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:   Fri, 22 May 2020 18:39:26 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jishnu Prakash <jprakash@...eaurora.org>
Cc:     agross@...nel.org, Bjorn Andersson <bjorn.andersson@...aro.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Matthias Kaehlcke <mka@...omium.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Amit Kucheria <amit.kucheria@...durent.com>,
        smohanad@...eaurora.org, kgunda@...eaurora.org,
        aghayal@...eaurora.org, Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-arm-msm@...r.kernel.org,
        linux-iio <linux-iio@...r.kernel.org>,
        linux-arm-msm-owner@...r.kernel.org
Subject: Re: [PATCH V5 4/5] iio: adc: Update debug prints

On Fri, May 22, 2020 at 5:25 PM Jishnu Prakash <jprakash@...eaurora.org> wrote:
>
> Change pr_err/pr_debug statements to dev_err/dev_dbg for
> increased clarity.
>

Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>

In the same way you should have patch with removal of ' < 0' parts.

> Signed-off-by: Jishnu Prakash <jprakash@...eaurora.org>
> ---
>  drivers/iio/adc/qcom-spmi-adc5.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
> index e1482fd..11eb97c 100644
> --- a/drivers/iio/adc/qcom-spmi-adc5.c
> +++ b/drivers/iio/adc/qcom-spmi-adc5.c
> @@ -249,11 +249,11 @@ static int adc5_read_voltage_data(struct adc5_chip *adc, u16 *data)
>         *data = (rslt_msb << 8) | rslt_lsb;
>
>         if (*data == ADC5_USR_DATA_CHECK) {
> -               pr_err("Invalid data:0x%x\n", *data);
> +               dev_err(adc->dev, "Invalid data:0x%x\n", *data);
>                 return -EINVAL;
>         }
>
> -       pr_debug("voltage raw code:0x%x\n", *data);
> +       dev_dbg(adc->dev, "voltage raw code:0x%x\n", *data);
>
>         return 0;
>  }
> @@ -385,24 +385,24 @@ static int adc5_do_conversion(struct adc5_chip *adc,
>
>         ret = adc5_configure(adc, prop);
>         if (ret) {
> -               pr_err("ADC configure failed with %d\n", ret);
> +               dev_err(adc->dev, "ADC configure failed with %d\n", ret);
>                 goto unlock;
>         }
>
>         if (adc->poll_eoc) {
>                 ret = adc5_poll_wait_eoc(adc);
>                 if (ret) {
> -                       pr_err("EOC bit not set\n");
> +                       dev_err(adc->dev, "EOC bit not set\n");
>                         goto unlock;
>                 }
>         } else {
>                 ret = wait_for_completion_timeout(&adc->complete,
>                                                         ADC5_CONV_TIMEOUT);
>                 if (!ret) {
> -                       pr_debug("Did not get completion timeout.\n");
> +                       dev_dbg(adc->dev, "Did not get completion timeout.\n");
>                         ret = adc5_poll_wait_eoc(adc);
>                         if (ret) {
> -                               pr_err("EOC bit not set\n");
> +                               dev_err(adc->dev, "EOC bit not set\n");
>                                 goto unlock;
>                         }
>                 }
> @@ -724,7 +724,7 @@ static int adc5_get_dt_channel_data(struct adc5_chip *adc,
>         channel_name = of_get_property(node,
>                                 "label", NULL) ? : node->name;
>         if (!channel_name) {
> -               pr_err("Invalid channel name\n");
> +               dev_err(dev, "Invalid channel name\n");
>                 return -EINVAL;
>         }
>         prop->datasheet_name = channel_name;
> @@ -767,7 +767,7 @@ static int adc5_get_dt_channel_data(struct adc5_chip *adc,
>                         return ret;
>                 }
>
> -               pr_debug("dig_ver:minor:%d, major:%d\n", dig_version[0],
> +               dev_dbg(dev, "dig_ver:minor:%d, major:%d\n", dig_version[0],
>                                                 dig_version[1]);
>                 /* Digital controller >= 5.3 have hw_settle_2 option */
>                 if ((dig_version[0] >= ADC5_HW_SETTLE_DIFF_MINOR &&
> @@ -971,7 +971,7 @@ static int adc5_probe(struct platform_device *pdev)
>
>         ret = adc5_get_dt_data(adc, node);
>         if (ret) {
> -               pr_err("adc get dt data failed\n");
> +               dev_err(dev, "adc get dt data failed\n");
>                 return ret;
>         }
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