mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Staging: kernel: user: fixed some coding style issues
@ 2020-04-11 19:42 carlosteniswarrior
  2020-04-11 19:53 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: carlosteniswarrior @ 2020-04-11 19:42 UTC (permalink / raw)
  To: gregkh; +Cc: akpm, linux-kernel, porfavorde

From: porfavorde <carlosteniswarrior@gmail.com>

Fixed a coding style issue with a for loop and a trailing whitespace in
the comments

Signed-off-by: Carlos Guerrero Álvarez <carlosteniswarrior@gmail.com>
---
 kernel/user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/user.c b/kernel/user.c
index 5235d7f49982..4228ec04678d 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -6,7 +6,7 @@
  *
  * We have a per-user structure to keep track of how many
  * processes, files etc the user has claimed, in order to be
- * able to have per-user limits for system resources. 
+ * able to have per-user limits for system resources.
  */
 
 #include <linux/init.h>
@@ -216,7 +216,7 @@ static int __init uid_cache_init(void)
 	uid_cachep = kmem_cache_create("uid_cache", sizeof(struct user_struct),
 			0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
 
-	for(n = 0; n < UIDHASH_SZ; ++n)
+	for (n = 0; n < UIDHASH_SZ; ++n)
 		INIT_HLIST_HEAD(uidhash_table + n);
 
 	/* Insert the root user immediately (init already runs as root) */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Staging: kernel: user: fixed some coding style issues
  2020-04-11 19:42 [PATCH] Staging: kernel: user: fixed some coding style issues carlosteniswarrior
@ 2020-04-11 19:53 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2020-04-11 19:53 UTC (permalink / raw)
  To: carlosteniswarrior, gregkh; +Cc: akpm, linux-kernel

On Sat, 2020-04-11 at 21:42 +0200, carlosteniswarrior@gmail.com wrote:
> From: porfavorde <carlosteniswarrior@gmail.com>

Hello.

> Fixed a coding style issue with a for loop and a trailing whitespace in
> the comments
> 
> Signed-off-by: Carlos Guerrero Álvarez <carlosteniswarrior@gmail.com>

A From: line is generally used when sending a patch authored
by someone else.

It would be better here not to use a From: line at all as you
are both the author and sender.

Also please make your first patch somewhere in drivers/staging
and not any other directory until you are familiar with the
kernel styles and tools.  kernel/ isn't really a good place
for a first patch to be accepted, though I don't see anything
wrong with this patch other than the From: line.

But whitespace only changes outside of drivers/staging and a
few other directories are generally not accepted unless sent
as a patch series along with some other change such as
refactoring or a logical change for a defect.

cheers, Joe
---
>  kernel/user.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/user.c b/kernel/user.c
> index 5235d7f49982..4228ec04678d 100644
> --- a/kernel/user.c
> +++ b/kernel/user.c
> @@ -6,7 +6,7 @@
>   *
>   * We have a per-user structure to keep track of how many
>   * processes, files etc the user has claimed, in order to be
> - * able to have per-user limits for system resources. 
> + * able to have per-user limits for system resources.
>   */
>  
>  #include <linux/init.h>
> @@ -216,7 +216,7 @@ static int __init uid_cache_init(void)
>  	uid_cachep = kmem_cache_create("uid_cache", sizeof(struct user_struct),
>  			0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
>  
> -	for(n = 0; n < UIDHASH_SZ; ++n)
> +	for (n = 0; n < UIDHASH_SZ; ++n)
>  		INIT_HLIST_HEAD(uidhash_table + n);
>  
>  	/* Insert the root user immediately (init already runs as root) */


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-11 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11 19:42 [PATCH] Staging: kernel: user: fixed some coding style issues carlosteniswarrior
2020-04-11 19:53 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®