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 50AF543760; Fri, 22 Dec 2023 18:18:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CEC6406B8; Fri, 22 Dec 2023 18:18:36 +0100 (CET) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 6400A4069F for ; Fri, 22 Dec 2023 18:18:34 +0100 (CET) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-6d3cb1ccccbso1054104b3a.0 for ; Fri, 22 Dec 2023 09:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1703265513; x=1703870313; 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=hqa2vdVg3JBzUdFWP3ruGiqD3zU/oxwZ3ag93WPYWpyMLRn0BIYd17NnhMt06BBsdW QM8A/fqfKPyu2X34hvW50sVKjbdK8gWkiI5I9ma/Lx2f3/VnWUKxtBSEb8FL9ZPmsg51 x9lKPcTe+NpGTSCZtPB20vWYaGXw+EelW6AhXR8xgNTREhdYOxxyqBY9hbJsy17dw+RD troMzLS6DcFructtqKsNYLc6TaqOKYzcLEvCourltOzsCaPWAP5R+yXcMq34822chSYS xerxt+yxyhIPpEaBNpB2jNmGEA5KI/6kTmPizgdEtVjx8LowYjqR25F9tvKvPU54ITVD xYpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703265513; x=1703870313; 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=PqkVe8gXqFphFnK4r3xOGciKeDhwnijnIkWToApgheqK4Wmjdxy+H0Xyrhfuz2XPa/ nB0umJCleYTjss7WRz4+KQsiHCbkAgKBnGdXDGNBbAHyNrRExGYOpL9WlWP0bXDteNzg usScUvbH9qevUX5cUqTLj7/WcKWeThYNDwVEHlmEcArR3TW2WnLe8UbuZXcJ8BNtDAu5 qkWcTxP7UY+KJNtEz4aJjv2L1ziHvl11XEYzM1U1BF3WChKzAhNl7EX1FEb58TX8gonw ORgucBOv0w7JNeLB4gpRJ+esiZKQPVn7tC5Cxpygw8QrAvvqBx9d2WT0MPjzUOEnlZaA j3+g== X-Gm-Message-State: AOJu0Yxxp0GhxHgQJREEbO6c0K0XKjm/vdimkzM6AoykFQsiw57LeoLr QofuHVVuBFYNvwtc9co+pNm1c397idvWr1rHrbQnEBByp3zydA== X-Google-Smtp-Source: AGHT+IExp1NwuEZclUsBxAB4aRvxo9qXfJuyeRgj9T+xfiNtLGkrqRCm7NgQ/kuf+hBU/FghdeUslA== X-Received: by 2002:a05:6a00:1d28:b0:6d8:a4cb:9f37 with SMTP id a40-20020a056a001d2800b006d8a4cb9f37mr1482171pfx.26.1703265513651; Fri, 22 Dec 2023 09:18:33 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id h19-20020a62b413000000b006d7d454e58asm372024pfn.117.2023.12.22.09.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 09:18:33 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko Subject: [PATCH v6 02/20] common/sfc_efx: remove use of PMD logtype Date: Fri, 22 Dec 2023 09:11:35 -0800 Message-ID: <20231222171820.8778-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222171820.8778-1-stephen@networkplumber.org> References: <20231213014408.612051-1-stephen@networkplumber.org> <20231222171820.8778-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