Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3687274ybz; Mon, 4 May 2020 07:53:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLnjKV+nwTTPl2K7eZBoEd9WqqzyM35scqYVYNj1AkfLkmNjW6em8d+9sby/DbM5RWcxX/h X-Received: by 2002:aa7:c1cf:: with SMTP id d15mr14095233edp.266.1588603987783; Mon, 04 May 2020 07:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588603987; cv=none; d=google.com; s=arc-20160816; b=Jaois0rWc+ewxtd8DaTQsI29w6q5CHc1EtAerrZKecyAB5HH5gKNr+uJuKx6Krvhin QEjKoSCrUbTXMztFuDboRM9YnK1daG6j7xhXfvsiausD9eoFcVESkdb0IYbevKGo22PP ce8EK6p+J+updlrlcfSygNf9ZC6Xs/T9tP3Bj4oFIUX0XyyTTyojWwm7Wjj8qLGrD2cF awx2gsIsiZZSvzVf0KmzmZBySxjUPmHwnUH1F67NcBwC8D2jDadtJLYgbPPchKv+44zs mYz7va53iLnxD/p9AsLfXK7YGLbvb0R7jCA0eyGwX9smFiNXgdeNj5jID8Xfu2eOeLAb 6iJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=3yQ3Ij2GmAMVWCZgAOFr7tqLm3WA4uUlYQWYBBTHD4o=; b=tLM1fzllyaMWNVsb3wl8Y3gaNHBxF95pNR8wmHUAUDT+i35L5+Nqp/ps4UT5aT1KuS YDrhArnXp/o2C2bkJN3gaZNjhybGhwjIzBhg68wS+k0ly9zARxhG3cIQdd2BIc2HbFRX J1UgBn/FpKa3sR0S2G4eDscRqkCO0Zp1wUujEDWtDjOvxecO3Vy+MCPyP5tpTjnfl1fE /ESPFWOQ20IOK0qOX6BUgRt/t6dVsKy28ElwVATE/C9qAE8kvZrwcNTIx2hcBuDnj5Pp R8U1sj8lUaYRHX34xqZaqa+7yWyWSfvS0isy0vqi3TVvJUf0S++qh0VMpL3wnrHSQDLY 4FHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cy17si6822922edb.84.2020.05.04.07.52.44; Mon, 04 May 2020 07:53:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728822AbgEDMm6 (ORCPT + 99 others); Mon, 4 May 2020 08:42:58 -0400 Received: from mga02.intel.com ([134.134.136.20]:61499 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbgEDMm6 (ORCPT ); Mon, 4 May 2020 08:42:58 -0400 IronPort-SDR: UEOS+CMm56Yg/50P4f3Vq1bMlZQzt7ljnJRNl/nSOjyVW6jWfCnDGiVfQ8hJgOU52Dqo5XEiED og4+Tq1Kz99A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2020 05:42:57 -0700 IronPort-SDR: GZ5CLlJqOXi5gp7wS+11Ftok3l7QEB8bkkbjg3l7se4ElhXZSXh++4QMLGzklhBtp32cu/PIvn OvjiMVJc5Dfg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,352,1583222400"; d="scan'208";a="338307544" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001.jf.intel.com with ESMTP; 04 May 2020 05:42:54 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jVaQy-004cHK-N9; Mon, 04 May 2020 15:42:56 +0300 Date: Mon, 4 May 2020 15:42:56 +0300 From: Andy Shevchenko To: Aishwarya Ramakrishnan Cc: Thor Thayer , Hans de Goede , Vladimir Zapolskiy , Masahiro Yamada , Greg Kroah-Hartman , Pierre-Yves MORDRET , Gregory CLEMENT , Baruch Siach , Dmitry Osipenko , Thomas Gleixner , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] i2c: drivers: Remove superfluous error message Message-ID: <20200504124256.GF185537@smile.fi.intel.com> References: <20200503120847.13528-1-aishwaryarj100@gmail.com> <20200504114408.9128-1-aishwaryarj100@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200504114408.9128-1-aishwaryarj100@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 04, 2020 at 05:14:06PM +0530, Aishwarya Ramakrishnan wrote: > The function platform_get_irq can log an error by itself. > This omit a redundant message for exception handling in the > calling function. FWIW, Reviewed-by: Andy Shevchenko > Suggested by Coccinelle. Compile tested only, right? > > Signed-off-by: Aishwarya Ramakrishnan > --- > drivers/i2c/busses/i2c-altera.c | 4 +--- > drivers/i2c/busses/i2c-cht-wc.c | 4 +--- > drivers/i2c/busses/i2c-img-scb.c | 4 +--- > drivers/i2c/busses/i2c-lpc2k.c | 4 +--- > drivers/i2c/busses/i2c-uniphier.c | 4 +--- > 5 files changed, 5 insertions(+), 15 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c > index f5c00f903df3..af6985f0ae63 100644 > --- a/drivers/i2c/busses/i2c-altera.c > +++ b/drivers/i2c/busses/i2c-altera.c > @@ -395,10 +395,8 @@ static int altr_i2c_probe(struct platform_device *pdev) > return PTR_ERR(idev->base); > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "missing interrupt resource\n"); > + if (irq < 0) > return irq; > - } > > idev->i2c_clk = devm_clk_get(&pdev->dev, NULL); > if (IS_ERR(idev->i2c_clk)) { > diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c > index 35e55feda763..343ae5754e6e 100644 > --- a/drivers/i2c/busses/i2c-cht-wc.c > +++ b/drivers/i2c/busses/i2c-cht-wc.c > @@ -314,10 +314,8 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev) > int ret, reg, irq; > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "Error missing irq resource\n"); > + if (irq < 0) > return -EINVAL; > - } > > adap = devm_kzalloc(&pdev->dev, sizeof(*adap), GFP_KERNEL); > if (!adap) > diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c > index 422097a31c95..2f6de763816a 100644 > --- a/drivers/i2c/busses/i2c-img-scb.c > +++ b/drivers/i2c/busses/i2c-img-scb.c > @@ -1344,10 +1344,8 @@ static int img_i2c_probe(struct platform_device *pdev) > return PTR_ERR(i2c->base); > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "can't get irq number\n"); > + if (irq < 0) > return irq; > - } > > i2c->sys_clk = devm_clk_get(&pdev->dev, "sys"); > if (IS_ERR(i2c->sys_clk)) { > diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c > index 13b0c12e2dba..43dc9b7043e4 100644 > --- a/drivers/i2c/busses/i2c-lpc2k.c > +++ b/drivers/i2c/busses/i2c-lpc2k.c > @@ -362,10 +362,8 @@ static int i2c_lpc2k_probe(struct platform_device *pdev) > return PTR_ERR(i2c->base); > > i2c->irq = platform_get_irq(pdev, 0); > - if (i2c->irq < 0) { > - dev_err(&pdev->dev, "can't get interrupt resource\n"); > + if (i2c->irq < 0) > return i2c->irq; > - } > > init_waitqueue_head(&i2c->wait); > > diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c > index 668b1fa2b0ef..ee00a44bf4c7 100644 > --- a/drivers/i2c/busses/i2c-uniphier.c > +++ b/drivers/i2c/busses/i2c-uniphier.c > @@ -324,10 +324,8 @@ static int uniphier_i2c_probe(struct platform_device *pdev) > return PTR_ERR(priv->membase); > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(dev, "failed to get IRQ number\n"); > + if (irq < 0) > return irq; > - } > > if (of_property_read_u32(dev->of_node, "clock-frequency", &bus_speed)) > bus_speed = I2C_MAX_STANDARD_MODE_FREQ; > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko