linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] staging: most: remove redundant print statement when kfifo_alloc fails
@ 2019-07-11 11:08 Keyur Patel
  2019-07-11 17:39 ` [PATCH v2] staging: most: remove redundant print statement when Keyur Patel
  0 siblings, 1 reply; 16+ messages in thread
From: Keyur Patel @ 2019-07-11 11:08 UTC (permalink / raw)
  Cc: iamkeyur96, Greg Kroah-Hartman, Christian Gromm, Colin Ian King,
	Eugeniu Rosca, Suresh Udipi, devel, linux-kernel

This print statement is redundant as kfifo_alloc just calls kmalloc_array
and without the __GFP_NOWARN flag, already does a dump_stack().

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
 drivers/staging/most/cdev/cdev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..bc0219ceac50 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,9 @@ static int comp_probe(struct most_interface *iface, int channel_id,
 	spin_lock_init(&c->unlink);
 	INIT_KFIFO(c->fifo);
 	retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-	if (retval) {
-		pr_info("failed to alloc channel kfifo");
+	if (retval)
 		goto err_del_cdev_and_free_channel;
-	}
+
 	init_waitqueue_head(&c->wq);
 	mutex_init(&c->io_mutex);
 	spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0


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

* [PATCH v2] staging: most: remove redundant print statement when
  2019-07-11 11:08 [PATCH 2/2] staging: most: remove redundant print statement when kfifo_alloc fails Keyur Patel
@ 2019-07-11 17:39 ` Keyur Patel
  2019-07-11 17:50   ` [PATCH v3] staging: most: remove redundant print statement when kfifo_alloc fails Keyur Patel
  0 siblings, 1 reply; 16+ messages in thread
From: Keyur Patel @ 2019-07-11 17:39 UTC (permalink / raw)
  Cc: iamkeyur96, Greg Kroah-Hartman, Christian Gromm, Eugeniu Rosca,
	Colin Ian King, Suresh Udipi, devel, linux-kernel

This print statement is redundant as kfifo_alloc just calls kmalloc_array
and without the __GFP_NOWARN flag, already does a dump_stack().

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
Changes in v2:
- Edit subject line.
---
 drivers/staging/most/cdev/cdev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..bc0219ceac50 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,9 @@ static int comp_probe(struct most_interface *iface, int channel_id,
 	spin_lock_init(&c->unlink);
 	INIT_KFIFO(c->fifo);
 	retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-	if (retval) {
-		pr_info("failed to alloc channel kfifo");
+	if (retval)
 		goto err_del_cdev_and_free_channel;
-	}
+
 	init_waitqueue_head(&c->wq);
 	mutex_init(&c->io_mutex);
 	spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0


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

* [PATCH v3] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-11 17:39 ` [PATCH v2] staging: most: remove redundant print statement when Keyur Patel
@ 2019-07-11 17:50   ` Keyur Patel
  2019-07-14 14:42     ` [v3] " Markus Elfring
                       ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Keyur Patel @ 2019-07-11 17:50 UTC (permalink / raw)
  Cc: iamkeyur96, Greg Kroah-Hartman, Christian Gromm, Suresh Udipi,
	Colin Ian King, devel, linux-kernel

