Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp729672ybp; Wed, 9 Oct 2019 03:21:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwR0fTbN3MhY+kuTbyjpQqtdMBrLNVcBEvNzf1YnGQ8VZKjnyLy1t0y0bTuTlvh5q5sEKxw X-Received: by 2002:a50:e40c:: with SMTP id d12mr2149462edm.256.1570616489690; Wed, 09 Oct 2019 03:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570616489; cv=none; d=google.com; s=arc-20160816; b=tGIzjPHG9oIPRZ1Ou7fXKTnCB0xPPStJ85BFVBp8pyuwyB8OGakvltuWlJ4lyzkfEO 9w3TMB/te6B1y5P6MWoPxydEOuGajwY5zaC1sAx6QBWcaiUTJGhySjXjpYDLFbmijU38 ysp/M7rGup4lcUwpY+EBKKB3eBqtwEeUQklFTz0UzZORbq4yTavet1XlYZk7jMgRRcwr GriU06SelVHxKw40bZEW2dzS/SIOZYtmOOU0dS/kU4pAUPyEW1bioDIkdxZlryaRzWrL 5bwZsDUl4OnaoXG10D0SKdClZx9BwfPJ4MWoNJ9ZtUTWcIHPmE0BdjQ4szVfIW9HiB1r eD8Q== 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=UYJO1V1m+h7M53+h/kPjzbkDN+rXDz8IfLFJm1pLF1k=; b=0+zj254xBllfbyMpjEYNIfskJUMnN0opZ3kkkal2380G3KUFqbWQrFnGSAFh5hQnNe pI0TM46xESK8XxCU374maWieOyYTlezxe3pPjYmC3MXMChO2TU6vBqdgd2o8bvnAA9UJ YmP27vcn1sUOhwGh5pUopdxbsDcqDckZAggjX3Y0rGeGXbxx+bq3JkLQ/zCV7wjbM0HX sPW1lULQXpcPzFjGOyad3+Kmloh8dTdJdrwPcsFgCjXTkHE8Po8ek2wjJn7Qz5S80ZYw farFsA27/FpPZGpVdma+QdxOSI6wCsxVy1Kh/VyWEKEciZIfW+jhp6HfiDAScmkiFDhx wHng== 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 f26si887506eji.55.2019.10.09.03.21.06; Wed, 09 Oct 2019 03:21:29 -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 S1731164AbfJIKSM (ORCPT + 99 others); Wed, 9 Oct 2019 06:18:12 -0400 Received: from inva020.nxp.com ([92.121.34.13]:54048 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731118AbfJIKSK (ORCPT ); Wed, 9 Oct 2019 06:18:10 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CBDAA1A0180; Wed, 9 Oct 2019 12:18:08 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6000B1A002C; Wed, 9 Oct 2019 12:18:04 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A0B26402E4; Wed, 9 Oct 2019 18:17:58 +0800 (SGT) From: Anson Huang To: fugang.duan@nxp.com, davem@davemloft.net, gregkh@linuxfoundation.org, andy.shevchenko@gmail.com, rafael.j.wysocki@intel.com, swboyd@chromium.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 1/2] net: fec_main: Use platform_get_irq_byname_optional() to avoid error message Date: Wed, 9 Oct 2019 18:15:47 +0800 Message-Id: <1570616148-11571-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 Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Anson Huang --- 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