Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp497150lqs; Tue, 5 Mar 2024 07:57:00 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCWQCGW+sP1yWSHTv61YozINMM85f+Oez3fqeg1GGngwe9CEhzsSPjI5Ovcl2F3+/BbCRAl2o9PZbVv+gNBFlQ8tlScX9A86D9DkDtO/0A== X-Google-Smtp-Source: AGHT+IEttHRY/E9gsUKOmpV7xJ2X0rFZkrYbjAlnzSKBkwIgsywqa2+iQUec17od6bPq8aZSmzE4 X-Received: by 2002:a05:6a20:439f:b0:1a1:56a4:826d with SMTP id i31-20020a056a20439f00b001a156a4826dmr2800224pzl.56.1709654219931; Tue, 05 Mar 2024 07:56:59 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1709654219; cv=pass; d=google.com; s=arc-20160816; b=mT3Kr2ii/hBcu9RJRv5dNK/75GcAZKIepkRbN3CaA/vQuFacCBRdLCQlKZ4ANRx0wu 5zaAkH3qDps7ksW2sY/j+Vvbt+qepoXTQ9EUR2TQ5QDEDNIln0Sbs8qS7LujBuRpcXHw cL1QxFAMgbfr/8jkQgMnQN2dUFFAi69nJnjdcHvivMCHkCYdLxxYm19s87A/WEiylwbF +ha0htZPayU2qSUOPG46dKBo7iwFazH7v9tpaS9QnzniKkJqgpFfYy9C69NHmN3UOWs3 iwQdqEZppxbDx8A15t89BGLrw2WhwGMAp0mhHlHu7Z/B9tXgNmS7i/FyAIsapTCuJzLZ HIQw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:subject:to:from:message-id:date:dkim-signature; bh=vDtouJ503DsmZpekKET0gTVEFHANxjrrVoxMk40zba8=; fh=y+ZY9+QCU1sbooI0kttqqGYi4jHtDHUuwtd9/QZL7s0=; b=Z7yAERrUVcy2YS6oyd3bjN83MPIEyjEVa2hturJW915Lovt2eAPrwRTPZdtcR9zKG7 VZlhIzrrKQLNWP1xIzAr9+lDWtEIpNBpWA03QSj6wmolKK4XD7t4If8nalyLQDhVnSLk orPcKCrfjmX6EGenbmWmMWwmrBl9HmTI31UsFXEItJbehHCumCtX0wHCctu/LGkKUGcw othJT0fy5CC/GgBBnB43RbSdevegehHgOU9ZizZiGTspJPfvak5o040sQdqm2uzHoilN z8rDLsRI2wKTO7BsVmJNC3ouOqKS7zH5omdmJgUqFfDlapEoVyffLmJS6SaKGWyjp5Pa I6wA==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@linux.beauty header.s=zmail header.b=SF9VsMi3; arc=pass (i=2 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty); spf=pass (google.com: domain of linux-kernel+bounces-92642-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92642-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l22-20020a63f316000000b005d8b8c682cfsi10277329pgh.582.2024.03.05.07.56.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 07:56:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92642-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.beauty header.s=zmail header.b=SF9VsMi3; arc=pass (i=2 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty); spf=pass (google.com: domain of linux-kernel+bounces-92642-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92642-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 97EB728178F for ; Tue, 5 Mar 2024 15:56:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61D61128395; Tue, 5 Mar 2024 15:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b="SF9VsMi3" Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) (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 A8C685C604 for ; Tue, 5 Mar 2024 15:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.15 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709654160; cv=pass; b=qtdXLNq5kO8Z7D66jq9HMslFdswkHf5c+xYUru8zfnbdRyEGoFz99Kr8K5jBS9aEEEs4SIUJZdHgDIfpVps0RE4t6DWItv4fOdoMNfJ4yXInoqDjaeeD7Fmqyro8gAO7hn6URBH66N/+JDchdj9p4r76vPVXsQqkSxHCkpiiLdE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709654160; c=relaxed/simple; bh=KzsuZzqms1SpSDUV2y+JDVPqV/15KCbuT8pNLNMpXoc=; h=Date:Message-ID:From:To:Subject:MIME-Version:Content-Type; b=RE8m+RH6wPTFwbJzDtFUp9hUP+K56Cxpub3jxBmCPsMTOdZyJo2upiq6MSoCU9hDBGnrTrwB0wdZteDBTjxrtR49OBRdF/5H/dgeW4FO8e8KnswMDfLKF0D+kXknZjONTALa9P76/TVyCiw/PLiVzSVya7qfx9hWOzKEAbVMK1Q= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty; spf=pass smtp.mailfrom=linux.beauty; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b=SF9VsMi3; arc=pass smtp.client-ip=136.143.188.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.beauty ARC-Seal: i=1; a=rsa-sha256; t=1709654152; cv=none; d=zohomail.com; s=zohoarc; b=mnaVLN5TQKLsO9vpo7V5Z7YozEO+k8yS6YlinagRUSGjbJq9LHybEVKN2u963dMZjCgAgyQtLDJckpX1rU/ho5puheaTyxTelFm91giUZrrZhoR5AJlvakWS+pdgepE5iS+mEIX/ojMtZ3EYNKXEyVxW3Cjkxw1LLXCydV8PPFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709654152; h=Content-Type:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=vDtouJ503DsmZpekKET0gTVEFHANxjrrVoxMk40zba8=; b=FlG2ZWTXQHrxGN7Hc/giqjpo+Ck7JTM05AdMEK3ZranlhTSC65C4dgqTtWC6Iy/G4IsqvdOnMXDAQ8h/xlhIWo3P+LybggebpA+TrYBFBUlfRRwdeZnfT9V5+d89dc8rQkBh3vk3OsSK3/wL7q6Ct2KcxpA7fTfWjEiBPKzE4Us= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1709654152; s=zmail; d=linux.beauty; i=me@linux.beauty; h=Date:Date:Message-ID:From:From:To:To:Subject:Subject:MIME-Version:Content-Type:Message-Id:Reply-To:Cc; bh=vDtouJ503DsmZpekKET0gTVEFHANxjrrVoxMk40zba8=; b=SF9VsMi3uXxgZ6G3XmyV21jJXgvUseU7CKb1r6iNaWWZWpsIM2OOEkuGaM4g5KoB tvQNk+XJnytLt7PA+Q+iYjs0HC0S38HPCoiF/c1WasiWc3uiamB3hxT+n0J2k7rkS+q 0JAJusUtKZ5oaIthuplSuQW4cIs71bQxlqV2jADw= Received: from lchen-jiaolong.linux.beauty (116.169.7.108 [116.169.7.108]) by mx.zohomail.com with SMTPS id 1709654150072859.7482347338068; Tue, 5 Mar 2024 07:55:50 -0800 (PST) Date: Tue, 05 Mar 2024 23:44:14 +0800 Message-ID: <87frx4r8dt.wl-me@linux.beauty> From: Li Chen To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/1] Guiding Use of ssleep over msleep for Whole-Second Delays User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-ZohoMailClient: External This change particularly targets replacing msleep() with ssleep() for delays that are clear multiples of 1000ms, enhancing code semantics and readability. I'm contemplating a kernel-wide update to conform to this practice, pending community feedback. While a sed script (like '/\bmsleep\s*\(\s*([0-9]+000)\s*\);/{s/\bmsleep\s*\(\s*([0-9]+)000\s*\);/ssleep(\1);/g}') could automate this, I'm cautious of potential implications and seek your thoughts on both the patch and the idea of a broad codebase update. Li Chen (1): checkpatch: Add warning for msleep with durations suitable for ssleep scripts/checkpatch.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.44.0