All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging:Fix WARNING: quoted string split across lines
@ 2020-02-11 20:04 Kaaira Gupta
  2020-02-11 20:45 ` [Outreachy kernel] " Julia Lawall
  2020-02-12 11:19 ` [Outreachy kernel] [PATCH] staging:Fix WARNING: quoted string split across lines Vaishali Thakkar
  0 siblings, 2 replies; 9+ messages in thread
From: Kaaira Gupta @ 2020-02-11 20:04 UTC (permalink / raw)
  To: Rob Springer, Todd Poynor, Ben Chan, Greg Kroah-Hartman; +Cc: outreachy-kernel

Whenever it tries to map a region, but the region has permissions, or it attempts to open gasket with tgid, or it releases device node the messages are displayed in one line only, respectively.
And it becomes confusing for the developer to search for the code based on these lines' output since they are written in separate lines in the code.
So, this patch fixes this 'WARNING: quoted string split across lines'
in three lines in the file gasket_core.c.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
---
 drivers/staging/gasket/gasket_core.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index cd8be80d2076..411aaf248b37 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/gasket_core.c
@@ -692,8 +692,7 @@ static bool gasket_mmap_has_permissions(struct gasket_dev *gasket_dev,
 		(vma->vm_flags & (VM_WRITE | VM_READ | VM_EXEC));
 	if (requested_permissions & ~(bar_permissions)) {
 		dev_dbg(gasket_dev->dev,
-			"Attempting to map a region with requested permissions "
-			"0x%x, but region has permissions 0x%x.\n",
+			"Attempting to map a region with requested permissions 0x%x, but region has permissions 0x%x.\n",
 			requested_permissions, bar_permissions);
 		return false;
 	}
@@ -1180,8 +1179,7 @@ static int gasket_open(struct inode *inode, struct file *filp)
 	inode->i_size = 0;
 
 	dev_dbg(gasket_dev->dev,
-		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, "
-		"fmode_write: %d is_root: %u)\n",
+		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, fmode_write: %d is_root: %u)\n",
 		current->tgid, task_name, filp->f_mode,
 		(filp->f_mode & FMODE_WRITE), is_root);
 
@@ -1258,8 +1256,7 @@ static int gasket_release(struct inode *inode, struct file *file)
 	mutex_lock(&gasket_dev->mutex);
 
 	dev_dbg(gasket_dev->dev,
-		"Releasing device node. Call origin: tgid %u (%s) "
-		"(f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
+		"Releasing device node. Call origin: tgid %u (%s) (f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
 		current->tgid, task_name, file->f_mode,
 		(file->f_mode & FMODE_WRITE), is_root);
 	dev_dbg(gasket_dev->dev, "Current open count (owning tgid %u): %d\n",
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH] staging:Fix WARNING: quoted string split across lines
  2020-02-11 20:04 [PATCH] staging:Fix WARNING: quoted string split across lines Kaaira Gupta
