Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jishnu Prakash <jprakash@codeaurora.org>
Cc: agross@kernel.org, Bjorn Andersson <bjorn.andersson@linaro.org>,
	devicetree <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Amit Kucheria <amit.kucheria@verdurent.com>,
	smohanad@codeaurora.org, kgunda@codeaurora.org,
	aghayal@codeaurora.org, Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-arm-msm@vger.kernel.org,
	linux-iio <linux-iio@vger.kernel.org>,
	linux-arm-msm-owner@vger.kernel.org
Subject: Re: [PATCH V5 4/5] iio: adc: Update debug prints
Date: Fri, 22 May 2020 18:39:26 +0300
Message-ID: <CAHp75VcE9Q26HUn9cRH8TtjzCrFxSyu=J9XhT-m1Fs6=Gbh-8Q@mail.gmail.com> (raw)
In-Reply-To: <1590157452-27179-5-git-send-email-jprakash@codeaurora.org>

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

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

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

> Signed-off-by: Jishnu Prakash <jprakash@codeaurora.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

  reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1590157452-27179-1-git-send-email-jprakash@codeaurora.org>
2020-05-22 14:24 ` [PATCH V5 1/5] iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format Jishnu Prakash
2020-05-22 14:24 ` [PATCH V5 2/5] iio: adc: Add PMIC7 ADC bindings Jishnu Prakash
2020-05-22 14:24 ` [PATCH V5 3/5] iio: adc: Add support for PMIC7 ADC Jishnu Prakash
2020-05-22 15:37   ` Andy Shevchenko
2020-05-22 15:41     ` Andy Shevchenko
2020-05-24 11:59   ` Jonathan Cameron
2020-05-22 14:24 ` [PATCH V5 4/5] iio: adc: Update debug prints Jishnu Prakash
2020-05-22 15:39   ` Andy Shevchenko [this message]
2020-05-22 14:24 ` [PATCH V5 5/5] iio: adc: Clean up ADC code common to PMIC5 and PMIC7 Jishnu Prakash
2020-05-22 15:41   ` Andy Shevchenko
2020-05-24 12:04   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75VcE9Q26HUn9cRH8TtjzCrFxSyu=J9XhT-m1Fs6=Gbh-8Q@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=aghayal@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=amit.kucheria@verdurent.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=jprakash@codeaurora.org \
    --cc=kgunda@codeaurora.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm-owner@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=pmeerw@pmeerw.net \
    --cc=smohanad@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git