* [PATCH] kernel/params.c: Remove sparse-warning (different signedness).
@ 2007-12-08 12:56 Richard Knutsson
0 siblings, 0 replies; only message in thread
From: Richard Knutsson @ 2007-12-08 12:56 UTC (permalink / raw)
To: Greg KH, Adrian Bunk; +Cc: linux-kernel, Richard Knutsson
Fixing:
CHECK kernel/params.c
kernel/params.c:329:41: warning: incorrect type in argument 8 (different signedness)
kernel/params.c:329:41: expected int *num
kernel/params.c:329:41: got unsigned int *
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
Compile-tested on x86 with all[yes|mod|no]config.
Since 'num' is initialized to '0', then only increments, it can/should be unsigned.
diff --git a/kernel/params.c b/kernel/params.c
index 2a4c514..de1d0c4 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -272,7 +272,7 @@ static int param_array(const char *name,
unsigned int min, unsigned int max,
void *elem, int elemsize,
int (*set)(const char *, struct kernel_param *kp),
- int *num)
+ unsigned int *num)
{
int ret;
struct kernel_param kp;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-08 13:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-08 12:56 [PATCH] kernel/params.c: Remove sparse-warning (different signedness) Richard Knutsson
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).