From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E5D052BB9 for ; Wed, 4 Jan 2017 14:59:54 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 04 Jan 2017 05:59:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,459,1477983600"; d="scan'208";a="209557032" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by fmsmga004.fm.intel.com with ESMTP; 04 Jan 2017 05:59:52 -0800 To: Qiming Yang , dev@dpdk.org References: <1482841816-54143-1-git-send-email-qiming.yang@intel.com> <1483531428-14481-1-git-send-email-qiming.yang@intel.com> <1483531428-14481-3-git-send-email-qiming.yang@intel.com> Cc: helin.zhang@intel.com, remy.horton@intel.com From: Ferruh Yigit Message-ID: Date: Wed, 4 Jan 2017 13:59:52 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1483531428-14481-3-git-send-email-qiming.yang@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v4 2/5] net/e1000: add firmware version get 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: Wed, 04 Jan 2017 13:59:55 -0000 On 1/4/2017 12:03 PM, Qiming Yang wrote: > This patch adds a new function eth_igb_fw_version_get. > > Signed-off-by: Qiming Yang > --- <...> > > static void > +eth_igb_fw_version_get(struct rte_eth_dev *dev, u32 *fw_major, u32 *fw_minor, > + u32 *fw_patch, u32 *etrack_id) > +{ <...> > + default: > + /* if option rom is valid, display its version too*/ > + if (fw.or_valid) { > + *fw_major = fw.eep_major; > + *fw_minor = fw.eep_minor; > + *etrack_id = fw.etrack_id; > + *fw_patch = fw.or_patch; > + /* no option rom */ > + } else { > + if (fw.etrack_id != 0X0000) { > + *fw_major = fw.eep_major; > + *fw_minor = fw.eep_minor; > + *etrack_id = fw.etrack_id; indentation is wrong here. Also it looks like major, minor assignment is common and can be moved from if statement. > + } else { > + *fw_major = fw.eep_major; > + *fw_minor = fw.eep_minor; > + } > + } > + break; > + } > +} <...>