From: "J, KEERTHY" <j-keerthy@ti.com>
To: Amit Kucheria <amit.kucheria@verdurent.com>,
Markus Elfring <Markus.Elfring@web.de>
Cc: "Linux PM list" <linux-pm@vger.kernel.org>,
lakml <linux-arm-kernel@lists.infradead.org>,
linux-rockchip@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-omap@vger.kernel.org,
"Alexandre Torgue" <alexandre.torgue@st.com>,
"Allison Randal" <allison@lohutok.net>,
"Clark Williams" <williams@redhat.com>,
"Colin Ian King" <colin.king@canonical.com>,
"Daniel Lezcano" <daniel.lezcano@linaro.org>,
"Eduardo Valentin" <edubezval@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Heiko Stübner" <heiko@sntech.de>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Pascal Paillet" <p.paillet@st.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Zhang Rui" <rui.zhang@intel.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
"Tang Bin" <tangbin@cmss.chinamobile.com>
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@mail.gmail.com>
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
>>
next prev parent reply other threads:[~2020-04-06 8:18 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
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@ti.com \
--cc=Markus.Elfring@web.de \
--cc=alexandre.torgue@st.com \
--cc=allison@lohutok.net \
--cc=amit.kucheria@verdurent.com \
--cc=bigeasy@linutronix.de \
--cc=colin.king@canonical.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=p.paillet@st.com \
--cc=rui.zhang@intel.com \
--cc=tangbin@cmss.chinamobile.com \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/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