Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp543878ybn; Wed, 2 Oct 2019 02:13:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlP3BVNRf+9pV5RmcWyPWaN4oeYyw6iCuEf9951QijtXmoEoFN9n+uzn5kvsgbIR3xKFY9 X-Received: by 2002:a17:906:493:: with SMTP id f19mr2016636eja.285.1570007609556; Wed, 02 Oct 2019 02:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570007609; cv=none; d=google.com; s=arc-20160816; b=f54vLhjIn3waa/yKznfjtxDwg/cqX1vRGBDzT/diiVBH2TGOi4fKxs0zDnvW3KcIKC aMTbrWGbKkDMy6Cj9Q5OKJ0OnRW7EkNfclnkIKJjPkZCk47fks/ZK0Rq3Z0YN/A/BvSV b22NSVwGS03u/OOJOks2/GRT6en5ut9Ll9HmPpw83I0BQLlcOWSJ7v3PocM8lXdaznFs kTNmh48Yr7/CFGz7j0TbUypZwzHiAD1l2uHGJwdRXgGckU3RB2JXRnLgVYmIQLoU0xtq kZD8WNzB8DXtBMBNalTthEkVlLc9QdpheF1fiiIqtIhTbB/ONZMFwwkuvK339mg7JAjV WtPQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=snm/Nrqs5QlS5PiXAWfvh6paeZp4yNlu1hsumZL0i1o=; b=ZhdrSFsy4K1kV8t7ae1png+cAPqJfvOz3gbGQe+pgUn7gTObmbndz3lcIOrGCaA8px 0qK8Ftt6IQAYAeM0+2AS9nqDJ9VvNteq4Zk/mCnxjJ/yrQ3y1jcKgBTsqHHo30Vjpgkw htVZc4i4BZyPsgKDGCsE8+OZbdV0EXYE3hYvHhPvOO0ET1Y2wlYJzjPGwpcZdnV7AsXo TlR94S1wZRw13BNQatBc0AqY5LDQp8xjHKbYUglwDEFfDf8W6IPe5SuGmeOAZi6TBFLU hv5JBfwvo7OmIk7vELo1oZCBobnJsfIXXs/Hii/YX7EDUWpShP7SH4122oySKionFrQe y6aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b="M/2NAixW"; 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 z7si11055961edb.160.2019.10.02.02.13.04; Wed, 02 Oct 2019 02:13: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; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b="M/2NAixW"; 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 S1726240AbfJBJLv (ORCPT + 99 others); Wed, 2 Oct 2019 05:11:51 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45674 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfJBJLv (ORCPT ); Wed, 2 Oct 2019 05:11:51 -0400 Received: by mail-lf1-f65.google.com with SMTP id r134so12112436lff.12 for ; Wed, 02 Oct 2019 02:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=snm/Nrqs5QlS5PiXAWfvh6paeZp4yNlu1hsumZL0i1o=; b=M/2NAixWfPaMv3ZQW8Iwvj3sYZDoLYGfcGEUPMvVVvRTO0GZtIAGlDedHIPNizgtIs /PLzYWTMsIkba6wIwEff4EucUGUk8nrIsz6BPQM3MbVfUA9LRQ+07VcP/QoWSp+XTN+K JIccWCDorvAIj8F3AMn9ahODS2anPU/p9rqnJr/uzBkaGYdCwIQdsI1kz6bLqe8kUdrj lE1kW7iIdsH7hTOiCe2dQKT4LufypcTvTrZYYOiDTGM6/D1FWO9PNg1ooBveodsGmmK5 8prq4eTWC19Vtg8J1G/aI/3slaof/k2pbJ/5Ol+djQc6jbctJ3JvALeC02h/qNrFaCHo A4aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=snm/Nrqs5QlS5PiXAWfvh6paeZp4yNlu1hsumZL0i1o=; b=JSQNRu0PqdzCOyOsnjp78GufFplUtDKgmGX0hmSBCwIOi618jzmwRHKD6EcJQ7HDyl ZFgQ4GVeDcEYuOwynDO+tFsBpC6oZMKi9q/aQK8Op4wau5XHnpKysLk9go5poF9OMzsr ww2P9RjpVkZYaXV5p88X6DGovVSCoqBbiHp/j7HybsAIFSQh/1wxrxphgRcb28y4iPuV gXgPldy/+icEyMF+rszDvl/Vq7RHowEblqvyknvLhFXYJwOMCigL3B31H/GyJLgFHd6g uaOWYa9jlyec3XbaDdeIOcrAWpev+32AVio0b+LSdf5yZV8NfnjUE/3LFItCT72Xdpv1 sYZQ== X-Gm-Message-State: APjAAAVv4F35UVdncgN6N8cvfDwSeQJKmBvnraNJzz+j/1UfFiQoCUZ+ +Wue2S6lVzzDpiWBSdekVN0wske2dxxnAA== X-Received: by 2002:a05:6512:210:: with SMTP id a16mr1605247lfo.42.1570007509119; Wed, 02 Oct 2019 02:11:49 -0700 (PDT) Received: from ?IPv6:2a00:1fa0:445f:5d29:e99c:20bb:1ee3:467? ([2a00:1fa0:445f:5d29:e99c:20bb:1ee3:467]) by smtp.gmail.com with ESMTPSA id k8sm5693214ljg.9.2019.10.02.02.11.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:11:48 -0700 (PDT) Subject: Re: [PATCH] mmc: renesas_sdhi: Do not use platform_get_irq() to count interrupts To: Geert Uytterhoeven , Ulf Hansson , Wolfram Sang Cc: Stephen Boyd , Greg Kroah-Hartman , linux-renesas-soc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191001180703.910-1-geert+renesas@glider.be> From: Sergei Shtylyov Message-ID: Date: Wed, 2 Oct 2019 12:11:45 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191001180703.910-1-geert+renesas@glider.be> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.10.2019 21:07, Geert Uytterhoeven wrote: > As platform_get_irq() now prints an error when the interrupt does not > exist, counting interrupts by looping until failure causes the printing s/the//? > of scary messages like: > > renesas_sdhi_internal_dmac ee140000.sd: IRQ index 1 not found > > Fix this by using the platform_irq_count() helper to avoid touching > non-existent interrupts. > > 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/mmc/host/renesas_sdhi_core.c | 26 ++++++++++++++------------ > 1 file changed, 14 insertions(+), 12 deletions(-) > > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c > index d4ada5cca2d14f6a..122f429602d825bd 100644 > --- a/drivers/mmc/host/renesas_sdhi_core.c > +++ b/drivers/mmc/host/renesas_sdhi_core.c [...] > @@ -825,24 +825,26 @@ int renesas_sdhi_probe(struct platform_device *pdev, > host->hs400_complete = renesas_sdhi_hs400_complete; > } > > - i = 0; > - while (1) { > + /* There must be at least one IRQ source */ > + num_irqs = platform_irq_count(pdev); > + if (num_irqs < 1) { > + ret = num_irqs; > + goto eirq; This will return 0 with failed probe if 'num_irqs' is 0, I don't think you want this... [...] MBR, Sergei