@ 2020-02-11 20:45 ` Julia Lawall
  2020-02-12 11:50     ` Kaaira Gupta
  2020-02-12 11:19 ` [Outreachy kernel] [PATCH] staging:Fix WARNING: quoted string split across lines Vaishali Thakkar
  1 sibling, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2020-02-11 20:45 UTC (permalink / raw)
  To: Kaaira Gupta
  Cc: Rob Springer, Todd Poynor, Ben Chan, Greg Kroah-Hartman,
	outreachy-kernel

On Wed, 12 Feb 2020, Kaaira Gupta wrote:

> Whenever it tries to map a region, but the region has permissions, or it attempts to open gasket with tgid, or it releases device node the messages are displayed in one line only, respectively.
> And it becomes confusing for the developer to search for the code based on these lines' output since they are written in separate lines in the code.
> So, this patch fixes this 'WARNING: quoted string split across lines'
> in three lines in the file gasket_core.c.

Congratulations on making the first submission of this round :)

However, some changes are needed.  The subject line needs better tags at
the beginning to highlight what part of the kernel is affected.  Use git
log --oneline on this file to see what others have done.  And follow the
style used, in terms of whitespace.  Also, try to avoid the word Fix in
the subject line, which is not very descriptive.  The word WARNING: is
probably also not necessary.

Afterwards, the log message should also respect the 80 character limit.
Ideally even fewer characters, because it will come out indented in the
resulting path.

Finally, the log message should describe what it does using the
imperative, and again should avoid the word "fix".

julia

>
> Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
> ---
>  drivers/staging/gasket/gasket_core.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
> index cd8be80d2076..411aaf248b37 100644
> --- a/drivers/staging/gasket/gasket_core.c
> +++ b/drivers/staging/gasket/gasket_core.c
> @@ -692,8 +692,7 @@ static bool gasket_mmap_has_permissions(struct gasket_dev *gasket_dev,
>  		(vma->vm_flags & (VM_WRITE | VM_READ | VM_EXEC));
>  	if (requested_permissions & ~(bar_permissions)) {
>  		dev_dbg(gasket_dev->dev,
> -			"Attempting to map a region with requested permissions "
> -			"0x%x, but region has permissions 0x%x.\n",
> +			"Attempting to map a region with requested permissions 0x%x, but region has permissions 0x%x.\n",
>  			requested_permissions, bar_permissions);
>  		return false;
>  	}
> @@ -1180,8 +1179,7 @@ static int gasket_open(struct inode *inode, struct file *filp)
>  	inode->i_size = 0;
>
>  	dev_dbg(gasket_dev->dev,
> -		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, "
> -		"fmode_write: %d is_root: %u)\n",
> +		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, fmode_write: %d is_root: %u)\n",
>  		current->tgid, task_name, filp->f_mode,
>  		(filp->f_mode & FMODE_WRITE), is_root);
>
> @@ -1258,8 +1256,7 @@ static int gasket_release(struct inode *inode, struct file *file)
>  	mutex_lock(&gasket_dev->mutex);
>
>  	dev_dbg(gasket_dev->dev,
> -		"Releasing device node. Call origin: tgid %u (%s) "
> -		"(f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
> +		"Releasing device node. Call origin: tgid %u (%s) (f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
>  		current->tgid, task_name, file->f_mode,
>  		(file->f_mode & FMODE_WRITE), is_root);
>  	dev_dbg(gasket_dev->dev, "Current open count (owning tgid %u): %d\n",
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200211200456.GA10351%40kaaira-HP-Pavilion-Notebook.
>


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

* Re: [Outreachy kernel] [PATCH] staging:Fix WARNING: quoted string split across lines
  2020-02-11 20:04 [PATCH] staging:Fix WARNING: quoted string split across lines Kaaira Gupta
  2020-02-11 20:45 ` [Outreachy kernel] " Julia Lawall
