Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "J, KEERTHY" <j-keerthy-l0cyMroinI0@public.gmane.org>
To: Amit Kucheria
	<amit.kucheria-LY4KaoCqKrnby3iVrkZq2A@public.gmane.org>,
	Markus Elfring <Markus.Elfring-S0/GAf8tV78@public.gmane.org>
Cc: "Pascal Paillet" <p.paillet-qxv4g6HH51o@public.gmane.org>,
	"Tang Bin"
	<tangbin-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/@public.gmane.org>,
	"Alexandre Torgue"
	<alexandre.torgue-qxv4g6HH51o@public.gmane.org>,
	"Linux PM list"
	<linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Clark Williams"
	<williams-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Greg Kroah-Hartman"
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"Sebastian Andrzej Siewior"
	<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	"Daniel Lezcano"
	<daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Zhang Rui" <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Eduardo Valentin"
	<edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	"Allison Randal"
	<allison-wcfNWazeolPR7s880joybQ@public.gmane.org>,
	"Maxime Coquelin"
	<mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Colin Ian King"
	<colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
	"Thomas Gleixner" <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-stm32-XDFAJ8BFU24N7RejjzZ/Li2xQDfSxrLKVpNB7YpNyf8@public.gmane.org,
	lakml
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Subject: Re: [PATCH] thermal: Delete an error message in four functions
Date: Mon, 6 Apr 2020 13:47:22 +0530	[thread overview]
Message-ID: <ac59c663-18a5-5bbf-09da-2cd8d034138c@ti.com> (raw)
In-Reply-To: <CAHLCerMS5ghVXhOD7RAd5unxEe7w1W4_8hBP5Tf9HvuMEh5Lqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>



On 4/6/2020 1:00 PM, Amit Kucheria wrote:
> On Sun, Apr 5, 2020 at 10:21 PM Markus Elfring <Markus.Elfring@web.de> wrote:
>>
>> From: Markus Elfring <elfring@users.sourceforge.net>
>> 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 <elfring@users.sourceforge.net>

Reviewed-by: Keerthy <j-keerthy@ti.com>

> 
> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
> 
>> ---
>>   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
>>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2020-04-06  8:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 16:50 [PATCH] thermal: Delete an error message in four functions Markus Elfring
2020-04-06  7:30 ` Amit Kucheria
     [not found]   ` <CAHLCerMS5ghVXhOD7RAd5unxEe7w1W4_8hBP5Tf9HvuMEh5Lqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-06  8:17     ` J, KEERTHY [this message]
2020-04-06  9:03 ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac59c663-18a5-5bbf-09da-2cd8d034138c@ti.com \
    --to=j-keerthy-l0cymroini0@public.gmane.org \
    --cc=Markus.Elfring-S0/GAf8tV78@public.gmane.org \
    --cc=alexandre.torgue-qxv4g6HH51o@public.gmane.org \
    --cc=allison-wcfNWazeolPR7s880joybQ@public.gmane.org \
    --cc=amit.kucheria-LY4KaoCqKrnby3iVrkZq2A@public.gmane.org \
    --cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-stm32-XDFAJ8BFU24N7RejjzZ/Li2xQDfSxrLKVpNB7YpNyf8@public.gmane.org \
    --cc=mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=p.paillet-qxv4g6HH51o@public.gmane.org \
    --cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=tangbin-0p4V/sDNsUmm0O/7XYngnFaTQe2KTcn/@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=williams-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox