Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp267232rwd; Tue, 16 May 2023 00:20:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6HKlo1hdkauqc7GBJtK39spmbDaTYX85JTxR5qpfFvaA0ucGq/OvwZ460gNXG7VcerY5T7 X-Received: by 2002:a05:6a00:849:b0:643:980:65b with SMTP id q9-20020a056a00084900b006430980065bmr53182916pfk.2.1684221626133; Tue, 16 May 2023 00:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684221626; cv=none; d=google.com; s=arc-20160816; b=zkpKX1DbpNBSUOBUiIfN9LEth071B8N82y6u1R0NYsJp1HCNyrwZq6lcOY3vwMzDDE DREPViXk3t0TxNYLeiJhp9SIZ/KuSEgfhLxps/xUrga8RnC2Xy9/G7FaeLhcPjbGNtmZ A+E7kUP+Gv2cBrvq7BU3DCzl1El7FqzkRYdk8nslHi9NeCBqbKcyV0ge4RrbzaDJ9Xi8 AndubM3F2JAJh8ni+LKZudJYy54+Yt8PvDMMHA1xYqE/r+eIBrMD4xmtTMsEuhTMA8eH HPtiY50BIuuindfo4uhg7idiTL31v/8AuSrZTzGZ4rwuAPmmrTilbc1MrKiT/S5k7dhN 6L3w== 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:from:date:dkim-signature; bh=xlM3eYv1IZ/hNqJzORarcpDSgFBeHnRSgoVNeCMN0OI=; b=XuD6PXSEZtZ+f5JGv8/8JD0j4YVNORHPa90NoJuNjF6m3nSGyWRE5sV4lGz6sEUoO0 lFMLvvyC/rLAhB+PQp93YIWo4+V3+MOnHAntkWSCG9T5d5UO8NliT8o4vazf5E9rYw96 MEX6md4i85SgCr9w4yLgJL4jmajpEaw9vTuXPdOvdApkWwb4muhquIIeV4o+A+rjmmmK E9iAqCY6MuQfN0YSY3cGoN5vpcBOgvfaxcMCQvxzr3lXu1CgOKugMei12kRA5wWhudcF JD5W1TppQmHSzVpVGC/Xx5xW4iL8Vg3YVqaZqGjKpdSWOqK6oyawf70vRtXXGrGJtTLO BpoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=CYF2awqA; 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=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 k9-20020aa79d09000000b0063bba133a6esi18766737pfp.4.2023.05.16.00.20.14; Tue, 16 May 2023 00:20:26 -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=@gmail.com header.s=20221208 header.b=CYF2awqA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231134AbjEPHNE (ORCPT + 99 others); Tue, 16 May 2023 03:13:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230448AbjEPHMw (ORCPT ); Tue, 16 May 2023 03:12:52 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF6E1BD3; Tue, 16 May 2023 00:12:47 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f24cfb8539so12372134e87.3; Tue, 16 May 2023 00:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684221166; x=1686813166; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xlM3eYv1IZ/hNqJzORarcpDSgFBeHnRSgoVNeCMN0OI=; b=CYF2awqA3QBPqECdXTLxEG95LOlfTJWtn1YpWmrDv19exiCwfnk9p+iVSfFFn4sOEN 2epPa0KICye73idQTg1vSX0IDvHfHxyx1qK7Gnatc1njwlqOiI5Vw+UKeEcC7QM6Fh0d 3G75lwc1QLsBXbqKnxk2kL6NoVMxEPKxFNUGn1QXglTN9H9+ZdAZYLOJ2dBWwX9S+ztv phu2u2xg9TKcDe3Nm9UYDQzeUzhUEc8ycuLElK8kObvyPT4+1qqDJ3IoHzahBoPXz7HG kuhAPHG0q0JrfDl2wCuZK7eHjQ3q/gN3uwIfGBbe1keuI9V3sKdf1bM3QA65rBTsx/52 7Fzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684221166; x=1686813166; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xlM3eYv1IZ/hNqJzORarcpDSgFBeHnRSgoVNeCMN0OI=; b=RT2PMqGOg0utdShm7E4zXAA5kAqM17w2g52k9fD0KUR4stLg+zC1WtyFqRyQdqEvbh /FXNVQbj7KCfUCKHIxmXXXMGU/2T5a499bqQVg2WEUkey2Yjuog9KxVDiZ2prJXSFVyZ k35e+W5DSN/R1H3tA33j5kNmeY4v2Tr3VIPAmPDpFXClESk93V6r/h41oIsGAN3VGwJf 00PG8oYAp9Sf7lUVDXBk7wQV/J6qDj1H2izYc1X3aQ3i6IuoeXPT2eOg1hwBEKwgbMOS ydkLRts//op3+kaO4vqRm3bKgkIlz6OcGxLHEz48TfpNO6lFz4IpMRiXPKdBXLmOJPq7 +JYQ== X-Gm-Message-State: AC+VfDwYkK3UQyE54aelkILwn1deY6sdFicxWAMtioeloyLc+DqfAdga nB3wQm/tVsLmZEwHOmqvMJ8= X-Received: by 2002:ac2:5197:0:b0:4f1:43b9:a600 with SMTP id u23-20020ac25197000000b004f143b9a600mr7658465lfi.60.1684221165779; Tue, 16 May 2023 00:12:45 -0700 (PDT) Received: from fedora (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id u25-20020ac243d9000000b004f3892d21a5sm198196lfl.69.2023.05.16.00.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 00:12:45 -0700 (PDT) Date: Tue, 16 May 2023 10:12:41 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , 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 , Wolfram Sang , Akhil R , linux-acpi@vger.kernel.org, linux-kernel@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: [PATCH v4 2/7] iio: mb1232: relax return value check for IRQ get Message-ID: <429804dac3b1ea55dd233d1e2fdf94240e2f2b93.1684220962.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YZ9e9PLl/tEtytF1" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 --YZ9e9PLl/tEtytF1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable fwnode_irq_get() was changed to not return 0 anymore. Drop check for return value 0. Signed-off-by: Matti Vaittinen --- 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/proximity/mb1232.c b/drivers/iio/proximity/mb1232.c index e70cac8240af..2ab3e3fb2bae 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; } =20 - if (data->irqnr >=3D 0) { + if (data->irqnr > 0) { /* it cannot take more than 100 ms */ ret =3D wait_for_completion_killable_timeout(&data->ranging, HZ/10); @@ -212,7 +212,7 @@ static int mb1232_probe(struct i2c_client *client) init_completion(&data->ranging); =20 data->irqnr =3D fwnode_irq_get(dev_fwnode(&client->dev), 0); - if (data->irqnr <=3D 0) { + if (data->irqnr < 0) { /* usage of interrupt is optional */ data->irqnr =3D -1; } else { --=20 2.40.1 --=20 Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =3D]=20 --YZ9e9PLl/tEtytF1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmRjLOkACgkQeFA3/03a ocVexAf/ZLicwkXRv1fFHlX8vmi3zS+r5H5aAR1qR57lTAdsuB532T3J6K5aYef2 8Dz0CcvPPLTs0fYf6dRgkakqyyQIEc7tbh/VAFORSTjQ6tgF+ri0nbWRSoDI+9We GSbtRRVRfE0Ly4POgzAFkhoVflM7Iu7pMVFM5ydk4BtrrZjbqRufZf1YmRU7xLSD JvrE7TNgyCHe5FD55le/38L1ykZ2D2l6OgVUjTs9Ggdg/on1YCHvMiFwGbHWjdze vpp2UXsxv+FVv1wUvDtRTt/AfYUM+hz/zna09SApsy1tNysG8NfazKlYg8s+lTDu Fo8Ar1amCpD8jYycIBJiDQUgKrhgUQ== =YyGW -----END PGP SIGNATURE----- --YZ9e9PLl/tEtytF1--