@ 2020-02-12 11:19 ` Vaishali Thakkar
  1 sibling, 0 replies; 9+ messages in thread
From: Vaishali Thakkar @ 2020-02-12 11:19 UTC (permalink / raw)
  To: Kaaira Gupta
  Cc: Rob Springer, Todd Poynor, Ben Chan, Greg Kroah-Hartman, Outreachy

On Wed, Feb 12, 2020 at 1:35 AM Kaaira Gupta <kgupta@es.iitr.ac.in> wrote:
>
> Whenever it tries to map a region, but the region has permissions, or it attempts to open gasket with tgid, or it releases device node the messages are displayed in one line only, respectively.
> And it becomes confusing for the developer to search for the code based on these lines' output since they are written in separate lines in the code.
> So, this patch fixes this 'WARNING: quoted string split across lines'
> in three lines in the file gasket_core.c.

Hi Kaaira,

Thanks for your first patch. Although the contribution period
for the next round of Outreachy has not yet started. So, we
won't be moderating this mailing list and Greg won't be picking
up patches from this mailing list. We will send a welcome
email on March 5, 2020 when the contribution period will
open.

Till then feel free to use get_maintainer.pl and send
patches to the appropriate people/mailing lists.

Thank you!

> Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
> ---
>  drivers/staging/gasket/gasket_core.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
> index cd8be80d2076..411aaf248b37 100644
> --- a/drivers/staging/gasket/gasket_core.c
> +++ b/drivers/staging/gasket/gasket_core.c
> @@ -692,8 +692,7 @@ static bool gasket_mmap_has_permissions(struct gasket_dev *gasket_dev,
>                 (vma->vm_flags & (VM_WRITE | VM_READ | VM_EXEC));
>         if (requested_permissions & ~(bar_permissions)) {
>                 dev_dbg(gasket_dev->dev,
> -                       "Attempting to map a region with requested permissions "
> -                       "0x%x, but region has permissions 0x%x.\n",
> +                       "Attempting to map a region with requested permissions 0x%x, but region has permissions 0x%x.\n",
>                         requested_permissions, bar_permissions);
>                 return false;
>         }
> @@ -1180,8 +1179,7 @@ static int gasket_open(struct inode *inode, struct file *filp)
>         inode->i_size = 0;
>
>         dev_dbg(gasket_dev->dev,
> -               "Attempting to open with tgid %u (%s) (f_mode: 0%03o, "
> -               "fmode_write: %d is_root: %u)\n",
> +               "Attempting to open with tgid %u (%s) (f_mode: 0%03o, fmode_write: %d is_root: %u)\n",
>                 current->tgid, task_name, filp->f_mode,
>                 (filp->f_mode & FMODE_WRITE), is_root);
>
> @@ -1258,8 +1256,7 @@ static int gasket_release(struct inode *inode, struct file *file)
>         mutex_lock(&gasket_dev->mutex);
>
>         dev_dbg(gasket_dev->dev,
> -               "Releasing device node. Call origin: tgid %u (%s) "
> -               "(f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
> +               "Releasing device node. Call origin: tgid %u (%s) (f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
>                 current->tgid, task_name, file->f_mode,
>                 (file->f_mode & FMODE_WRITE), is_root);
>         dev_dbg(gasket_dev->dev, "Current open count (owning tgid %u): %d\n",
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200211200456.GA10351%40kaaira-HP-Pavilion-Notebook.


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

* [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line
  2020-02-11 20:45 ` [Outreachy kernel] " Julia Lawall
@ 2020-02-12 11:50     ` Kaaira Gupta
  0 siblings, 0 replies; 9+ messages in thread
From: Kaaira Gupta @ 2020-02-12 11:50 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Rob Springer, Todd Poynor, Ben Chan, gregkh, devel, linux-kernel

On Tue, Feb 11, 2020 at 09:45:03PM +0100, Julia Lawall wrote:
> On Wed, 12 Feb 2020, Kaaira Gupta wrote:
> 
> > Whenever it tries to map a region, but the region has permissions, or it attempts to open gasket with tgid, or it releases device node the messages are displayed in one line only, respectively.
> > And it becomes confusing for the developer to search for the code based on these lines' output since they are written in separate lines in the code.
> > So, this patch fixes this 'WARNING: quoted string split across lines'
> > in three lines in the file gasket_core.c.
> 
> Congratulations on making the first submission of this round :)

Thanks!

> 
> However, some changes are needed.  The subject line needs better tags at
> the beginning to highlight what part of the kernel is affected.  Use git
> log --oneline on this file to see what others have done.  And follow the
> style used, in terms of whitespace.  Also, try to avoid the word Fix in
> the subject line, which is not very descriptive.  The word WARNING: is
> probably also not necessary.
> 
> Afterwards, the log message should also respect the 80 character limit.
> Ideally even fewer characters, because it will come out indented in the
> resulting path.
> 
> Finally, the log message should describe what it does using the
> imperative, and again should avoid the word "fix".
> 
> julia

When the driver tries to map a region, but the region has certain
permissions, or when it attempts to open gasket with tgid, or when it
realeases device node; the logs are displayed in one line only while the
code has the strings split in two lines which makes it difficult for
developers to search for code based on the log messages. So, this patch
fixes three warnings of 'quoted string split across lines' in
gasket_core.c by merging the strings in one line.

Also, I wasn't sure if I were to send a separate batch or reply with a
v2 for this one. If former was the case than please let me know.
Thanks for your time!

> 
> >
> > Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
> > ---
> >  drivers/staging/gasket/gasket_core.c | 9 +++------
> >  1 file changed, 3 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
> > index cd8be80d2076..411aaf248b37 100644
> > --- a/drivers/staging/gasket/gasket_core.c
> > +++ b/drivers/staging/gasket/gasket_core.c
> > @@ -692,8 +692,7 @@ static bool gasket_mmap_has_permissions(struct gasket_dev *gasket_dev,
> >  		(vma->vm_flags & (VM_WRITE | VM_READ | VM_EXEC));
> >  	if (requested_permissions & ~(bar_permissions)) {
> >  		dev_dbg(gasket_dev->dev,
> > -			"Attempting to map a region with requested permissions "
> > -			"0x%x, but region has permissions 0x%x.\n",
> > +			"Attempting to map a region with requested permissions 0x%x, but region has permissions 0x%x.\n",
> >  			requested_permissions, bar_permissions);
> >  		return false;
> >  	}
> > @@ -1180,8 +1179,7 @@ static int gasket_open(struct inode *inode, struct file *filp)
> >  	inode->i_size = 0;
> >
> >  	dev_dbg(gasket_dev->dev,
> > -		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, "
> > -		"fmode_write: %d is_root: %u)\n",
> > +		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, fmode_write: %d is_root: %u)\n",
> >  		current->tgid, task_name, filp->f_mode,
> >  		(filp->f_mode & FMODE_WRITE), is_root);
> >
> > @@ -1258,8 +1256,7 @@ static int gasket_release(struct inode *inode, struct file *file)
> >  	mutex_lock(&gasket_dev->mutex);
> >
> >  	dev_dbg(gasket_dev->dev,
> > -		"Releasing device node. Call origin: tgid %u (%s) "
> > -		"(f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
> > +		"Releasing device node. Call origin: tgid %u (%s) (f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
> >  		current->tgid, task_name, file->f_mode,
> >  		(file->f_mode & FMODE_WRITE), is_root);
> >  	dev_dbg(gasket_dev->dev, "Current open count (owning tgid %u): %d\n",
> > --
> > 2.17.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200211200456.GA10351%40kaaira-HP-Pavilion-Notebook.
> >

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

* [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line
@ 2020-02-12 11:50     ` Kaaira Gupta
  0 siblings, 0 replies; 9+ messages in thread
