Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp419631ybl; Wed, 11 Dec 2019 01:51:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxpQ9vKudF2Dd0Ztu6m9SBls2e9nLmWpf//tIImC++IdkgTOgSym9GHvvelYWdxlAY9MOsP X-Received: by 2002:a9d:eea:: with SMTP id 97mr1506253otj.177.1576057903058; Wed, 11 Dec 2019 01:51:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576057903; cv=none; d=google.com; s=arc-20160816; b=hFqCHfaAVwggpcyleN8mkxqgcPa16gxcOoa3gI+qbFC+TRO4HwCu32zBpxhqzZIA3D C4homXmBgHPQoua7J5LmTdNgHRRkyi4+GlWgNTR08nPfgBRM19HEZoCsmXc/nmcVDLDv JE2wyel+eQPNTsC06XxyspF7oD7i4Ihs2Kub5CqAuqhjr8XmrGmmGXdF68eT5Dj0I98M 3ENJi3jW52tSuUsq47cE+QMBbou12kS0w4acxRbNOSnG/hsDduacbiflyyMrT/a2kn2r 9f/Z7wscIrlE1qY59djvnor2o5kv3yFNvZIIsHCn9A3TTvj7yHp+ObcrfVtplSoMs3zW GTfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=jtfv8dcZm47Y20ZDbkmcXUkdKFZru1+kNWE7k3s29RI=; b=uM55QF2sU5fpgvnujFMA84nZ9wnKVSZO0V0KDAgsIIiN50nMvbkUccR1FhAF9SGja0 sl7ed897pR1nmJV4X9+O/JCaFuh7Y6LgDPmQFA7ssvgRNV3n+a1hfqdR0HDL+vyrZ3S8 dMsxuMqedSu8jWMvDuSbdILavTYsy/k+DZiOkAE8PRSQsAZnFc4BaSjwFUgsGyKrCBlD 3eTqpsu9Kdv+tsLW9KJLQCVpVTwvJ03c6G3BHaTAFsD4tjzNuh060tUhx6dRWN6k327P aFH8F9PXVPTZMMrZTWV0vVqXqhjE7KiKOI0tB4FxEj/EIO/rc8USPZK7RTgdGrJrkv3e j8hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w26si695436otl.213.2019.12.11.01.51.31; Wed, 11 Dec 2019 01:51:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728637AbfLKJuB (ORCPT + 99 others); Wed, 11 Dec 2019 04:50:01 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:41939 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728562AbfLKJuB (ORCPT ); Wed, 11 Dec 2019 04:50:01 -0500 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ieyd1-00020i-Hb; Wed, 11 Dec 2019 10:49:55 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1ieyd0-0004je-Pc; Wed, 11 Dec 2019 10:49:54 +0100 Date: Wed, 11 Dec 2019 10:49:54 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Bartosz Golaszewski Cc: Peng Fan , "rjui@broadcom.com" , "linus.walleij@linaro.org" , "f.fainelli@gmail.com" , "sbranden@broadcom.com" , "thierry.reding@gmail.com" , "robh@kernel.org" , "bcm-kernel-feedback-list@broadcom.com" , dl-linux-imx , "linux-gpio@vger.kernel.org" , "linux-pwm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 2/2] gpio: bcm-kona: use platform_irq_count Message-ID: <20191211094954.qk44xv3uh33rgz7z@pengutronix.de> References: <1575451330-11112-1-git-send-email-peng.fan@nxp.com> <1575451330-11112-2-git-send-email-peng.fan@nxp.com> <20191204100925.sjp6cztozlm5qm6y@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 11, 2019 at 10:30:33AM +0100, Bartosz Golaszewski wrote: > śr., 4 gru 2019 o 11:09 Uwe Kleine-König > napisał(a): > > > > On Wed, Dec 04, 2019 at 09:24:39AM +0000, Peng Fan wrote: > > > From: Peng Fan > > > > > > platform_irq_count() is the more generic way (independent of > > > device trees) to determine the count of available interrupts. So > > > use this instead. > > > > > > As platform_irq_count() might return an error code (which > > > of_irq_count doesn't) some additional handling is necessary. > > > > > > Signed-off-by: Peng Fan > > > --- > > > > > > V3: > > > Use %pe > > > > Great. Note that with %pe there is a dependency on commit 57f5677e535b > > ("printf: add support for printing symbolic error names") which was > > applied during the current merge window. > > > > Why would %pe be better in this case? The function returned an int - > why convert it to a pointer? The conversion to a pointer is (currently still) needed, because there is no printk facility (yet) that consumes an int error pointer and results in the respecting code. Somewhere on my todo-list is an item to fix that, but we're not there yet and so the best option is to use %pe. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |