Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2022613rwd; Thu, 18 May 2023 23:02:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4h2j6KIyuIhi097Me93NpTpwdn+h+xc6LfdBXQIIEuBA+Ot/tNqcbKZLPQfeThCGJwwsIg X-Received: by 2002:a17:90a:f318:b0:24b:27e1:92fc with SMTP id ca24-20020a17090af31800b0024b27e192fcmr1049998pjb.44.1684476145263; Thu, 18 May 2023 23:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684476145; cv=none; d=google.com; s=arc-20160816; b=LNt3FzrNmm3bsx256glyP3bJnTNio0wE2Z6k9YPdWGSsnAbhwFOkmz/npgLnZDfcU1 JImuJWnUVK2aFfpxTVWSKSx1FkW+CI/zPcpsiscO+jpfQzoDw6YPYHQ0jnz6NOkO0RT6 aROHmxublKe9lpOdhWfUT+dN7/0iAmLUxeAJXrER3GxNcWpONt621RL74p4rMyWuDM// k3oiCx+8hyLJeCwB8rztNOt6q1wF5UwtgOPNwsH6Jv+YbeVd4JA1AF0YgKusJyseKjpM cYhB9Mp5NOcV4/yiY3Chzy42baWLesohbv+qhDJGr/vOZISmws+kPFgjrGaifgU/Pml5 yhKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wNtRnyQN8vO04gSlcyvpsqnkimMuzHNYu/QdOo0JXbg=; b=0H5o/XAgYzECMt39T8wy2oSkwK/3k1ihHm36JaFbCibPYo757C+92zPhHyjeJy0bUe 8QggQ6+ZEzNduOCx9Sq4iiZAyDdF7EttH5OlTz6zhwPOqjNC8Y91KOPmRdUrfWDZXiz0 lvgj/imQ3MA2JWO/EoSb0pZaoOfsI2Gdg6vapdwZ7oc+22ZlfGzq/A59Z9is2K6J2RGf n9WN+iXFfwigNgkB1tsDlxecAF4hUKKGgKKMI+4naE1uabbYIHaStT6k6RgFu1r5cbon 46gwcsffzePT2hlaiBWsESa1k5sKXjbuswhK/NAzmy3je3OQsSBTikQmou8NHsYWpiBX oEfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=MmMPzTf5; 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 h5-20020a17090a130500b002536b553afdsi1145515pja.98.2023.05.18.23.02.08; Thu, 18 May 2023 23:02:25 -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=MmMPzTf5; 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 S229970AbjESF0I (ORCPT + 99 others); Fri, 19 May 2023 01:26:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjESF0G (ORCPT ); Fri, 19 May 2023 01:26:06 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48FF7E4C; Thu, 18 May 2023 22:26:04 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f25d79f6bfso3323068e87.2; Thu, 18 May 2023 22:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684473962; x=1687065962; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wNtRnyQN8vO04gSlcyvpsqnkimMuzHNYu/QdOo0JXbg=; b=MmMPzTf5aPuDZyy+pZTLvBgU5RoGY7h4ncqYpeVHj+sAwcpYtepWH2v7u7wE8tOJzH bQ5aF6x3HuDfU4LKnPHxc46tOqC0CsVkDkt18RKY4+/oF01Zkb2oFebosWut936pCpOy 92KBvUQcEMweaWq9cp97c8g/pPRra1YqK8CFHze+UV8JedIm0WcFrvkmX2RnHxsCrBTn tbX7hz5/zz9ObpEGIJC3MFYqQoiwit4jmSpt1clolDqy455jzvYUo4VWl1oZFAOHd1/T lrt4WwatKqHTU2QOnFZAaf1rDlL+FccUx8Eb7ZKUBhJvz7XM22RkLPBnUbjgKCxS1wyO fv9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684473962; x=1687065962; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wNtRnyQN8vO04gSlcyvpsqnkimMuzHNYu/QdOo0JXbg=; b=c8z9ksRvASxb8bNb0nDjddM/qVNIEyohrvNkQzd6otMp7UhkoqTb9862FtyfMde75B GKOKEGfCeXgEvPlkKGM7Q6lhFDCZEBJWWsQFqBJtoiSsTNqFyL9JYZM/k+lYv9Wk8MYF T7oqlL0G5+zg2HiS4BwRJWfT2QpUsZKrvh2nMVK5suWI3qqT+fDOCqNtQehbNmnBwWNZ vhh64bEK2UaoJIEFzjQtvLtrZ8TF9r7rI8hfr8tSKw8kKy0X/LDo6Fpc4Kpx/wLDSByE 5TMQwFKHpZ9zBdytEhuYnf8vQLTo+/lINq5DV2oCJMlHP+MeJyH6weR+IJO2mIvWv2dZ ZT8Q== X-Gm-Message-State: AC+VfDxzt0itKxYxl/RqC2xbEeU0nFF7HBfx2e8GfuQ30V1V3hTgXiEx 3vf2Y+nxE7idWpT2xrVNIoY= X-Received: by 2002:ac2:4352:0:b0:4f0:124:b56b with SMTP id o18-20020ac24352000000b004f00124b56bmr441637lfl.7.1684473962219; Thu, 18 May 2023 22:26:02 -0700 (PDT) Received: from [192.168.1.126] (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id m5-20020ac24ac5000000b004eed8de597csm472747lfp.32.2023.05.18.22.26.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 May 2023 22:26:01 -0700 (PDT) Message-ID: <6ab1852e-139f-579b-3ef4-5c98e0ea446d@gmail.com> Date: Fri, 19 May 2023 08:26:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v4 2/7] iio: mb1232: relax return value check for IRQ get Content-Language: en-US, en-GB To: Andy Shevchenko Cc: Matti Vaittinen , 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 , =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= , 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 References: <429804dac3b1ea55dd233d1e2fdf94240e2f2b93.1684220962.git.mazziesaccount@gmail.com> <1a3a84d4-1955-f0ee-5c6d-ab36fddc5e15@gmail.com> From: Matti Vaittinen In-Reply-To: <1a3a84d4-1955-f0ee-5c6d-ab36fddc5e15@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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 On 5/19/23 08:00, Matti Vaittinen wrote: > On 5/17/23 19:47, Andy Shevchenko wrote: >> On Tue, May 16, 2023 at 10:12:41AM +0300, Matti Vaittinen wrote: >>> fwnode_irq_get() was changed to not return 0 anymore. >>> >>> Drop check for return value 0. >> >> ... >> >>> -    if (data->irqnr <= 0) { >>> +    if (data->irqnr < 0) { >>>           /* usage of interrupt is optional */ >>>           data->irqnr = -1; >>>       } else { >> >> >> After this change I'm not sure we need this branch at all, I mean that >> -errn is >> equal to -1 in the code (but needs to be checked for silly checks like >> == -1). >> >> Hence >> >> Entire excerpt can be replaced with >> >>     if (data->irqnr > 0) { >> > > I agree. Furthermore, at a quick glance it seems the whole irqnr could > be dropped from the private data, and the private data struct could > probably be static. I'd send them as separate clean-ups though as those > changes are not really related to this return-value series. Please, ignore everything I wrote above, except that I agree to your suggestion. I was writing utter nonsense. Sorry for the noise. > > Yours, >     -- Matti > -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~