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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A94CC433E1 for ; Thu, 13 Aug 2020 10:10:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 014CB2080C for ; Thu, 13 Aug 2020 10:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597313445; bh=8S6jKUx46BaOyd6AEOnq4IBcGElO3fsBbXuThZ9ef9Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=MiI+chMlrVu/usjxt7MqAYKOcB3UUxyriusbDEobNIlgG9sSZsvDtRNSOfKi7Io3B e42owTnm/Fn+pD45KYwxryKODiGuF05wtvc0PcgvFOxTYTQXRPRlYAgWe0UzeAHpn/ fV5cBA+42qBkisNy5yYgoXcGC/NZp4nOnvcK2lG4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726253AbgHMKKn (ORCPT ); Thu, 13 Aug 2020 06:10:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:38912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726048AbgHMKKn (ORCPT ); Thu, 13 Aug 2020 06:10:43 -0400 Received: from coco.lan (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D96E520781; Thu, 13 Aug 2020 10:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597313442; bh=8S6jKUx46BaOyd6AEOnq4IBcGElO3fsBbXuThZ9ef9Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=B/O/ZSqBYDBJzorx/2d7HlkU1ilrHm2wLKnb0Tq0ft8UhED82Fpxw1SNCHwYh01ML Po/6cfpStrpfdUTWfs88AqPqQmiQ0YmuAF/abzvBdZNJxeM+xHCpuUICNvqymCze1u rOq0O+poRpNHojmOg34CDYSTSI1vXxT+A1T2QV10= Date: Thu, 13 Aug 2020 12:10:36 +0200 From: Mauro Carvalho Chehab To: Joe Perches Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Subject: Re: [PATCH 35/44] staging: regulator: hi6421v600-regulator: add a driver-specific debug macro Message-ID: <20200813121036.126c4797@coco.lan> In-Reply-To: <6a424468eb61e2eb9b014817819dd4da61f2ada1.camel@perches.com> References: <7cb10b3910e9fa3e52d36e4e416030175cc761ab.1597247164.git.mchehab+huawei@kernel.org> <6a424468eb61e2eb9b014817819dd4da61f2ada1.camel@perches.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 12 Aug 2020 09:10:29 -0700 Joe Perches escreveu: > On Wed, 2020-08-12 at 17:56 +0200, Mauro Carvalho Chehab wrote: > > Using dev_dbg() is not too nice, as, instead of printing the > > name of the regulator, it prints "regulator.", making > > harder to associate what is happening with each ldo line. > > > > So, add a debug-specific macro, which will print the rdev's > > name, just like the regulator core. > > Seems sensible, but trivially: > > > diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c b/drivers/staging/hikey9xx/hi6421v600-regulator.c > [] > > @@ -209,10 +212,10 @@ static unsigned int hi6421_spmi_regulator_get_optimum_mode(struct regulator_dev > > struct hi6421v600_regulator *sreg = rdev_get_drvdata(rdev); > > > > if (load_uA || ((unsigned int)load_uA > sreg->eco_uA)) { > > - dev_dbg(&rdev->dev, "%s: normal mode", __func__); > > + rdev_dbg(rdev, "normal mode"); > > return REGULATOR_MODE_NORMAL; > > } else { > > - dev_dbg(&rdev->dev, "%s: idle mode", __func__); > > + rdev_dbg(rdev, "idle mode"); > > missing terminating newlines As per request from Jonathan, I ended dropping those rdev_dbg() on a followup patch. Btw, after this changeset: commit 563873318d328d9bbab4b00dfd835ac7c7e28697 Merge: 24532f768121 bfd8d3f23b51 Author: Linus Torvalds Date: Mon Oct 10 09:29:50 2016 -0700 Merge branch 'printk-cleanups' Merge my system logging cleanups, triggered by the broken '\n' patches. the printk lib will add a line feed if a "\n" is missing. I had to get rid of pr_cont() & friends on that time on media, due to that. Thanks, Mauro 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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33370C433E1 for ; Thu, 13 Aug 2020 10:10:49 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 074C820781 for ; Thu, 13 Aug 2020 10:10:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="B/O/ZSqB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 074C820781 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BB7B6226F3; Thu, 13 Aug 2020 10:10:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sGBaP6EQTbsv; Thu, 13 Aug 2020 10:10:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 92DF9203FD; Thu, 13 Aug 2020 10:10:44 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 8771B1BF48B for ; Thu, 13 Aug 2020 10:10:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 83F8686B7A for ; Thu, 13 Aug 2020 10:10:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e4DpqVwOBCMn for ; Thu, 13 Aug 2020 10:10:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E75F48699B for ; Thu, 13 Aug 2020 10:10:42 +0000 (UTC) Received: from coco.lan (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D96E520781; Thu, 13 Aug 2020 10:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597313442; bh=8S6jKUx46BaOyd6AEOnq4IBcGElO3fsBbXuThZ9ef9Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=B/O/ZSqBYDBJzorx/2d7HlkU1ilrHm2wLKnb0Tq0ft8UhED82Fpxw1SNCHwYh01ML Po/6cfpStrpfdUTWfs88AqPqQmiQ0YmuAF/abzvBdZNJxeM+xHCpuUICNvqymCze1u rOq0O+poRpNHojmOg34CDYSTSI1vXxT+A1T2QV10= Date: Thu, 13 Aug 2020 12:10:36 +0200 From: Mauro Carvalho Chehab To: Joe Perches Subject: Re: [PATCH 35/44] staging: regulator: hi6421v600-regulator: add a driver-specific debug macro Message-ID: <20200813121036.126c4797@coco.lan> In-Reply-To: <6a424468eb61e2eb9b014817819dd4da61f2ada1.camel@perches.com> References: <7cb10b3910e9fa3e52d36e4e416030175cc761ab.1597247164.git.mchehab+huawei@kernel.org> <6a424468eb61e2eb9b014817819dd4da61f2ada1.camel@perches.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mauro.chehab@huawei.com, Greg Kroah-Hartman , devel@driverdev.osuosl.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" Em Wed, 12 Aug 2020 09:10:29 -0700 Joe Perches escreveu: > On Wed, 2020-08-12 at 17:56 +0200, Mauro Carvalho Chehab wrote: > > Using dev_dbg() is not too nice, as, instead of printing the > > name of the regulator, it prints "regulator.", making > > harder to associate what is happening with each ldo line. > > > > So, add a debug-specific macro, which will print the rdev's > > name, just like the regulator core. > > Seems sensible, but trivially: > > > diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c b/drivers/staging/hikey9xx/hi6421v600-regulator.c > [] > > @@ -209,10 +212,10 @@ static unsigned int hi6421_spmi_regulator_get_optimum_mode(struct regulator_dev > > struct hi6421v600_regulator *sreg = rdev_get_drvdata(rdev); > > > > if (load_uA || ((unsigned int)load_uA > sreg->eco_uA)) { > > - dev_dbg(&rdev->dev, "%s: normal mode", __func__); > > + rdev_dbg(rdev, "normal mode"); > > return REGULATOR_MODE_NORMAL; > > } else { > > - dev_dbg(&rdev->dev, "%s: idle mode", __func__); > > + rdev_dbg(rdev, "idle mode"); > > missing terminating newlines As per request from Jonathan, I ended dropping those rdev_dbg() on a followup patch. Btw, after this changeset: commit 563873318d328d9bbab4b00dfd835ac7c7e28697 Merge: 24532f768121 bfd8d3f23b51 Author: Linus Torvalds Date: Mon Oct 10 09:29:50 2016 -0700 Merge branch 'printk-cleanups' Merge my system logging cleanups, triggered by the broken '\n' patches. the printk lib will add a line feed if a "\n" is missing. I had to get rid of pr_cont() & friends on that time on media, due to that. Thanks, Mauro _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel