Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp328675rdb; Sat, 16 Dec 2023 09:46:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaMQooSHv1gnBzQdikXCvwHN1blQzbuPN2CmJNn9jSns9lu6ltEy7xyLNL2d/PikInETAT X-Received: by 2002:a05:620a:4712:b0:77f:408d:1bb7 with SMTP id bs18-20020a05620a471200b0077f408d1bb7mr18290558qkb.2.1702748779808; Sat, 16 Dec 2023 09:46:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702748779; cv=none; d=google.com; s=arc-20160816; b=UUjZRk8t2dicuAfjvRhOqbxzgs4zUtDS+bQ2S4wv7Smjz1UqRuFvYAJR2XWVsrxU6o I8HQnYCnmMyvCfvgHK/kTN6uoyEgJYLBpuyx+IjspGv19OP/hpKIkPW9aLqmZj59+UsW S0hiEQKapEhFnpokY+/3ifTCQSZGe4pWGC3HVwQzEDaA2YcAG0DnvAZtJndeDMJXtolJ 0J5haofsa0vEqfjUBHpuxiyOfuVuMCRUPnu+C/CZ8EXKlBDgk03IFJ7hlDgofjwoh9Rp 89BP0KgBCKTwjEiHcYNzWeax3Bu2701ioLrc/+CLLQ6BUEPZ4fGBVevtLNIun90TaRJw eKww== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=qF2NtUuNhducxGmUp0kneVFxNo8HeCoddxh5KxsI1fw=; fh=QwEOK/MZnBUTBQAzGwecl0DPfALWXdlHbxPQlQn9VIw=; b=j/I71Dp/jw3gL4IXdx2wnn3yHSJC7icLXU+iCNB89gnnK4Gal9G3Yfy15JI0iBFgGh ZRyRLeXisHX+qKRx+utGsaGAF98IQEckPgQq3gZ9PRoza40H6qClT4EObFgQYVTtkFhn Pr7HXjNYtV76md+sM4zKEbviJa6/6gVgkNDYpaNXOCg9drMI+ogQ4+NpBPWyioUGajYJ xT4hxc7nVrSL0Yrfoe2+9rsaVgFfydTLRXUDEm7OEXpgeIujvopo/1L2XaAxP4J/T8/Y 4NIi6g3VWdT7jv3NJJ+4U5j9lfnfC2zmBGQ0rASjhpN4s54fwobUAtBy7d2Za4wXK1Hr /JXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f13-20020a05620a15ad00b0077fb303fc75si3293446qkk.710.2023.12.16.09.46.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 09:46:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2299-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; spf=pass (google.com: domain of linux-kernel+bounces-2299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.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 8275C1C21849 for ; Sat, 16 Dec 2023 17:46:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C21830FAB; Sat, 16 Dec 2023 17:46:11 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (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 D03BD31592; Sat, 16 Dec 2023 17:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BGFkkQm011864; Sat, 16 Dec 2023 12:45:48 -0500 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3v1etvg8jb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 16 Dec 2023 12:45:48 -0500 (EST) Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 3BGHjl3t029573 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 16 Dec 2023 12:45:47 -0500 Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Sat, 16 Dec 2023 12:45:46 -0500 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Sat, 16 Dec 2023 12:45:46 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Sat, 16 Dec 2023 12:45:46 -0500 Received: from work.ad.analog.com (HYB-hERzalRezfV.ad.analog.com [10.65.205.129]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 3BGHjTnD015744; Sat, 16 Dec 2023 12:45:32 -0500 From: Marcelo Schmitt To: , , , , , , , , , , , , , CC: , , Subject: [PATCH v4 01/15] scripts: checkpatch: Add __aligned to the list of attribute notes Date: Sat, 16 Dec 2023 14:45:27 -0300 Message-ID: <1c5c93ecbd8c46a338b22a4ef52e51648e333c01.1702746240.git.marcelo.schmitt1@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: mIoKI-PSG86OJAGwBcWzms_wT0dJ0Jat X-Proofpoint-ORIG-GUID: mIoKI-PSG86OJAGwBcWzms_wT0dJ0Jat X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-02_01,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=0 adultscore=0 clxscore=1015 bulkscore=0 mlxscore=0 impostorscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312160136 Checkpatch presumes attributes marked with __aligned(alignment) are part of a function declaration and throws a warning stating that those compiler attributes should have an identifier name which is not correct. Add __aligned compiler attributes to the list of attribute notes so they don't cause warnings anymore. Signed-off-by: Marcelo Schmitt --- Any expression that evaluates to an integer that is a power of 2 can be within __aligned parenthesis. I can't see how we could use a regex to check code meets such constraint (if possible). Some additional exotic uses of __aligned are: drivers/net/wireless/quantenna/qtnfmac/bus.h:72: char bus_priv[] __aligned(sizeof(void *)); include/linux/netdevice.h:225:} __aligned(4 * sizeof(unsigned long)); The regex __aligned\s*\(.*\) seems to match all use cases. We might not catch invalid arguments to __aligned, but it looks like making checkpath confidently report those wouldn't be feasible anyway. The patch that would trigger the mentioned warning in now patch number 13 (iio: adc: Add support for AD7091R-8). scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 25fdb7fda112..d56c98146da3 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -512,6 +512,7 @@ our $Attribute = qr{ __ro_after_init| __kprobes| $InitAttribute| + __aligned\s*\(.*\)| ____cacheline_aligned| ____cacheline_aligned_in_smp| ____cacheline_internodealigned_in_smp| -- 2.42.0