From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18EB545D41; Tue, 19 Nov 2024 10:26:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0622E427A8; Tue, 19 Nov 2024 10:26:19 +0100 (CET) Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) by mails.dpdk.org (Postfix) with ESMTP id C7AC040268 for ; Tue, 19 Nov 2024 10:26:16 +0100 (CET) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 015AB114013F; Tue, 19 Nov 2024 04:26:15 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 19 Nov 2024 04:26:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1732008375; x=1732094775; bh=TrOJNk+vi0/qCJ01wScuQpDSdbSZqsLsTMWGyuHmCKM=; b= TUKc5tR099+fYzHlZU5hEqZt+o4T1YXPFXCVO+Kl4T5SrXlTyHmuY6AANJk9u77W PjKDWMyEY8dMEGSMl+xL1aGYm7L5L6PxEn3Ln4FT0hM8HNzy3sE6t2PX8y95nu5n kYTQFHCSL1EkFggdLla5HPTG+62T/5VeSp4kIixjBQlpqIGy4jTcF0nuSF7Ro9TR LLVBsW+W7buJGtbE5SNR42oTBzBncpUwV71nxGFWR6/fuYYFyoSpJDEBlMGLm1gl IAJL6rfK5Kc3CnvhdQFsvcBFSQ7ixEmy/JLZOCBjRzu2rjYVc5svog3kcJa01djL 3zz/MSXdKxuL73MMoCo+XA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1732008375; x= 1732094775; bh=TrOJNk+vi0/qCJ01wScuQpDSdbSZqsLsTMWGyuHmCKM=; b=B t7AAWpRfoaY0T8082ZC4ju5xkXStXxE4YgtKRnfhaDaKEpDSXZH/tegvYMZHOVHy hRhQOkchADiBSde5gP6ufPKK1yO3Hak1mZCg60+0s5Qs6BwaDfe+K2fAN+3JDoB5 sC8CWC6+tT2cFJjNrs3i9jBeKHT77iAXREKT6HneKp0YhyhskhGjHeG2RX61lIcT OeWOjSTQUT3fA3cjBeI112YobLZ/0aiYcpGXdzAgkQJ8LZUD73ZcZgZ9pPKcVMd3 p4yt1DdpI7n/CpTXccRvLsvZ2Q29gd0qz6jum5svBVioNo2l36IOClcm3XkJDdP6 PBNy+S37dBG2rzoc7ESzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedvgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecu hfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlh honhdrnhgvtheqnecuggftrfgrthhtvghrnhepjeduveehieevuddutdevfffgtdegkeeu veejffejgedtgeegkefgvdeugfefkeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgs pghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghnughrvg hmuhgvsehlihhnuhigrdhmihgtrhhoshhofhhtrdgtohhmpdhrtghpthhtohepshhtvghp hhgvnhesnhgvthifohhrkhhplhhumhgsvghrrdhorhhgpdhrtghpthhtohepuggvvhesug hpughkrdhorhhgpdhrtghpthhtohephhhonhhnrghpphgrrdhnrghgrghrrghhrghllhhi segrrhhmrdgtohhmpdhrtghpthhtohepughouhhgrdhfohhsthgvrhesrghrmhdrtghomh dprhgtphhtthhopegurghvihgurdhmrghrtghhrghnugesrhgvughhrghtrdgtohhm X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Nov 2024 04:26:14 -0500 (EST) From: Thomas Monjalon To: Andre Muezerie , Stephen Hemminger Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, doug.foster@arm.com, david.marchand@redhat.com Subject: Re: [PATCH v3] rcu: shift 64-bit constant to avoid implicit 32 to 64 bit conversion Date: Tue, 19 Nov 2024 10:26:13 +0100 Message-ID: <2042671.PIDvDuAF1L@thomas> In-Reply-To: <20241115081820.10c423f8@hermes.local> References: <1731448959-18046-1-git-send-email-andremue@linux.microsoft.com> <1731684330-5735-1-git-send-email-andremue@linux.microsoft.com> <20241115081820.10c423f8@hermes.local> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 15/11/2024 17:18, Stephen Hemminger: > On Fri, 15 Nov 2024 07:25:30 -0800 > Andre Muezerie wrote: > > > From reading the code this is also a bugfix: > > (1 << id), where id = thread_id & 0x3f, was wrong when thread_id > 0x1f. > > Since this seems to be a common anti-pattern in DPDK, > I wonder if coccinelle is smart enough to be able to make a script for these? A simple grep '1UL << ' would do it as well. We could add a checkpatch warning for this pattern.