linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix NR_IRQS printk()
@ 2017-05-03 10:03 Vincent Legoll
  2017-05-09  7:08 ` Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Legoll @ 2017-05-03 10:03 UTC (permalink / raw)
  To: vincent.legoll, tglx, linux-kernel

- Missing some whitespace
- Tell that the third number is "initcnt" (whatever that is)

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
 kernel/irq/irqdesc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 00bb0ae..b18526f 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -480,7 +480,7 @@ int __init early_irq_init(void)
 
 	/* Let arch update nr_irqs and return the nr of preallocated irqs */
 	initcnt = arch_probe_nr_irqs();
-	printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt);
+	printk(KERN_INFO "NR_IRQS: %d, nr_irqs: %d, initcnt: %d\n", NR_IRQS, nr_irqs, initcnt);
 
 	if (WARN_ON(nr_irqs > IRQ_BITMAP_BITS))
 		nr_irqs = IRQ_BITMAP_BITS;
-- 
2.1.4

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

* Re: [PATCH] Fix NR_IRQS printk()
  2017-05-03 10:03 [PATCH] Fix NR_IRQS printk() Vincent Legoll
@ 2017-05-09  7:08 ` Thomas Gleixner
  2017-05-09  7:41   ` Vincent Legoll
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2017-05-09  7:08 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: linux-kernel

On Wed, 3 May 2017, Vincent Legoll wrote:

> Subject : [PATCH] Fix NR_IRQS printk()

The subject line is missing a subsystem token. Please consult

  Documentation/process/submitting-patches.rst

and run 'git log path/to/affected.file' to see how a proper subject line
should look like.

> - Missing some whitespace
> - Tell that the third number is "initcnt" (whatever that is)

Your changelog is telling WHAT the patch is doing, but not WHY and despite
the subject claiming to fix something the changelog lacks any information
about the problem it "fixes".

Aside of that: "(whatever that is)" is not really convincing that you know
what you are doing.

Thanks,

	tglx

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

* Re: [PATCH] Fix NR_IRQS printk()
  2017-05-09  7:08 ` Thomas Gleixner
@ 2017-05-09  7:41   ` Vincent Legoll
  2017-05-09  8:20     ` [PATCH] genirq: Tell that early_irq_init() is printing the nr of preallocated irqs Vincent Legoll
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Legoll @ 2017-05-09  7:41 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Linux Kernel ML

On Tue, May 9, 2017 at 9:08 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Wed, 3 May 2017, Vincent Legoll wrote:
>
>> Subject : [PATCH] Fix NR_IRQS printk()
>
> The subject line is missing a subsystem token. Please consult
>
>   Documentation/process/submitting-patches.rst
>
> and run 'git log path/to/affected.file' to see how a proper subject line
> should look like.

OK, looks like this is "genirq", is that right ?

>> - Missing some whitespace
>> - Tell that the third number is "initcnt" (whatever that is)
>
> Your changelog is telling WHAT the patch is doing, but not WHY and despite
> the subject claiming to fix something the changelog lacks any information
> about the problem it "fixes".

OK, will change, what about:
"[PATCH] genirq: Fix early_irq_init() printing the nr of preallocated irqs"

> Aside of that: "(whatever that is)" is not really convincing that you know
> what you are doing.

Is the above better ? If OK, I'll resend properly.

Thanks for the help

-- 
Vincent Legoll

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

* [PATCH] genirq: Tell that early_irq_init() is printing the nr of preallocated irqs
  2017-05-09  7:41   ` Vincent Legoll
@ 2017-05-09  8:20     ` Vincent Legoll
  2017-05-09  8:34       ` Vincent Legoll
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Legoll @ 2017-05-09  8:20 UTC (permalink / raw)
  To: tglx, linux-kernel; +Cc: Vincent Legoll

The early_irq_init() function was not telling what all the displayed
information is.

- Add some missing whitespace & commas for easier reading
- Tell that the third number is the number of preallocated irqs
  returned by arch_probe_nr_irqs()

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
 kernel/irq/irqdesc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 00bb0ae..cd22d85 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -480,7 +480,8 @@ int __init early_irq_init(void)
 
 	/* Let arch update nr_irqs and return the nr of preallocated irqs */
 	initcnt = arch_probe_nr_irqs();
-	printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt);
+	printk(KERN_INFO "NR_IRQS: %d, nr_irqs: %d, nr of preallocated irqs: %d\n",
+	       NR_IRQS, nr_irqs, initcnt);
 
 	if (WARN_ON(nr_irqs > IRQ_BITMAP_BITS))
 		nr_irqs = IRQ_BITMAP_BITS;
-- 
2.7.4

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

* [PATCH] genirq: Tell that early_irq_init() is printing the nr of preallocated irqs
  2017-05-09  8:20     ` [PATCH] genirq: Tell that early_irq_init() is printing the nr of preallocated irqs Vincent Legoll
