Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp541733lqh; Thu, 28 Mar 2024 09:02:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDhkiIm5Spg0TzSoyW/yAcHftnAA6s/0gVxJLxyFXLimQ+rt0+eHY3Gj0zJLF2CQhLmt4z5Sn8GzbHnTFS9YkXyBx9NV1CVbiEX0hNrA== X-Google-Smtp-Source: AGHT+IEgjJFGBIgah0aWpYUj1SA3tNI3wWk3pytZdyh36AZQ5x03vyX1raB5lwqF4bzYhcT+k7Q1 X-Received: by 2002:a17:903:8cd:b0:1e1:a506:9589 with SMTP id lk13-20020a17090308cd00b001e1a5069589mr3746896plb.27.1711641778977; Thu, 28 Mar 2024 09:02:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711641778; cv=pass; d=google.com; s=arc-20160816; b=DK3uPsKZxdnxT9QMzcdz+fHV5KHp2z8eTbSMgveFOlIwv4YuuWRa5CFFPUA2ngO5w0 rYeHmR03KkcbJ34lKqomsyGPXHq2EBcekfVaCljXpw2Xsa7DysTByG7Q93SH07AUkosf ozqclmrAMzVoCBdZu+9H9Qo6ZwZuWqP6fHutt7uVVuCNUmj7TAAujLOO9sgs4D3nXSlP +F67L0JUZav4FtUEO5uRgSrRhpSQBeOmmmmSG0pkzWwmbTzvJQYUG4eEvsXWDl1Gxohg iOD0CpczVSffKJ2NC07agRrl3pIInYks4apmxjzk0zb1zwFWc0CtqAnYBe0jPXkBlzWp 9HXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=wA0aGtF7pfUFgVF+PxkYWrv7TedUijbGDdENsyX5AgQ=; fh=L860xjEgjEin6EdfINsgCgJVZWPTVnB8IFhFeoev6b4=; b=tTTrWGcFwonq2i/D6tvQaAqbC5oGeOwdFrGftjUhDBXlWf4x14map23OaIStgXM9k7 Vrk7FgdYl9Kh1CJ+zkXfDEUoRu+qPkftfPCdxyfcRxMN4hkHd8T+ss3Te+5e+XeQUO4n r9DJM24GUGG6+QgdhWSiBEe3IAeHrTlfoo36thNX4kseRp4k62HXdeNN58UQSuDbqDXC +p5B7qj1vdqooNi+vx+O5BuDBgf6Z8gTXdb7Nw3inaOeFx6nrMfXnOCroV2BN0tz6s5h VHUektDfOYoITbLINzxiig1SYuHgy+Gk05lC2aiGvqqtp8ooPqYcmHfD1dslK0rwusWL qANQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kolvcEWX; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-123204-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123204-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t14-20020a05622a180e00b00430cb76f588si1636298qtc.624.2024.03.28.09.02.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 09:02:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123204-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kolvcEWX; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-123204-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123204-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9EE3E1C24BDF for ; Thu, 28 Mar 2024 16:02:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6303130E58; Thu, 28 Mar 2024 16:02:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="kolvcEWX" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 7473054BCB; Thu, 28 Mar 2024 16:02:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711641754; cv=none; b=eXALzYfKFCxDqvXJSSQraWvzRWOyFjnlUB7Gn5BW8Fx3Jltyq6jfruaEvjXrojJr7/XHq0HRlkWtUVv4LeKTMhgcaNp6dusRT1KRJFa9eWtzemPN8gSyOqFllKYzmZ1v2nqn/AcLr51vOj47RoDeMxDsQhYaPCTM/XX7KGyHtAg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711641754; c=relaxed/simple; bh=Yd+L1QfQn5v6eTEbWUAT4ptod70oCMTDA08xBm0v75s=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Kl3PRF8QCGlqI6cB2JA+Ov1ylCrwVvgBD88513BUcMEooKUz4Yf+eKHPavg3VsvoSYSQXG2PFVbl0J1gg8kw/3SkzRMhm6mvvQsXb8wYoKBSL7SCJEgjhzMpF0ISxzdEVJzczJf+P7AvNuxTB002Eg7FND4zFSdIyOly7cqzByg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=kolvcEWX; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42SCMHpM029979; Thu, 28 Mar 2024 16:01:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=wA0aGtF7pfUFgVF+PxkYWrv7TedUijbGDdENsyX5AgQ=; b=ko lvcEWXQ+cSONt0QrNcfGX2I+aipfJmjAd57F/9FXL58aSPra8zcFgdKuJ8Z21nTf ketEXxlSqpWo/WTx8e6RQBE/QMU5yOl669saggIdbDUEgDNm6L9uOihE5R82qHol 4WBMkxyD/udJAO90PQFnWvtkkOy5uge61LkeZ2rS8h3pF5+tvy5LBYWhZtN1QbQx 48HxQbhUanOh9lgq07HjOlbT4z01aSyxxY4PnXgTbbWSW4x/sQmWJMdfw4XSrMfA Bt49OwX7tVVhm5icQppKo8Sipn3byK8GsRH+Sj7Fj+ajxM9ka3huOx9w/PWw6juH OEiCUmsnV7KLexfHeBMg== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3x54r61f2v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Mar 2024 16:01:36 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42SG1Z4S019666 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Mar 2024 16:01:35 GMT Received: from [10.110.124.221] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 28 Mar 2024 09:01:34 -0700 Message-ID: <09fe8f18-7f68-4d5d-89e4-68c1e5487b05@quicinc.com> Date: Thu, 28 Mar 2024 09:01:33 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/2] scripts: checkpatch: check unused parameters for function-like macro Content-Language: en-US To: Barry Song <21cnbao@gmail.com>, , CC: , , , , , , , , , , , , , , , Max Filippov References: <20240328022136.5789-1-21cnbao@gmail.com> <20240328022136.5789-3-21cnbao@gmail.com> From: Jeff Johnson In-Reply-To: <20240328022136.5789-3-21cnbao@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Uyx3T4g92k3IzsT8Y3tgT1r8_KiCbe2B X-Proofpoint-ORIG-GUID: Uyx3T4g92k3IzsT8Y3tgT1r8_KiCbe2B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-28_15,2024-03-28_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 priorityscore=1501 clxscore=1011 lowpriorityscore=0 malwarescore=0 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403210001 definitions=main-2403280108 On 3/27/2024 7:21 PM, Barry Song wrote: > From: Xining Xu > > If function-like macros do not utilize a parameter, it might result in a > build warning. In our coding style guidelines, we advocate for utilizing > static inline functions to replace such macros. This patch verifies > compliance with the new rule. > > For a macro such as the one below, > > #define test(a) do { } while (0) > > The test result is as follows. > > ERROR: Parameter 'a' is not used in function-like macro, please use static > inline instead > #21: FILE: mm/init-mm.c:20: > +#define test(a) do { } while (0) > > total: 1 errors, 0 warnings, 8 lines checked > > Signed-off-by: Xining Xu if you are re-posting somebody else's work you need to add your own Signed-off-by > Tested-by: Barry Song > Cc: Chris Zankel > Cc: Huacai Chen > Cc: Herbert Xu > Cc: Guenter Roeck > Cc: Stephen Rothwell > Cc: Mark Brown > Cc: Andy Whitcroft > Cc: Dwaipayan Ray > Cc: Joe Perches > Cc: Jonathan Corbet > Cc: Lukas Bulwahn > Cc: Max Filippov