From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 830AD36E477 for ; Fri, 27 Feb 2026 18:15:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772216136; cv=none; b=Jz7qSzb0ri0m44ty5EEDBhn1TXU4HMx2JEtqB9YFwnamArJi1aDWbijgEStfLvJRBYCrC7WuJvV7vUdxRTtcMwfFuURy/QYlaCJAiuld6+ytYuAeBJOyY8x1jKlL9vEJrJEV4QAAO9cPrmIE7mQWdpSscwd4cDokx3/67JHo3z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772216136; c=relaxed/simple; bh=EIHCSnDQnPgzLOrkBSeiEeMSnqPciWc+HEYIcaNXe48=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=F8OJsCM7Z9WNTAdyCluNoo9dnZ3SX7GusRy8fuG/C5FI8uzvvOk5eqZR0d1/yDiK1XP0NIRcEgQakHUdq6dUl1ZqaKOHXls2l6ToHZWM1sukJzbutXRap9YNAOPNe4NX1HeTuZmtJYJvueaPfSKRawYeuG0yAKVJf3hJZ8uz5q4= 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=h6LVdD/G; arc=none smtp.client-ip=209.85.128.50 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="h6LVdD/G" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-483abed83b6so19287485e9.0 for ; Fri, 27 Feb 2026 10:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772216134; x=1772820934; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=+vLtKfQfpUyImPgufwuUFBCxVkCuAbK5gi85kgZFI1o=; b=h6LVdD/GZ4s3Hr4A2zQzkP4zWi17wlFecgS4tVhNz+dAjce1OQ27sPJHqP8Qm/NJ2Q GzX7gNLydWx7M0Pnp7WTRQpuQR+s1z3V7Y7w5Gg1PtQImctmytNVD+vPwbh14IUhSAbQ w5yW/7qliqcX8p82bDrHPfDt81/zU7ZcctW0iwVocEio1OzWGBquNwQqSmwWHpWuXhP8 Is6iVJ300Z08CS3ea0WrczFtTIwpmcOpe3O1vyd0EsuJK+pt3UEVmYFFD4fMbSffbrdU FlIi0Dym+m9cXCXvFeotg0tIMGGPOoFxqiS8Hkz4USL9nYsVz/E81GgU4k9AEEhtZZ71 phRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772216134; x=1772820934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+vLtKfQfpUyImPgufwuUFBCxVkCuAbK5gi85kgZFI1o=; b=jK0FoCoSWFFwbubZy1BtUIt9I4IFP8CJzOA2rDJ30Jbcu8j9JCwiS5Hn3ABM3JXOhw mGXBUun0PAiEDtdJcwSXzUneRrIIgWE/tvJi1H7Jhxu74Cx/RWOPE21UbmO8r+9a2qft gkxUyAnkfWcmAwDkiGNgwSVJetl2VWFca1fpONiJgkfKUg/T5EgV2R8uL2SgK+aGFnTl uXuGlPJPvOViSjQK9HxdMEtBjZYz85Mhn9C5ansGkl0hsK0KRceQ4ArHfPyYOvJpmjd5 MS5DxdBqxGNKo6CCszxJMAO7KEVnyattZ8rBo1vCNT2cHPI03yT/ggm9V6o6txXfiMsK zRRg== X-Forwarded-Encrypted: i=1; AJvYcCWpuuPHzdrM0EVAnC61ULwLWsNpQtO6q+NyC0yotAVx4dnoo1ZAaaMRmv0JzvAGJzf59TufyENrhH4Siiw=@vger.kernel.org X-Gm-Message-State: AOJu0Yy4r1i3x8zbf6F9ejFZHc7J9ZtOWtXElSZau3IHqwcx/Fnt8U4P upqnVAwS5GVMEfe5er1IbpN4UqgPNFqz9B96cm0tDZ+WX2E+UCHKlcU6 X-Gm-Gg: ATEYQzwRuqaR2dKV1zv38ACwP/xE6W7H+YmSZV06szPin1ZheGaZPgZCeWJIrIXMBMF cHa7Y9qUtLxGltmob4dSPNZ8+J9oSAXyGJj0F1fD/7ESSp7pk/U7Fr7fH13oYET4T1p05LO+Orr EIW+m6GTxOX1GuxI54QHeVecei6Zmc/ar1cVqpgTD3DstNJCp0ST+1o8uHD0Dwzo+uuzfsOUKqH D++QFBP4ASqcwKVjMZkw2JTlrOFhizFMJ9f6xUUcp+a+rb3Bmyyw3FqB9R/Dwf4xLUen3V6q/C4 TD19Bq+sEbySOVUJHZXptr+L9NnENVe/4a/diZKVLSXsX9rACggltw+FnkTZMevKSYWVR4XRIuE UafT2B4zkPYz14qLBj6628XwiIeY4ujwl1D7NbkKlqDTTnAktzPZA6u9i+amgeX9q+rKin4uWsn pT4tZusVve68uMyWfagDz0ijiiFhOjcxm8DQ0ZZzxXrv1zqx/TS7o2HE5tWKIJQhQq X-Received: by 2002:a05:600c:3e16:b0:46e:32dd:1b1a with SMTP id 5b1f17b1804b1-483c9ba38damr64818595e9.7.1772216133739; Fri, 27 Feb 2026 10:15:33 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483c3b770e7sm131066685e9.9.2026.02.27.10.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 10:15:33 -0800 (PST) Date: Fri, 27 Feb 2026 18:15:32 +0000 From: David Laight To: Andrew Lunn Cc: Sean Chang , nicolas.ferre@microchip.com, claudiu.beznea@tuxon.dev, trond.myklebust@hammerspace.com, anna@kernel.org, netdev@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/2] sunrpc: fix unused variable warnings by using no_printk Message-ID: <20260227181532.1616f720@pumpkin> In-Reply-To: References: <20260227152624.164964-1-seanwascoding@gmail.com> <20260227152624.164964-2-seanwascoding@gmail.com> <20260227173814.2f928556@pumpkin> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 27 Feb 2026 18:57:33 +0100 Andrew Lunn wrote: > > > # 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__) > > > > You can omit fmt, then you don't need the ## > > #define dfprintk(fac, ...) no_printk(__VA_ARGS__) > > /* > * Dummy printk for disabled debugging statements to use whilst maintaining > * gcc's format checking. > */ > #define no_printk(fmt, ...) \ > ({ \ > if (0) \ > _printk(fmt, ##__VA_ARGS__); \ > 0; \ > }) > > Without fmt, gcc cannot do format checking. Or worse, it takes the > first member of __VA_ARGS__ as the format, and gives spurious errors? By the time the compiler looks at it the pre-processor has expanded __VA_ARGS__. So it doesn't matter that the format string is in the __VA_ARGS__ list rather than preceding it. David > > Andrew