Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp94101lqf; Tue, 26 Mar 2024 15:49:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpTzI+C5QLvFBarjJ3S5Jeo1k3jxYgk/J1s9+X/HxeJOPoUzJMxXvM80MVqNFw+dHZgeZhtXGH6dTlYDyQvokSE9jg9gJw1TTBTpXJAw== X-Google-Smtp-Source: AGHT+IESccmtSH8zbaDz16JKWHxgT0xOhRe6qdVXA7YAdAGNIIlGNaqiLatfEEr/bAuPT64kUxCb X-Received: by 2002:a05:6a20:a108:b0:1a3:4df6:b3a1 with SMTP id q8-20020a056a20a10800b001a34df6b3a1mr3399774pzk.30.1711493371785; Tue, 26 Mar 2024 15:49:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711493371; cv=pass; d=google.com; s=arc-20160816; b=LL9DK0euecGxPzO9uX3sLbEd5y1cEWfF202rLBUijA79gI8eqNT6JUH0fhrXlrEP/W usmJCCzOvGP4a97aG/IY/NTDHedmexs3L3T/uFFYjTxJDavjrdJHL2y76wbi+AUHzQWR yawBVfA2k3aSPBWR4vvq/90gW6Xbtu3S2PObZ8QrNT2nQ98euo48ErDOBkQ0qZ+yIFFu 4uCQf/RA1KNaln1aU058kqAtHn6CPoBzBkqPdWc7tW0njBWf24B4JA/ZqcYQj1Au3egY 56zhiDO2HTGd50SGbXM0tuMeyupWQ3W9QsNVkp6m8Mhv/6euYr+Zo49XFoES6m7HOly1 aZmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Jbr0SVSCZmwrL2aXpW6PF8R5Tr9nsP8XaE7BaYzV3wk=; fh=wgnbRCZKyyv8N0Rn5V+hZ3x8Zibkjki58JQCGRgxyeg=; b=PcwagA2d8QL10mPrr3PhHNE5Nk6I7y6ICTcH6jwt5oB+hOJY2YSUtEc0KfuFieWIu1 Zi0wFkzOi/3PTloeLYnJR8vzbRWX7VDx20qTJh3FD1q704yj5+Ah3bykpB9feG60HTaI XbxCyX9aza/6JqT1yojJTmVgU8Wx2c2twUhSkYMFLOoZ4JQF9E6AusU2onsyoGcbTixV 9q/UzX8ZoCQuPBu+d/Yj+KhVmiqQphyv4lggCWyo9BEd+JdE4HleyJ6uYZkDZ/zlv6o8 dWp6ZCR4QNo53XP2ubhUHtxgn8xJNKhlmcqeip41dMwuG/BtwCQLF3cAZ1NqMmGcQruI AAOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nUkPCOXw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j5-20020aa78dc5000000b006ea871c00e5si7981740pfr.83.2024.03.26.15.49.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 15:49:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nUkPCOXw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 49AF6B2628B for ; Tue, 26 Mar 2024 22:40:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2F2013E6D1; Tue, 26 Mar 2024 22:39:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nUkPCOXw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D91F13DDD1; Tue, 26 Mar 2024 22:39:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711492762; cv=none; b=FHYj4h6/i7WOKhArQy1D46faoc1vXg3BxSAx5GvAM31JKBbJ1SACpnt0aS8Wwt1y+HzHPkW56tP+jd46u4jAuK92twUGC05p8UwCdZW2mRIn8CtLeJf8x0U+SV+d0tB7Gw/TSvgq9iFWza2KJ6vdsX+9k87o2SpP3X24Wi1GTZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711492762; c=relaxed/simple; bh=KeyNCZskP6/b1M7OoexAF78T4p7x0+NMkepYQTejfAs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R+DwFPLz8/N/YbHpK7GsSotFK8aBeH+dVlGB+obaKAnxo0BsCwM/gtcRrHgtaT55Sx9YI6BCjoQ9m8HAvbBg/aFDCwAg6nz/Nq4aqhkOrEgqdnDGSDLrzwt0Q1gDQEoucaT6rET96eVnCmOMsgLvVjiYxVyP+Mn2aLogv8FfmSk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nUkPCOXw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71FCCC433F1; Tue, 26 Mar 2024 22:39:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711492762; bh=KeyNCZskP6/b1M7OoexAF78T4p7x0+NMkepYQTejfAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nUkPCOXw+m5dqLk95Et2hTWpRql228gXeu8f+g16q/hj+saAwDtlMyNW4nQsKg0uX uETZmJRUz04kFjXnWd6W6R71BSc8mkPb2IheQs1CmSdeBBbbe/n4vD2rj0QdFMLbat 8nrxaQORCAEzyEdi/qJkvRTjb+nalTS/yJYn0BT+m23og1RLtxP67iJ/eq8Jmk3drz hpl+H88S0+HhCx/NRHckYmvJ5ja+NMBvGik3LgZ30BQlsrYIjOym+Ve1NWmGxISm6H kyZfezpARfHQ7tCCQuFrkZIT0abEeJqADaFJswMq3U8ES5bVtnnp4K4tH2fYoGBMI2 oUYIkuTMnNyMw== From: Arnd Bergmann To: llvm@lists.linux.dev, Claudiu Manoil , Vladimir Oltean Cc: Arnd Bergmann , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Simon Horman , Ferenc Fejes , Wei Fang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH 2/9] enetc: avoid truncating error message Date: Tue, 26 Mar 2024 23:38:01 +0100 Message-Id: <20240326223825.4084412-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240326223825.4084412-1-arnd@kernel.org> References: <20240326223825.4084412-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann As clang points out, the error message in enetc_setup_xdp_prog() still does not fit in the buffer and will be truncated: drivers/net/ethernet/freescale/enetc/enetc.c:2771:3: error: 'snprintf' will always be truncated; specified size is 80, but format string expands to at least 87 [-Werror,-Wformat-truncation] Replace it with an even shorter message that should fit. Fixes: f968c56417f0 ("net: enetc: shorten enetc_setup_xdp_prog() error message to fit NETLINK_MAX_FMTMSG_LEN") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index 9f07f4947b63..5c45f42232d3 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -2769,7 +2769,7 @@ static int enetc_setup_xdp_prog(struct net_device *ndev, struct bpf_prog *prog, if (priv->min_num_stack_tx_queues + num_xdp_tx_queues > priv->num_tx_rings) { NL_SET_ERR_MSG_FMT_MOD(extack, - "Reserving %d XDP TXQs does not leave a minimum of %d for stack (total %d)", + "Reserving %d XDP TXQs leaves under %d for stack (total %d)", num_xdp_tx_queues, priv->min_num_stack_tx_queues, priv->num_tx_rings); -- 2.39.2