lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 07 Mar 2014 19:55:53 -0800
From:	Joe Perches <joe@...ches.com>
To:	Choi Gi-yong <yong@...y.org>
Cc:	tj@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Fix Coding style

On Sat, 2014-03-08 at 12:46 +0900, Choi Gi-yong wrote:
[]
> diff --git a/mm/percpu.c b/mm/percpu.c

Please run your suggested patches through checkpatch.

> @@ -715,7 +715,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved)
>  
>  	if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) {
>  		WARN(true, "illegal size (%zu) or align (%zu) for "
> -		     "percpu allocation\n", size, align);
> +				"percpu allocation\n", size, align);

It'd be better to coalesce the format fragments

[]

> @@ -968,8 +968,8 @@ bool is_kernel_percpu_address(unsigned long addr)
>  		void *start = per_cpu_ptr(base, cpu);
>  
>  		if ((void *)addr >= start && (void *)addr < start + static_size)
> -			return true;
> -        }
> +		return true;
> +       }

Not an improvement.
Why do you think it's better?

> @@ -1929,8 +1929,7 @@ void __init setup_per_cpu_areas(void)
>   */
>  void __init percpu_init_late(void)
>  {
> -	struct pcpu_chunk *target_chunks[] =
> -		{ pcpu_first_chunk, pcpu_reserved_chunk, NULL };
> +	struct pcpu_chunk *target_chunks[] = { pcpu_first_chunk, pcpu_reserved_chunk, NULL };

This exceeds 80 columns.

This would be better as:

	struct pcpu_chunk *target_chunks[] = {
		pcpu_first_chunk, pcpu_reserved_chunk, NULL
	};

And perhaps this should be static const

>  	struct pcpu_chunk *chunk;
>  	unsigned long flags;
>  	int i;



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists