All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: llvm@lists.linux.dev, Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Vlad Buslov <vladbu@nvidia.com>, Roi Dayan <roid@nvidia.com>,
	Maor Dickman <maord@nvidia.com>, Gal Pressman <gal@nvidia.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 4/9] mlx5: avoid truncating error message
Date: Tue, 26 Mar 2024 23:38:03 +0100	[thread overview]
Message-ID: <20240326223825.4084412-5-arnd@kernel.org> (raw)
In-Reply-To: <20240326223825.4084412-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

clang warns that one error message is too long for its destination buffer:

drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c:1876:4: error: 'snprintf' will always be truncated; specified size is 80, but format string expands to at least 94 [-Werror,-Wformat-truncation-non-kprintf]

Reword it to be a bit shorter so it always fits.

Fixes: 70f0302b3f20 ("net/mlx5: Bridge, implement mdb offload")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
index 1b9bc32efd6f..c5ea1d1d2b03 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
@@ -1874,7 +1874,7 @@ int mlx5_esw_bridge_port_mdb_add(struct net_device *dev, u16 vport_num, u16 esw_
 				 "Failed to lookup bridge port vlan metadata to create MDB (MAC=%pM,vid=%u,vport=%u)\n",
 				 addr, vid, vport_num);
 			NL_SET_ERR_MSG_FMT_MOD(extack,
-					       "Failed to lookup bridge port vlan metadata to create MDB (MAC=%pM,vid=%u,vport=%u)\n",
+					       "Failed to lookup vlan metadata for MDB (MAC=%pM,vid=%u,vport=%u)\n",
 					       addr, vid, vport_num);
 			return -EINVAL;
 		}
-- 
2.39.2


  parent reply	other threads:[~2024-03-26 22:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 22:37 [PATCH 0/9] enabled -Wformat-truncation for clang Arnd Bergmann
2024-03-26 22:37 ` Arnd Bergmann
2024-03-26 22:38 ` [PATCH 1/9] fbdev: shmobile: fix snprintf truncation Arnd Bergmann
2024-03-26 22:42   ` Laurent Pinchart
2024-03-27  8:13   ` Helge Deller
2024-03-26 22:38 ` [PATCH 2/9] enetc: avoid truncating error message Arnd Bergmann
2024-03-26 22:38 ` [PATCH 3/9] qed: avoid truncating work queue length Arnd Bergmann
2024-03-27 14:04   ` [EXTERNAL] " Subbaraya Sundeep Bhatta
2024-03-27 15:34     ` Arnd Bergmann
2024-03-27 17:08       ` Subbaraya Sundeep Bhatta
2024-03-26 22:38 ` Arnd Bergmann [this message]
2024-03-27 14:08   ` [EXTERNAL] [PATCH 4/9] mlx5: avoid truncating error message Subbaraya Sundeep Bhatta
2024-03-26 22:38 ` [PATCH 5/9] surface3_power: avoid format string truncation warning Arnd Bergmann
2024-03-26 23:05   ` Nathan Chancellor
2024-03-27 10:58     ` Andy Shevchenko
2024-04-01  6:24   ` Uwe Kleine-König
2024-03-26 22:38 ` [PATCH 6/9] Input: IMS: fix printf string overflow Arnd Bergmann
2024-03-28 20:29   ` Dmitry Torokhov
2024-03-26 22:38 ` [PATCH 7/9] scsi: mylex: fix sysfs buffer lengths Arnd Bergmann
2024-03-27  7:40   ` Hannes Reinecke
2024-03-26 22:38 ` [PATCH 8/9] ALSA: aoa: avoid false-positive format truncation warning Arnd Bergmann
2024-03-26 22:38   ` Arnd Bergmann
2024-03-27  9:54   ` Takashi Iwai
2024-03-27  9:54     ` Takashi Iwai
2024-03-26 22:38 ` [PATCH 9/9] kbuild: enable -Wformat-truncation on clang Arnd Bergmann
2024-03-27  0:47 ` [PATCH 0/9] enabled -Wformat-truncation for clang Jakub Kicinski
2024-03-27  0:47   ` Jakub Kicinski
2024-03-29 19:30 ` patchwork-bot+netdevbpf
2024-03-29 19:30   ` patchwork-bot+netdevbpf
2024-04-02  1:48 ` (subset) " Martin K. Petersen
2024-04-02  1:48   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240326223825.4084412-5-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=justinstitt@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=maord@nvidia.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=vladbu@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.