Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Andy Duan <fugang.duan@nxp.com>
To: Anson Huang <anson.huang@nxp.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
	"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	"swboyd@chromium.org" <swboyd@chromium.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message
Date: Thu, 10 Oct 2019 06:55:32 +0000
Message-ID: <VI1PR0402MB3600BABFA79F76C65FA511ADFF940@VI1PR0402MB3600.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <1570616148-11571-2-git-send-email-Anson.Huang@nxp.com>

From: Anson Huang <Anson.Huang@nxp.com> Sent: Wednesday, October 9, 2019 6:16 PM
> Use platform_get_irq_byname_optional() and platform_get_irq_optional()
> instead of platform_get_irq_byname() and platform_get_irq() for optional
> IRQs to avoid below error message during probe:
> 
> [    0.795803] fec 30be0000.ethernet: IRQ pps not found
> [    0.800787] fec 30be0000.ethernet: IRQ index 3 not found
> 
> Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to
> platform_get_irq*()")
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Acked-by: Fugang Duan <fugang.duan@nxp.com>
> ---
>  drivers/net/ethernet/freescale/fec_ptp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c
> b/drivers/net/ethernet/freescale/fec_ptp.c
> index 19e2365..945643c 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -600,9 +600,9 @@ void fec_ptp_init(struct platform_device *pdev, int
> irq_idx)
> 
>  	INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep);
> 
> -	irq = platform_get_irq_byname(pdev, "pps");
> +	irq = platform_get_irq_byname_optional(pdev, "pps");
>  	if (irq < 0)
> -		irq = platform_get_irq(pdev, irq_idx);
> +		irq = platform_get_irq_optional(pdev, irq_idx);
>  	/* Failure to get an irq is not fatal,
>  	 * only the PTP_CLOCK_PPS clock events should stop
>  	 */
> --
> 2.7.4


  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 10:15 [PATCH 1/2] net: fec_main: Use platform_get_irq_byname_optional() " Anson Huang
2019-10-09 10:15 ` [PATCH 2/2] net: fec_ptp: Use platform_get_irq_xxx_optional() " Anson Huang
2019-10-10  6:55   ` Andy Duan [this message]
2019-10-10 18:30   ` Stephen Boyd
2019-10-10  6:55 ` [PATCH 1/2] net: fec_main: Use platform_get_irq_byname_optional() " Andy Duan
2019-10-10 18:30 ` Stephen Boyd
2019-10-10 23:08 ` Jakub Kicinski
2019-10-11  0:03   ` Anson Huang
2019-10-11  0:32     ` Jakub Kicinski
2019-10-11  0:38       ` Anson Huang
2019-10-11  0:53         ` Jakub Kicinski
2019-10-11  1:10           ` Anson Huang
2019-10-11  9:55             ` Vladimir Oltean
2019-10-12  1:09               ` Anson Huang
2019-10-13  1:03               ` Jakub Kicinski

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR0402MB3600BABFA79F76C65FA511ADFF940@VI1PR0402MB3600.eurprd04.prod.outlook.com \
    --to=fugang.duan@nxp.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=anson.huang@nxp.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git