@ 2017-05-09  8:34       ` Vincent Legoll
  2017-05-26 12:58         ` [tip:irq/core] genirq: Make early_irq_init() print out more informative tip-bot for Vincent Legoll
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Legoll @ 2017-05-09  8:34 UTC (permalink / raw)
  To: tglx, linux-kernel; +Cc: Vincent Legoll

The early_irq_init() function was not telling what all the displayed
information is.

- Add some missing whitespace & commas for easier reading
- Tell that the third number is the number of preallocated irqs
  returned by arch_probe_nr_irqs()
- Also cover !CONFIG_SPARSE_IRQ case

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
 kernel/irq/irqdesc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 00bb0ae..fb53da0 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -480,7 +480,8 @@ int __init early_irq_init(void)
 
 	/* Let arch update nr_irqs and return the nr of preallocated irqs */
 	initcnt = arch_probe_nr_irqs();
-	printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt);
+	printk(KERN_INFO "NR_IRQS: %d, nr_irqs: %d, nr of preallocated irqs: %d\n",
+	       NR_IRQS, nr_irqs, initcnt);
 
 	if (WARN_ON(nr_irqs > IRQ_BITMAP_BITS))
 		nr_irqs = IRQ_BITMAP_BITS;
@@ -516,7 +517,7 @@ int __init early_irq_init(void)
 
 	init_irq_default_affinity();
 
-	printk(KERN_INFO "NR_IRQS:%d\n", NR_IRQS);
+	printk(KERN_INFO "NR_IRQS: %d\n", NR_IRQS);
 
 	desc = irq_desc;
 	count = ARRAY_SIZE(irq_desc);
-- 
2.7.4

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

* [tip:irq/core] genirq: Make early_irq_init() print out more informative
  2017-05-09  8:34       ` Vincent Legoll
@ 2017-05-26 12:58         ` tip-bot for Vincent Legoll
  0 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Vincent Legoll @ 2017-05-26 12:58 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: vincent.legoll, tglx, mingo, linux-kernel, hpa

Commit-ID:  5a29ef22098874db79af7bf92a247a0f503bfa6e
Gitweb:     http://git.kernel.org/tip/5a29ef22098874db79af7bf92a247a0f503bfa6e
Author:     Vincent Legoll <vincent.legoll@gmail.com>
AuthorDate: Tue, 9 May 2017 10:34:09 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 26 May 2017 14:54:05 +0200

genirq: Make early_irq_init() print out more informative

The printk in early_irq_init() is cryptic and badly formatted:

  NR_IRQS:33024 nr_irqs:968 16

The last number is the number of preallocated interrupts, so add a prefix
to it:

  NR_IRQS: 33024, nr_irqs: 968, preallocated irqs: 16

Cleanup the formatting for better readability as well.

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1494318849-6733-1-git-send-email-vincent.legoll@gmail.com

---
 kernel/irq/irqdesc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 00bb0ae..09abce2 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -480,7 +480,8 @@ int __init early_irq_init(void)
 
 	/* Let arch update nr_irqs and return the nr of preallocated irqs */
 	initcnt = arch_probe_nr_irqs();
-	printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt);
+	printk(KERN_INFO "NR_IRQS: %d, nr_irqs: %d, preallocated irqs: %d\n",
+	       NR_IRQS, nr_irqs, initcnt);
 
 	if (WARN_ON(nr_irqs > IRQ_BITMAP_BITS))
 		nr_irqs = IRQ_BITMAP_BITS;
@@ -516,7 +517,7 @@ int __init early_irq_init(void)
 
 	init_irq_default_affinity();
 
-	printk(KERN_INFO "NR_IRQS:%d\n", NR_IRQS);
+	printk(KERN_INFO "NR_IRQS: %d\n", NR_IRQS);
 
 	desc = irq_desc;
 	count = ARRAY_SIZE(irq_desc);

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

end of thread, other threads:[~2017-05-26 13:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 10:03 [PATCH] Fix NR_IRQS printk() Vincent Legoll
2017-05-09  7:08 ` Thomas Gleixner
2017-05-09  7:41   ` Vincent Legoll
2017-05-09  8:20     ` [PATCH] genirq: Tell that early_irq_init() is printing the nr of preallocated irqs Vincent Legoll
2017-05-09  8:34       ` Vincent Legoll
2017-05-26 12:58         ` [tip:irq/core] genirq: Make early_irq_init() print out more informative tip-bot for Vincent Legoll

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).