Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp66573imu; Thu, 3 Jan 2019 14:12:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN4EMR/kcv9wyfmgqo29pO+GivrrEOshwbVYApJBpMHr5f1tKwjehrXiuh7uamvk+0iLGBVJ X-Received: by 2002:a63:f65:: with SMTP id 37mr18431436pgp.238.1546553521513; Thu, 03 Jan 2019 14:12:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546553521; cv=none; d=google.com; s=arc-20160816; b=W+9qp5JmcWuyMhixjm5MPG+5MafFxGdxeVg8eRHgRrn1IIZaNLByUdXW7Cp4GJUQEd 32U6STmfwRZNUCe0f9gFZEDPg8rWEVe6UImpuzpwojQC3tXJnfmIgRDHq9+W2Q84KN1U +FeEXORjERpRXrBvKK19YJBdrNrTgYBTEdZnbiE7X9hkQ/NyzZZnqj0R9QC6lnLQe4e5 NXD34wq53pZmrsXT40eRL5QOTCDSnAkQ8Q/oaYPsYYTKatdLrDfFBap6uRaeRoJdyx9L FTCZKgILNonhmhukzHR+L8HZjH8fL1BzxyHM2utORUbykIJ2LK0by8q49p6slMXvNvsv 74vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:references:user-agent :from:in-reply-to:to:cc:subject:content-transfer-encoding :mime-version:dkim-signature; bh=j51rfX6wnYKjcDiMwHcW7yVFPbV8mnVTvkI9KgLgShg=; b=X3IZeDt6RH2LlTkvsCKdq4haXNhN5sPXy5YEvbmFpQbpnEPMgxHxWGp20MQUNfxZLr banRNRFiT8Sdxai50PSnI7A5NuIRiUll32/TYZ3E378kWU91pTs0mTeuIUZV8TcoyA82 j+TFoc0cBKqnOFNnhYvAfWfCvfCQ4SGcu6m19/0mg2LrQQbAwxxKcxJaQyGd4YckHolj onYHJAzp60VGpg5bpv9EMmBZuamsOVn7GU8kXDJFglE/vjbcmeVlZi0wyWYJJRF4reLl XUOdCvaFFMFdmwuUkb7XoFFGz100PS9YkL5G8gXF4ip9+UFTKg5TVjVhPO8Hsg+QDhVs urjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JaE2w7ST; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si52219840pgk.445.2019.01.03.14.11.46; Thu, 03 Jan 2019 14:12:01 -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; dkim=pass header.i=@chromium.org header.s=google header.b=JaE2w7ST; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730729AbfACQMD (ORCPT + 99 others); Thu, 3 Jan 2019 11:12:03 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36871 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbfACQMC (ORCPT ); Thu, 3 Jan 2019 11:12:02 -0500 Received: by mail-pg1-f194.google.com with SMTP id c25so16194677pgb.4 for ; Thu, 03 Jan 2019 08:12:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:subject:cc:to:in-reply-to :from:user-agent:references:message-id:date; bh=j51rfX6wnYKjcDiMwHcW7yVFPbV8mnVTvkI9KgLgShg=; b=JaE2w7ST29UZmkZPVI7AxzMfWlORWEFj7Rd0JibNoV9y8F25kf/RD/lSTOMuegYsah /oq6PHK09n0aG5VE3ql7HIN9riu5GdCcf1RLLN8pggvnPyXhi1+ZAhlkCx2BQDNExQa0 0PhZT4080ztEB7d531xZAC8Ba/DE+gxzNYTyM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:subject :cc:to:in-reply-to:from:user-agent:references:message-id:date; bh=j51rfX6wnYKjcDiMwHcW7yVFPbV8mnVTvkI9KgLgShg=; b=cidT3fmPx90+Co2N9dbJJsWlvZci7EHHB2H0DD8GxM82fnNC109lwCl7aNR8y/EQts TCuEMALc/mWvaPs/5y5gi6nc+DXTpA4o1kT6LnEvQEowjxeG8/5CrbNs8DR/e7dhoP3x 7fhUWj2suQvC5P2y/fH09UfOpt//65C1AW5cN5tBRTedS5foZNF6olYmwc/B7bCMTB9H rcJNNrkE6P6fEcA2hAp3LvxpDe/goA5W41eAO5fiqrtdKDGdG/z8KDD2kYbo0N5ePJkD YkNCfVJVfJu5yrUMOt/YRiDKZayaWUSigEgWxXg4WK2X7rfmD1p+gmH7gzPIIrcTnCct jICQ== X-Gm-Message-State: AA+aEWYaCKizd/Y6X5Let9H7D+wL10699Ly4FXVFVdP+o7975N85XrI6 LK+lJYBSXPcphfflgGAizp0yew== X-Received: by 2002:a62:1112:: with SMTP id z18mr48399261pfi.173.1546531921854; Thu, 03 Jan 2019 08:12:01 -0800 (PST) Received: from localhost ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id v5sm93011023pgn.5.2019.01.03.08.12.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Jan 2019 08:12:01 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*() Cc: Rob Herring , Andrzej Hajda , Andy Shevchenko , Bartlomiej Zolnierkiewicz , Mark Brown , Greg Kroah-Hartman , javierm@redhat.com, Linux ARM , Linux Kernel Mailing List , Russell King - ARM Linux , Marek Szyprowski , "Rafael J. Wysocki" To: "Rafael J. Wysocki" In-Reply-To: From: Stephen Boyd User-Agent: alot/0.8 References: <20190102185106.56913-1-swboyd@chromium.org> Message-ID: <154653191998.15366.14229484132412159772@swboyd.mtv.corp.google.com> Date: Thu, 03 Jan 2019 08:11:59 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Rafael J. Wysocki (2019-01-03 01:40:26) > On Wed, Jan 2, 2019 at 7:51 PM Stephen Boyd wrote: > > @@ -130,6 +125,22 @@ int platform_get_irq(struct platform_device *dev, = unsigned int num) > > return r ? r->start : -ENXIO; > > #endif > > } > > + > > +/** > > + * platform_get_irq - get an IRQ for a device > > + * @dev: platform device > > + * @num: IRQ number index > > + */ > > +int platform_get_irq(struct platform_device *dev, unsigned int num) > > +{ > > + int ret; > > + > > + ret =3D __platform_get_irq(dev, num); > > + if (ret < 0 && ret !=3D -EPROBE_DEFER) > > + dev_err(&dev->dev, "IRQ index %u not found\n", num); >=20 > Why don't you log the error code too? >=20 I don't see much benefit to seeing -ENXIO or -EINVAL printed here, so I left out the error code.