lkml.org 
[lkml]   [2020]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 35/44] staging: regulator: hi6421v600-regulator: add a driver-specific debug macro
    From
    Date
    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


    \
     
     \ /
      Last update: 2020-08-12 18:11    [W:7.064 / U:0.832 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site