All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] This commit fixes the error generated due to the wrong indentation which does not follow the codding  style norms set by Linux-kernel  and space- bar is used in place of tab to give space which causes a visual error for  some compilers
@ 2021-05-21 10:56 ` Aviral Gupta
  0 siblings, 0 replies; 6+ messages in thread
From: Aviral Gupta @ 2021-05-21 10:56 UTC (permalink / raw)
  To: viro, shuah
  Cc: Aviral Gupta, linux-fsdevel, linux-kernel, linux-kernel-mentees

ERROR: switch and case should be at the same indent
+	switch (whence) {
+		case 1:
[...]
+		case 0:
[...]
+		default:
ERROR: code indent should use tabs where possible
+                              void (*callback)(struct dentry *))$

Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
---
 fs/libfs.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/libfs.c b/fs/libfs.c
index e9b29c6ffccb..a7a9deec546c 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -138,15 +138,15 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
 {
 	struct dentry *dentry = file->f_path.dentry;
 	switch (whence) {
-		case 1:
-			offset += file->f_pos;
-			fallthrough;
-		case 0:
-			if (offset >= 0)
-				break;
-			fallthrough;
-		default:
-			return -EINVAL;
+	case 1:
+		offset += file->f_pos;
+		fallthrough;
+	case 0:
+		if (offset >= 0)
+			break;
+		fallthrough;
+	default:
+		return -EINVAL;
 	}
 	if (offset != file->f_pos) {
 		struct dentry *cursor = file->private_data;
@@ -266,7 +266,7 @@ static struct dentry *find_next_child(struct dentry *parent, struct dentry *prev
 }
 
 void simple_recursive_removal(struct dentry *dentry,
-                              void (*callback)(struct dentry *))
+				void (*callback)(struct dentry *))
 {
 	struct dentry *this = dget(dentry);
 	while (true) {
-- 
2.25.1


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

* [PATCH] This commit fixes the error generated due to the wrong indentation which does not follow the codding style norms set by Linux-kernel and space- bar is used in place of tab to give space which causes a visual error for some compilers
@ 2021-05-21 10:56 ` Aviral Gupta
  0 siblings, 0 replies; 6+ messages in thread
From: Aviral Gupta @ 2021-05-21 10:56 UTC (permalink / raw)
  To: viro, shuah; +Cc: linux-fsdevel, linux-kernel-mentees, linux-kernel

ERROR: switch and case should be at the same indent
+	switch (whence) {
+		case 1:
[...]
+		case 0:
[...]
+		default:
ERROR: code indent should use tabs where possible
+                              void (*callback)(struct dentry *))$

Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
---
 fs/libfs.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/libfs.c b/fs/libfs.c