This print statement is redundant as kfifo_alloc just calls kmalloc_array
and without the __GFP_NOWARN flag, already does a dump_stack().

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
Changes in v3:
- fix checkpatch warrning
---
 drivers/staging/most/cdev/cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..724d098aeef0 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,8 @@ static int comp_probe(struct most_interface *iface, int channel_id,
 	spin_lock_init(&c->unlink);
 	INIT_KFIFO(c->fifo);
 	retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-	if (retval) {
-		pr_info("failed to alloc channel kfifo");
+	if (retval)
 		goto err_del_cdev_and_free_channel;
-	}
 	init_waitqueue_head(&c->wq);
 	mutex_init(&c->io_mutex);
 	spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0


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

* Re: [v3] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-11 17:50   ` [PATCH v3] staging: most: remove redundant print statement when kfifo_alloc fails Keyur Patel
@ 2019-07-14 14:42     ` Markus Elfring
  2019-07-14 15:05     ` [PATCH v4] " Keyur Patel
  2019-07-14 16:41     ` [PATCH v4] staging: most: Delete an error message for a failed memory allocation Keyur Patel
  2 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2019-07-14 14:42 UTC (permalink / raw)
  To: Keyur Patel, devel, kernel-janitors
  Cc: Christian Gromm, Colin Ian King, Greg Kroah-Hartman,
	Suresh Udipi, linux-kernel

> This print statement is redundant as kfifo_alloc just calls kmalloc_array
> and without the __GFP_NOWARN flag, already does a dump_stack().

I suggest to omit the word “and” from this sentence.
Will any further wording adjustments become helpful for commit descriptions?


> Changes in v3:
> - fix checkpatch warrning
> ---

Please move such version information below the triple dashes without a typo.

Regards,
Markus

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

* [PATCH v4] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-11 17:50   ` [PATCH v3] staging: most: remove redundant print statement when kfifo_alloc fails Keyur Patel
  2019-07-14 14:42     ` [v3] " Markus Elfring
@ 2019-07-14 15:05     ` Keyur Patel
  2019-07-14 15:23       ` [v4] " Markus Elfring
  2019-07-14 16:41     ` [PATCH v4] staging: most: Delete an error message for a failed memory allocation Keyur Patel
  2 siblings, 1 reply; 16+ messages in thread
From: Keyur Patel @ 2019-07-14 15:05 UTC (permalink / raw)
  Cc: markus.elfring, Keyur Patel, Greg Kroah-Hartman, Christian Gromm,
	Suresh Udipi, Colin Ian King, devel, linux-kernel

This print statement is redundant as kfifo_alloc just calls kmalloc_array
without the __GFP_NOWARN flag, already does a dump_stack().

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
Changes in v3:
- fix checkpatch warning

 drivers/staging/most/cdev/cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..724d098aeef0 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,8 @@ static int comp_probe(struct most_interface *iface, int channel_id,
 	spin_lock_init(&c->unlink);
 	INIT_KFIFO(c->fifo);
 	retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-	if (retval) {
-		pr_info("failed to alloc channel kfifo");
+	if (retval)
 		goto err_del_cdev_and_free_channel;
-	}
 	init_waitqueue_head(&c->wq);
 	mutex_init(&c->io_mutex);
 	spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0


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

* Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-14 15:05     ` [PATCH v4] " Keyur Patel
@ 2019-07-14 15:23       ` Markus Elfring
  2019-07-14 15:45         ` Keyur Patel
  2019-07-14 15:47         ` Keyur Patel
  0 siblings, 2 replies; 16+ messages in thread
From: Markus Elfring @ 2019-07-14 15:23 UTC (permalink / raw)
  To: Keyur Patel, devel, kernel-janitors
  Cc: Christian Gromm, Colin Ian King, Greg Kroah-Hartman,
	Suresh Udipi, linux-kernel

> ---
> Changes in v3:

Thanks for your quick response.

I find the change log incomplete (even if corresponding information
can be determined also from public message archives).

Regards,
Markus

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

* Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-14 15:23       ` [v4] " Markus Elfring
@ 2019-07-14 15:45         ` Keyur Patel
  2019-07-14 15:47         ` Keyur Patel
  1 sibling, 0 replies; 16+ messages in thread
From: Keyur Patel @ 2019-07-14 15:45 UTC (permalink / raw)
  To: Markus Elfring
  Cc: devel, kernel-janitors, Christian Gromm, Colin Ian King,
	Greg Kroah-Hartman, Suresh Udipi, linux-kernel



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

* Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-14 15:23       ` [v4] " Markus Elfring
  2019-07-14 15:45         ` Keyur Patel
@ 2019-07-14 15:47         ` Keyur Patel
  2019-07-14 16:20           ` Markus Elfring
  2019-07-15  7:32           ` Greg Kroah-Hartman
  1 sibling, 2 replies; 16+ messages in thread
From: Keyur Patel @ 2019-07-14 15:47 UTC (permalink / raw)
  To: Markus Elfring
  Cc: devel, kernel-janitors, Christian Gromm, Colin Ian King,
	Greg Kroah-Hartman, Suresh Udipi, linux-kernel

I didn't get you. I stiil need to update changelog and send more 
version or not. If you say so, I can send one more.

Thnaks.
On Sun, Jul 14, 2019 at 05:23:34PM +0200, Markus Elfring wrote:
> > ---
> > Changes in v3:
> 
> Thanks for your quick response.
> 
> I find the change log incomplete (even if corresponding information
> can be determined also from public message archives).
> 
> Regards,
> Markus

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

* Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-14 15:47         ` Keyur Patel
@ 2019-07-14 16:20           ` Markus Elfring
  2019-07-15  7:32           ` Greg Kroah-Hartman
  1 sibling, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2019-07-14 16:20 UTC (permalink / raw)
  To: Keyur Patel, devel, kernel-janitors
  Cc: Christian Gromm, Colin Ian King, Greg Kroah-Hartman,
	Suresh Udipi, linux-kernel

> I didn't get you. I stiil need to update changelog

I would appreciate the completion of the listing for V2 till V4.
I guess that a message resend could be sufficient for these adjustments.


> and send more version

This could be another opportunity if you would like to improve
the commit description considerably.
How do you think about previous clarification attempts on a topic like
“Delete an error message for a failed memory allocation”?

Regards,
Markus

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

* [PATCH v4] staging: most: Delete an error message for a failed memory allocation
  2019-07-11 17:50   ` [PATCH v3] staging: most: remove redundant print statement when kfifo_alloc fails Keyur Patel
  2019-07-14 14:42     ` [v3] " Markus Elfring
  2019-07-14 15:05     ` [PATCH v4] " Keyur Patel
@ 2019-07-14 16:41     ` Keyur Patel
  2019-07-14 16:55       ` [v4] " Markus Elfring
  2019-07-14 17:27       ` [PATCH v5] " Keyur Patel
  2 siblings, 2 replies; 16+ messages in thread
From: Keyur Patel @ 2019-07-14 16:41 UTC (permalink / raw)
  Cc: markus.elfring, Keyur Patel, Greg Kroah-Hartman, Christian Gromm,
	Eugeniu Rosca, Suresh Udipi, Colin Ian King, devel, linux-kernel

This error message for a failed memory allocation is redundant as 
kfifo_alloc just calls kmalloc_array without the __GFP_NOWARN flag,
already does a dump_stack().

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
Changes in v4:
- change subject line
- improve commit description
- fix checkpatch warning

 drivers/staging/most/cdev/cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..724d098aeef0 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,8 @@ static int comp_probe(struct most_interface *iface, int channel_id,
 	spin_lock_init(&c->unlink);
 	INIT_KFIFO(c->fifo);
 	retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-	if (retval) {
-		pr_info("failed to alloc channel kfifo");
+	if (retval)
 		goto err_del_cdev_and_free_channel;
-	}
 	init_waitqueue_head(&c->wq);
 	mutex_init(&c->io_mutex);
 	spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0


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

* Re: [v4] staging: most: Delete an error message for a failed memory allocation
  2019-07-14 16:41     ` [PATCH v4] staging: most: Delete an error message for a failed memory allocation Keyur Patel
@ 2019-07-14 16:55       ` Markus Elfring
  2019-07-14 17:04         ` Keyur Patel
  2019-07-14 17:27       ` [PATCH v5] " Keyur Patel
  1 sibling, 1 reply; 16+ messages in thread
From: Markus Elfring @ 2019-07-14 16:55 UTC (permalink / raw)
  To: Keyur Patel, devel, kernel-janitors
  Cc: Greg Kroah-Hartman, Christian Gromm, Eugeniu Rosca, Suresh Udipi,
	Colin Ian King, linux-kernel

> ---
> Changes in v4:

I find this change log still incomplete.

You have chosen to adjust the commit message once more.
(Some contributors might be also not satisfied with this variant.)

Such a change requires to increase the corresponding patch version number,
doesn't it?

Regards,
Markus

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

* Re: [v4] staging: most: Delete an error message for a failed memory allocation
  2019-07-14 16:55       ` [v4] " Markus Elfring
@ 2019-07-14 17:04         ` Keyur Patel
  2019-07-14 17:12           ` Markus Elfring
  0 siblings, 1 reply; 16+ messages in thread
From: Keyur Patel @ 2019-07-14 17:04 UTC (permalink / raw)
  To: Markus Elfring
  Cc: devel, kernel-janitors, Greg Kroah-Hartman, Christian Gromm,
	Eugeniu Rosca, Suresh Udipi, Colin Ian King, linux-kernel

I think commit message is clear enough to understand why this is needed.
You can send me what should I include in commit description and I will
add and send it again. Otherwise, Greg can comment on this.

Thanks.


On Sun, Jul 14, 2019 at 06:55:30PM +0200, Markus Elfring wrote:
> > ---
> > Changes in v4:
> 
> I find this change log still incomplete.
> 
> You have chosen to adjust the commit message once more.
> (Some contributors might be also not satisfied with this variant.)
> 
> Such a change requires to increase the corresponding patch version number,
> doesn't it?
> 
> Regards,
> Markus

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

* Re: [v4] staging: most: Delete an error message for a failed memory allocation
  2019-07-14 17:04         ` Keyur Patel
@ 2019-07-14 17:12           ` Markus Elfring
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2019-07-14 17:12 UTC (permalink / raw)
  To: Keyur Patel, devel, kernel-janitors
  Cc: Greg Kroah-Hartman, Christian Gromm, Eugeniu Rosca, Suresh Udipi,
	Colin Ian King, linux-kernel

> I think commit message is clear enough to understand why this is needed.

There are differences to consider between the involved software developers.


> You can send me what should I include in commit description

The clarification should be continued with the number “v5”
in the message subject.


> and I will add and send it again. Otherwise, Greg can comment on this.

Would you like to recheck information sources for the safe description
of the Linux allocation failure report?

Regards,
Markus

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

* [PATCH v5] staging: most: Delete an error message for a failed memory allocation
  2019-07-14 16:41     ` [PATCH v4] staging: most: Delete an error message for a failed memory allocation Keyur Patel
  2019-07-14 16:55       ` [v4] " Markus Elfring
@ 2019-07-14 17:27       ` Keyur Patel
  2019-07-14 17:38         ` [v5] " Markus Elfring
  1 sibling, 1 reply; 16+ messages in thread
From: Keyur Patel @ 2019-07-14 17:27 UTC (permalink / raw)
  Cc: markus.elfring, Keyur Patel, Greg Kroah-Hartman, Christian Gromm,
	Suresh Udipi, Eugeniu Rosca, Colin Ian King, devel, linux-kernel

The kfifo_alloc() failure generates enough information and doesn't need 
to be accompanied by another error statement.

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
Changes in v5:
- change subject line
- simplify commit description
- fix checkpatch warning
- removed braces around if

 drivers/staging/most/cdev/cdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index d0cc0b746107..724d098aeef0 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -463,10 +463,8 @@ static int comp_probe(struct most_interface *iface, int channel_id,
 	spin_lock_init(&c->unlink);
 	INIT_KFIFO(c->fifo);
 	retval = kfifo_alloc(&c->fifo, cfg->num_buffers, GFP_KERNEL);
-	if (retval) {
-		pr_info("failed to alloc channel kfifo");
+	if (retval)
 		goto err_del_cdev_and_free_channel;
-	}
 	init_waitqueue_head(&c->wq);
 	mutex_init(&c->io_mutex);
 	spin_lock_irqsave(&ch_list_lock, cl_flags);
-- 
2.22.0


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

* Re: [v5] staging: most: Delete an error message for a failed memory allocation
  2019-07-14 17:27       ` [PATCH v5] " Keyur Patel
@ 2019-07-14 17:38         ` Markus Elfring
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2019-07-14 17:38 UTC (permalink / raw)
  To: Keyur Patel, devel, kernel-janitors
  Cc: Greg Kroah-Hartman, Christian Gromm, Suresh Udipi, Eugeniu Rosca,
	Colin Ian King, linux-kernel

> The kfifo_alloc() failure generates enough information and doesn't need
> to be accompanied by another error statement.

I am curious how the acceptance will evolve for this variant of
another different commit description according to a known software
transformation pattern.


> ---
> Changes in v5:

The subsequent listing should usually be split between V2 till V5
for such a patch change log.

Regards,
Markus

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

* Re: [v4] staging: most: remove redundant print statement when kfifo_alloc fails
  2019-07-14 15:47         ` Keyur Patel
  2019-07-14 16:20           ` Markus Elfring
@ 2019-07-15  7:32           ` Greg Kroah-Hartman
  1 sibling, 0 replies; 16+ messages in thread
From: Greg Kroah-Hartman @ 2019-07-15  7:32 UTC (permalink / raw)
  To: Keyur Patel
  Cc: Markus Elfring, devel, kernel-janitors, linux-kernel,
	Suresh Udipi, Colin Ian King, Christian Gromm

On Sun, Jul 14, 2019 at 11:47:37AM -0400, Keyur Patel wrote:
> I didn't get you. I stiil need to update changelog and send more 
> version or not. If you say so, I can send one more.

Please note that the person/bot you are responding to is on in my email
blacklist, and many others, so I wouldn't worry too much about the
responses.

I'll review this patch once 5.3-rc1 is out as I can't do anything with
it during the merge window.

thanks,

greg k-h

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

end of thread, other threads:[~2019-07-15  7:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 11:08 [PATCH 2/2] staging: most: remove redundant print statement when kfifo_alloc fails Keyur Patel
2019-07-11 17:39 ` [PATCH v2] staging: most: remove redundant print statement when Keyur Patel
2019-07-11 17:50   ` [PATCH v3] staging: most: remove redundant print statement when kfifo_alloc fails Keyur Patel
2019-07-14 14:42     ` [v3] " Markus Elfring
2019-07-14 15:05     ` [PATCH v4] " Keyur Patel
2019-07-14 15:23       ` [v4] " Markus Elfring
2019-07-14 15:45         ` Keyur Patel
2019-07-14 15:47         ` Keyur Patel
2019-07-14 16:20           ` Markus Elfring
2019-07-15  7:32           ` Greg Kroah-Hartman
2019-07-14 16:41     ` [PATCH v4] staging: most: Delete an error message for a failed memory allocation Keyur Patel
2019-07-14 16:55       ` [v4] " Markus Elfring
2019-07-14 17:04         ` Keyur Patel
2019-07-14 17:12           ` Markus Elfring
2019-07-14 17:27       ` [PATCH v5] " Keyur Patel
2019-07-14 17:38         ` [v5] " Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).