Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3836058ybb; Mon, 6 Apr 2020 17:09:35 -0700 (PDT) X-Google-Smtp-Source: APiQypJpvtDIqC84HcAiQ2r57zxDlnVWnIpNk7s9xEIkBAof+yyWY4oxDQSoB8eKSuEMohSZZhE3 X-Received: by 2002:aca:1303:: with SMTP id e3mr1490155oii.36.1586218175798; Mon, 06 Apr 2020 17:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586218175; cv=none; d=google.com; s=arc-20160816; b=BBcYKF1m0fX1Kex2b95vXIACA/R9h/QUy600jiom/fWqsj/hwMQjjFEeeLipLwf7no hLWKDiqASlX47LOcH+UH/q7mBJ/CFIoowyQkSoNWeM2GS8t/J+w7075YLDVfpP9xKeeh uAhS+L9xr1Bf0CG/IPUKfzGT7mNyvqGkVHSzHC1LuDiPAZmc8vVhIIU1pg8LRUpF4HMS 9O063bIvVSO14EJ8MoP3MONfCDokerk7f/HRfuBjANkMgI8ecmgj8OcqVZkcGXtGAmHt KceJR1nxi7yIJbPt1YoFq5dNUjPycNpFuwYruCic3HCpYzls+4NX64yCSfE/EyiCPyUJ OfZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rHfmKyb9vRFsgoTIHbjDqYk0Y2L6FZlt+s4X4W+8tZ8=; b=kbTzUj/WEUjovItFcIC8TTG1Rj8gbqFwdWfkVMGnuVdLkyVlOYHvYF75VOENfUVdUd uPhFXEd+NYTPi1hWFi5lxmNPpB16O7EHd8HBKUqMdm87IGTJmJVAILsmTBrEVE618wdb 01zypZKGdburpaiaE3q4rVgyXkwFMP+NWqMEi2JS0gabx/steqfOVV513OnalRFX5Jkt uaqiEt+zZpn16RBYFay8E+5jI2Vgz2djnuW2KJOiZQOOKZr1+Pt0D48yTQZGQtE3j8cB EyL5sKAhBkZm4yuxBVLhiUFIjdv1A4kTQzCrr/XDShVYPh1yykvnm3ll/Qp6ECMZnNmW U4+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FkzYwlah; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si711570oij.194.2020.04.06.17.09.24; Mon, 06 Apr 2020 17:09:35 -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; dkim=pass header.i=@kernel.org header.s=default header.b=FkzYwlah; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728381AbgDGAI5 (ORCPT + 99 others); Mon, 6 Apr 2020 20:08:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:34154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726735AbgDGABU (ORCPT ); Mon, 6 Apr 2020 20:01:20 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7F05120768; Tue, 7 Apr 2020 00:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586217679; bh=lCpe+4Dnaharjk9WK99w2h7l5Sscy3orPRfo6OQyoYA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FkzYwlahAs4zNU9M3I2uv0RydbTTiYagp/vYTif7aH61x6cxkudj860Od3xH97+Sx fpiLeAHka3AK+VTYnxdTkZqGUr0ovgfC38hvJ5Xo9q7qBeynCdOOc/eScz5SjuA07M Umsu4ERcjatED1ecyZ0V9r//Y6JpD/JJJRdo+ciA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Markus Fuchs , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.5 16/35] net: stmmac: platform: Fix misleading interrupt error msg Date: Mon, 6 Apr 2020 20:00:38 -0400 Message-Id: <20200407000058.16423-16-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200407000058.16423-1-sashal@kernel.org> References: <20200407000058.16423-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Fuchs [ Upstream commit fc191af1bb0d069dc7e981076e8b80af21f1e61d ] Not every stmmac based platform makes use of the eth_wake_irq or eth_lpi interrupts. Use the platform_get_irq_byname_optional variant for these interrupts, so no error message is displayed, if they can't be found. Rather print an information to hint something might be wrong to assist debugging on platforms which use these interrupts. Signed-off-by: Markus Fuchs Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index d10ac54bf385a..13fafd905db87 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -663,16 +663,22 @@ int stmmac_get_platform_resources(struct platform_device *pdev, * In case the wake up interrupt is not passed from the platform * so the driver will continue to use the mac irq (ndev->irq) */ - stmmac_res->wol_irq = platform_get_irq_byname(pdev, "eth_wake_irq"); + stmmac_res->wol_irq = + platform_get_irq_byname_optional(pdev, "eth_wake_irq"); if (stmmac_res->wol_irq < 0) { if (stmmac_res->wol_irq == -EPROBE_DEFER) return -EPROBE_DEFER; + dev_info(&pdev->dev, "IRQ eth_wake_irq not found\n"); stmmac_res->wol_irq = stmmac_res->irq; } - stmmac_res->lpi_irq = platform_get_irq_byname(pdev, "eth_lpi"); - if (stmmac_res->lpi_irq == -EPROBE_DEFER) - return -EPROBE_DEFER; + stmmac_res->lpi_irq = + platform_get_irq_byname_optional(pdev, "eth_lpi"); + if (stmmac_res->lpi_irq < 0) { + if (stmmac_res->lpi_irq == -EPROBE_DEFER) + return -EPROBE_DEFER; + dev_info(&pdev->dev, "IRQ eth_lpi not found\n"); + } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); stmmac_res->addr = devm_ioremap_resource(&pdev->dev, res); -- 2.20.1