From: Kaaira Gupta @ 2020-02-12 11:50 UTC (permalink / raw)
  To: Julia Lawall; +Cc: devel, gregkh, linux-kernel, Rob Springer, Todd Poynor

On Tue, Feb 11, 2020 at 09:45:03PM +0100, Julia Lawall wrote:
> On Wed, 12 Feb 2020, Kaaira Gupta wrote:
> 
> > Whenever it tries to map a region, but the region has permissions, or it attempts to open gasket with tgid, or it releases device node the messages are displayed in one line only, respectively.
> > And it becomes confusing for the developer to search for the code based on these lines' output since they are written in separate lines in the code.
> > So, this patch fixes this 'WARNING: quoted string split across lines'
> > in three lines in the file gasket_core.c.
> 
> Congratulations on making the first submission of this round :)

Thanks!

> 
> However, some changes are needed.  The subject line needs better tags at
> the beginning to highlight what part of the kernel is affected.  Use git
> log --oneline on this file to see what others have done.  And follow the
> style used, in terms of whitespace.  Also, try to avoid the word Fix in
> the subject line, which is not very descriptive.  The word WARNING: is
> probably also not necessary.
> 
> Afterwards, the log message should also respect the 80 character limit.
> Ideally even fewer characters, because it will come out indented in the
> resulting path.
> 
> Finally, the log message should describe what it does using the
> imperative, and again should avoid the word "fix".
> 
> julia

When the driver tries to map a region, but the region has certain
permissions, or when it attempts to open gasket with tgid, or when it
realeases device node; the logs are displayed in one line only while the
code has the strings split in two lines which makes it difficult for
developers to search for code based on the log messages. So, this patch
fixes three warnings of 'quoted string split across lines' in
gasket_core.c by merging the strings in one line.

Also, I wasn't sure if I were to send a separate batch or reply with a
v2 for this one. If former was the case than please let me know.
Thanks for your time!

