linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] genirq: fix type inconsistency
@ 2015-05-03  8:49 Nicholas Mc Guire
  2015-05-05  8:49 ` [tip:irq/core] genirq: Fix " tip-bot for Nicholas Mc Guire
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Mc Guire @ 2015-05-03  8:49 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, Nicholas Mc Guire

The return type of kstat_irqs_usr() is unsigned int and kstat_irqs() also
returns unsigned int so sum should be unsigned int here as well. 

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

While it would go trough two automatic type conversions and thus the result
would still be correct it makes static code checkers happy if types match.

Patch was compile tested with x86_64_defconfig 

Patch is against 4.1-rc1 (localversion-next is -next-20150501)

 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 99793b9..996ab1c 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -639,7 +639,7 @@ unsigned int kstat_irqs(unsigned int irq)
  */
 unsigned int kstat_irqs_usr(unsigned int irq)
 {
-	int sum;
+	unsigned int sum;
 
 	irq_lock_sparse();
 	sum = kstat_irqs(irq);
-- 
1.7.10.4


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

* [tip:irq/core] genirq: Fix type inconsistency
  2015-05-03  8:49 [PATCH] genirq: fix type inconsistency Nicholas Mc Guire
@ 2015-05-05  8:49 ` tip-bot for Nicholas Mc Guire
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Nicholas Mc Guire @ 2015-05-05  8:49 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: mingo, tglx, linux-kernel, hofrat, hpa

Commit-ID:  7df0b278385df3c8d0606c620e6ab1e9eea3d9cd
Gitweb:     http://git.kernel.org/tip/7df0b278385df3c8d0606c620e6ab1e9eea3d9cd
Author:     Nicholas Mc Guire <hofrat@osadl.org>
AuthorDate: Sun, 3 May 2015 10:49:11 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 5 May 2015 10:45:58 +0200

genirq: Fix type inconsistency

The return type of kstat_irqs_usr() is unsigned int and kstat_irqs() also
returns unsigned int so sum should be unsigned int here as well. 

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Link: http://lkml.kernel.org/r/1430642951-23964-1-git-send-email-hofrat@osadl.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 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 8228f73..73a76e2 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -639,7 +639,7 @@ unsigned int kstat_irqs(unsigned int irq)
  */
 unsigned int kstat_irqs_usr(unsigned int irq)
 {
-	int sum;
+	unsigned int sum;
 
 	irq_lock_sparse();
 	sum = kstat_irqs(irq);

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

end of thread, other threads:[~2015-05-05  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-03  8:49 [PATCH] genirq: fix type inconsistency Nicholas Mc Guire
2015-05-05  8:49 ` [tip:irq/core] genirq: Fix " tip-bot for Nicholas Mc Guire

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