Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp562666rdb; Thu, 19 Oct 2023 12:06:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkEnvjueLXD1aOzoMgX8fZooXZIosj5nihQZJ7XsmPtqWO6dv1ZxISwiSzNdwZ5mBWY5yG X-Received: by 2002:a17:902:c101:b0:1bb:6875:5a73 with SMTP id 1-20020a170902c10100b001bb68755a73mr3246184pli.2.1697742396680; Thu, 19 Oct 2023 12:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697742396; cv=none; d=google.com; s=arc-20160816; b=wkhPL67We6h3xT+xf+2EYLfxsHyjj67bHjI/Ll2VS6nlrGzze3RcusB8u8FSSXasuE eJWbR1KjxsRzFW5+BWQ2cV2cd26zIN7GJfkK04LcARTNEWKY9AgKkdBgRKpp5kaOqZ2s V9LcHG6tUz7cpW5xsdqSW14TRwnAMyYDpVXFKzVPG0ESq1QY29YD6IJOymfyp4hXNuRl 9l+JlFweATm2X59/jDNkEiWmDnBSFtWxw+r3Ez41ie+GVUCFn4lOrew7OFZgbU6Hw6at vdOxD1Km98yMZidQjdyPCN3p9MLqJunzefzA76e7gDDq2GWCoGtLS69CWo8pgWWGcSYt VWzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zWJpu48XDgOzWODf3Ip57EpXlsaglYJphkrHkfSodW0=; fh=I8neygvW90mteaepb3EsGPWeBP2Ko6O9PeFKCJ8ssKg=; b=faBR5JZCqk60C0+8/7iF0ZTREe40gK9TsbgrSZafrvodR5djs2VR+eOh7oOmykfN0l UT/HHAdjFj3H7+9m6Dfmz+pGv8o8W6NHzWpDjHFQbGyt6HCmGmoMDCAMtCImwDEZDmEE ExqrsXHnz3TnJeVDNMX5/wehfE3MWQ6n9ZvTo6jUhRbSQvejc8ncOLiF7OZ4BjIkT2eb Y+ziOIoVeglQERkLjr+Olln3Yk1PyH4IYtNJJFjXqnSyywQ36h1B9zFoHIaPe30FRLjs 5wZUQ3HTRVQaOAsqQyQOQbXNyn61XwDUmIb4xhMt28+xI8C4yLlSGWhmrA6E059d0iaH ZV4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QqAzEHyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p3-20020a170902a40300b001befd0512ecsi116337plq.314.2023.10.19.12.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 12:06:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QqAzEHyP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 464BB81B5D38; Thu, 19 Oct 2023 12:06:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235518AbjJSTGZ (ORCPT + 99 others); Thu, 19 Oct 2023 15:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233278AbjJSTGW (ORCPT ); Thu, 19 Oct 2023 15:06:22 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5DF4F7 for ; Thu, 19 Oct 2023 12:06:20 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-692c02adeefso57092b3a.3 for ; Thu, 19 Oct 2023 12:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697742380; x=1698347180; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=zWJpu48XDgOzWODf3Ip57EpXlsaglYJphkrHkfSodW0=; b=QqAzEHyPspvlUOPkbuuIy8UJBJoEtJJC1m1O9V2PGW+nUiDFtRgjE8uRT5fglm40Q5 LW7697TLdwUB7p0ktzRPMPKUa4fJ49wn3sBKfVTh2IrDs3jQCp5qVNmD1tE02JJ+0Spf O2t8zwfExAm45vr7pGu9vLP8kGnRujpmgjqz0w+pz6c313QBp7ciTQ8+EOI8+bGJpdXy 1DxFnoFPLYdw67GJAlUEqNL1gT6ItgqMFdwJZL7g4lR+02PkIfwa5pRenNfipIDCajq4 Kq1V3oZOoiTcl1QiJRyrQ/nsZPCpKD2eKEfA8jxMBd6LOF8aSEzb80DEO3eqfFW2ZO+n 9OPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697742380; x=1698347180; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zWJpu48XDgOzWODf3Ip57EpXlsaglYJphkrHkfSodW0=; b=tRBF3Bnwz0v40+d1l7LDnMehnAKys1Uld/rpUDJP10cre3+fQS6x0lChod7pT5yDjg GIkheYLN3tb8CM3VSSSAU/13KrHxIE7Hd9r7qLUynq7yNEqJfX2KbmFQGbar921sBxJe pX2eXbi6quqyBNH8UONdu/jepISljow8M9mMGZejQp4rAlYK4pPsbgAqRBrT03zm3Ii2 4xBDFucTp++fkJ7mxYI7d9k6SIhXJWNW/TTxhwiHu+6XyPUzo3q0HQBwOGIp2cLBNTJu CNzkmLH6neejrc8MzZMwGhBaELhD115sq/C8W2CdIpRAvEo43izTA1lzjJgo1zqeU2q1 7qcQ== X-Gm-Message-State: AOJu0YwUJhG4m2hQEeggFa3awF80o6C5Gf4m8sPwgeU9alvqGMx8TL+r ovpijdM4AZeJ7L7i4ybyEfUox1r+rfPH+g== X-Received: by 2002:a05:6a00:1895:b0:6be:2bfa:6290 with SMTP id x21-20020a056a00189500b006be2bfa6290mr3054593pfh.8.1697742379976; Thu, 19 Oct 2023 12:06:19 -0700 (PDT) Received: from Negi ([68.181.16.134]) by smtp.gmail.com with ESMTPSA id c4-20020a056a00008400b006be22fde07dsm133346pfj.106.2023.10.19.12.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 12:06:19 -0700 (PDT) Date: Thu, 19 Oct 2023 12:06:18 -0700 From: Soumya Negi To: Greg Kroah-Hartman 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: <20231019190618.GA29750@Negi> References: <2023101823-unhidden-draw-d68c@gregkh> <20231018193855.GA32553@Negi> <2023101925-kudos-playful-7c5a@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023101925-kudos-playful-7c5a@gregkh> User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 19 Oct 2023 12:06:34 -0700 (PDT) On Thu, Oct 19, 2023 at 05:34:01PM +0200, Greg Kroah-Hartman wrote: > 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. Got it. The pr_() in find_bridge() can't be converted to dev_ so I'll remove the message entirely in another patch. I understand that the device-NULL checks should be done on the caller's side. Since empty devices would mean something went wrong, would it be better to put in an assertion(..WARN_ON) when removing the check? > > 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 :) Will do this. Regards, Soumya > thanks, > > greg k-h