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 007E9436D8; Wed, 13 Dec 2023 02:47:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0CD742EAD; Wed, 13 Dec 2023 02:47:03 +0100 (CET) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by mails.dpdk.org (Postfix) with ESMTP id 54D0642E7F for ; Wed, 13 Dec 2023 02:46:58 +0100 (CET) Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-6d9e0f0cba9so4006938a34.1 for ; Tue, 12 Dec 2023 17:46:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1702432017; x=1703036817; 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=hxQxLoDS3vg/T2ba6PLlwpaRQ8BgmKF9iW2xv/u3hxM=; b=c6YaUqXH0VLMaXa9VCQayJ+OGAsVKIJtZJle0XCvqLs2FvFFVSavNkpFmr1OEc1n0l moviqgFDxwN/bFxok72ClLUqCjhBobBI18ywC2zk5T0LTU7hmdoDDR+h8QSCY27oswIt BSTB0D8XH0ZCgeU/uSUJyD9SR9NyAm1JeCje7rkZJnqSGVe5YTfOy88MEMk++MYUZ1vH pYpm29R3M2ZnLqzA8rRifcV7pFS49XVkH5xJG83y7/EHhN6g+i51ALRACzkyJ3XU/c6u N1zHpgO5XCoh/bOpLH+wKNs0aZTu108ZZG9Vz2HG/7bKLHXAwcwHuWKplfS6rXbVnooB khKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702432017; x=1703036817; 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=hxQxLoDS3vg/T2ba6PLlwpaRQ8BgmKF9iW2xv/u3hxM=; b=TAGlYBs27aCiyboNiNXO4V6Ubj9JCYAxSPL3/OAKVN7xG3EATcMD3+kJx88JFShxY4 3TnW6UAl0YZvWTnqi5pwTKLqc8iKSeOB0XM0k6BcAJcdy9UvjIpr78Lsx9swlB9Ipg0j 70odhpq8vSiVHJ61Ml4RWNCyOJChoMummaZxkI5ikMLHXK8BTu/A1TYP2lUvmjy2ASfI nNbQXrjL3kXKNCqo/nOgw1MGluTO9GlD2WlDRBhZ5lf5WdRhUu2C81J75FY+Kjbnf6UJ ossv1gc0mTKi92kkZ2s1ohSHLUqk98V09BVKFI2sYZVQ0mqSoq+w5GRM0l304Ezfey4z R2mg== X-Gm-Message-State: AOJu0YxtwyD3SZTElGaxLfjR2OOmOh5YvCTWhVFBVtjn/+zFLqKcNqiq jRnHVf1Sie9GE6UCo2prbgyBUIirR5E2rqhwiQ31mA== X-Google-Smtp-Source: AGHT+IHKNHdJHCp7W7Nt2Oq6mLN+uU6oRQNnb4AP8//y/S97aw8Vsph6P1cPlKm9i/f110hSHmQ/ew== X-Received: by 2002:a05:6808:1416:b0:3b9:e87b:d96e with SMTP id w22-20020a056808141600b003b9e87bd96emr8208880oiv.90.1702432017763; Tue, 12 Dec 2023 17:46:57 -0800 (PST) Received: from hermes.lan (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id f7-20020aa79d87000000b006ce5b4ade28sm8988375pfq.174.2023.12.12.17.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 17:46:57 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko Subject: [PATCH 20/26] common/sfc_efx: remove use of PMD logtype Date: Tue, 12 Dec 2023 17:42:36 -0800 Message-ID: <20231213014408.612051-21-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231213014408.612051-1-stephen@networkplumber.org> References: <20231213014408.612051-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.42.0