Re: [PATCH] mm/kmemleak: fix errors/warnings for coding style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 15, 2024 at 12:09:18AM +0530, Pintu Kumar wrote:
> There are several errors/warnings reported by checkpatch.
> Fix all of the positive once as below:
> - Use #include <linux/processor.h> instead of <asm/processor.h>
> - Missing a blank lines after declarations
> - Prefer 'unsigned int' to bare use of 'unsigned'
> - else should follow close brace '}'

I wouldn't bother fixing up the style in existing code, it just makes
backporting fixes harder.

> @@ -2179,8 +2180,7 @@ static int __init kmemleak_boot_config(char *str)
>  	else if (strcmp(str, "on") == 0) {
>  		kmemleak_skip_disable = 1;
>  		stack_depot_request_early_init();
> -	}
> -	else
> +	} else
>  		return -EINVAL;
>  	return 0;

According to the coding style doc, the 'else' branch also needs braces
here.

-- 
Catalin




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux