From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QOT/EzKm" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6975BD; Wed, 13 Dec 2023 10:49:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702493344; x=1734029344; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=Z/Q+UPMHmt44cji+uKAe1SPXYy0AJonMorDcsxZBYFE=; b=QOT/EzKmiOQiIswR4BxDLsOi/xZDGWq94ZCSMh7rCkUcwmd1HVU+RrNJ /NnThdGPo2DV0nvMX0gGTOlyvNOdnsv/9BQiIvkQ79A4QvcsO9DR7zpix rQe+rOsK6x0B8dHUb9Px/JY5DrQRo6XPuSbGX1WNpljcKSAzhnmyC45HA u2SGtV9M3phtRsnJ2kMYS+DAEM3v6wshjyrFKO2VXtnpajhnNRGfm1XrG eMDq2iVT/akdE3Jjh19BXBEZUtMqfKqWdtXJ+19yfy7HohLgfCHD7SGCF Dx0hxJ9mc/uOo0uBpm5L+8/X9RUHwkM2AltwPjo1qt/m8ck/i17T8YT/v Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="1825724" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="1825724" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 10:49:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="802973014" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="802973014" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 10:48:59 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rDUHv-00000005c3Y-3yQa; Wed, 13 Dec 2023 20:48:55 +0200 Date: Wed, 13 Dec 2023 20:48:55 +0200 From: Andy Shevchenko To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Nikita Shubin , Hartley Sweeten , Alexander Sverdlin , Russell King , Sergey Shtylyov , Damien Le Moal , Linus Walleij , Dmitry Torokhov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use Message-ID: References: <20231212-ep93xx-v6-0-c307b8ac9aa8@maquefel.me> <20231212-ep93xx-v6-36-c307b8ac9aa8@maquefel.me> <20231213183349.hdjoxxszrrc4hqrg@pengutronix.de> Precedence: bulk X-Mailing-List: linux-ide@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231213183349.hdjoxxszrrc4hqrg@pengutronix.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Dec 13, 2023 at 07:33:49PM +0100, Uwe Kleine-König wrote: > On Wed, Dec 13, 2023 at 08:16:26PM +0200, Andy Shevchenko wrote: > > On Tue, Dec 12, 2023 at 11:20:53AM +0300, Nikita Shubin wrote: > > > Drop legacy acquire/release since we are using pinctrl for this now. ... > > > - if (IS_ERR(drv_data->dma_rx_channel)) { > > > + if (PTR_ERR_OR_ZERO(drv_data->dma_rx_channel)) { > > > > This seems incorrect. > > > > > ret = PTR_ERR(drv_data->dma_rx_channel); > > > return dev_err_probe(dev, ret, "rx DMA setup failed"); > > > > return dev_err_probe(...); > > > > > } > > > > I think you wanted > > > > ret = PTR_ERR_OR_ZERO(drv_data->dma_rx_channel); > > if (ret) > > return dev_err_probe(dev, ret, "rx DMA setup failed"); > > How is that different from > > if (IS_ERR(drv_data->dma_rx_channel)) > return dev_err_probe(dev, PTR_ERR(drv_data->dma_rx_channel), "...."); > > (which seems to be more idiomatic to me)? While I was involved in > creating PTR_ERR_OR_ZERO, I don't particularily like it (today). Makes lines shorter, either works for me. > Also note that you want a \n at the end of error messages. Indeed. -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB3DDC4167B for ; Wed, 13 Dec 2023 18:49:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U8UqsafmNSckjRxWJV52NKsedYLR2HtMZQXXKzrqEf4=; b=Z9JYVnwwnIn25s YIDcmb6g+9hCypvwxju6G3mdpH6MefBXeJZl+hpjhqEgCZ5bHMVFcbksq9Bsv+YNFJNzkWBXwqv6d wokSptSyLPaUTAC+srYQBQYsp8tWKsB4YbAAob7iQu+9adpEMGGEeZpGT8SZRILU5PxxmvnfG7sVC o03Tb22EBAB6DKO3BEhX5F6wpk+uBcANBDzYo+hHBtmCTo0xmZXj4D6ouPR2uxVlq3h/R7ypWZEFb FIhAeE1f8uDgkBNJDgURG7WppkA9QQ04nsRbd0Li6zY3JtPllNVClE3G7L7Ngz73GVvhgk9nSrtgS ybq1q7VmXwSXa70hqlGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDUI5-00Fl80-3D; Wed, 13 Dec 2023 18:49:06 +0000 Received: from mgamail.intel.com ([192.198.163.11]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDUI3-00Fl7d-3B for linux-arm-kernel@lists.infradead.org; Wed, 13 Dec 2023 18:49:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702493344; x=1734029344; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=Z/Q+UPMHmt44cji+uKAe1SPXYy0AJonMorDcsxZBYFE=; b=QOT/EzKmiOQiIswR4BxDLsOi/xZDGWq94ZCSMh7rCkUcwmd1HVU+RrNJ /NnThdGPo2DV0nvMX0gGTOlyvNOdnsv/9BQiIvkQ79A4QvcsO9DR7zpix rQe+rOsK6x0B8dHUb9Px/JY5DrQRo6XPuSbGX1WNpljcKSAzhnmyC45HA u2SGtV9M3phtRsnJ2kMYS+DAEM3v6wshjyrFKO2VXtnpajhnNRGfm1XrG eMDq2iVT/akdE3Jjh19BXBEZUtMqfKqWdtXJ+19yfy7HohLgfCHD7SGCF Dx0hxJ9mc/uOo0uBpm5L+8/X9RUHwkM2AltwPjo1qt/m8ck/i17T8YT/v Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="1825725" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="1825725" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 10:49:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="802973014" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="802973014" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 10:48:59 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rDUHv-00000005c3Y-3yQa; Wed, 13 Dec 2023 20:48:55 +0200 Date: Wed, 13 Dec 2023 20:48:55 +0200 From: Andy Shevchenko To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Nikita Shubin , Hartley Sweeten , Alexander Sverdlin , Russell King , Sergey Shtylyov , Damien Le Moal , Linus Walleij , Dmitry Torokhov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v6 36/40] ata: pata_ep93xx: remove legacy pinctrl use Message-ID: References: <20231212-ep93xx-v6-0-c307b8ac9aa8@maquefel.me> <20231212-ep93xx-v6-36-c307b8ac9aa8@maquefel.me> <20231213183349.hdjoxxszrrc4hqrg@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231213183349.hdjoxxszrrc4hqrg@pengutronix.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_104904_039890_CF012CEF X-CRM114-Status: GOOD ( 18.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 13, 2023 at 07:33:49PM +0100, Uwe Kleine-K=F6nig wrote: > On Wed, Dec 13, 2023 at 08:16:26PM +0200, Andy Shevchenko wrote: > > On Tue, Dec 12, 2023 at 11:20:53AM +0300, Nikita Shubin wrote: > > > Drop legacy acquire/release since we are using pinctrl for this now. ... > > > - if (IS_ERR(drv_data->dma_rx_channel)) { > > > + if (PTR_ERR_OR_ZERO(drv_data->dma_rx_channel)) { > > = > > This seems incorrect. > > = > > > ret =3D PTR_ERR(drv_data->dma_rx_channel); > > > return dev_err_probe(dev, ret, "rx DMA setup failed"); > > = > > return dev_err_probe(...); > > = > > > } > > = > > I think you wanted > > = > > ret =3D PTR_ERR_OR_ZERO(drv_data->dma_rx_channel); > > if (ret) > > return dev_err_probe(dev, ret, "rx DMA setup failed"); > = > How is that different from > = > if (IS_ERR(drv_data->dma_rx_channel)) > return dev_err_probe(dev, PTR_ERR(drv_data->dma_rx_channel), "...."); > = > (which seems to be more idiomatic to me)? While I was involved in > creating PTR_ERR_OR_ZERO, I don't particularily like it (today). Makes lines shorter, either works for me. > Also note that you want a \n at the end of error messages. Indeed. -- = With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel