Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2436505imm; Sat, 15 Sep 2018 17:43:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZbUiJI08ln/GgCUKHUyQAObCv4e+vu3xpzzuPUloJkAgLRdLnUw8YSJk0qj91bqIFDRinS X-Received: by 2002:a63:5706:: with SMTP id l6-v6mr18246670pgb.118.1537058622767; Sat, 15 Sep 2018 17:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537058622; cv=none; d=google.com; s=arc-20160816; b=DXIPkhwUYCRR4hT74CswPabFOFEj0dpmnvBbwOktGbcTZVKI6eSsLmK9mLhwyPbPT4 CNLkREXhtwJ0pheWAodSKB9KAthLVsSBUN8UWH6OWEM6OZUVUoeLodgZUAQ/3kMgOR04 Y98TOLr+hCA3GASujGyaNxmXfgyIfmYlC9Kcx7zZFqxQSZ+VB7nniCVdE2GVJEJYo9Op f3Inw8Z+ij1357bUI01uWQzHJWx/T6D70SPxELxoRW4VLvrtiyrvwDuMYKkpXFCaS0M4 PMq0AfOy6+Z7MC6TYVopuX+ogzBb0XUIFgLG4OXkHa8Ys6dolGU1b64Hh6d9S+IE6Mzu gScA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=I32c3IMA3Gf6l1MDq8YJ3TJ1oDF3cJShcf4FyJmXZ8g=; b=jviH3en4TDXF4x/I5kdMjCjReMDUivV/+pCSl6cDAGfZ8s7R7Fx9fulDG76XAh6Ruk 4vNBAf+MjM6HaE7WjuaoYl6ETqOLoCvJv2899MgVEx3oiciK/R3Juw0eeeU4kNgkC5VU 2/SyoPYPcEFEdw5yxnp5+HnQU1hKW/81DxNVSdn8Pd63KvrSfASWn4Q2HnjFKSMJzW/O yD4Kd/3IGpG2D14X/6BJ8eWcngRk33Ol1vv8w5VMXTimqiP/ffkcR7fpXGDJdi8kOOTY n1gYkrfmWbkeGwz57pKhkKSipb15TI3Zw51i7k7g+aO39PznyliTDgFJ5BgM8r1TL8Dw aolA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HN1xtNk4; 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 g11-v6si10467829pgo.525.2018.09.15.17.43.26; Sat, 15 Sep 2018 17:43:42 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HN1xtNk4; 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 S1727558AbeIPGEU (ORCPT + 99 others); Sun, 16 Sep 2018 02:04:20 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34845 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726656AbeIPGEU (ORCPT ); Sun, 16 Sep 2018 02:04:20 -0400 Received: by mail-pf1-f196.google.com with SMTP id p12-v6so5938277pfh.2; Sat, 15 Sep 2018 17:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=I32c3IMA3Gf6l1MDq8YJ3TJ1oDF3cJShcf4FyJmXZ8g=; b=HN1xtNk4pM9aKjwm1+qdCLjZ9ISqmPJpQRr2EGOXyS8+FRMrgAEQjImBeQb4u+Y1Oz JO5Qgk8n0r5VspGPZYpjcV+ep5rjypMUQfxFJvVI71JnfmbnC9IAlanaU7NG+uCS/ALw 187Ym+BqNHzVdHgcBlQDkM4Y2vxkLoVgl86CpS9p3m5yUymVZI7Zxr2e//anuLNTiRQy ZftNEsM7U3/XMvuVAgJmoJjyUAYfCRYdJrNz1JcDiHDHmiqQJLISQIdD1K2jHvheLAiv EXO8HRBeao5mmLZx+VAS3oMVZlbCugGLazjzZVArsxDyi48+TmHpvUwRwi+QOSUPhfdw tswQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mime-version:content-disposition:user-agent; bh=I32c3IMA3Gf6l1MDq8YJ3TJ1oDF3cJShcf4FyJmXZ8g=; b=tp9XHVAR5wbRU1qlO2fJjLTBnH1ZOM+0zOy7HUj9Ko9ujxHneeTLoOyqx2Ww0dfKWX 0NlMmHl5riF3tuEmdhbTaoV8lJar3hgVeZqtnNFLp1oNrs/RfJQV+aleRrsAjD8MIjAn 9gk94AecGH+lXCcisuiOZ6otdyK2uTxvgO7Gx4GNrCLNRPFqSJSom3lpH4YMWD3qAKRX l0ccfvM1PYGL8Ws635emkiVp9iTnWJwiqVFOzmshxlfHTAE2LbTZKbci25QWoeeVFtlH Qm5bNCYEbJhvDjme8grJzlHjtWXZcEtZUMWGybd9hWO8tj6DWOlIcF+HtPiiy92hjE5u Q+8Q== X-Gm-Message-State: APzg51BQGG4RJ9pHaTlzhFUV9dyhNyzwkbkRreSn5OMLErVuITgR8TCc G/PJu7FoFfyVvj1eN7F2d30= X-Received: by 2002:a63:da04:: with SMTP id c4-v6mr17992281pgh.398.1537058601187; Sat, 15 Sep 2018 17:43:21 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id t9-v6sm14367336pgi.87.2018.09.15.17.43.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Sep 2018 17:43:20 -0700 (PDT) Date: Sat, 15 Sep 2018 17:43:18 -0700 From: Guenter Roeck To: zhong jiang 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 Message-ID: <20180916004318.GA30797@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 >