From nobody Mon Feb 9 16:45:32 2026 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (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 687EB215767 for ; Sat, 25 Jan 2025 06:47:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737787642; cv=none; b=KTcClWHkwI39SzvCtjgjhN+8KIAwt28mS9GlO5B5EVIrh3zLwbXZeJaR8EBUcwFfjBjDFn0YvA2et2t/f3Bk7jC52senETXeWpqEzEvhv4uG44Lb1f0ZDkK4/PXpAJiVR4j5LQLMLKInJXaxPP/ZZ2vTkHrtYdZ6RcOwhUAte1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737787642; c=relaxed/simple; bh=/DGcybV4z9Qrjh0SfcfK88h7n1S5ljrhXeLGlAviCN8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cVDa5OUHkytWP84I6OlEgBR8YAsEznbwc/ukl1mG3FvQ/U1zPskjwLKmXKJ83LiNO1R79upNMY/X42MinoLpCuP2nBxSzjuBaMFBLIZNZI/Q7PVZj30tPBAm+jwzmfSInqVGpu1CF/6FF3TCEmvd6MdEOBSgW4bjTBuRrF+ZTGM= 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=E26CO3Lo; arc=none smtp.client-ip=209.85.166.46 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="E26CO3Lo" Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-852050432a8so79392839f.1 for ; Fri, 24 Jan 2025 22:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737787640; x=1738392440; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LhR9o1TqB18h8Gejof58ltJDYupe0+A8Qxz5wplRn78=; b=E26CO3Lo2NIP26e5JM5RFF2aZmFbzn3dzeLembKkoE+NoLri+DoNi8cX0Jo0DE4nEf SwctgyMiLagMVxPXj1jjMKHQnrE0mFt0c7TDAZJ7FXz1kYSIXVf9ehpS2uejzhKBH6Hm FnODC8M0HDs3BrlsMPaQQEPNW9xdCxxdNeWGVexXWJ3li7Ui3zU9Ubs67wydF15LcvVf D9uzzBxHKnGx++K+7uFQRdCuULj0A2mb+oaGSnNPQoIx/OggnXABur+h8bsi/lJnm7KG aTkZirch1Rv5J8zlWEmZ5LkWrp8q86DFCRk5OmxnV9yIbL1PgvVcdv0J2pdaNtyr7gAj xZfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737787640; x=1738392440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LhR9o1TqB18h8Gejof58ltJDYupe0+A8Qxz5wplRn78=; b=HAk5n0YNAs320CJFYuHcuzaa80EGO25TL5gHkGWZVWPzy7ke879cniNS0WeCtyNS70 ZYEhHpXIOq9qSWTGiEKx9a1twS8lySjC3PLDZPvS9lfRVElL5s7psL6X2ujhf3CuTqV4 qKdfB1OH7yrsckRYztxLmcITdEWY2J0mK9MMT+2ycFe9UDD78kx7GQnM1Fv1O1Ziunqx utp6hupP8oFZQ7FBSp8i2m3LfHVuNIK2IbQpskR10oEtswMBGYr7eneJwUp9zv89A/k6 6I7EZAZcyIzWrKz2tZ9ZGj2qNAZETt+lxbvkikGARXoaJQ1HNCIRoSrKAQBCc3OTyHmh DAzQ== X-Gm-Message-State: AOJu0YwZUmkkT4mfC6RtzhIlvVhS6us9iHIaY6CCb+4tzHaJe6KNqQP1 oFkhqj8JU5/EioxS4wGB78nkZeU75xgquT9FplPmIY8PHo6P0mTVicsOAw== X-Gm-Gg: ASbGnctuwYrAU4KOS4HqeB26JFEl1X/yeCuHue0Akk0YvsD1lxwtto4tW+ugcyrzM+9 RwQl4KKQM0asFenGDw4K7qeXJa9DfwnUmf5h5XAkkwI0zjvIrS7L0qsAFMbiRRW5thw53w/PELc 9HQ8tFki4H3/DJ4qHAKEFIUVoVeVpWqBboVfWvupMhTT1M/qdfTIS2kv+ku/rLhIEJ3W3XUnYRS eq2w7PMKXguyEP4pdljlDpK8qejaSJFxYTmOVh38qvbEDRI0w3gtiaNHeTM+QyqJIharXN0EoDt AeY6aIbyGaQEq23zvmFoSTD093FE+U6q0JLBHw== X-Google-Smtp-Source: AGHT+IHZEzBNBYNOEBBToI8KiDl5Tsa5XkYH0RjpgGMIymyYt3NOZibANggXDZzgs4FwkUSL/FRdxA== X-Received: by 2002:a05:6602:280c:b0:84f:70b6:d827 with SMTP id ca18e2360f4ac-8520bde410dmr633621439f.8.1737787640439; Fri, 24 Jan 2025 22:47:20 -0800 (PST) Received: from gandalf.. (c-67-165-245-5.hsd1.co.comcast.net. [67.165.245.5]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4ec1da476fesm1174144173.58.2025.01.24.22.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 22:47:20 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, ukaszb@chromium.org Cc: intel-gfx-trybot@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, Jim Cromie , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Subject: [PATCH 40/63] checkpatch: dont warn about unused macro arg on empty body Date: Fri, 24 Jan 2025 23:45:54 -0700 Message-ID: <20250125064619.8305-41-jim.cromie@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250125064619.8305-1-jim.cromie@gmail.com> References: <20250125064619.8305-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" we currently get: WARNING: Argument 'name' is not used in function-like macro on: #define DRM_CLASSMAP_USE(name) /* nothing here */ Following this advice is wrong here, and shouldn't be fixed by ignoring args altogether; the macro should properly fail if invoked with 0 or 2+ args. cc: Andy Whitcroft cc: Joe Perches cc: Dwaipayan Ray cc: Lukas Bulwahn Signed-off-by: Jim Cromie --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 4a93b2ede8cd..8933bd30317c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6046,7 +6046,7 @@ sub process { } =20 # check if this is an unused argument - if ($define_stmt !~ /\b$arg\b/) { + if ($define_stmt !~ /\b$arg\b/ && $define_stmt) { WARN("MACRO_ARG_UNUSED", "Argument '$arg' is not used in function-like macro\n" . "$herec= tx"); } --=20 2.48.1