Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp161617lqh; Wed, 27 Mar 2024 19:24:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUV2hAwU59O6FnZvCjIpGXkLU6CNbpelN+HUn4leKUga1i6XH0j4ce3zwZL2SAH4qCsIb32P+scFS9kEW4hEbquNo7IcmlXGxWKPVakzw== X-Google-Smtp-Source: AGHT+IG+uSYdMjiH/fVdNaS3LAvtPcx8cTsxpNXtIxQHM0zKSCklWUIUDg2eYLnHRO/2BKrNgQ0C X-Received: by 2002:a05:6358:419f:b0:183:4336:b8de with SMTP id w31-20020a056358419f00b001834336b8demr1262616rwc.5.1711592688371; Wed, 27 Mar 2024 19:24:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711592688; cv=pass; d=google.com; s=arc-20160816; b=IvviykYbLYM4ZFFKqvtLyPVogf1Wn3l/Z2Rv+GJowWfq+TALYga1b3vPjSSv27QL7A sZQmSiYegayBxsE4vTUYwX0b2liEpF+HtrPIDb3wvv0LeBCr0z0u9K9BqcuagzyGHAhv Ori7LDQ25nP+goNaCBYvbhj2/EQQnJ7tU5CwvRAWbvzrcFQ1083FI46cTtX1gsVLHTTL OLYsOW20aZHtHpwwPnMrI5SXLm1s9gH7T9wCHah5+qdMG7rCg919m6Qtnv7ius5C8POH WQSe83EIIpx2+YV5LKNwf7asGNSnO6Ah0cAmD5lqhvar4y1qFQJJdtAu4FwiBrSMl+3B ZVAQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=wwjh6A6RPtwgIFd2DAl8tZSZOuIYbO20aM3+8bN09j0=; fh=1hJcGTuB/54v3a0Mjzri25484R4W16gDnjiPXisnc5k=; b=SIA45YuslCiXjl6SGcl1yMFlyvart6mmOtelSsj5OvZXiM1fgczjP1gQaHsau6vIZ8 S2moIDNF1eFcCYdncOXj/qMcHWlkVRR31gHdDwVA0BYEh8GucgF3C54ZEueW8so0eRwp znIADNIypLOpeZOC/JzvIZoE1/si5j5IgN+2BmABTWQBPvX4zlgs6oZ/+CEAFkXADMPV +ZnqWKZxd5PHPYbnKlhY1+4GG4NEiPusMHOJVDaUT6p7XPMwQrah0ajQY4F9SNc3p3D5 21GbNcE6EBfdlhrf9Lue4RiDI3ZwdauaBxpmTdXatvr5MR/Ww2CxyiN3qTiUf4ZANSbt LhMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XPbDV2NR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-122323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t6-20020a63eb06000000b005dc97d88897si398268pgh.698.2024.03.27.19.24.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 19:24:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XPbDV2NR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-122323-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 7375EB23BCD for ; Thu, 28 Mar 2024 02:22:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D23682C194; Thu, 28 Mar 2024 02:21:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XPbDV2NR" Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (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 E86E12577B; Thu, 28 Mar 2024 02:21:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592514; cv=none; b=P111kFpHcmw4lykJw06h50elbLAuQqKrhuLCZB/anAQN5B8CfAR6m9VFNTLLtB3NxiDNPEGaPIAJkNruoSvJsOFRw6J2NI0gHLlJBAZs4QSLohOCu9CBiCOK+Dzwi1URVnGflIPd8DmpvOa01CFe2d6Xp1/TtuIOAtH1I/+w3ao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592514; c=relaxed/simple; bh=hzzBRWdiGWuG8Yb90Fydca7wDueo8i9XUKGhs113zKE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=BYPJg4G74O3LqYXdoK5RZ27pthefeyTmoS0Bxxf8DT/LBiWw7Vs2NtOX6j1CpBxXBJBRL9zetuVUpvpg95ACPv9PkW7v8mHokrNKblcdSSn7e5STUdkHuOicLrthT4F+1ZRF1AeP1pYjoqbaKdJM8yYSawLV0A6T78gLSKvmYgw= 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=XPbDV2NR; arc=none smtp.client-ip=209.85.167.178 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 Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-3c3aa9ca414so337618b6e.2; Wed, 27 Mar 2024 19:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711592511; x=1712197311; 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=wwjh6A6RPtwgIFd2DAl8tZSZOuIYbO20aM3+8bN09j0=; b=XPbDV2NRMGdp86z6MR7NqjNgSzDddQluvzuwI2kZGGoq48jF60zxAvFhZoNr/CgrC9 02KyVIobUZkyhKUVjHO8lvasFAOlpuiZdvQxnicSrUoMgBCDV6qoChGZ+1TsjXIzF4k6 eD/jxXYZ+kI7ZWLZxi2t/NdzZcWad/W2o+MHUEc/IDxKnhMbL7QGnRPi0v+UX9TH/CX+ CGtTlyUwuOBa/8DAqzkI9CcZGCCCboq8F4MhtEjCq8+6USynQaz3PI/hN6aAYBVnau0A nExnOJRP3al4np1XfxAgFhAI5Xtvp0PoVsDeT7FK0Zltp2YBgXoSNpFHxBt1Nd49qDsi 6jTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711592511; x=1712197311; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wwjh6A6RPtwgIFd2DAl8tZSZOuIYbO20aM3+8bN09j0=; b=fCynmHN/VKmdOW4AxnH8PqWWwLsHt77k/tGnHBoSTpnGHDGUzsqICs4HdonxvKnfL1 GcyrB4SDQ168DAfAivBkQ8HYxbPmzgxSmLyQnJALsx/s6j2oTXewlo1a5uOI+73zh26s AnGrIpbtVOcoyMVwWPOLMaVJT7OU94Cg72qa4tM6MzpGO60b2zLKQS1k+d2ypsxfA0Ib 66KJ+yt7voYzZhk/nGMd1xGczkv5DvA2NRtT7nxnpDTZZJkNPe7kRu4hMRppkW809T53 Tofr16m7TBLKZSof8ZCaxU5J/iP0120B93CpmvyO4VUFUILIrKufSfnQJv3sekgimsX2 pgSQ== X-Forwarded-Encrypted: i=1; AJvYcCVsMQ1g/Y+AOc3iKZJ/XYawo5vq1kw+zXCQzOSiqB+fnUAoLGmC6Kpi5MyzCzoMVAxgXdyIAq1I1yVUTwoPcSAYWw3P25+R81eLbPtPC5Rdl/EodBGn8MEL5EuXDSyQ1thn+ed8GRTfalrGQdrWfuIxT9aJtxE/gvKFltRAL5Ut1iVY X-Gm-Message-State: AOJu0YwrXUy8gsxMb7l1CCVLv/JpmLLAV/ncfS5uIcmh7ypiOj9njiUX TlQcpOEnVhJEKkINrOJKabv4efiogBZrI9TK4UHE9a2eNenb78XfJmFirxiZ X-Received: by 2002:a05:6808:2217:b0:3c3:d372:c3c5 with SMTP id bd23-20020a056808221700b003c3d372c3c5mr2135403oib.19.1711592510953; Wed, 27 Mar 2024 19:21:50 -0700 (PDT) Received: from localhost.localdomain ([2407:7000:8942:5500:aaa1:59ff:fe57:eb97]) by smtp.gmail.com with ESMTPSA id d26-20020aa7869a000000b006eac233f5c2sm228113pfo.127.2024.03.27.19.21.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 19:21:50 -0700 (PDT) From: Barry Song <21cnbao@gmail.com> To: akpm@linux-foundation.org, linux-doc@vger.kernel.org Cc: apw@canonical.com, broonie@kernel.org, chenhuacai@loongson.cn, chris@zankel.net, corbet@lwn.net, dwaipayanray1@gmail.com, herbert@gondor.apana.org.au, joe@perches.com, linux-kernel@vger.kernel.org, linux@roeck-us.net, lukas.bulwahn@gmail.com, mac.xxn@outlook.com, sfr@canb.auug.org.au, v-songbaohua@oppo.com, workflows@vger.kernel.org Subject: [PATCH v4 0/2] codingstyle: avoid unused parameters for a function-like macro Date: Thu, 28 Mar 2024 15:21:34 +1300 Message-Id: <20240328022136.5789-1-21cnbao@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 From: Barry Song -v4: * fix Xining's email address, s/ma.xxn@outlook.com/mac.xxn@outlook.com/g * fix some false positives of checkpatch.pl * downgrade from ERROR to WARN in checkpatch.pl Thanks for Joe's comments! -v3: https://lore.kernel.org/all/20240322084937.66018-1-21cnbao@gmail.com/ A function-like macro could result in build warnings such as "unused variable." This patchset updates the guidance to recommend always using a static inline function instead and also provides checkpatch support for this new rule. Barry Song (1): Documentation: coding-style: ask function-like macros to evaluate parameters Xining Xu (1): scripts: checkpatch: check unused parameters for function-like macro Documentation/process/coding-style.rst | 16 ++++++++++++++ scripts/checkpatch.pl | 30 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) -- 2.34.1