Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp6047654rwb; Tue, 1 Aug 2023 11:26:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFsw9JQLcttqitSmWTQsmhjKY1ADhkmwP+4F1JwTN5UG4VNfcQThXnAzug/1UkQU5yCblWj X-Received: by 2002:a17:906:8448:b0:99b:6687:6107 with SMTP id e8-20020a170906844800b0099b66876107mr2776695ejy.5.1690914368498; Tue, 01 Aug 2023 11:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690914368; cv=none; d=google.com; s=arc-20160816; b=wjFl7sZza3FuuZVzaxai40ic7WHxTRlQKrJFHsuwmRchSTVtf/meZ13kv5qk9vweEi 7+iR9hKYJ0Ocfy8RnIV1p3AWooo0Y5h6mEbyV1ceyKifF6VXsdj+Tj6HpKlWoIiEASHN vSwsyD5m0MY4bCffncF/FiktcWt95hYQa/E8D1o+ICjCHniYH65LERDzQOlB7Q6cgXpl wPKC1xX4biC0r1tiSw+B6i56sxrMIaBuHjk1UhvV5oeN87awkwdr8CpvGKS1CgSeh5ca S4/A8I6x++/l9GoWC5vgEeGWH0iLjURFz40usMOIHVNmbv1P1G7z434g35kz+mpKJrNX n31A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KXtW/d87iI7k/fOir7+dvf1rG5UFgHLQRgcjlj+LlkY=; fh=XMJ/7IIkSvGzuHsg7Cfp71MGoW4FqwJwgS5IK+Y5jYM=; b=MQY5pHptR4opgk0S62Mq6O0pf6M7bhGKBpYvq8SH7A+UCDea/3IL3B3RuMUGrhgTyb UWEyc67vXLzkHm4ogyXVQF0lJnsO+wkF+M2gwVEkpNwt5txCJoFM+9nqH6P50xTH4Jti Vnaismwas9mdt3talUjnMHbDBZQ5SHzLS3VP84oyq4oVhusRjrxFekp5ED6S0C5UvvKu XBYUOl0+Opiu2Oz4az8D2vO/O3mzeDvsIeqPp22qdu5fVAu7BwIZd6fM2VxG/3jQyNyJ yTwsgD+30HSkpcBo1ugKpz5YxDGEy/I4ijU6Ys2A6WlODAqTuvJxMv9axlNqk8fNeUXa vDZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g1vlSfu7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a1709063c4f00b00987d66e6d26si8911680ejg.250.2023.08.01.11.25.43; Tue, 01 Aug 2023 11:26:08 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g1vlSfu7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229726AbjHARxi (ORCPT + 99 others); Tue, 1 Aug 2023 13:53:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjHARxh (ORCPT ); Tue, 1 Aug 2023 13:53:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B455B1BF6; Tue, 1 Aug 2023 10:53:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3F05461651; Tue, 1 Aug 2023 17:53:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5F40C433C7; Tue, 1 Aug 2023 17:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690912415; bh=6zn7B+X9EKomLgs7vP1NQZpukGu6QMSoZShFNEZ12JU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=g1vlSfu7nUrCLeSuZwoOJEom1imVZTRzjOuTma0XlTKCMMxWrR+ZYMERuoGghKRF7 ZSIgUn3MooR257jkdQVKAyCidON9oDgsSAkor5f4S7T/y3aYbttwrDTS76yVohDZkY msW+4yRWeW5ZdlCYfKpRRQnf4B3WrXVmG345o64z5XGJnvvBXzbZnXelNTxWcWL9bZ f052zvMzmpveUlYGN/v4IJoyK8skoko8a2o23Xr0tjA0Z2UZDuWq208556NtYwfMo1 B5/CMcEI5rA53bjpnAX1CdCb6API9ijU1gCqy8CM6dKHS+uIGromK7D3B06eaSwoxP 4RE8piudZ7J8A== Date: Tue, 1 Aug 2023 18:53:28 +0100 From: Jonathan Cameron To: Matti Vaittinen Cc: Matti Vaittinen , Andreas Klinger , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 1/8] iio: mb1232: relax return value check for IRQ get Message-ID: <20230801185328.49dab901@jic23-huawei> In-Reply-To: <9e18cf49a8bb581a84c3fa548ea577e2a3eb840d.1690890774.git.mazziesaccount@gmail.com> References: <9e18cf49a8bb581a84c3fa548ea577e2a3eb840d.1690890774.git.mazziesaccount@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, 1 Aug 2023 15:02:10 +0300 Matti Vaittinen wrote: > fwnode_irq_get() was changed to not return 0 anymore. > > Drop check for return value 0. > > Signed-off-by: Matti Vaittinen > Acked-by: Jonathan Cameron > Reviewed-by: Andy Shevchenko > Applied fiddling above so I don't ack and sign off on it because that confuses me :) Applied to the togreg branch and pushed out as testing for all the normal reasons. Thanks, Jonathan > --- > Revsion history: > v5 =>: > - No changes > v4 => v5: > - drop unnecessary data->irqnr = -1 assignment > > The patch changing the fwnode_irq_get() got merged during 5.4: > https://lore.kernel.org/all/fb7241d3-d1d1-1c37-919b-488d6d007484@gmail.com/ > This is a clean-up as agreed. > --- > 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 fb1073c8d9f7..614e65cb9d42 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 */ > - 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) {