index e9b29c6ffccb..a7a9deec546c 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -138,15 +138,15 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
 {
 	struct dentry *dentry = file->f_path.dentry;
 	switch (whence) {
-		case 1:
-			offset += file->f_pos;
-			fallthrough;
-		case 0:
-			if (offset >= 0)
-				break;
-			fallthrough;
-		default:
-			return -EINVAL;
+	case 1:
+		offset += file->f_pos;
+		fallthrough;
+	case 0:
+		if (offset >= 0)
+			break;
+		fallthrough;
+	default:
+		return -EINVAL;
 	}
 	if (offset != file->f_pos) {
 		struct dentry *cursor = file->private_data;
@@ -266,7 +266,7 @@ static struct dentry *find_next_child(struct dentry *parent, struct dentry *prev
 }
 
 void simple_recursive_removal(struct dentry *dentry,
-                              void (*callback)(struct dentry *))
+				void (*callback)(struct dentry *))
 {
 	struct dentry *this = dget(dentry);
 	while (true) {
-- 
2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [PATCH] This commit fixes the error generated due to the wrong indentation which does not follow the codding style norms set by Linux-kernel and space- bar is used in place of tab to give space which causes a visual error for some compilers
  2021-05-21 10:56 ` Aviral Gupta
@ 2021-05-21 11:07   ` Greg KH
  -1 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-05-21 11:07 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: viro, shuah, linux-fsdevel, linux-kernel-mentees, linux-kernel

On Fri, May 21, 2021 at 04:26:54PM +0530, Aviral Gupta wrote:
> ERROR: switch and case should be at the same indent
> +	switch (whence) {
> +		case 1:
> [...]
> +		case 0:
> [...]
> +		default:
> ERROR: code indent should use tabs where possible
> +                              void (*callback)(struct dentry *))$
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  fs/libfs.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

Your subject line is very odd.

And why are you trying to change coding style issues in core kernel
code?

Please start this type of work in drivers/staging/ where it is wanted,
not in other areas of the kernel where it is not good to try to learn
the process.

good luck!

greg k-h

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

* Re: [PATCH] This commit fixes the error generated due to the wrong indentation which does not follow the codding style norms set by Linux-kernel and space- bar is used in place of tab to give space which causes a visual error for some compilers
@ 2021-05-21 11:07   ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-05-21 11:07 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: shuah, linux-fsdevel, linux-kernel-mentees, viro, linux-kernel

On Fri, May 21, 2021 at 04:26:54PM +0530, Aviral Gupta wrote:
> ERROR: switch and case should be at the same indent
> +	switch (whence) {
> +		case 1:
> [...]
> +		case 0:
> [...]
> +		default:
> ERROR: code indent should use tabs where possible
> +                              void (*callback)(struct dentry *))$
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  fs/libfs.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

Your subject line is very odd.

And why are you trying to change coding style issues in core kernel
code?

Please start this type of work in drivers/staging/ where it is wanted,
not in other areas of the kernel where it is not good to try to learn
the process.

good luck!

greg k-h
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [PATCH] This commit fixes the error generated due to the wrong indentation which does not follow the codding style norms set by Linux-kernel and space- bar is used in place of tab to give space which causes a visual error for some compilers
  2021-05-21 10:56 ` Aviral Gupta
@ 2021-05-21 11:41   ` Pavel Skripkin
  -1 siblings, 0 replies; 6+ messages in thread
From: Pavel Skripkin @ 2021-05-21 11:41 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: viro, shuah, linux-fsdevel, linux-kernel-mentees, linux-kernel

On Fri, 21 May 2021 16:26:54 +0530
Aviral Gupta <shiv14112001@gmail.com> wrote:

> ERROR: switch and case should be at the same indent
> +	switch (whence) {
> +		case 1:
> [...]
> +		case 0:
> [...]
> +		default:
> ERROR: code indent should use tabs where possible
> +                              void (*callback)(struct dentry *))$
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  fs/libfs.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 

Hi, Aviral!

Always check your patches with ./scripts/checpatch.pl. It will warn You
if your patch has common errors (ex: too long subject line like yours). 

I think, this link might be helpful
https://www.kernel.org/doc/html/latest/process/submitting-patches.html.
This document contains canonical patch format and other useful
info about "how to send patches".

Goog luck! 


With regards,
Pavel Skripkin

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

* Re: [PATCH] This commit fixes the error generated due to the wrong indentation which does not follow the codding style norms set by Linux-kernel and space- bar is used in place of tab to give space which causes a visual error for some compilers
@ 2021-05-21 11:41   ` Pavel Skripkin
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Skripkin @ 2021-05-21 11:41 UTC (permalink / raw)
  To: Aviral Gupta
  Cc: shuah, linux-fsdevel, linux-kernel-mentees, viro, linux-kernel

On Fri, 21 May 2021 16:26:54 +0530
Aviral Gupta <shiv14112001@gmail.com> wrote:

> ERROR: switch and case should be at the same indent
> +	switch (whence) {
> +		case 1:
> [...]
> +		case 0:
> [...]
> +		default:
> ERROR: code indent should use tabs where possible
> +                              void (*callback)(struct dentry *))$
> 
> Signed-off-by: Aviral Gupta <shiv14112001@gmail.com>
> ---
>  fs/libfs.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 

Hi, Aviral!

Always check your patches with ./scripts/checpatch.pl. It will warn You
if your patch has common errors (ex: too long subject line like yours). 

I think, this link might be helpful
https://www.kernel.org/doc/html/latest/process/submitting-patches.html.
This document contains canonical patch format and other useful
info about "how to send patches".

Goog luck! 


With regards,
Pavel Skripkin
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

end of thread, other threads:[~2021-05-21 11:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 10:56 [PATCH] This commit fixes the error generated due to the wrong indentation which does not follow the codding style norms set by Linux-kernel and space- bar is used in place of tab to give space which causes a visual error for some compilers Aviral Gupta
2021-05-21 10:56 ` Aviral Gupta
2021-05-21 11:07 ` Greg KH
2021-05-21 11:07   ` Greg KH
2021-05-21 11:41 ` Pavel Skripkin
2021-05-21 11:41   ` Pavel Skripkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.