lkml.org 
[lkml]   [2015]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] genirq: fix type inconsistency
Date
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


\
 
 \ /
  Last update: 2015-05-03 11:21    [W:0.044 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site