From mboxrd@z Thu Jan 1 00:00:00 1970 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 E4AC62D7DD9; Fri, 27 Feb 2026 15:59:12 +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=1772207953; cv=none; b=cU7Atk5pt3uL/9AoGCChzgYG9xELqlLSpWNzMJX+iVjgUPTeY9Ni4ObjJGcD/wgeiy49nVqBzeL1x9S+wSx4UdwPZVO09jJTlAr0Qmc2W2+iOgKMbHMfxtXqMtBqhck7O4KN6v4zjVWzoLy2aDgiYBm0dRLEK7M3gSRpRaMPclw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772207953; c=relaxed/simple; bh=XrVoy8xjLNPfd1wS5auMCANauxnpnXG12SU37vLWqIc=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=A07ZWFJJ8QXoeKXntMK8GBMft5+ci0GiXuNdpdrcntxWIooFFsw7y3UZLGppa/OcH8peOnnwlacKdP91tpl4SbPf74Y0gmJlFxKwAn4LJaIL0aKxiKlyKgIL0avA5azMgRqHBw1h2qHmJVrIU9nPyDknhSd2iNzO49I/XmnRz1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MxNu/QHc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MxNu/QHc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31121C116C6; Fri, 27 Feb 2026 15:59:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772207952; bh=XrVoy8xjLNPfd1wS5auMCANauxnpnXG12SU37vLWqIc=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=MxNu/QHc46NTd9U+paOULKGAtmU6jgcl8a89KxuG/IsjOivMruHAYlx7pzJwzg5/0 +7IIrjLRox7ripKRM1NbNLGTkFO2p1y2RG4BpXDOE/1PxwCGcxffjieRneMm6SRuoU 4HJZiPqp7Vxrt4TYZ+pIkC65qF7xjmPDncndA/W1EGeTICJH/Y45r5POnvlnM0P97a 4UuCgKUy5nDaPi4U6YAymhv5gi1/9gIzRcTeQlPgA20NY2YPFHXsQ5VeGfcEk/lRdd XOCvXg0P3stPZIo3p9m+cyfK7cVaHDwmSIp81wCTNf8wuNHW97AGNW8lkMHpOGwXku JKgBXA+W+PHiw== Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id 3D769F40068; Fri, 27 Feb 2026 10:59:11 -0500 (EST) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-10.internal (MEProxy); Fri, 27 Feb 2026 10:59:11 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgeelgedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfvehhuhgt khcunfgvvhgvrhdfuceotggvlheskhgvrhhnvghlrdhorhhgqeenucggtffrrghtthgvrh hnpefhffekffeftdfgheeiveekudeuhfdvjedvfedvueduvdegleekgeetgfduhfefleen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegthhhutg hklhgvvhgvrhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudeifeegleel leehledqfedvleekgeegvdefqdgtvghlpeepkhgvrhhnvghlrdhorhhgsehfrghsthhmrg hilhdrtghomhdpnhgspghrtghpthhtohepledpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepshgvrghnfigrshgtohguihhnghesghhmrghilhdrtghomhdprhgtphhtthhope htrhhonhgurdhmhihklhgvsghushhtsehhrghmmhgvrhhsphgrtggvrdgtohhmpdhrtghp thhtoheprghnnhgrsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrnhgurhgvfieslh hunhhnrdgthhdprhgtphhtthhopehnihgtohhlrghsrdhfvghrrhgvsehmihgtrhhotghh ihhprdgtohhmpdhrtghpthhtoheptghlrghuughiuhdrsggviihnvggrsehtuhigohhnrd guvghvpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghl rdhorhhgpdhrtghpthhtoheplhhinhhugidqnhhfshesvhhgvghrrdhkvghrnhgvlhdroh hrghdprhgtphhtthhopehnvghtuggvvhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: ifa6e4810:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 1DE83780070; Fri, 27 Feb 2026 10:59:11 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A7BSLXbSElHV Date: Fri, 27 Feb 2026 10:58:26 -0500 From: "Chuck Lever" To: "Sean Chang" , "Andrew Lunn" , nicolas.ferre@microchip.com, claudiu.beznea@tuxon.dev, "Trond Myklebust" , "Anna Schumaker" Cc: netdev@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <68618f03-7d77-4cab-b223-29ae16d5b230@app.fastmail.com> In-Reply-To: <20260227152624.164964-2-seanwascoding@gmail.com> References: <20260227152624.164964-1-seanwascoding@gmail.com> <20260227152624.164964-2-seanwascoding@gmail.com> Subject: Re: [PATCH v4 1/2] sunrpc: fix unused variable warnings by using no_printk Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, Feb 27, 2026, at 10:26 AM, Sean Chang wrote: > When CONFIG_SUNRPC_DEBUG is disabled, the dfprintk() macros currently > expand to empty do-while loops. This causes variables used solely > within these calls to appear unused, triggering -Wunused-variable > warnings. > > Instead of marking every affected variable with __maybe_unused, > update the dfprintk and dfprintk_rcu stubs to use no_printk(). > This allows the compiler to see the variables and perform type > checking without emitting any code, thus silencing the warnings > globally for these macros. > > Suggested-by: Andrew Lunn > Signed-off-by: Sean Chang > --- > include/linux/sunrpc/debug.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h > index eb4bd62df319..55c54df8bc7d 100644 > --- a/include/linux/sunrpc/debug.h > +++ b/include/linux/sunrpc/debug.h > @@ -52,8 +52,8 @@ do { \ > # define RPC_IFDEBUG(x) x > #else > # define ifdebug(fac) if (0) > -# define dfprintk(fac, fmt, ...) do {} while (0) > -# define dfprintk_rcu(fac, fmt, ...) do {} while (0) > +# define dfprintk(fac, fmt, ...) no_printk(fmt, ##__VA_ARGS__) > +# define dfprintk_rcu(fac, fmt, ...) no_printk(fmt, ##__VA_ARGS__) > # define RPC_IFDEBUG(x) > #endif > > -- > 2.34.1 Seems obviously good to me. Reviewed-by: Chuck Lever -- Chuck Lever