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 B599DA0487 for ; Mon, 1 Jul 2019 12:31:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AD13E235; Mon, 1 Jul 2019 12:31:37 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 9B455235; Mon, 1 Jul 2019 12:31:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2019 03:31:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,439,1557212400"; d="scan'208";a="190205634" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 01 Jul 2019 03:31:34 -0700 Received: from fmsmsx162.amr.corp.intel.com (10.18.125.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 1 Jul 2019 03:31:34 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx162.amr.corp.intel.com (10.18.125.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 1 Jul 2019 03:31:34 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.55]) with mapi id 14.03.0439.000; Mon, 1 Jul 2019 18:31:32 +0800 From: "Xu, Rosen" To: "Zhang, Tianfei" , "dev@dpdk.org" , "Yigit, Ferruh" CC: "stable@dpdk.org" Thread-Topic: [PATCH v4 2/5] raw/ifpga_rawdev: fix logically dead code Thread-Index: AQHVJ8wJvWPm/2EyH0K920oniF6wxqa1oKuQ Date: Mon, 1 Jul 2019 10:31:31 +0000 Message-ID: <0E78D399C70DA940A335608C6ED296D73A85CA2D@SHSMSX104.ccr.corp.intel.com> References: <20190621084017.6763-1-tianfei.zhang@intel.com> <20190621084017.6763-2-tianfei.zhang@intel.com> In-Reply-To: <20190621084017.6763-2-tianfei.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjk0ZTAzNGQtMjQ3OS00YTI5LWI3ZjQtZmVmMzJhODg4ZjUwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOFhQaE9cL2E0NmhzVmpuU2lHakFFdE5TSFdxbFRJU3paVnlLZlwvWlZsR1RFcmRyZ29UUkx1MEZUVzNHQWczdXJoIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH v4 2/5] raw/ifpga_rawdev: fix logically dead code X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Zhang, Tianfei > Sent: Friday, June 21, 2019 16:40 > To: dev@dpdk.org; Yigit, Ferruh > Cc: Xu, Rosen ; stable@dpdk.org; Zhang, Tianfei > > Subject: [PATCH v4 2/5] raw/ifpga_rawdev: fix logically dead code >=20 > add temporary variable in max10_reg_write(). >=20 > Coverity issue: 337927 > Fixes: 96ebfcf ("raw/ifpga/base: add SPI and MAX10 device driver") > Cc: stable@dpdk.org >=20 > Signed-off-by: Tianfei zhang > Acked-by: Rosen Xu > --- > drivers/raw/ifpga_rawdev/base/opae_intel_max10.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/raw/ifpga_rawdev/base/opae_intel_max10.c > b/drivers/raw/ifpga_rawdev/base/opae_intel_max10.c > index f354ee4b6..3ff6575d7 100644 > --- a/drivers/raw/ifpga_rawdev/base/opae_intel_max10.c > +++ b/drivers/raw/ifpga_rawdev/base/opae_intel_max10.c > @@ -17,11 +17,13 @@ int max10_reg_read(unsigned int reg, unsigned int > *val) >=20 > int max10_reg_write(unsigned int reg, unsigned int val) { > + unsigned int tmp =3D val; > + > if (!g_max10) > return -ENODEV; >=20 > return spi_transaction_write(g_max10->spi_tran_dev, > - reg, 4, (unsigned char *)&val); > + reg, 4, (unsigned char *)&tmp); > } >=20 > struct intel_max10_device * > @@ -57,7 +59,7 @@ intel_max10_device_probe(struct altera_spi_device > *spi, >=20 > /* set PKVL Polling manually in BBS */ > ret =3D max10_reg_write(PKVL_POLLING_CTRL, 0x3); > - if (ret) { > + if (ret !=3D 0) { > dev_err(dev, "%s set PKVL polling fail\n", __func__); > goto spi_tran_fail; > } > -- > 2.17.1 Acked-by: Rosen Xu