Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2044921rwd; Sun, 21 May 2023 11:44:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hUIkZ+8AqBZgaNwxkyIzFaaqUo+11l09dvSUtcSyJQvCOeAWow7LnikWXZomxZetixGE4 X-Received: by 2002:a05:6a20:4292:b0:10b:c7f4:66ee with SMTP id o18-20020a056a20429200b0010bc7f466eemr147216pzj.42.1684694682313; Sun, 21 May 2023 11:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684694682; cv=none; d=google.com; s=arc-20160816; b=n2dYB34eMYYYX4L8O0uJBkF2Wn+qnYjgZRF9/nt66hk5w3oDU4mrFO+Ivve2zNd1cB 0Nt0e+NIrbiVF8hNzltfFg/miJ43v5S1xsKEZqi7+wcilhEq40yn1qqVWG4FHorQ34K0 9fMcU0e1rTGSyDwVq6va2FAnEkZ6NLVugvPRlWgXVwbkhlM9+Sh+aQNR/91lG7YmNV9N LR+aDN3FsQo/kbpIYBsYhLsWzypaQUapib68GxZO+hPMbhv01RfsGeCO1eGdi8hEqPXE 7UzSEySY0HuiWPE2TSJLuhleLHZN1bdc8LaoYR55A5yBna9BTW+LX/2bKri0rcFH7PGO aeqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=DK06uYPsv+tK0rSfNp0n2Nr6AD7gnyw1nA0kqL5dt88=; b=qRa/xFa9r19R/JjL9EJ63FYWbkJqb7wWTdEgLueXsDbtiJkfxDwkEXIE/UCc+//hJj ixHJMk5DJDwjlt6f+QrDJxw2YLc3vB1xV9TZ3gxA7jYBDJFqn3ySqyV5efJePeSHhJSN ybpFCaqk5aGZer0TJDwcYfV/rs09IljthXXiWPIjuu3LH2G5qelCRKv7HJFTkHtX27se Dkc4X6cejYOv2cJJH7IhqIi1L3g/5fMF5HELHxMhXviBShNv/ODokxMtJvdv5fyhUCgD CkSoWwcMUm48HEL+Mb5J76I1Za8R6u1lNMLO3HXVVr22SpA/UiobkOKIPUe1KV651MQh tXzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x71-20020a63864a000000b0053b52fed717si2300016pgd.864.2023.05.21.11.44.25; Sun, 21 May 2023 11:44:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230176AbjEUSca (ORCPT + 99 others); Sun, 21 May 2023 14:32:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231319AbjEURnD (ORCPT ); Sun, 21 May 2023 13:43:03 -0400 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 019CFE45 for ; Sun, 21 May 2023 10:14:26 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id ee8f2be1-f7fa-11ed-abf4-005056bdd08f; Sun, 21 May 2023 20:14:24 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Sun, 21 May 2023 20:14:23 +0300 To: Matti Vaittinen Cc: Matti Vaittinen , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Wolfram Sang , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Andreas Klinger , Marcin Wojtas , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , Linus Walleij , Paul Cercueil , Akhil R , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, netdev@vger.kernel.org, openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH v5 2/8] iio: mb1232: relax return value check for IRQ get Message-ID: References: <05636b651b9a3b13aa3a3b7d3faa00f2a8de6bca.1684493615.git.mazziesaccount@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05636b651b9a3b13aa3a3b7d3faa00f2a8de6bca.1684493615.git.mazziesaccount@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fri, May 19, 2023 at 02:01:23PM +0300, Matti Vaittinen kirjoitti: > fwnode_irq_get() was changed to not return 0 anymore. > > Drop check for return value 0. > > Signed-off-by: Matti Vaittinen With or without below being addressed, Reviewed-by: Andy Shevchenko > --- > Revsion history: > v4 => v5: > - drop unnecessary data->irqnr = -1 assignment > > The first patch of the series changes the fwnode_irq_get() so this depends > on the first patch of the series and should not be applied alone. > --- > drivers/iio/proximity/mb1232.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/iio/proximity/mb1232.c b/drivers/iio/proximity/mb1232.c > index e70cac8240af..3ae226297a00 100644 > --- a/drivers/iio/proximity/mb1232.c > +++ b/drivers/iio/proximity/mb1232.c > @@ -76,7 +76,7 @@ static s16 mb1232_read_distance(struct mb1232_data *data) > goto error_unlock; > } > > - if (data->irqnr >= 0) { > + if (data->irqnr > 0) { > /* it cannot take more than 100 ms */ > ret = wait_for_completion_killable_timeout(&data->ranging, > HZ/10); > @@ -212,10 +212,7 @@ static int mb1232_probe(struct i2c_client *client) > init_completion(&data->ranging); > > data->irqnr = fwnode_irq_get(dev_fwnode(&client->dev), 0); > - if (data->irqnr <= 0) { > - /* usage of interrupt is optional */ Maybe this comment can be kept. > - data->irqnr = -1; > - } else { > + if (data->irqnr > 0) { > ret = devm_request_irq(dev, data->irqnr, mb1232_handle_irq, > IRQF_TRIGGER_FALLING, id->name, indio_dev); > if (ret < 0) { -- With Best Regards, Andy Shevchenko