From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19EBFC2BA18 for ; Mon, 6 Apr 2020 08:18:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE47320672 for ; Mon, 6 Apr 2020 08:18:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="e+t0jx7+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbgDFISL (ORCPT ); Mon, 6 Apr 2020 04:18:11 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:55244 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbgDFISL (ORCPT ); Mon, 6 Apr 2020 04:18:11 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0368HUvb124787; Mon, 6 Apr 2020 03:17:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1586161050; bh=dBNRdO4qjuUg0RS1p/z67TE2khhRn2hu1uvilxmf+c0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=e+t0jx7+2BdPzDD4c47L46lozlZZaC6OkEtj7jZUFAFnIPnRjvA0pHPGSmJv0jA2t tolAaqWvl4UhUHzaIardb8IELE8ZbCfwEFoBcCnuszVl4SkYKtJpnPN8K1ko4R+dS9 xODVjfifgPDKo+MIQt52PzzLlCguJKaWHHWh9M/g= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0368HUom120221; Mon, 6 Apr 2020 03:17:30 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 6 Apr 2020 03:17:29 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Mon, 6 Apr 2020 03:17:29 -0500 Received: from [10.250.133.125] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0368HMcQ118835; Mon, 6 Apr 2020 03:17:23 -0500 Subject: Re: [PATCH] thermal: Delete an error message in four functions To: Amit Kucheria , Markus Elfring CC: Linux PM list , lakml , , , , Alexandre Torgue , Allison Randal , Clark Williams , Colin Ian King , Daniel Lezcano , Eduardo Valentin , Greg Kroah-Hartman , =?UTF-8?Q?Heiko_St=c3=bcbner?= , Maxime Coquelin , Pascal Paillet , Sebastian Andrzej Siewior , Thomas Gleixner , Zhang Rui , LKML , , Tang Bin References: <05f49ae7-5cc7-d6a0-fc3d-abaf2a0b373c@web.de> From: "J, KEERTHY" Message-ID: Date: Mon, 6 Apr 2020 13:47:22 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On 4/6/2020 1:00 PM, Amit Kucheria wrote: > On Sun, Apr 5, 2020 at 10:21 PM Markus Elfring wrote: >> >> From: Markus Elfring >> Date: Sun, 5 Apr 2020 18:35:16 +0200 >> >> The function “platform_get_irq” can log an error already. >> Thus omit redundant messages for the exception handling in the >> calling functions. >> >> This issue was detected by using the Coccinelle software. >> >> Signed-off-by: Markus Elfring Reviewed-by: Keerthy > > Reviewed-by: Amit Kucheria > >> --- >> drivers/thermal/rockchip_thermal.c | 4 +--- >> drivers/thermal/st/st_thermal_memmap.c | 4 +--- >> drivers/thermal/st/stm_thermal.c | 4 +--- >> drivers/thermal/ti-soc-thermal/ti-bandgap.c | 5 ++--- >> 4 files changed, 5 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c >> index 7c1a8bccdcba..15a71ecc916c 100644 >> --- a/drivers/thermal/rockchip_thermal.c >> +++ b/drivers/thermal/rockchip_thermal.c >> @@ -1241,10 +1241,8 @@ static int rockchip_thermal_probe(struct platform_device *pdev) >> return -ENXIO; >> >> irq = platform_get_irq(pdev, 0); >> - if (irq < 0) { >> - dev_err(&pdev->dev, "no irq resource?\n"); >> + if (irq < 0) >> return -EINVAL; >> - } >> >> thermal = devm_kzalloc(&pdev->dev, sizeof(struct rockchip_thermal_data), >> GFP_KERNEL); >> diff --git a/drivers/thermal/st/st_thermal_memmap.c b/drivers/thermal/st/st_thermal_memmap.c >> index a824b78dabf8..a0114452d11f 100644 >> --- a/drivers/thermal/st/st_thermal_memmap.c >> +++ b/drivers/thermal/st/st_thermal_memmap.c >> @@ -94,10 +94,8 @@ static int st_mmap_register_enable_irq(struct st_thermal_sensor *sensor) >> int ret; >> >> sensor->irq = platform_get_irq(pdev, 0); >> - if (sensor->irq < 0) { >> - dev_err(dev, "failed to register IRQ\n"); >> + if (sensor->irq < 0) >> return sensor->irq; >> - } >> >> ret = devm_request_threaded_irq(dev, sensor->irq, >> NULL, st_mmap_thermal_trip_handler, >> diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c >> index 9314e3df6a42..331e2b768df5 100644 >> --- a/drivers/thermal/st/stm_thermal.c >> +++ b/drivers/thermal/st/stm_thermal.c >> @@ -385,10 +385,8 @@ static int stm_register_irq(struct stm_thermal_sensor *sensor) >> int ret; >> >> sensor->irq = platform_get_irq(pdev, 0); >> - if (sensor->irq < 0) { >> - dev_err(dev, "%s: Unable to find IRQ\n", __func__); >> + if (sensor->irq < 0) >> return sensor->irq; >> - } >> >> ret = devm_request_threaded_irq(dev, sensor->irq, >> NULL, >> diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c >> index 263b0420fbe4..ab19ceff6e2a 100644 >> --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c >> +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c >> @@ -772,10 +772,9 @@ static int ti_bandgap_talert_init(struct ti_bandgap *bgp, >> int ret; >> >> bgp->irq = platform_get_irq(pdev, 0); >> - if (bgp->irq < 0) { >> - dev_err(&pdev->dev, "get_irq failed\n"); >> + if (bgp->irq < 0) >> return bgp->irq; >> - } >> + >> ret = request_threaded_irq(bgp->irq, NULL, >> ti_bandgap_talert_irq_handler, >> IRQF_TRIGGER_HIGH | IRQF_ONESHOT, >> -- >> 2.26.0 >>