Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52CE1C02198 for ; Tue, 18 Feb 2025 09:57:12 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.891219.1300288 (Exim 4.92) (envelope-from ) id 1tkKLa-0005DU-60; Tue, 18 Feb 2025 09:56:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 891219.1300288; Tue, 18 Feb 2025 09:56:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tkKLa-0005DN-1w; Tue, 18 Feb 2025 09:56:58 +0000 Received: by outflank-mailman (input) for mailman id 891219; Tue, 18 Feb 2025 09:56:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tkKLY-0005DH-AX for xen-devel@lists.xenproject.org; Tue, 18 Feb 2025 09:56:56 +0000 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazlp170120003.outbound.protection.outlook.com [2a01:111:f403:c200::3]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ae963077-edde-11ef-9896-31a8f345e629; Tue, 18 Feb 2025 10:56:54 +0100 (CET) Received: from AS2PR03MB8907.eurprd03.prod.outlook.com (2603:10a6:20b:5e4::22) by AS8PR03MB7077.eurprd03.prod.outlook.com (2603:10a6:20b:294::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8445.19; Tue, 18 Feb 2025 09:56:51 +0000 Received: from AS2PR03MB8907.eurprd03.prod.outlook.com ([fe80::804:c187:252a:9593]) by AS2PR03MB8907.eurprd03.prod.outlook.com ([fe80::804:c187:252a:9593%7]) with mapi id 15.20.8445.017; Tue, 18 Feb 2025 09:56:51 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ae963077-edde-11ef-9896-31a8f345e629 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ExKBfVHFyAKNXaVCpqA9M63cVUOK96U5xUEOim76X1zkhV3m5Y0CXFQvbvTpA/UUdpy4xWlky1vGVjl+w4jxtYZUX0kRVoFJfQHhSLuL99qHVHlJD6dbuGiSmxeo4nebTjDGaBoBmY2XVWfZDUXUlKUSWOYl3bQV3Nh3XusK6NIREGYsxuHqKUVvCMYbh+mzJwiMWr+kxFzTysORvl7jpVCdl9pC1iN1GLk45sJO03FfrZWPsPuqgWxZF1LLl3EpwwRPIj6v7KZLSfhJIMULNq6ehfvd3gwMfi3/N+VONSxEHcwUBy16bj7P3ZS/ZjbaXABuOoCfHNFD7Wgtdr+Njw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xGl0/G8/+JX2BeKYGS+AkICE1Sk02TVZJHXQ++DT0zc=; b=B7s2+mo9ritiRlllQN7IJTEp5/CRttVGMoP9sAAHWZ31RboX15ijUrr8vGmpiGUeSBVBtqfE+2nTEkIjtcFYizuZ/1+3HQxVvxbqZozCz7kWMYI737quMlGBvtA6U3mpkvBG4d+k0f/xCpA90gVnbn5/dB1f9USi4mKE0vj3gUI6UYvEeWkw9C2fMvyYCkK7UmQKvHEZgEfXOZ8ykfO13tDKlMJyO1RPP9inzSktjJBexMuOEfbNvittYyIZ2//grKHUC0Pxz+mwCFetSjQC6r+m+jOR4njHNqlarW/uCesSkKDssA9LHhvlWY1dMdVQldVu5qzULyLUbDC6xWRD7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xGl0/G8/+JX2BeKYGS+AkICE1Sk02TVZJHXQ++DT0zc=; b=WFFwcnTVO47FpXAAASAL/hQLN2ht0k5TfYpElje1dleZIOBhvFgusw9vs6ot6Dbo7ZBnnmPPAES2cz0nJSpPh+An1Qp0SEifVt4IF6+siOwZyflzvLunZknpTd8grUyP3fMHF4Zly/1iLe9+MkZ3GMIqWw/jumioDKHAapPa7cBu72e5CoP81Ea7rU5vAKPY144PbOCqoT7IouVlrRdTBOfoYdZA55yYXbxT+PmgYe1PsP3Suk6RrLcbfV7PzZFIbYDv2+0NFSuu1c5A4DSuZm3YougUlHfMdxOFpIx+OucmoYhtYHasT3c4XskOKjaUxd8Nlz4nNFSjxJo1rTFFWQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com; Message-ID: <6c25b6fb-989c-4788-9f3f-c2e309bec4ba@epam.com> Date: Tue, 18 Feb 2025 11:56:48 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/2] code style exercise: Drivers folder samples To: Oleksandr Andrushchenko , xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, Artem_Mygaiev@epam.com, jbeulich@suse.com, Luca.Fancellu@arm.com, roger.pau@citrix.com, marmarek@invisiblethingslab.com, andrew.cooper3@citrix.com, anthony.perard@vates.tech References: <20250216102108.2665222-1-andr2000@gmail.com> Content-Language: en-US From: Grygorii Strashko In-Reply-To: <20250216102108.2665222-1-andr2000@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0107.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a3::17) To AS2PR03MB8907.eurprd03.prod.outlook.com (2603:10a6:20b:5e4::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS2PR03MB8907:EE_|AS8PR03MB7077:EE_ X-MS-Office365-Filtering-Correlation-Id: bc9c9551-68a1-4ee6-b5a2-08dd500290fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?UFlpekJSYkxxNUEyQnRFRm4ydldkT21mbVZCRm9jcktxWU9aSnhQYWw1SVhs?= =?utf-8?B?QUxZRmk2aXo1amF4OWYxVEtZeE5ZSWNTaTZnT1JNYi9HcS9UbGFrSG4xM0pn?= =?utf-8?B?R1N0dkRxc1NXV21uUUZtMUl1ekhFQzVBTWx0VklTdG9mbUt6dmRETDFjS0xR?= =?utf-8?B?SHdzZkgvTWtKTDl1Yy9CV1BLYVR1R2QrNllVMHJnRUVoaC9FVlhxeWZqZjE5?= =?utf-8?B?N1Z1NGg2elZzVlVJRnM1Mkc3d3JWNGtueGVpa0Qrd0cyNXlaM1FpaTlOL2ta?= =?utf-8?B?WUx3WWZ1d1FwdjltRG9qaGN3OG9RVFhYaEttSXNGWUJ0RGlYV3ByNWpPS2lw?= =?utf-8?B?WnE0UExublFtd0F4NytKekJrMWlaOHNZdXJUeTkrTmJvTHZLTnVIU2V3ZTF5?= =?utf-8?B?dEU3OGttMG1ia25pTS91NERNYWdlcTNqSFFrSkp5Ti9xQVpwRS9qNkFIRkR6?= =?utf-8?B?VWZIc1R0bW9YWkF1bkp4S0V0VDJ0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1aWZhVEJNVms0dmF4eXM5ODNEdHdmY2dSckttQXNySmpnSzNPTmc4NXBs?= =?utf-8?B?ZzRrZ2QzeGtMLzgxTmtocS9lakhTY0ZHWjRCN1Qrc1JKYkliWUhMckJnWDBu?= =?utf-8?B?WUczam9QRGdzS1IxK3RmZGdoaGQ5WENCUmpkcmI2N3JnbUdVK0VtKzR6NVd3?= =?utf-8?B?RklkajU4NjdyZTBlbnpjRWV4Q3FFRGUrOGVpd3doMENuRjhpRTRCZXFESTda?= =?utf-8?B?ZXNHNGwrTVBXM25CdmxVSmtIdmN6UTNQYjJjL3kzbHRBT0NnZ2J3eEt0Szdt?= =?utf-8?B?UGtFaHdaaGJXcXArem9CR2U2d2ZrTXV6WXNzWCtzSTk5ck5EcHZTMXNwUE1k?= =?utf-8?B?TWFwWTY0RVhSTCtFM3FuK1g3Z3pHa2oraEd6b0w2ajgxdEE1TmMzS3NtQ0FG?= =?utf-8?B?Z0t0cVo0SXU5Z2JCcnZraGxFc2RLalpqdUg2TytHR2hjaHZoUVZaeHBMNnFt?= =?utf-8?Q?xSa8tJMZA9dPN?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS2PR03MB8907.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bG1mUUQ4OFRTVG52RERkMFVCNzc3ZlNwUTJPOC8zSXZJWTFDOGNubTVSOGRC?= =?utf-8?B?cUhaS0FLUUNTenhEVFhnOHdWU3R5WXVBTFJZZkdyb1NwUitPL3JVY2RsRUtk?= =?utf-8?B?ckY1V2xyUE9RSEoxTktRaWlRd0E2SlpHNnZPWDRlSU1lRTc0cFFlTEtGY0VY?= =?utf-8?B?Z3VXQUN1a0dPd3V6bE5GMGNrY042L2s3WU4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U1NSUdnVFF1U1NnbHhGc2hvTVZ3ak05eUR6cGUxeWNPZlJ1RDk1b1VF?= =?utf-8?B?cFk0M2RwWWxodGpydjNpN3FoTmNEU2ZwQ3BpRVBhUHBLNU04WnR6anNkc1ZV?= =?utf-8?B?Yzl5UCswNGJzTDRLV3FyVzVVYWZZTmQvZjE2MWc3Rm1QM0w1cWE3c05EcWdI?= =?utf-8?B?cFE9PQ==?= X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc9c9551-68a1-4ee6-b5a2-08dd500290fc X-MS-Exchange-CrossTenant-AuthSource: AS2PR03MB8907.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2025 09:56:51.0759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TpI+kfXV4RHUUwxBAsBGUJWpLD83P046xthuClkJU5x37NKdH942L/3W/AhB8A+/87EgqxgyZFfjf6tKaiAzIgbPL1/nwoXvkfwBd4X1D18= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB7077 On 16.02.25 12:21, Oleksandr Andrushchenko wrote: > Hello, everybody! > > As agreed before [1] I am sending a series to show two samples of the > formatting done with clang-format. The clang-format configuration can be > found at [2]. It already has some notes on previous discussions when > Luca presented his version of that configuration and which I used to > start from. > > There are two diff files which show what happens in case the same is > applied to the whole xen/drivers directory: > - first one is the result of the "git diff" command, 1.2M [3] > - the second one is for "git diff --ignire-all-space", 600K [4] > > This is not to limit the reviewers from seeing a bigger picture and not > only the files in this series. > N.B. xen/drivers uses tabs a lot, so this is no surprise the size > difference is big enough: roughly space conversion is half of the changes. > > While reviewing the changes I have collected some of the unexpected things > done by clang-format and some interesting pieces. You can find those > below. For some of those I have filed an issue on clang-format and hope the > community will lead me in resolving those. Of course what I collected is > not the complete list of such changes, so I hope we can discuss missed > ones here. > > From this exercise I can definitely tell that clang-format does help a > lot and has potential to be employed as a code formatting tool for Xen. > Of course it cannot be used as is now and will require discussions on the > Xen coding style and possibly submitting patches to clang-format to > satisfy those which cannot be handled by the tool now. > > Stay safe, > Oleksandr Andrushchenko > > 1. Const string arrays reformatting > In case the length of items change we might need to introduce a bigger > change wrt new formatting of unaffected lines > ============================================================================== > > --- a/xen/drivers/acpi/tables.c > +++ b/xen/drivers/acpi/tables.c > @@ -38,10 +38,10 @@ > -static const char *__initdata > -mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" }; > -static const char *__initdata > -mps_inti_flags_trigger[] = { "dfl", "edge", "res", "level" }; > +static const char *__initdata mps_inti_flags_polarity[] = { "dfl", "high", > + "res", "low" }; > +static const char *__initdata mps_inti_flags_trigger[] = { "dfl", "edge", "res", > > --- a/xen/drivers/acpi/utilities/utglobal.c > +++ b/xen/drivers/acpi/utilities/utglobal.c > static const char *const acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { > - "SystemMemory", > - "SystemIO", > - "PCI_Config", > - "EmbeddedControl", > - "SMBus", > - "CMOS", > - "PCIBARTarget", > - "DataTable" > + "SystemMemory", "SystemIO", "PCI_Config", "EmbeddedControl", > + "SMBus", "CMOS", "PCIBARTarget", "DataTable" > }; > > 2. Long strings in ptintk violations > I filed an issue on printk format strings [5] > ============================================================================== > @@ -225,9 +231,9 @@ void __init acpi_table_print_madt_entry(struct acpi_subtable_header *header) > printk(KERN_DEBUG PREFIX > - "GIC Distributor (gic_id[0x%04x] address[0x%"PRIx64"] gsi_base[%d])\n", > - p->gic_id, p->base_address, > - p->global_irq_base); > + "GIC Distributor (gic_id[0x%04x] address[0x%" PRIx64 > + "] gsi_base[%d])\n", > + p->gic_id, p->base_address, p->global_irq_base); > > @@ -629,12 +628,14 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header) > - printk(XENLOG_ERR VTDPREFIX > - "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and [%"PRIx64",%"PRIx64"]\n", > - rmrru->base_address, rmrru->end_address, > - base_addr, end_addr); > + printk(XENLOG_ERR VTDPREFIX "Overlapping RMRRs [%" PRIx64 > + ",%" PRIx64 "] and [%" PRIx64 > + ",%" PRIx64 "]\n", > + rmrru->base_address, rmrru->end_address, base_addr, > + end_addr); It doesn't understand properly things like "PRIx64" :( Most of other items, I've mentioned already, > Unhappy: it's probably "known" things - identification of complex defines and > static struct/arrays declarations. And for them, probably, no magic automation tools exist which will satisfy everybody as, at least static definitions are usually formatted to achieve better readability which is always subjective. The tags /* clang-format off/clang-format on */ might be useful. [..] Honestly, It looks a bit strange that Xen community is considering batch automated code formatting, For example Linux kernel cleanly rejected such approach. Linux kernel docs "4.1.1. Coding style" section [1]. Another thing, checking the new code and accepting code style violations (if any) on per-patch basis. [1] https://docs.kernel.org/process/4.Coding.html BR, -grygorii