Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4027197rdg; Wed, 18 Oct 2023 12:39:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6amXbHNZ4TG1jav4+D8rAuI7Icx4nCBwqzd/JDPzmQMvL1RG6Qq+G5I0RoDMl8TBnNcT+ X-Received: by 2002:a05:6870:44d4:b0:1ea:7bd1:c495 with SMTP id t20-20020a05687044d400b001ea7bd1c495mr390358oai.27.1697657964971; Wed, 18 Oct 2023 12:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697657964; cv=none; d=google.com; s=arc-20160816; b=vVqTS45S6OdO305u8mE1sjgw41E59Htx2MRyDIzOAtuhQdmKIZvK2oeqLXk/QH8Uiw TSUp2voPyvPjTRSqZyqpvZEtbf9snnPIt3zHiYT3MJw6rcGTCGLagYUBLvp+k5hvAsSM G05Fktm1QtcqjoixSnGRJZZpxo87TWcfs4P0KUMFCZU03lsfkmkqcS5yEY8Y/1flFefQ aGkfTAGR6Yk+ED32aXBKc/E5mAy6NNDmsw3K8Pa1UQKGDdxgV3GSnBzStBruQbQMNwj2 TznZyNaDGazRNGmOaXa0YlXW0gsw2E0kEtg8EbdRrQ9AHigRrHC6lxXlc3w4w1Aaky6O 6edw== 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=SbWpIm78ki4Fx1nMnnk18t9z2vykmSJma0XrCQOyKmQ=; fh=I8neygvW90mteaepb3EsGPWeBP2Ko6O9PeFKCJ8ssKg=; b=aHNxbQc+dW4c3IFQieBAOccDyk6Ed0b6RLblTBASJ9J/5pzsUMap/cownO67lP1Dwj WWW5X6pAv1tRSEPpD/r3o7Fndq70rb+igwQcBepMFku/Jy3hdVpHBXyExPUZ8TTds2L+ q4OqKhJrY1JegzvEag9ZWQLcSUfU7xEF655Q3kgva2gLtQENVe+Llx3MxMW/YiB8zxXO 1TPaGkqf0tG50pmeqpXHygBY9l22ki52sZXIXUl7uq1VNwTWSX8qvCcXo6OCo20vA32p od4B41qdt5ckngcY2BaXsrJyBkB4qxxxhd0H4Jt8fCWvb2b8ojMuamgW1WtX0dX1KV7a +bKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PhbC3zvs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s196-20020a6377cd000000b005898d648224si3018796pgc.12.2023.10.18.12.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 12:39:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PhbC3zvs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 57B8F80DA98D; Wed, 18 Oct 2023 12:39:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbjJRTjB (ORCPT + 99 others); Wed, 18 Oct 2023 15:39:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231536AbjJRTi7 (ORCPT ); Wed, 18 Oct 2023 15:38:59 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 033E611F for ; Wed, 18 Oct 2023 12:38:58 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bf55a81eeaso50065055ad.0 for ; Wed, 18 Oct 2023 12:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697657937; x=1698262737; 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=SbWpIm78ki4Fx1nMnnk18t9z2vykmSJma0XrCQOyKmQ=; b=PhbC3zvsbqSnCKVVVmQ+ve5EGfJkRVPMGtOEBQYCtp95cBPlAQ9EgXGlPDngkVhF4a VtlEFeeIgBzsNzQG7QPYBNlMouM25sPpLvd6isdInCOwW3Bu/9SUBnJNgq1r3BKMMpsy hfjg3BI+bFDPypvEANylJthpQp+p/cHxMPNmbe7SBkgewbR3IjKKUG/l2KCnVtXgFmHI VmGzPr1kQpFbwpUGcW2oWoWT5lNVVOEezRX8lGlIVD56ZDxgtcf9Sz1JXe75/4RBaDY0 nMZ2gYblEIdcPWkhnTOSrjSv8ZRL4hF1uIMwtLqxBG+sSouo5VD1+WhWL26mTuxFPWJi 3v3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697657937; x=1698262737; 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=SbWpIm78ki4Fx1nMnnk18t9z2vykmSJma0XrCQOyKmQ=; b=X7NtlMkZiQrk22Y+/h4doPu0uMDtK/YUA5elKxmxFeR5/U4C9k5EXcGsX+hfUCObHe kIX4mxQCR68TW8pkGaAur8/ZknjUVKxF8ymmyhvMYaq7H1+en2ypPf2B20pfcMERjYED msw5tvr8gSRq0sAOyqDyH0yak/C8/s5+vb51Li0DXaPeNUgSaC32nlv97SNNXVDbqat7 pOnv8O3odYQ9RM2xzOkcb1mFLJdc2lMTTdAYwso3P9lWgNoPdmbieSOi97SFI5xO3tyj v0cZH3ej7gyI8AJhtHcM3bmm/MKtGRpY+qfEkZfYg1g7xZbzC4ddnP2LJnrAGFQYvR9J TBVA== X-Gm-Message-State: AOJu0YxyV3a90NWgyg7jQ4CDLr4cNWG58aizKtJ483u40ThtAEq4IYG9 fFaljjooObYxg7dDTPw39Mg= X-Received: by 2002:a17:903:2305:b0:1c8:9d32:3396 with SMTP id d5-20020a170903230500b001c89d323396mr332383plh.60.1697657937180; Wed, 18 Oct 2023 12:38:57 -0700 (PDT) Received: from Negi ([68.181.16.134]) by smtp.gmail.com with ESMTPSA id u8-20020a17090282c800b001b896d0eb3dsm311044plz.8.2023.10.18.12.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 12:38:56 -0700 (PDT) Date: Wed, 18 Oct 2023 12:38:56 -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: <20231018193855.GA32553@Negi> References: <2023101823-unhidden-draw-d68c@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2023101823-unhidden-draw-d68c@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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 12:39:22 -0700 (PDT) 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 Also, there are portions of the driver where we have no access to any 'struct device' to feed into dev_. > Yes, that means that sometimes you do need to propagate the proper > device to the function, but that's ok, it's the correct solution here. Got it. In v2, I'll make pr_*() to dev_*() wherever possible. In most cases, the VME bridge device is accessible or if not we can get it using find_bridge(). Thanks, Soumya > thanks, > > greg k-h