[PATCH] arch: change variable types to match those of what is assigned to them

Max Filippov jcmvbkbc at gmail.com
Tue Dec 13 17:48:59 PST 2022


Hi Seija,

On Tue, Dec 13, 2022 at 4:51 PM Seija Kijin <doremylover123 at gmail.com> wrote:
>
> There are many places where "int len = strlen(foo);" is written, just for len to be passed as a parameter of size_t.

[...]

> diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
> index 10b79d3c74e0..3159917ffd2f 100644
> --- a/arch/xtensa/platforms/iss/console.c
> +++ b/arch/xtensa/platforms/iss/console.c
> @@ -64,7 +64,7 @@ static int rs_write(struct tty_struct * tty,
>   static void rs_poll(struct timer_list *unused)
>   {
>       struct tty_port *port = &serial_port;
> -    int i = 0;
> +    size_t i = 0;

This is not what happens here at all.

-- 
Thanks.
-- Max



More information about the linux-arm-kernel mailing list