Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3012062imm; Sun, 16 Sep 2018 07:57:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaXm+1zNVYdSFl2lkimt/e9+IpECDO5TRniyVAm4muA0feJHm/wH/azjIsGFguP8tMyzbig X-Received: by 2002:a62:174a:: with SMTP id 71-v6mr22234257pfx.217.1537109831287; Sun, 16 Sep 2018 07:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537109831; cv=none; d=google.com; s=arc-20160816; b=fgYWUTxM2ekbZKMs/IYEB83JfUaYNTy4ojzjV9vA4E6HasfNomJTBno9+YGYdHUaO1 P3j7j+StQKtotHm0DJLTFTL2emD6S9V+/Rfob2GXihrhnkKWegUAahQsEipKBiAxuMaK 28fLyt7SMcJ/a1zuS1gPit1cr+Z9kpy+tr62g7veWlmGK7Q842EBbEDi4Oh/dObBnJa+ BrnKbHRLjLkbkqYsEwvpqEPOX/YOCpXkuc4IvhH5I+yYlqzf4ZAhFwXy6aEOmmE/dfol tmiwcxexh1sEjddXwLwK+NmCg3CctkGzUzjf99/JbAkplwmbbjfr7jB7K1tI8Hr6ywUE YPOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=Ty7ApCB7M17cN+2U8oWsJruq7K5Of/iew6tb/2pYre4=; b=xlYfr+J2NvZQ2D9WPEuZozZXY/0zRLre8EDRKha+JWfvwVsY8q6BTRUmc5TLDviWA6 +WIJN+8Z0Iq2VJGQDuY/GND/48hqpZKFcAZuf/evmAUttnQAlgCa+tMjVDmnaRHeW2p/ jgQR4+K02lJCvnF0BcmKHL9GhD8D+T33dUVsaHkvjFe5W+7Yt71m6Xwhuz/2a8xzkECv P7vbYuCc0vSdZF4zjOtMtKUtWGZRTorm9ryUevAu525y5tEZY1EqfXt8fIg/nqLsqPQj LVkSUszo/Z8KmAMPSYyRlHXEv3qPl4H0IVWPNzOYrpuhgE+dThJUcPhwffNCAUGtwzOr NYdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o20-v6si13359027pgd.58.2018.09.16.07.56.42; Sun, 16 Sep 2018 07:57:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728266AbeIPUTw (ORCPT + 99 others); Sun, 16 Sep 2018 16:19:52 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:40599 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726852AbeIPUTw (ORCPT ); Sun, 16 Sep 2018 16:19:52 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7864B1A039B6; Sun, 16 Sep 2018 22:56:32 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.399.0; Sun, 16 Sep 2018 22:56:32 +0800 Message-ID: <5B9E6F1F.5030908@huawei.com> Date: Sun, 16 Sep 2018 22:56:31 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Guenter Roeck CC: , , , Subject: Re: [PATCH] hwmon: Use PTR_ERR_OR_ZERO instead of reimplementing its function References: <20180916004318.GA30797@roeck-us.net> In-Reply-To: <20180916004318.GA30797@roeck-us.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 >> >