Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2441893rwd; Wed, 17 May 2023 09:51:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FvYj+YiEmIhwePGDeW4bjkm/qYAp5pRoWZi5YXT+Joo4ZyYLsS+8roBTfutXKGK3njRc1 X-Received: by 2002:a17:90a:5289:b0:24e:28c:f391 with SMTP id w9-20020a17090a528900b0024e028cf391mr270818pjh.27.1684342305888; Wed, 17 May 2023 09:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684342305; cv=none; d=google.com; s=arc-20160816; b=kj9LaOipipFNPiYUUmwGmULlOS/LOmo3Bfw6LE73bedOd5rZkP44GeY0y3y+GzM56z seWCC2E9GFHQRhsHRJAACc/bmHsqXsPpv/MeMf4zl/O1CkdEHbYZMPFu5LzJD1eMpTIp WXYxhxy9cEltYFU5tI63WbBxTN2iFr2UkGv1jxDYzdNKXdmGc7+fz6qUf75u6DvmXKLg /UjQFHsXB4ox9Oz/RwKCJrxPhrBdCK5LjS4meGf7NPDkUVSnYzHyIOLoUlL//D3SUfYC Do48+HyIfudVWdj9zAKw7gqIF509gdJpUmGinLUjTfozU/VDey7PEtG/Qjkn24ANPi82 9Z2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Uobe7RyMfjnlzIfbcoCFqhD5AchqjruNoPLjeVkvwUg=; b=gX7yukLo175yKLrprxqPaT0Px5bOVsz1cKKWiVlC65kml/WXhl0blgqC3NdH+R4WIc z0UAdbfc7PWidX64nDl0mSFn0wTZ0tFrUL14zLnms2yeCA0t1NjJVghkdWN81kO/a5Rh s4BqqWG5/X7xz3XBv0qFR8Fy5Z2XGYTvDqAOH7KZq8UbdgEVZeJeAKIbKTI62CGk+DKh ivIyOSisoFZIwMJ1JupoeAMFQ8iWHe2p0k2tv7D0N+MqeCZ0iuMsdvvH96/qN67zBjWf 8e6VBkSnQNMVViEPoKPQ7lhiAXtFt7LMLsfVzLeMJJqS/MWpc66z95RZW4Ko0DP+GScT hCCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NwujApAR; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a639d08000000b0051ba2ec8320si21089133pgd.353.2023.05.17.09.51.33; Wed, 17 May 2023 09:51:45 -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=@intel.com header.s=Intel header.b=NwujApAR; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229445AbjEQQr7 (ORCPT + 99 others); Wed, 17 May 2023 12:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjEQQr5 (ORCPT ); Wed, 17 May 2023 12:47:57 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28CDE59DC; Wed, 17 May 2023 09:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684342076; x=1715878076; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3aGbiMN0V+5yc6Amt+Y7GgCQxqWtHVXzMieUoBpl1Y0=; b=NwujApARbS7z1+LSFfGoME6jThv38EVEpbFbdRsSmpRq/iKKAQs2HeIZ jJlEWubv7r4iGiwuTLAoRvQDvWLxJqRj7o/J9WXzngQy4EoBJsBFjI9fP rjdNxavDWXW5CtSU2AU4CXvE46E1VGSbPUVKcaIhu2AllfO55IQEvDp/c klRU9gK1V50fBPsHNXAkzXK9LcKuGS9MjHnNCNR+7Wku7Z6T6iqyuvMCF kWe+DgG5JMjPI14pnwIsQ3G4My6eP10PKejM0RsYy3mD463l6zeQWwYre 5r1AdcPFAxjCiiWSiu3Qu9/g1ujYOThj1fqnHQWKXQuQni50baQfZV707 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="351834340" X-IronPort-AV: E=Sophos;i="5.99,282,1677571200"; d="scan'208";a="351834340" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 09:47:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="948338934" X-IronPort-AV: E=Sophos;i="5.99,282,1677571200"; d="scan'208";a="948338934" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP; 17 May 2023 09:47:38 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pzKJL-0008UB-36; Wed, 17 May 2023 19:47:35 +0300 Date: Wed, 17 May 2023 19:47:35 +0300 From: Andy Shevchenko To: Matti Vaittinen 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 , 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: Re: [PATCH v4 2/7] iio: mb1232: relax return value check for IRQ get Message-ID: References: <429804dac3b1ea55dd233d1e2fdf94240e2f2b93.1684220962.git.mazziesaccount@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <429804dac3b1ea55dd233d1e2fdf94240e2f2b93.1684220962.git.mazziesaccount@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, 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) { -- With Best Regards, Andy Shevchenko