From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6958B629; Sat, 1 Feb 2025 00:11:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738368706; cv=none; b=EfOr2AueiKCrE6e6bafHX50hGrP0LkZtd+TWaPBNY3T+DdgnGhpIlQ6bQmJPg8/5x8oBHp8pwzYivwK8i4FeDtfKCyN0Mhcq8lhuaQTiO8JJXJsp179qzJwlRBV65oG/w6BYx8TPtDXrY2QP24S4BttdvH9MQcOPvR/CHmUJRRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738368706; c=relaxed/simple; bh=MYKomRfEqunKF+5LDSAdQtifzb1Zt5hNQibIdFjJ+s8=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=ien2NZeGrw1V2KBJmjzy20S23UL2MD2y8OH1JJCfbdPJimvNplJvMxT3OuOSgxkDub5wrR+Qe9ZUAPheNwCzr2PPh1WeeUh6yEQFcZ+glIwbXsAfgCFs2noD8Zj47Wv5kYd6SXiOFOmCJdM4HBNvYUMfwx1CnrD8PQ/zBgoTLqQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=VAieKTRU; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="VAieKTRU" Received: from [100.65.234.206] (unknown [20.236.11.185]) by linux.microsoft.com (Postfix) with ESMTPSA id 7E312210C329; Fri, 31 Jan 2025 16:11:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7E312210C329 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1738368698; bh=URcW5d1wFUuTsZZ61zIwPjo02bqd3Xwwrj5siI/ejR4=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=VAieKTRUQduuqC4WMWksNFGAWFpl7wH2vcfIqWTtocImegfQz7yg09xx/uVhF84+8 X7djRP48uKGESU6HAg1NDd667oKEWQCkly+4NL3U6jOR2q4YvgMKiwE4cdu5TQF7bE 8JEcr4WkbAHOc5PABGxI8dv7PLkq6NUdzzexdebM= Message-ID: <632be2db-78d2-4249-92f0-3f60e0373172@linux.microsoft.com> Date: Fri, 31 Jan 2025 16:11:37 -0800 Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: cocci@inria.fr, kernel-janitors@vger.kernel.org, eahariha@linux.microsoft.com, LKML , linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ide@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pm@vger.kernel.org, linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org, linux-sound@vger.kernel.org, linux-spi@vger.kernel.org, linux-xfs@vger.kernel.org, ceph-devel@vger.kernel.org, platform-driver-x86@vger.kernel.org, dri-devel@lists.freedesktop.org, ibm-acpi-devel@lists.sourceforge.net, imx@lists.linux.dev, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, Andrew Morton , Carlos Maiolino , Chris Mason , Christoph Hellwig , Damien Le Moal , "Darrick J. Wong" , David Sterba , Dick Kennedy , Dongsheng Yang , Fabio Estevam , Frank Li , Hans de Goede , Henrique de Moraes Holschuh , James Bottomley , James Smart , Jaroslav Kysela , Jason Gunthorpe , Jens Axboe , Josef Bacik , Julia Lawall , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , Ilya Dryomov , Kalesh Anakkur Purayil , Keith Busch , Leon Romanovsky , Mark Brown , "Martin K. Petersen" , Nicolas Palix , Niklas Cassel , Oded Gabbay , Ricardo Ribalda , Sagi Grimberg , Sascha Hauer , Sebastian Reichel , Selvin Xavier , Shawn Guo , Shyam Sundar S K , Takashi Iwai , Victor Gambier , Xiubo Li , Yaron Avizrat , Ricardo Ribalda Subject: Re: [PATCH 01/16] coccinelle: misc: secs_to_jiffies: Patch expressions too To: Markus Elfring References: <20250128-converge-secs-to-jiffies-part-two-v1-1-9a6ecf0b2308@linux.microsoft.com> From: Easwar Hariharan Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/30/2025 3:01 AM, Markus Elfring wrote: >> Teach the script to suggest conversions for timeout patterns where the >> arguments to msecs_to_jiffies() are expressions as well. > > Does anything hinder to benefit any more from a source code analysis approach > (like the following by the extended means of the semantic patch language)? > Thank you, this is much more useful feedback, specifically due to the suggested patch below. I did intend to learn about the other modes and progressively upgrade secs_to_jiffies.cocci with them in the future once the existing instances were resolved, to help with future code submissions. The patch below will be super helpful in that. As it stands, I'll fix up the current rules in v2 following your suggestion to keep the multiplication in each line to allow Coccinelle to use the commutativity properties and find more instances. I'll refrain from implementing the report mode until current instances have been fixed because of the issue we have already seen[1] with CI builds being broken. I would not want to break a strict CI build that is looking for coccicheck REPORT to return 0 results. [1]: https://lore.kernel.org/all/20250129-secs_to_jiffles-v1-1-35a5e16b9f03@chromium.org/ Thanks, Easwar (he/him)