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 1BB365688 for ; Wed, 27 Feb 2019 17:08:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2019 08:08:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,420,1544515200"; d="scan'208";a="142105040" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by orsmga001.jf.intel.com with ESMTP; 27 Feb 2019 08:08:05 -0800 From: Ferruh Yigit To: dev@dpdk.org, Andrew Rybchenko Cc: Stephen Hemminger Date: Wed, 27 Feb 2019 16:08:03 +0000 Message-Id: <20190227160803.16200-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190226213424.10567-6-stephen@networkplumber.org> References: <20190226213424.10567-6-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/sfc: do not use PMD logtype 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, 27 Feb 2019 16:08:13 -0000 From: Stephen Hemminger The sfc driver was still using RTE_LOGTYPE_PMD which was superseded by local logging. Signed-off-by: Stephen Hemminger --- v2: * Replaced all RTE_LOGTYPE_PMD instances in sfc_register_logtype() * ternary replaced with if and multiple return because of the compiler error: error: operand of ?: changes signedness from ‘int’ to ‘uint32_t’ {aka ‘unsigned int’} due to unsignedness of other operand [-Werror=sign-compare] --- drivers/net/sfc/sfc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c index 898603884..fd4156f78 100644 --- a/drivers/net/sfc/sfc.c +++ b/drivers/net/sfc/sfc.c @@ -1115,12 +1115,12 @@ sfc_register_logtype(const struct rte_pci_addr *pci_addr, ++lt_prefix_str_size; /* Reserve space for prefix separator */ lt_str_size_max = lt_prefix_str_size + PCI_PRI_STR_SIZE + 1; } else { - return RTE_LOGTYPE_PMD; + return sfc_logtype_driver; } lt_str = rte_zmalloc("logtype_str", lt_str_size_max, 0); if (lt_str == NULL) - return RTE_LOGTYPE_PMD; + return sfc_logtype_driver; strncpy(lt_str, lt_prefix_str, lt_prefix_str_size); lt_str[lt_prefix_str_size - 1] = '.'; @@ -1131,5 +1131,8 @@ sfc_register_logtype(const struct rte_pci_addr *pci_addr, ret = rte_log_register_type_and_pick_level(lt_str, ll_default); rte_free(lt_str); - return (ret < 0) ? RTE_LOGTYPE_PMD : ret; + if (ret < 0) + return sfc_logtype_driver; + + return ret; } -- 2.20.1