From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2F70C43751; Thu, 21 Dec 2023 17:49:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23BBA42D95; Thu, 21 Dec 2023 17:48:58 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 77F38406A2 for ; Thu, 21 Dec 2023 17:48:54 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5c699b44dddso478286a12.1 for ; Thu, 21 Dec 2023 08:48:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1703177333; x=1703782133; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YyBqO/sb6UeQ4NeBuhZ1nXTlTFjLIN4jayiZCG0GWMs=; b=XcTyZlmvK2WrksxSYGYNUeFVMUYtzzcEOqAKDxnZWeFO02FqyGpjgeuijFps1bsezX 5RC5mLauIBTUeEdJ8bq8kTLBUuaXwcCcLs/s9LQxCWhJaFa6D8Mnarn3TVrdQQ45Rd8J T/w8dq3tUC3uCSH7jtSKzgH0CBVR0F9Hd6vfgI3va2y++oscTV/lux9sGtbDd2VU/nfQ 8GZYiKGESMOnMi6bvrgEJ9U+w2cKmsoKfOo1l9o7Ns++kNCsBXvA9/X0RDFsCK1ts93r C/F/6N+0gYlgdqsQ10NErYKsfeWz9bY7+BdyVPqioVEogaWV5DYVoWvx2RNm/QivGCV8 jGcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703177333; x=1703782133; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YyBqO/sb6UeQ4NeBuhZ1nXTlTFjLIN4jayiZCG0GWMs=; b=jfX97gatUENhOY96vjiRiJYXq0+erb1iIlYmbR5Bwk6+7N45MdW31MSoZj1Q3QWHzC 68J/dEm6moHJVk+ZcHRoDNe+CXJtSbcOxNdzQcwWCqdNIU9SqFzppxSj0vZPFHgqWayW vu9uGaYfc1XUbpxGLiz7qxTVfwUxnQNK5RR5nVnUS6Dn7vZgHEk7BEUR+g83fqRdM+5r hCLBsYspaaAkn1SMU0P1JZss4HaDNaLN0EQRbamVwIt5O74RrVOSpo/nFxOeZUEZ4rB4 LN+hpnbx6GUcTyLZmclRYfF6jv5y8tCx+V6n1EYdmBu9ATaeyET+b+EpbWxshNUAL/qw WoAg== X-Gm-Message-State: AOJu0YyzgFLkEF0/GWavpk+Db19c+Yu+POx6bRDz9xHif4n+iRMgLpAK 46U5ucP26S7IM2k/I+7JwfXz6tK1oFguDOpdN/ob9Q== X-Google-Smtp-Source: AGHT+IGZHhq+b5t6ofvsAAgU50R3UwFLpF4PJnxBFwJ8X9zjw7GqOHtvJPEIP+nTDxpQHGRQeFvcpg== X-Received: by 2002:a05:6a20:7352:b0:18f:97c:4f4b with SMTP id v18-20020a056a20735200b0018f097c4f4bmr1185987pzc.87.1703177333631; Thu, 21 Dec 2023 08:48:53 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id g20-20020a63e614000000b0058901200bbbsm1842456pgh.40.2023.12.21.08.48.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 08:48:53 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko Subject: [PATCH v5 02/18] common/sfc_efx: remove use of PMD logtype Date: Thu, 21 Dec 2023 08:46:19 -0800 Message-ID: <20231221164841.125006-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221164841.125006-1-stephen@networkplumber.org> References: <20231213014408.612051-1-stephen@networkplumber.org> <20231221164841.125006-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This code was implemented in a slightly different manner than all the other logging code (for no good reason). Make it the same and handle errors in same way as other drivers. Signed-off-by: Stephen Hemminger --- drivers/common/sfc_efx/sfc_efx.c | 11 ++--------- drivers/common/sfc_efx/sfc_efx_log.h | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/common/sfc_efx/sfc_efx.c b/drivers/common/sfc_efx/sfc_efx.c index 2dc5545760b8..5eeffb065b0d 100644 --- a/drivers/common/sfc_efx/sfc_efx.c +++ b/drivers/common/sfc_efx/sfc_efx.c @@ -15,7 +15,7 @@ #include "sfc_efx_log.h" #include "sfc_efx.h" -uint32_t sfc_efx_logtype; +int sfc_efx_logtype; static int sfc_efx_kvarg_dev_class_handler(__rte_unused const char *key, @@ -117,11 +117,4 @@ sfc_efx_family(struct rte_pci_device *pci_dev, return rc; } -RTE_INIT(sfc_efx_register_logtype) -{ - int ret; - - ret = rte_log_register_type_and_pick_level("pmd.common.sfc_efx", - RTE_LOG_NOTICE); - sfc_efx_logtype = (ret < 0) ? RTE_LOGTYPE_PMD : ret; -} +RTE_LOG_REGISTER_DEFAULT(sfc_efx_logtype, NOTICE); diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h index 694455c1b14e..1519ebdc175f 100644 --- a/drivers/common/sfc_efx/sfc_efx_log.h +++ b/drivers/common/sfc_efx/sfc_efx_log.h @@ -11,7 +11,7 @@ #define _SFC_EFX_LOG_H_ /** Generic driver log type */ -extern uint32_t sfc_efx_logtype; +extern int sfc_efx_logtype; /** Log message, add a prefix and a line break */ #define SFC_EFX_LOG(level, ...) \ -- 2.43.0