From: Guenter Roeck <linux@roeck-us.net>
To: zhong jiang <zhongjiang@huawei.com>
Cc: kronos.it@gmail.com, jdelvare@suse.com,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: Use PTR_ERR_OR_ZERO instead of reimplementing its function
Date: Sat, 15 Sep 2018 17:43:18 -0700 [thread overview]
Message-ID: <20180916004318.GA30797@roeck-us.net> (raw)
On Tue, Sep 11, 2018 at 08:03:37PM +0800, zhong jiang wrote:
> PTR_ERR_OR_ZERO has implemented the same function. We prefer to use
> inlined function rather than code-opened implementation.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Applied to hwmon-next. For future patches, please also refer to the
affected driver in the Subject line, unless the change is in the
subsystem core code.
Thanks,
Guenter
> ---
> drivers/hwmon/asus_atk0110.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
> index a6636fe..a7cf008 100644
> --- a/drivers/hwmon/asus_atk0110.c
> +++ b/drivers/hwmon/asus_atk0110.c
> @@ -1210,10 +1210,8 @@ static int atk_register_hwmon(struct atk_data *data)
> data->hwmon_dev = hwmon_device_register_with_groups(dev, "atk0110",
> data,
> data->attr_groups);
> - if (IS_ERR(data->hwmon_dev))
> - return PTR_ERR(data->hwmon_dev);
>
> - return 0;
> + return PTR_ERR_OR_ZERO(data->hwmon_dev);
> }
>
> static int atk_probe_if(struct atk_data *data)
> --
> 1.7.12.4
>
next reply other threads:[~2018-09-16 0:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-16 0:43 Guenter Roeck [this message]
2018-09-16 14:56 ` [PATCH] hwmon: Use PTR_ERR_OR_ZERO instead of reimplementing its function zhong jiang
-- strict thread matches above, loose matches on Subject: below --
2018-09-11 12:03 zhong jiang
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=20180916004318.GA30797@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=kronos.it@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhongjiang@huawei.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).