> 
> >
> > Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
> > ---
> >  drivers/staging/gasket/gasket_core.c | 9 +++------
> >  1 file changed, 3 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
> > index cd8be80d2076..411aaf248b37 100644
> > --- a/drivers/staging/gasket/gasket_core.c
> > +++ b/drivers/staging/gasket/gasket_core.c
> > @@ -692,8 +692,7 @@ static bool gasket_mmap_has_permissions(struct gasket_dev *gasket_dev,
> >  		(vma->vm_flags & (VM_WRITE | VM_READ | VM_EXEC));
> >  	if (requested_permissions & ~(bar_permissions)) {
> >  		dev_dbg(gasket_dev->dev,
> > -			"Attempting to map a region with requested permissions "
> > -			"0x%x, but region has permissions 0x%x.\n",
> > +			"Attempting to map a region with requested permissions 0x%x, but region has permissions 0x%x.\n",
> >  			requested_permissions, bar_permissions);
> >  		return false;
> >  	}
> > @@ -1180,8 +1179,7 @@ static int gasket_open(struct inode *inode, struct file *filp)
> >  	inode->i_size = 0;
> >
> >  	dev_dbg(gasket_dev->dev,
> > -		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, "
> > -		"fmode_write: %d is_root: %u)\n",
> > +		"Attempting to open with tgid %u (%s) (f_mode: 0%03o, fmode_write: %d is_root: %u)\n",
> >  		current->tgid, task_name, filp->f_mode,
> >  		(filp->f_mode & FMODE_WRITE), is_root);
> >
> > @@ -1258,8 +1256,7 @@ static int gasket_release(struct inode *inode, struct file *file)
> >  	mutex_lock(&gasket_dev->mutex);
> >
> >  	dev_dbg(gasket_dev->dev,
> > -		"Releasing device node. Call origin: tgid %u (%s) "
> > -		"(f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
> > +		"Releasing device node. Call origin: tgid %u (%s) (f_mode: 0%03o, fmode_write: %d, is_root: %u)\n",
> >  		current->tgid, task_name, file->f_mode,
> >  		(file->f_mode & FMODE_WRITE), is_root);
> >  	dev_dbg(gasket_dev->dev, "Current open count (owning tgid %u): %d\n",
> > --
> > 2.17.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200211200456.GA10351%40kaaira-HP-Pavilion-Notebook.
> >
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line
  2020-02-12 11:50     ` Kaaira Gupta
@ 2020-02-12 14:44       ` Dan Carpenter
  -1 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2020-02-12 14:44 UTC (permalink / raw)
  To: Kaaira Gupta
  Cc: Julia Lawall, devel, gregkh, linux-kernel, Rob Springer, Todd Poynor

On Wed, Feb 12, 2020 at 05:20:35PM +0530, Kaaira Gupta wrote:
> When the driver tries to map a region, but the region has certain
> permissions, or when it attempts to open gasket with tgid, or when it
> realeases device node;

We don't care about any of this information...

> the logs are displayed in one line only while the
> code has the strings split in two lines which makes it difficult for
> developers to search for code based on the log messages. So, this patch
> fixes three warnings of 'quoted string split across lines' in
> gasket_core.c by merging the strings in one line.
> 
> Also, I wasn't sure if I were to send a separate batch or reply with a
> v2 for this one. If former was the case than please let me know.
> Thanks for your time!

I would say:

"Kernel style says not to split string literals across mutliple lines
because it makes it difficult to grep the source for the printk.  I have
changed the code accordingly.  It will not affect runtime."

That's not imperative and some subsystems are more strict about "you're
not allowed to use the words 'I', 'we' or 'this patch'" in a commit
description.  But in staging we are pragmatists.  So long as it's clear
why you're writing the patch that's the main thing.

The other problem with this code is that some of these messages are over
80 characters long themselves which is very long for one line.

It doesn't matter if you send the v2 as a reply or not.

regards,
dan carpenter


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

* Re: [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line
@ 2020-02-12 14:44       ` Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2020-02-12 14:44 UTC (permalink / raw)
  To: Kaaira Gupta
  Cc: devel, gregkh, linux-kernel, Julia Lawall, Rob Springer, Todd Poynor

On Wed, Feb 12, 2020 at 05:20:35PM +0530, Kaaira Gupta wrote:
> When the driver tries to map a region, but the region has certain
> permissions, or when it attempts to open gasket with tgid, or when it
> realeases device node;

We don't care about any of this information...

> the logs are displayed in one line only while the
> code has the strings split in two lines which makes it difficult for
> developers to search for code based on the log messages. So, this patch
> fixes three warnings of 'quoted string split across lines' in
> gasket_core.c by merging the strings in one line.
> 
> Also, I wasn't sure if I were to send a separate batch or reply with a
> v2 for this one. If former was the case than please let me know.
> Thanks for your time!

I would say:

"Kernel style says not to split string literals across mutliple lines
because it makes it difficult to grep the source for the printk.  I have
changed the code accordingly.  It will not affect runtime."

That's not imperative and some subsystems are more strict about "you're
not allowed to use the words 'I', 'we' or 'this patch'" in a commit
description.  But in staging we are pragmatists.  So long as it's clear
why you're writing the patch that's the main thing.

The other problem with this code is that some of these messages are over
80 characters long themselves which is very long for one line.

It doesn't matter if you send the v2 as a reply or not.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line
  2020-02-12 14:44       ` Dan Carpenter
@ 2020-02-12 14:49         ` Dan Carpenter
  -1 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2020-02-12 14:49 UTC (permalink / raw)
  To: Kaaira Gupta
  Cc: devel, gregkh, linux-kernel, Julia Lawall, Rob Springer, Todd Poynor

On Wed, Feb 12, 2020 at 05:44:24PM +0300, Dan Carpenter wrote:
> On Wed, Feb 12, 2020 at 05:20:35PM +0530, Kaaira Gupta wrote:
> > When the driver tries to map a region, but the region has certain
> > permissions, or when it attempts to open gasket with tgid, or when it
> > realeases device node;
> 
> We don't care about any of this information...
> 
> > the logs are displayed in one line only while the
> > code has the strings split in two lines which makes it difficult for
> > developers to search for code based on the log messages. So, this patch
> > fixes three warnings of 'quoted string split across lines' in
> > gasket_core.c by merging the strings in one line.

Another perfectly adequate commit message would be:

Fix three checkpatch.pl warnings of 'quoted string split across lines'
in gasket_core.c by merging the strings in one line.

Which is imperative.  :)  Hooray!

regards,
dan carpenter


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

* Re: [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line
@ 2020-02-12 14:49         ` Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2020-02-12 14:49 UTC (permalink / raw)
  To: Kaaira Gupta
  Cc: devel, gregkh, linux-kernel, Julia Lawall, Rob Springer, Todd Poynor

On Wed, Feb 12, 2020 at 05:44:24PM +0300, Dan Carpenter wrote:
> On Wed, Feb 12, 2020 at 05:20:35PM +0530, Kaaira Gupta wrote:
> > When the driver tries to map a region, but the region has certain
> > permissions, or when it attempts to open gasket with tgid, or when it
> > realeases device node;
> 
> We don't care about any of this information...
> 
> > the logs are displayed in one line only while the
> > code has the strings split in two lines which makes it difficult for
> > developers to search for code based on the log messages. So, this patch
> > fixes three warnings of 'quoted string split across lines' in
> > gasket_core.c by merging the strings in one line.

Another perfectly adequate commit message would be:

Fix three checkpatch.pl warnings of 'quoted string split across lines'
in gasket_core.c by merging the strings in one line.

Which is imperative.  :)  Hooray!

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-02-12 14:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 20:04 [PATCH] staging:Fix WARNING: quoted string split across lines Kaaira Gupta
2020-02-11 20:45 ` [Outreachy kernel] " Julia Lawall
2020-02-12 11:50   ` [PATCH v2] staging:gasket:gasket_core.c:unified quoted string split across lines in one line Kaaira Gupta
2020-02-12 11:50     ` Kaaira Gupta
2020-02-12 14:44     ` Dan Carpenter
2020-02-12 14:44       ` Dan Carpenter
2020-02-12 14:49       ` Dan Carpenter
2020-02-12 14:49         ` Dan Carpenter
2020-02-12 11:19 ` [Outreachy kernel] [PATCH] staging:Fix WARNING: quoted string split across lines Vaishali Thakkar

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.