From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b="SF9VsMi3" 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