lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Aug 2020 09:10:29 -0700
From:   Joe Perches <joe@...ches.com>
To:     Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc:     linuxarm@...wei.com, mauro.chehab@...wei.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: Re: [PATCH 35/44] staging: regulator: hi6421v600-regulator: add a
 driver-specific debug macro

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.<number>", 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