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 5553D45D0B; Fri, 15 Nov 2024 07:08:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A185642F71; Fri, 15 Nov 2024 07:07:54 +0100 (CET) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 63B6C42F59 for ; Fri, 15 Nov 2024 07:07:51 +0100 (CET) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-7f3da2c2cb5so1013041a12.2 for ; Thu, 14 Nov 2024 22:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731650870; x=1732255670; 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=MhKczu3psgFhp00mj+aRRxI4AfpIT53of3BrkNx6V1k=; b=yhcSCQL5FxG2KYASxdCMM3244/suFvu9Q69Iqe+tlmrhLLw47bp6GIIMWD8OCFqFth 0SX5x24UicEMbgGuf104m2jHRK/MaK/zzN9G324YYwlKZ2QcdxYBHkqdTgH75JFGPJRb OqAztk+2s09jMUZrF5Zrk1pVa0iYmVGCQzcl/GMWJeaYBhK6cPJ+HSKV3JUBu4ISAlIe mL3YyC3bmWcMgwc8fhTRInfpBO9HMiSweJGDUz4EjC1vSDjDAx5bETubjHqAmsYFLkDd X7awJSYijgGZ76YSZxPbJz3oR1OGaBOT3UgpdEGBmW9qvbp7iwHOzbYk4/EJuIwwkKu2 3/4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731650870; x=1732255670; 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=MhKczu3psgFhp00mj+aRRxI4AfpIT53of3BrkNx6V1k=; b=LEhuG886D1VY+oMFpAvdzwHNn0X117rGaH2DZJwGJQY75V4f9rpU1J9ee68LV9GXg+ LCnK0DeVDlx+vRNrKlewJDo7G1kYSJLavMmn5thP8U9sFx6fzF4+qmUd2r7jmW92UNVr l8Pwgpk55xCI1ohs3crS45MH31yOk6wwcPT68zaN/f8kWzElrtzONlgCAQLYdjIAKiy7 Q57SZsvla1DF114BzrD2Ix3ldF2+zxBJ7XdVOv3HqnyfHo5GAKxxLcpQnzgOvC8PqqNU f64EVeTvsAOkGO7K65MCQQquEvzBXgsyraemRYs8tEeUrfze5ApAjiyFiNpm539Tgf92 DhCg== X-Gm-Message-State: AOJu0YzwvbVODntTT8dzrJ7A6wmlCWX3L1fCdOVrfa5WVVdfKVBkWt9c qo5B4Ai9aziSN16VNl9xT9U6Esgp43d3OEI4khpeb9Xco6ulXb30CyPuU6PURvOj4iSXYZfFG0p I X-Google-Smtp-Source: AGHT+IGjk5rWrmPWWiEtmXTlQO6QkXWST1vFbGjFrGGJM/+LimLoIVTI7WdLjz+U3bjDFWtOBCNMMQ== X-Received: by 2002:a05:6a20:729d:b0:1d6:e635:5c5e with SMTP id adf61e73a8af0-1dc90aec006mr2080718637.9.1731650870422; Thu, 14 Nov 2024 22:07:50 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea06f4856esm2123781a91.23.2024.11.14.22.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 22:07:50 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Praveen Shetty Subject: [PATCH 02/16] net/cpfl: avoid calling log (printf) with null Date: Thu, 14 Nov 2024 22:05:39 -0800 Message-ID: <20241115060738.313190-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115060738.313190-1-stephen@networkplumber.org> References: <20241115060738.313190-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 The log message would always refer to str variable which is NULL here. Looks like author intended to print original parameter. Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ Signed-off-by: Stephen Hemminger --- drivers/net/cpfl/cpfl_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c index 6f6707a0bd..1817221652 100644 --- a/drivers/net/cpfl/cpfl_ethdev.c +++ b/drivers/net/cpfl/cpfl_ethdev.c @@ -1580,7 +1580,7 @@ parse_repr(const char *key __rte_unused, const char *value, void *args) RTE_DIM(eth_da->representor_ports)); done: if (str == NULL) { - PMD_DRV_LOG(ERR, "wrong representor format: %s", str); + PMD_DRV_LOG(ERR, "wrong representor format: %s", value); return -1; } -- 2.45.2