Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2657466pxb; Tue, 13 Apr 2021 07:12:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRa13/vHZWIlodXNQfeToYQ4wND3/o6hDJdxQc6J/zFucSX9am9TVzJU0zTGlJVla/n1B2 X-Received: by 2002:a17:906:6882:: with SMTP id n2mr32265294ejr.50.1618323149701; Tue, 13 Apr 2021 07:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618323149; cv=none; d=google.com; s=arc-20160816; b=A7B5rFyS34n6ony+TYHIGB0YgHd/aUJiSy5WziE7gMbg1pJSFQGSr9St3oDIXkiKni xBDyhSFx7qEUY0vTl3H4VJ/GVuRIssVeBErqoS+AiHWwgTdqHrfG9L2wHxAxbxG4Nb33 7LFemVH4wtK4zSk+7LWCmT/rdEi1uIBTOc2yEk13qMueuM4+qFqzsTOFL7DTJGePdf3x eD1eN7wTWJb/kxoAVpldsINWl3gJQWbXuAD1nQGXRUXdfe3BdHqVw9po+nOFr9gNVnU2 ZKwHwBCnH0MkQSTkGZ6X+Y7v7kwU/DEgGy8hM0dMhaFGOdHlmX42bE5lBCsYIqdXgXWq K2BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=utEBEmltQSk7Y15EuX1ZxwriEwU21xhKl7UaEQvtrI0=; b=c8l8evs3QN48Fq/x/UAQRrd2ofUhnh6ARo15sbaN/c6CdeNpBzQjW2vmhRsyiEhOjO klILJhcW2FhY8sMwgN1oQV6TdXLiFWsjvJxaY2l1G6/6vR127t6p4YU0zca7l89UkBCv h7yILwv2yaiPfnexaBUEUSfUCU5VtSBdBN5Qdx/gLMYyqLr2LcRa5Gdf/PzwLUJKiUfC gl1AKwkdmq5W2c8Hqa1IcU7Efc2ySBHvvAM2Y+I2Ul7yxxyi9i6E8aYXkCbcxSkI7x19 FCpO2FG9e4zLQcr+WRjqnTBq2YmmqqykvsQBT/9pXYd4ak/An0oziJhr3/GeVbAG8BCO LKYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lOSS5qqJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be12si11105909edb.159.2021.04.13.07.12.06; Tue, 13 Apr 2021 07:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lOSS5qqJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245309AbhDMJMB (ORCPT + 99 others); Tue, 13 Apr 2021 05:12:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:45230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245305AbhDMJMB (ORCPT ); Tue, 13 Apr 2021 05:12:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 49B706124B; Tue, 13 Apr 2021 09:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618305101; bh=CXFf9eOGEOFFg2jSw8hjvuyc0IJcgo7e7gCJHl6r5ps=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lOSS5qqJUKjV0+GdYJ4diz1gJIWMmavB/rMBrIDaaAKYi3xd815/Ys1syzcEYQoze w65feWLmhPgB5lxSOFFzZKc1ykuxMnhh39qZ4dU9b/d5ndBgaQgR5c19PBWOeAwVzi YI45q9Iko1JkNXX3y0cRXvDSL/GM6vd7dbtn2JD8= Date: Tue, 13 Apr 2021 11:11:38 +0200 From: Greg KH To: Fabio Aiuto Cc: joe@perches.com, julia.lawall@inria.fr, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: cocci script hints request Message-ID: References: <20210413090400.GA5477@agape.jhs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210413090400.GA5477@agape.jhs> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2021 at 11:04:01AM +0200, Fabio Aiuto wrote: > Hi, > > I would like to improve the following coccinelle script: > > @@ > expression a, fmt; > expression list var_args; > @@ > > - DBG_871X_LEVEL(a, fmt, var_args); > + printk(fmt, var_args); > > I would replace the DBG_871X_LEVEL macro with printk, No you really do not, you want to change that to a dev_*() call instead depending on the "level" of the message. No "raw" printk() calls please, I will just reject them :) thanks, greg k-h