From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id EE7BA3798 for ; Sun, 30 Sep 2018 04:12:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2018 19:12:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,322,1534834800"; d="scan'208";a="261564685" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 29 Sep 2018 19:12:04 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 29 Sep 2018 19:12:04 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 29 Sep 2018 19:12:04 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.245]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.220]) with mapi id 14.03.0319.002; Sun, 30 Sep 2018 10:12:02 +0800 From: "Zhang, Qi Z" To: Li Han CC: "dev@dpdk.org" Thread-Topic: [PATCH] [dpdk-dev] drivers/net/i40e/:remove i40e_nvmupd_command redundant code Thread-Index: AQHUVjdnaqJ+eZELs0GO8zOrOa5RG6UIGSdw Date: Sun, 30 Sep 2018 02:12:01 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532A833E@SHSMSX103.ccr.corp.intel.com> References: <1538033190-2884-1-git-send-email-han.li1@zte.com.cn> In-Reply-To: <1538033190-2884-1-git-send-email-han.li1@zte.com.cn> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWJkM2M0MzMtMjM2OC00NDlhLTgxMGQtZDgyMzkzOWRjNWY3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicHpUQTVtRFFJM1V4QkdiaUFXREFmNFcxMlI4TER6SjZUYUdWMkM4aXgrRERBRTNsQnJScWhRYXF3ellNakxsbSJ9 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-dev] [PATCH] drivers/net/i40e/:remove i40e_nvmupd_command redundant code 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: , X-List-Received-Date: Sun, 30 Sep 2018 02:12:06 -0000 Hi Han: > -----Original Message----- > From: Li Han [mailto:han.li1@zte.com.cn] > Sent: Thursday, September 27, 2018 3:27 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Li Han > Subject: [PATCH] [dpdk-dev] drivers/net/i40e/:remove > i40e_nvmupd_command redundant code >=20 > in function i40e_nvmupd_validate_command, when "cmd->data_size < 1" > it'll return I40E_NVMUPD_INVALID,and in function "i40e_nvmupd_command" > when "upd_cmd =3D=3D I40E_NVMUPD_STATUS",it check "!cmd->data_size" again= , > but it's no need. Thanks for contribute this. I have no objection for this change. But you know , base code is kind of special code in driver, it is shared by= different platform, Intel DPDk team will update base code timely based on Intel's base code tea= m's release. So we are not prefer to make much difference from the original version whic= h make things complex for code update. So usually we will only accept necessary patch (like critical fix, missing = device configure... which may impact our customer) Since this is the patch for code clean, I think it's better we just feedbac= k to our base code team , and hope this could be captured in next update. Is that ok for you? Thanks for your understanding Regards Qi >=20 > Signed-off-by: Li Han > --- > drivers/net/i40e/base/i40e_nvm.c | 5 ----- > 1 file changed, 5 deletions(-) >=20 > diff --git a/drivers/net/i40e/base/i40e_nvm.c > b/drivers/net/i40e/base/i40e_nvm.c > index c77dac0..5de22e4 100644 > --- a/drivers/net/i40e/base/i40e_nvm.c > +++ b/drivers/net/i40e/base/i40e_nvm.c > @@ -869,11 +869,6 @@ enum i40e_status_code > i40e_nvmupd_command(struct i40e_hw *hw, > * going into the state machine > */ > if (upd_cmd =3D=3D I40E_NVMUPD_STATUS) { > - if (!cmd->data_size) { > - *perrno =3D -EFAULT; > - return I40E_ERR_BUF_TOO_SHORT; > - } > - > bytes[0] =3D hw->nvmupd_state; >=20 > if (cmd->data_size >=3D 4) { > -- > 1.8.3.1