Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8652062ybn; Tue, 1 Oct 2019 11:09:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqws8yn/70dgqRX88Niyhb9NJ4MitTx2ery3Qfxjtpf+rywKcdO6oEvO5dsYBIqINqGWMydp X-Received: by 2002:a17:906:5fc4:: with SMTP id k4mr25750527ejv.300.1569953344894; Tue, 01 Oct 2019 11:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953344; cv=none; d=google.com; s=arc-20160816; b=K3AhczB9W1qHH0dqM1rF63JZMLmoEu/oM3SYiKSntkDNJzoeH0PAqbemYDdN8ITB7X Uzy9LQMIFAna9nuwio4Ocj68oPMdSBUTwp1Q1ptOZc4jvM/psfEQgQAuq5RDHk9zdb6w JiIRT96981A2EaokxtFvgcDaI1v0E/hOKv/dDG4RKwwpLZ+PLnbWh4YX3HbwBpWfWBzR 87ku2cMdfKZBgEM2Y15uWGDNPM5/SciAD8PFWWKLhFpPyaXWtxVkbBOsf/oCoRenGOuK xPYaemIxipxHAEb1xYiJCNR4UB6aW7B90fo7HaBiYT0aRObrH68eU1lahT/HbsjSFpHO HBCQ== 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=5Ekfz2ygNYq4zNVdnxIBJx9z80IMXdxh5d5muzoZMbE=; b=mfgOk9KrF0SHNxQ++guOU/yklaywHR2o9SHqznSbh4sLJaN6/UPJ/hSfkRFBonV1fx BH51jNs/q1njY/HWh/hya4qib3r8KY00yW2/U6Pdin5lcWZMOXhoFhUVGYj5hMXz4We9 rficK2jLxgAMt+Mo5P/y3l//CgbaRqtnx+tMVpS0j1IzVtPvLMl+OLkHKOpizxTqXwGj BEXj0qWbLPZDZ+SK2yckXz8ICIGwWwg2MtdaRiFlYQmswdx7mCb+VF9N2YBJJUs4QPfh s+SHB5P0aw7phpMZEiCwllJDqbH664DDrAx5ddFEX1eQ8jxDf9zkZCyCri7c2/+hM+Cz lP+A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si9082322eje.338.2019.10.01.11.08.39; Tue, 01 Oct 2019 11:09:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731520AbfJASHr (ORCPT + 99 others); Tue, 1 Oct 2019 14:07:47 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:37248 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727021AbfJASHr (ORCPT ); Tue, 1 Oct 2019 14:07:47 -0400 Received: from ramsan ([84.194.98.4]) by michel.telenet-ops.be with bizsmtp id 8J7l2100805gfCL06J7l2D; Tue, 01 Oct 2019 20:07:45 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1iFMYr-0008Ku-4p; Tue, 01 Oct 2019 20:07:45 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1iFMYr-0000Ho-2G; Tue, 01 Oct 2019 20:07:45 +0200 From: Geert Uytterhoeven To: Greg Kroah-Hartman , Jiri Slaby Cc: Stephen Boyd , linux-renesas-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] serial: sh-sci: Use platform_get_irq_optional() for optional interrupts Date: Tue, 1 Oct 2019 20:07:43 +0200 Message-Id: <20191001180743.1041-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As platform_get_irq() now prints an error when the interrupt does not exist, scary warnings may be printed for optional interrupts: sh-sci e6550000.serial: IRQ index 1 not found sh-sci e6550000.serial: IRQ index 2 not found sh-sci e6550000.serial: IRQ index 3 not found sh-sci e6550000.serial: IRQ index 4 not found sh-sci e6550000.serial: IRQ index 5 not found Fix this by calling platform_get_irq_optional() instead for all but the first interrupts, which are optional. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven --- This is a fix for v5.4-rc1. --- drivers/tty/serial/sh-sci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 4e754a4850e6db63..22e5d4e13714e863 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2894,8 +2894,12 @@ static int sci_init_single(struct platform_device *dev, port->mapbase = res->start; sci_port->reg_size = resource_size(res); - for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) - sci_port->irqs[i] = platform_get_irq(dev, i); + for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) { + if (i) + sci_port->irqs[i] = platform_get_irq_optional(dev, i); + else + sci_port->irqs[i] = platform_get_irq(dev, i); + } /* The SCI generates several interrupts. They can be muxed together or * connected to different interrupt lines. In the muxed case only one -- 2.17.1