Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp550762ybn; Wed, 2 Oct 2019 02:21:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzS0Iiyj7QmF5bZAl/lNdUo+EKRqfxuSAfLI0jr6GP+xYux1xTDdi9HCH1DolyzcchgSLJ X-Received: by 2002:a17:906:5ad8:: with SMTP id x24mr2103681ejs.107.1570008074795; Wed, 02 Oct 2019 02:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570008074; cv=none; d=google.com; s=arc-20160816; b=oGruc/eGKv8DVNTOxblDiiQk6DE5xGrnTlPUOw/fdN+1xeCDu9KfJxSDX4OK/WPDbi bGaafSYrPgLdcyeNoDIlMNIuhISezhelOR1U578/fXKmQ+N2LjHK9qPDo/PKFaKwKw8V LRRSozheNdmt4LQ+D6E2HdnrAPicsLs7yJklu3aFlYuVg3LkjSV69zY+U7ysRgLLc/1f 47mVJhXVnd97UmwUQeq75i/AH7vCz9vHduumYyHmUSu5VovVggj6dm3mjMeUkl0uZ5y1 XDpzv9R6ZQ2yh2yfzwX35qJQVEZqdL0OF+2Z2izhZewprw1mg2z0TXnYvM6FN7ORCPuV MvyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=zO+tNlkfwYOYwgo9Rwy/x2Myvg50guhXleT3msC6d9I=; b=wI7geghVjAg1mBAZkXx7t2BICaE0yVYqMyFLne5fBM0DealFH+Q/UxBRJ0vPKoZ6K0 2LkMxasYuXmbJlFqKBHpCcUTBst/O7xQm2iV3/JpcdqJXIgn5OGYTmCq8L86CpWwevV6 1Dz6FiYWmogR+NWpwQdC2eeswDoaAmFprFGE47/WbnFwoiVnwCpLDmst+O1lxNFhNshY cYJrIym8SGygrC7on6DHgtVv8knRV5jX59h7ZsCE/YyBZTcG32R0DSXUXaE8GBEbHVOu 4NBTG/YQ7BNJlz7fD82Z1WGFxpsLzHqq4Ltur2gx1UgJng3N8kwmO3K8yqnObREh8Tgu m9yA== 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 y50si6772329edd.237.2019.10.02.02.20.50; Wed, 02 Oct 2019 02:21:14 -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 S1726975AbfJBJUU (ORCPT + 99 others); Wed, 2 Oct 2019 05:20:20 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:43292 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbfJBJUT (ORCPT ); Wed, 2 Oct 2019 05:20:19 -0400 Received: by mail-oi1-f194.google.com with SMTP id t84so17012399oih.10; Wed, 02 Oct 2019 02:20:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zO+tNlkfwYOYwgo9Rwy/x2Myvg50guhXleT3msC6d9I=; b=IWpZJPr3C2f1Ob3w9MOF5oiaEGyWakS1aZcnOyig8TghwV1ioTpZglQCwbqYQMW7xw knXMlCi82++YgV6dRsl+w4hqNmMXuFvFOV16HwcM8Jb/eWojZmWqvA3rwqJdCaPp2eeo y9sZWMVlsanJZFz7etcnpYG11Oy1IzQO0hrRRcWxtXnsY+RNBAHQuu1IXu4/ekYV9lqr 23fLTgHABSQzhad/TJh7M5iMQo9flj8RXQNSQZqcL94tC8XZCRmDAc9GsCtx+TLh1dss v3P3LfMFXCCybPYDdVigclFDgtq0ExtZwW3wor86fpzJAOQw1ZtfoBc2/fXGjKOQlxos Js4Q== X-Gm-Message-State: APjAAAVp3HqWr+syyjmM6YbYjeL90um5EvylmoURN3TX+sqPVtmT2kBk beWMTDPiNbnOoJOfr01v7ljqAiUj7FR0tTsVvBuP6Q== X-Received: by 2002:aca:dad4:: with SMTP id r203mr2110251oig.102.1570008018885; Wed, 02 Oct 2019 02:20:18 -0700 (PDT) MIME-Version: 1.0 References: <20191001180703.910-1-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Wed, 2 Oct 2019 11:20:07 +0200 Message-ID: Subject: Re: [PATCH] mmc: renesas_sdhi: Do not use platform_get_irq() to count interrupts To: Sergei Shtylyov Cc: Geert Uytterhoeven , Ulf Hansson , Wolfram Sang , Stephen Boyd , Greg Kroah-Hartman , Linux-Renesas , Linux MMC List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sergei, On Wed, Oct 2, 2019 at 11:11 AM Sergei Shtylyov wrote: > 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//? I believe "the printing" is correct. Any native English speakers to comment? > > 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 > > --- 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... Thanks, will fix. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds