From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F01626A1AC for ; Sun, 1 Mar 2026 16:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772381848; cv=none; b=Q/oQljacyfQG5D1RyQ9I7xY9egqpUTW0s24FaS44A9jFhB2GnTdw+zcRWeamegzs8G79r6LYryWJP09WjnjDvp+RRYpgUwgg9c7YB4nJSfnY5YBKF+8aJGwQiU6CFwPwUN8qDxR/dErLR4AsHKGhsOGLHv1gG93+TtZT8QKVQX8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772381848; c=relaxed/simple; bh=QfrtzPBTQgtN7q9STXng21AoBcTIYcmlUXaobTZcOIc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=L27rumCfx9+P/b8jaBjXcL6EsEQlSIW/We6gIUROR/mFWDTspVMDeFE1FfON8Tl7bJba8cmNCO7aqwyf0A6IIGeR8I7VrjOkiQaEJ3BLYnIPEKoie+O9B2MhuPRfj7CMmLNKG/9ScoEpmJyf5FG0jJ9aW7FebLx/FaZMb1ABiw4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LyZC87rE; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LyZC87rE" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-8274843810cso1783129b3a.3 for ; Sun, 01 Mar 2026 08:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772381845; x=1772986645; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Os/820D5KUwvVqZOLIPxhxLinek0g8TJ2GUPXHxbYBg=; b=LyZC87rEguhRUNISDEuez7TmCfn3ENSNUAXPibV6FvEPGdbTp+rThaqh1MkOmv1mVo CR+DSRkGOYGMIaknOCqX6J7M1efzYAJ7JvyXq8N2OfBcVm1unUJBieNxoIWHvM5SVgXY 9UHgONz6jjiVMGaHyjnb2KMpv5hmAR2vx1ijDFaqjY6JCdXMJG2DY/Sk12tiYmczji1Y 54uBXyUGAfvWxgLhTROcPqMa0MPyHPcEZd5qR+4c1GxzwQ4r5CP+DGVnCcENcwTISd0I LwEC5Prmgh0nx3nqHWVPZKPKoAlkZwm1PGOVU4TZNDmjJ475jyGzA9ECAfSgvhJEe60n O2Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772381845; x=1772986645; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Os/820D5KUwvVqZOLIPxhxLinek0g8TJ2GUPXHxbYBg=; b=ZnjvuHLrVvFQp9r/r9DGRbubfgpiLGYo9HzMDnDIR1ifMQh5WVsUll1xHc/7dSez0p PkKcIZZmIHD+UEk9dHd2e2XvhmkpWdXcoEBo46/w4O1aYxh4nVJ87/QpZvG0b9TaHjq8 17R5XNzGxSPvg9PDHYvFEHB+FXIPgqb5Pq7NADkL+h5uG/udw3TU4tekDY2AeocoR3dm 8Lq5nNy/CCVGAYPESOUC9yzl4sfEMdMkdzezXgE2K6ISuTT+BO0aaxoD7ZWI56HIUs6S C8vHiUIjKEFfcS+i03TtqZEp33pkNcyUvOOcf7jikSQ3r5ktssYP+bqhX6hAXGnItwdP 9qiA== X-Forwarded-Encrypted: i=1; AJvYcCVAnRqu5ISjQrvt66i51+LbHAbe8usf+1ACAnoJDSTI5xnZjz37oBUaxZiFXMTc9ZKhH68/iqV3BywUqoA=@vger.kernel.org X-Gm-Message-State: AOJu0YwqK8mSFBOrqN9JkTVNu96ok5SdSaqGZNQ+zaLdi2GHOC3vYO/Y p2KkRwQUV1qgDmMg12cVPvQ/3CZiuJQmDNjDfIeU/xHXxzz3LkWCQNNA X-Gm-Gg: ATEYQzxhtbDBjn2PioWEVpTVU6gn07dT8qjyqZQ6I8KXjxi4b0FUYRvxDU6lnD4W0GQ rl1zjf6m2RS2a5ZXEiVu50iGW3e+np5PUvks2cxKy1s8NdLYOq/MjqU6Hee6p0haic8EKUkq/WL tnOwDdvpDmmoUsoYqBdzq5Sw4jdTcA4/RbiH9rSZhScSt2QiBPxLjAHiP3TMFYdhuKTPiaY7j+L vPtQ+/XRIldjzHcg4/DRRMRi937iMOvwLsKyS1i/1VxjX3xq9tkzSAK+tr/V26pBbcLr/h75Htu VD/Y8SCCwBN4Ku5ODlqGE7A4iw89xwv/0nLZcKIIX2CfvKcRLXJ6+bleAvwsSXpJPZif/PBUpm0 mor3bIl/oxXzvlEnqYHq1R0ilwjCpQPKX+ouQ8H9rfYgzcwUkhHOtJU5yHhv0XBEh0vzmmzhNqm 9H8Il452r8ZU/OHOQHjPvQqpSmj+1vqh6ijmxci8BwV3GQtk9DUFIZnyL5OxHnbWUaQ5DV X-Received: by 2002:a05:6a20:cc0b:b0:38b:de3d:d542 with SMTP id adf61e73a8af0-395c3af081fmr7302665637.51.1772381845303; Sun, 01 Mar 2026 08:17:25 -0800 (PST) Received: from sean-All-Series.. (1-160-230-14.dynamic-ip.hinet.net. [1.160.230.14]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c70fa61fcdesm8651456a12.11.2026.03.01.08.17.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2026 08:17:25 -0800 (PST) From: Sean Chang To: Andrew Lunn , Chuck Lever , David Laight , nicolas.ferre@microchip.com, claudiu.beznea@tuxon.dev, trond.myklebust@hammerspace.com, anna@kernel.org Cc: netdev@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Chang Subject: [PATCH v6 0/2] Fix compiler warnings/errors in SUNRPC and MACB Date: Mon, 2 Mar 2026 00:17:07 +0800 Message-Id: <20260301161709.1365975-1-seanwascoding@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series addresses compiler warnings and a build error identified across different architectures and configurations. The first patch refactors the dfprintk macros in the SUNRPC subsystem. This global fix silences unused variable warnings and, by incorporating no_printk(), ensures continued compiler type checking. It also includes a specific fix for a build error in nfsd (nfsfh.c) uncovered by syzbot in non-debug configurations. The second patch fixes a format-truncation warning in the MACB ethernet driver by ensuring the snprintf output fits within the destination buffer. v6: - Instead of wrapping dprintk in #if blocks, completely remove the redundant RPC_IFDEBUG() macro and associated #if guards in nfsfh.c and svc_rdma_transport.c. - Remove the #if guard around the static helper nlmdbg_cookie2a() in svclock.c. - Verified via .lst and nm that both variables (buf) and helper functions (nlmdbg_cookie2a) are fully optimized out by the compiler when CONFIG_SUNRPC_DEBUG is disabled. v5: - Simplify dfprintk and dfprintk_rcu macros by removing the redundant 'fmt' argument and calling no_printk(__VA_ARGS__) directly, as suggested by David Laight. - Fix a build error in fs/nfsd/nfsfh.c reported by syzbot. The error was caused by a mismatch between the variable's lifecycle (defined via RPC_IFDEBUG) and its usage in dprintk. - Add Link tag to the syzbot build failure report. - Update series title to reflect the general nature of the fixes. v4: - Refactor patch 1 to use no_printk() in sunrpc headers instead of marking variables as __maybe_unused. This provides a cleaner, global fix and enables compiler type checking. v3: - Expand commit descriptions to include technical details regarding macro expansion, as requested by Andrew Lunn. - Test the different platform, such as ARM, ARM64, X86_64. v2: - Split the original treewide patch into subsystem-specific commits. - Added more detailed commit descriptions to satisfy checkpatch. Sean Chang (2): sunrpc: simplify dprintk macros and cleanup redundant debug guards net: macb: use ethtool_sprintf to fill ethtool stats strings drivers/net/ethernet/cadence/macb_main.c | 7 ++----- fs/lockd/svclock.c | 2 -- fs/nfsd/nfsfh.c | 2 +- include/linux/sunrpc/debug.h | 6 ++---- net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 +--- 5 files changed, 6 insertions(+), 15 deletions(-) -- 2.34.1