From nobody Mon Feb 9 07:06:35 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 567EC1D319B for ; Fri, 27 Dec 2024 10:22:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735294960; cv=none; b=UleFRdKSI0GjH+fr+uucv4Ymn6xlqyU01Ho/0h7FhdRwazc8+p77fdXYrhfq2DFHSXm6PAbWj5pziK/oaQI53DSBvXRhFhReCYQow+SGoWFmOOxKPHBkUs4pYdkAIDTPdllqLe9ygVAwODtbI8kIwWMv1/+61Fw9FxsPBvH85dA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735294960; c=relaxed/simple; bh=QIqypVCPTTHFGE7cEkuotaJKYMj+Rypa2n02YgkEE3Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=l6hc4dwE+xwk0GxOhwFo6ETnxfLHpjEZMNZAIFKpgSIf47rAFwObOJvW8VqyUdjxREXeQYbqF3NA9y8v/PDRtbrKvDm4T28tCOPkkT7yGS9+bWy0v1LVf1m+hSxyxdyi+MGKKvkQXgVs6nJ87nwmthj2Z3VY0NLzx069jLx2opc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=lmhXVrUB; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="lmhXVrUB" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BR7gmNI009671; Fri, 27 Dec 2024 10:22:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=3VHjIopPSmx6E4Xb0gGxD2 t3FQwwUELI+JuDSxMLYRU=; b=lmhXVrUBU3NldRuA1Q3722OKvEcreXt4mf6FiK C78NswwxTW/Yn1ZoHpINCoqjjm1s2z6cIcZ2671an80bdIQFFldBczk9+Knpg+wx lNxNzA4ydZDHatmrakcGVGy9O5ec4C7bMGqV6gmgMkZbL6T/qBvjOZt+euHsIabl ZXOaFTFizOAT2a99SdJzGLsd7m0+8g8ZDJTpshK4yW+7RmQvIG8OTZ0jsoHw//5e qwZbE2p7cdTdigCMY7H97wwhHhpoPDWdCliOugdSgiU/ZCnFT2/TT0NwM8/EDDnI fb3toUuzGnDh7rPTkVAkKfBO6klGXm1kqg36ZaMsQuNX6ApA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43sr3b8t1h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Dec 2024 10:22:32 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4BRAMVtE001861 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Dec 2024 10:22:31 GMT Received: from aiquny2-gv.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 27 Dec 2024 02:22:26 -0800 From: Maria Yu Date: Fri, 27 Dec 2024 18:22:16 +0800 Subject: [PATCH] checkpatch: fix UNNECESSARY_KERN_LEVEL false positive for printk_deferred_once Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20241227-avoid-unnecessary-printk-deferred-warning-v1-1-34147aa4a707@quicinc.com> X-B4-Tracking: v=1; b=H4sIANd/bmcC/x3NQQqDQAxG4atI1g3oKO3Qq5QuBufXhkKUpNUW8 e4OLr/Nexs5TOB0rzYyLOIyaUFzqah/JR3Bkosp1KFrQrhxWibJ/FVFD/dkf55N9PPmjAFmyLw mU9GRY7zGuk3o2pip9GbDIL/z9Xju+wGVXIDCewAAAA== X-Change-ID: 20241227-avoid-unnecessary-printk-deferred-warning-886803ae438d To: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn CC: , , Maria Yu X-Mailer: b4 0.15-dev-355e8 X-Developer-Signature: v=1; a=ed25519-sha256; t=1735294946; l=1121; i=quic_aiquny@quicinc.com; s=20240827; h=from:subject:message-id; bh=QIqypVCPTTHFGE7cEkuotaJKYMj+Rypa2n02YgkEE3Q=; b=v+MJg9Q2/NOzJpOFeqLmA23xFNBETI1Uj4zzrcX0yHuDIDRT0U9FLFeHEuIbrvSNkhUIZ3T28 k73/vj0iYHzDUO4P1s3iTYleXjIw41bnjjvuPcrzVMDt/BPzfuPoq2e X-Developer-Key: i=quic_aiquny@quicinc.com; a=ed25519; pk=w3csYrSQYa80T5pm2vrYYXdqoTAMJWQOYfsGU3GVZ6s= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: UHTtMmMLfCxjNyGR6LUTbgnm2uIxekw0 X-Proofpoint-ORIG-GUID: UHTtMmMLfCxjNyGR6LUTbgnm2uIxekw0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 spamscore=0 bulkscore=0 mlxscore=0 suspectscore=0 malwarescore=0 clxscore=1011 mlxlogscore=852 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412270086 KERN_ is never redundant with printk_deferred_once. Signed-off-by: Maria Yu --- There is an example of checkpatch warning here [1]. https://lore.kernel.org/all/20241227-sched-use-printk_deferred_once-v1-1-5d= a85cb38da2@quicinc.com/ [1] --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ccbc1dc00715b184cea70d89b6e2fa26b0ae0c5d..80ddeace88c9e2b3d6c30214ae4= 446e21287c343 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6458,7 +6458,7 @@ sub process { } =20 # check for logging functions with KERN_ - if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ && + if ($line !~ /printk(?:_ratelimited|_once|_deferred_once)?\s*\(/ && $line =3D~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) { my $level =3D $1; if (WARN("UNNECESSARY_KERN_LEVEL", --- base-commit: 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2 change-id: 20241227-avoid-unnecessary-printk-deferred-warning-886803ae438d Best regards, --=20 Maria Yu