From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8D37EA2EFC for ; Tue, 17 Sep 2019 09:59:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 230E31C014; Tue, 17 Sep 2019 09:58:22 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id 516E81BFBD for ; Tue, 17 Sep 2019 09:58:06 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id f5so2442223ljg.8 for ; Tue, 17 Sep 2019 00:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OOTwzgVVZbZgLcv17CgsjgDYfH2VrYmyoKk+LqKCjhc=; b=wgIpVU246yOn3bjEcfEl80uY4vLMPTJtTJ1rTxoSLAnDJwt9vI7AT/eypUPQd+Rbae +yzKmXKihTMQG7dzKV7mStgUihYcm2ECIHtgKFCmTSQ9IM/CA0UGnMLIPU5CJZTqUomM BcFLK9N3sj9meum/gi0EZotdkXk72soUeA2c9HtscXXGuD/5/cxjldr85PWla4/9XgEu aHpo++RO3qAAc3FADwHfPIm6LRqa/MRTyBJqrVPZcHEtW5Narz7XeDhakMqpUpEjmTB1 MmFwTqLfIqAKMXEwQQ/70dwIxsVxxveiawIgZhMKh4lwHK/3gdrsGdE1ofe/Vxua/sj1 QgSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OOTwzgVVZbZgLcv17CgsjgDYfH2VrYmyoKk+LqKCjhc=; b=LYwZZ6LpQE+AXHvlsMXedITEC2aieYgC8tgZI1jJV310yt7trYZ9mxzeoMU2SJZJAl UJ3aT8GhNqiVCoTL3K0Dq4CYQaeSPdsKZFNfyCXx3Hbprd60m2nx3Y2geCOlPLjTtuBr B1VbQpSaIzP2zB3PNK4K2C3coVAyrti+7kDO18CJdCqyuuDKH3ml/RVtjAB0b9/oCC1Z w9WhVFRtAyXyqrt8koE1LonBOI44TVPBRrTpmXLspieGiK3iA2nrHRLqDkCinM5D/9R5 5CJSkGrK8IJvC6SNShkhwDjOhhCFzT7/FjY+E1SnMToFsX9ZTYDXSQs4RSTRek++WSeQ oQrg== X-Gm-Message-State: APjAAAVWO7naq5cO7RgVma3xxvxae1ZdC+yeoz30DjFfrC4Lk3Xfhb7o 40mptphhIiTgsR+tvZ9HKnKNRCeaL0nktg== X-Google-Smtp-Source: APXvYqxidENImDx0J60Yp9OwLhfrXAxV8P4KLyGgMxf6oP/L/pEsEiVe/KMjfWF4yCW3VAiHX7L5Sw== X-Received: by 2002:a2e:4243:: with SMTP id p64mr1117884lja.213.1568707085547; Tue, 17 Sep 2019 00:58:05 -0700 (PDT) Received: from localhost.localdomain (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.googlemail.com with ESMTPSA id g1sm270659ljl.31.2019.09.17.00.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2019 00:58:05 -0700 (PDT) From: Andrzej Ostruszka To: dev@dpdk.org, Rasesh Mody , Shahed Shaikh Cc: mattias.ronnblom@ericsson.com, stephen@networkplumber.org, Andrzej Ostruszka Date: Tue, 17 Sep 2019 09:57:54 +0200 Message-Id: <20190917075754.8310-11-amo@semihalf.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190917075754.8310-1-amo@semihalf.com> References: <20190917075754.8310-1-amo@semihalf.com> Subject: [dpdk-dev] [PATCH v2 10/10] net/qede: fix maybe-uninitialized warnings for LTO build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" During LTO build compiler reports some 'false positive' warnings about variables being possibly used uninitialized. This patch silences these warnings. Signed-off-by: Andrzej Ostruszka --- drivers/net/qede/base/ecore_mcp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c index 6c6560688..666c0fe12 100644 --- a/drivers/net/qede/base/ecore_mcp.c +++ b/drivers/net/qede/base/ecore_mcp.c @@ -2278,7 +2278,7 @@ enum _ecore_status_t ecore_mcp_trans_speed_mask(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 *p_speed_mask) { - u32 transceiver_type, transceiver_state; + u32 transceiver_type = ETH_TRANSCEIVER_TYPE_NONE, transceiver_state; ecore_mcp_get_transceiver_data(p_hwfn, p_ptt, &transceiver_state, &transceiver_type); @@ -3163,7 +3163,8 @@ enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev, enum _ecore_status_t ecore_mcp_nvm_write(struct ecore_dev *p_dev, u32 cmd, u32 addr, u8 *p_buf, u32 len) { - u32 buf_idx, buf_size, nvm_cmd, nvm_offset, resp, param; + u32 buf_idx, buf_size, nvm_cmd, nvm_offset; + u32 resp = FW_MSG_CODE_ERROR, param; struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev); enum _ecore_status_t rc = ECORE_INVAL; struct ecore_ptt *p_ptt; @@ -3370,7 +3371,7 @@ enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn, u16 gpio, u32 *gpio_val) { enum _ecore_status_t rc = ECORE_SUCCESS; - u32 drv_mb_param = 0, rsp; + u32 drv_mb_param = 0, rsp = 0; drv_mb_param = (gpio << DRV_MB_PARAM_GPIO_NUMBER_OFFSET); @@ -3391,7 +3392,7 @@ enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn, u16 gpio, u16 gpio_val) { enum _ecore_status_t rc = ECORE_SUCCESS; - u32 drv_mb_param = 0, param, rsp; + u32 drv_mb_param = 0, param, rsp = 0; drv_mb_param = (gpio << DRV_MB_PARAM_GPIO_NUMBER_OFFSET) | (gpio_val << DRV_MB_PARAM_GPIO_VALUE_OFFSET); @@ -3481,7 +3482,7 @@ enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn, enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images( struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 *num_images) { - u32 drv_mb_param = 0, rsp; + u32 drv_mb_param = 0, rsp = 0; enum _ecore_status_t rc = ECORE_SUCCESS; drv_mb_param = (DRV_MB_PARAM_BIST_NVM_TEST_NUM_IMAGES << @@ -3865,7 +3866,7 @@ enum _ecore_status_t __ecore_mcp_resc_lock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, struct ecore_resc_lock_params *p_params) { - u32 param = 0, mcp_resp, mcp_param; + u32 param = 0, mcp_resp = 0, mcp_param = 0; u8 opcode; enum _ecore_status_t rc; -- 2.17.1