From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9CF9C225C6; Thu, 19 Oct 2023 15:34:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tKBv64mQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06E52C433CA; Thu, 19 Oct 2023 15:34:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697729644; bh=654sFT0xu88VFa1zlsXNRsh5wpWB9hJtkm4F9iJpGLA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tKBv64mQqGUlIugdH0YHyshgZ0xHaRCy71gNR6R+5GcbnFhfeu8+iqKJSALyxsuul PACcI+/OHGScAv4KHKJSeSsW3r580ZfHdzJ/eHC+iBo5UtNtd6FKLgxGtBlEB8QsZC onBb6pBoODe+hc4pHYHMB2tI4x9cHycuGJSC66Ps= Date: Thu, 19 Oct 2023 17:34:01 +0200 From: Greg Kroah-Hartman To: Soumya Negi Cc: Martyn Welch , Manohar Vanga , outreachy@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH 1/2] staging: vme_user: Replace printk() with pr_*(),dev_*() Message-ID: <2023101925-kudos-playful-7c5a@gregkh> References: <2023101823-unhidden-draw-d68c@gregkh> <20231018193855.GA32553@Negi> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018193855.GA32553@Negi> On Wed, Oct 18, 2023 at 12:38:56PM -0700, Soumya Negi wrote: > Hi Greg, > > On Wed, Oct 18, 2023 at 03:26:07PM +0200, Greg Kroah-Hartman wrote: > > On Tue, Oct 17, 2023 at 09:36:32PM -0700, Soumya Negi wrote: > > > vme.c uses printk() to log messages. To improve and standardize message > > > formatting, use logging mechanisms pr_err()/pr_warn() and > > > dev_err()/dev_warn() instead. Retain the printk log levels of the > > > messages during replacement. > > > > > > Issue found by checkpatch.pl > > > > > > Signed-off-by: Soumya Negi > > > --- > > > drivers/staging/vme_user/vme.c | 175 ++++++++++++++++++--------------- > > > 1 file changed, 94 insertions(+), 81 deletions(-) > > > > > > diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c > > > index 6519a7c994a0..e8c2c1e77b7d 100644 > > > --- a/drivers/staging/vme_user/vme.c > > > +++ b/drivers/staging/vme_user/vme.c > > > @@ -9,6 +9,8 @@ > > > * Copyright 2004 Motorola Inc. > > > */ > > > > > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > > > No, this is a driver, as others have pointed out, always use dev_*() > > calls instead. > > Some of the pr_ fns can be dev_, but I don't think all can. > e.g. device NULL-check error messages I would argue that those are pointless and can be removed and also the check is probably not needed either. > Also, there are portions of the driver where we have no access to > any 'struct device' to feed into dev_. Then you can fix that :) thanks, greg k-h