All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang@huawei.com>
To: Guenter Roeck <linux@roeck-us.net>
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: Sun, 16 Sep 2018 22:56:31 +0800	[thread overview]
Message-ID: <5B9E6F1F.5030908@huawei.com> (raw)
In-Reply-To: <20180916004318.GA30797@roeck-us.net>

On 2018/9/16 8:43, Guenter Roeck wrote:
> 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.
Get it.  Thanks.

Sincerely,
zhong jiang
> 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
>>
>

  reply	other threads:[~2018-09-16 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-16  0:43 [PATCH] hwmon: Use PTR_ERR_OR_ZERO instead of reimplementing its function Guenter Roeck
2018-09-16 14:56 ` zhong jiang [this message]
  -- 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=5B9E6F1F.5030908@huawei.com \
    --to=zhongjiang@huawei.com \
    --cc=jdelvare@suse.com \
    --cc=kronos.it@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.