From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9055BCDB465 for ; Thu, 19 Oct 2023 15:34:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346303AbjJSPeO (ORCPT ); Thu, 19 Oct 2023 11:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346331AbjJSPeG (ORCPT ); Thu, 19 Oct 2023 11:34:06 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB9D2196 for ; Thu, 19 Oct 2023 08:34:04 -0700 (PDT) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018193855.GA32553@Negi> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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