Re: [PATCH -next v3] sh: intc: replace simple_strtoul to kstrtoul
Geert Uytterhoeven <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel |
|---|---|
| Message-ID | <CAMuHMdW=xCWHOcMnY9pKpxB93V2GqPPBRa7pPH0fOVDh1HH6-A@mail.gmail.com> |
On Mon, Sep 2, 2024 at 4:37 AM Hongbo Li <[email protected]> wrote: > The function simple_strtoul performs no error checking > in scenarios where the input value overflows the intended > output variable. > > We can replace the use of the simple_strtoul with the safer > alternatives kstrtoul. For fail case, we also print the extra > message. > > Signed-off-by: Hongbo Li <[email protected]> > > --- > v3: > - Separate declaration and assignment to make it more consistent. Reviewed-by: Geert Uytterhoeven <[email protected]> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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