From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 3/3] thermal: rcar_gen3_thermal: Fix datatype for loop counter
Date: Wed, 7 Jul 2021 20:55:58 +0200 [thread overview]
Message-ID: <YOX4vulWqmtjrn14@oden.dyn.berto.se> (raw)
In-Reply-To: <CAMuHMdUx19uGTX3nddkODwdzLeSGuZbuyac7VMitZv=1tgyPSg@mail.gmail.com>
Hi Geert,
Thanks for your feedback.
On 2021-07-07 16:42:10 +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
>
> Thanks for your patch!
>
> On Wed, Jul 7, 2021 at 3:14 PM Niklas Söderlund
> <niklas.soderlund+renesas@ragnatech.se> wrote:
> > The loop counter 'i' should be unsigned int to match struct
> > rcar_gen3_thermal_priv num_tscs where it's stored.
>
> It is also stored in rcar_gen3_thermal_tsc.id, which is still (signed) int.
Thanks.
>
> > --- a/drivers/thermal/rcar_gen3_thermal.c
> > +++ b/drivers/thermal/rcar_gen3_thermal.c
> > @@ -423,7 +423,8 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
> > struct device *dev = &pdev->dev;
> > struct resource *res;
> > struct thermal_zone_device *zone;
> > - int ret, i;
> > + unsigned int i;
> > + int ret;
> >
> > /* default values if FUSEs are missing */
> > /* TODO: Read values from hardware on supported platforms */
>
> And perhaps:
>
> - dev_info(dev, "TSC%d: Loaded %d trip points\n", i, ret);
> + dev_info(dev, "TSC%u: Loaded %d trip points\n", i, ret);
>
> ?
Good catch, why do my compiler not warn for this? Did you catch this by
review or have you some compiler magic I'm missing?
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2021-07-07 18:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 13:13 [PATCH 0/3] thermal: rcar_gen3_thermal: Add support for trip points Niklas Söderlund
2021-07-07 13:13 ` [PATCH 1/3] thermal: rcar_gen3_thermal: Create struct for OF match data Niklas Söderlund
2021-07-07 14:42 ` Geert Uytterhoeven
2021-07-07 13:13 ` [PATCH 2/3] thermal: rcar_gen3_thermal: Add support for hardware trip points Niklas Söderlund
2021-07-07 14:58 ` Geert Uytterhoeven
2021-07-07 18:53 ` Niklas Söderlund
2021-07-07 13:13 ` [PATCH 3/3] thermal: rcar_gen3_thermal: Fix datatype for loop counter Niklas Söderlund
2021-07-07 14:42 ` Geert Uytterhoeven
2021-07-07 18:55 ` Niklas Söderlund [this message]
2021-07-07 21:12 ` Geert Uytterhoeven
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=YOX4vulWqmtjrn14@oden.dyn.berto.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=daniel.lezcano@linaro.org \
--cc=geert@linux-m68k.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.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