Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6388501ybe; Wed, 18 Sep 2019 02:38:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqy99OqxFt0dz9fDPnH8GZXvRJgLcZx9OawqIj2HCbFXcmeHGV6DZiW1t1n0GQbt5J1EwMUD X-Received: by 2002:a17:906:27cf:: with SMTP id k15mr8617156ejc.150.1568799532414; Wed, 18 Sep 2019 02:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568799532; cv=none; d=google.com; s=arc-20160816; b=IqfNjyIS7VxnnSFRNYDIDQtH0pudxMUQX9TMY+VSCHq9wG6FKe7lCpY7tPU860I18C /Vj8Z1UJidsipT0Cu7yplF55oSaZ4ph9SC28Qvk1jbqAr1VBISLowb7ql0b1NU39KEGK m7l3uxZA1GkbQnv4JjueDQEA9hMJmuWmHW/ZBDWHFAzvDsqlAx+3yYmSoWpcJUIvqTRw VrAvIV5t4ni2FNRhvUxJqEdll5zPu5IAE/4PIXSiBCO5wB1rOZi+baFqs/kqJiwQzKuL s2y4FXbC7AxRd4/j0UC/cgKF6l+5QHnNBFG7QOzZEhQ8N/k+e01yhtG+u9jGYee9q3vw Rlew== 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; bh=cP0iAhET7pytcNXccORp0lXaCFBphgBt3yKs3SjnI90=; b=tyvSxTs7S4sgDRy3C0JPnxp1ehzT/7+a/mXcaQcG9E5dWsOzhF3XHi7gLLK5D2Y0zf L6EekBUHrZmidrAVlWcqwP+4sKAyGLUJrWC443CUZofxgI18uK4K0A1jKdZiIHE8XNq1 tj543IykeBXXlQABtKkLgGDoA1Q6j7RXcBV0j/q6b8sh2cMl2o6hB/n7Q5sjA7J4Sbzi SukCFp9c1Zpx9bStwm97l+HEsHreleYYGLsX2uFPpiuoI8mLUNfSA7807hdkwt+A6VmN TagIThem9nf2sqZsn1f9qXvKULdKOI8IKF3DOX7caYpUP/gLhgyynd1KxRL1ov0GRhpe GDoA== 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 z55si2988044edz.254.2019.09.18.02.38.28; Wed, 18 Sep 2019 02:38:52 -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 S1730739AbfIRJAe (ORCPT + 99 others); Wed, 18 Sep 2019 05:00:34 -0400 Received: from ns.iliad.fr ([212.27.33.1]:40740 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725909AbfIRJAe (ORCPT ); Wed, 18 Sep 2019 05:00:34 -0400 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 3517A206A6; Wed, 18 Sep 2019 11:00:32 +0200 (CEST) Received: from [192.168.108.37] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 1D65120186; Wed, 18 Sep 2019 11:00:32 +0200 (CEST) Subject: Re: [PATCH v2 2/3] i2c: qup: Remove dev_err() log after platform_get_irq*() failure To: Saiyam Doshi Cc: MSM , I2C , LKML , Marc Zyngier , Thomas Gleixner References: <20190917172120.GA11581@SD> From: Marc Gonzalez Message-ID: <4e65aeeb-40da-7856-a22e-ce7aac21ae46@free.fr> Date: Wed, 18 Sep 2019 11:00:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190917172120.GA11581@SD> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Wed Sep 18 11:00:32 2019 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/09/2019 19:21, Saiyam Doshi wrote: > The debug message after platform_get_irq() failure is redundant > because platform_get_irq() already prints an error. Thus remove it. > > Generated by: scripts/coccinelle/api/platform_get_irq.cocci > > Signed-off-by: Saiyam Doshi > --- > Changes in v2: > Updated changelog and removed unnecessary braces after if condition. > > drivers/i2c/busses/i2c-qup.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c > index 5519c19bfd9c..ed09a59066b2 100644 > --- a/drivers/i2c/busses/i2c-qup.c > +++ b/drivers/i2c/busses/i2c-qup.c > @@ -1766,10 +1766,8 @@ static int qup_i2c_probe(struct platform_device *pdev) > return PTR_ERR(qup->base); > > qup->irq = platform_get_irq(pdev, 0); > - if (qup->irq < 0) { > - dev_err(qup->dev, "No IRQ defined\n"); > + if (qup->irq < 0) > return qup->irq; > - } As far as I understand, platform_get_irq() == 0 is also an error condition. I think the typical way to handle this peculiarity is: (Maybe the IRQ maintainers will correct me) qup->irq = platform_get_irq(pdev, 0); if (qup->irq <= 0) return qup->irq ? : -ENXIO; Regards.