Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4117150ybg; Tue, 29 Oct 2019 02:22:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6EAkUm8OiMSSDs6xymSAoGI2g4tUAs/w+LNksU1/RYJYM7kPR2BiMmruT6yD4/8VJN7IF X-Received: by 2002:a05:6402:386:: with SMTP id o6mr25061987edv.148.1572340935887; Tue, 29 Oct 2019 02:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572340935; cv=none; d=google.com; s=arc-20160816; b=IBh6bnF2JA6UPwW7w6EEFJGFcUvfjJC9IvAasC+VDaUvVoX2GaP7201wXqXdBS2K1W hA6Qw+i2jOIaiw0hPrRiWsJeg705xi+lxvInmFckfFTZja08suYu1iSZIHpi7glvbVpb ZxUqIi0mavSHrjVaAtKbMDUSSvDv+sD7BV2jF4lOWBZEOM9vcugUKlvxdSAn1UBkuJyS TJTYVw5+knCgu+ytq9Qr7tZ9L4SqQXWv7+e/6ZGMtivO8rjhlXwldztUJQrjkGBtl/AY X654oV/vARML8NaXZMg/HzxwmA2mSRV4bBlE3UqrF+FjLVDZceBHd5F4Ts0vGCCUh3im LTng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=wcoCPGnC2QXK8YeIZH0+hBPKQqRfTcqFkoQaDROLDpU=; b=YCOvsogVgy0mE97lkuJkRkdVGQu307bTywPHRocoQ8K8L74s24pe88kFiHDhY8Mgo9 +g1HKzqxg0Ebz+zRmRgWOX25ZitGUdI4kE+j88bJy6PrlXzv/FOdlxfMRj4UKCJG/dOu zHt6xJS9Q7TyK2MyHcLILAUpmzs82zmvsAikkOSKFViesiygV0EbHsfAdoLjxy5Vs6gc lXWuGuOhB+IBVcUWBFaJAeJD5eqOhO6GxOF7OvqSym76q3k63gptHCGIC/Va7q4S+JsH 4ilcU8Ccw2XgJ1sn+wiDQnuAU/r6QWLiHoNdVLo/PyPow9IMvsm36XxFkD41gfLaOcQI fzdg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si10701790edv.422.2019.10.29.02.21.52; Tue, 29 Oct 2019 02:22:15 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730135AbfJ2B4h (ORCPT + 99 others); Mon, 28 Oct 2019 21:56:37 -0400 Received: from inva021.nxp.com ([92.121.34.21]:60602 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729440AbfJ2B4h (ORCPT ); Mon, 28 Oct 2019 21:56:37 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2AF452000DC; Tue, 29 Oct 2019 02:56:35 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 92E73200355; Tue, 29 Oct 2019 02:56:32 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 12E8D402A2; Tue, 29 Oct 2019 09:56:29 +0800 (SGT) From: Anson Huang To: fugang.duan@nxp.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH RESEND 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message Date: Tue, 29 Oct 2019 09:53:18 +0800 Message-Id: <1572313999-23317-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Failed to get irq using name is NOT fatal as driver will use index to get irq instead, use platform_get_irq_byname_optional() instead of platform_get_irq_byname() to avoid below error message during probe: [ 0.819312] fec 30be0000.ethernet: IRQ int0 not found [ 0.824433] fec 30be0000.ethernet: IRQ int1 not found [ 0.829539] fec 30be0000.ethernet: IRQ int2 not found Signed-off-by: Anson Huang Acked-by: Fugang Duan Reviewed-by: Stephen Boyd --- - The patch f1da567f1dc1 ("driver core: platform: Add platform_get_irq_byname_optional()") already landed on network/master, resend this patch set. --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index d4d4c72..22c01b2 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3558,7 +3558,7 @@ fec_probe(struct platform_device *pdev) for (i = 0; i < irq_cnt; i++) { snprintf(irq_name, sizeof(irq_name), "int%d", i); - irq = platform_get_irq_byname(pdev, irq_name); + irq = platform_get_irq_byname_optional(pdev, irq_name); if (irq < 0) irq = platform_get_irq(pdev, i); if (irq < 0) { -- 2.7.4