Re: [PATCH -tip] trace: ring_buffer.c fix various signedness issues
From: Jaswinder Singh Rajput
Date: Sun Mar 22 2009 - 15:05:38 EST
On Mon, 2009-03-23 at 00:14 +0530, Jaswinder Singh Rajput wrote:
> From: Jaswinder Singh Rajput <jaswinderrajput@xxxxxxxxx>
> Date: Mon, 23 Mar 2009 00:02:38 +0530
> Subject: [PATCH] trace: ring_buffer.c fix various signedness issues
>
BTW, these issues were solved by this patch:
CHECK kernel/trace/ring_buffer.c
kernel/trace/ring_buffer.c:70:30: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:70:30: expected unsigned long volatile *addr
kernel/trace/ring_buffer.c:70:30: got long static [toplevel] *<noident>
kernel/trace/ring_buffer.c:84:32: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:84:32: expected unsigned long volatile *addr
kernel/trace/ring_buffer.c:84:32: got long static [toplevel] *<noident>
kernel/trace/ring_buffer.c:96:36: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:96:36: expected unsigned long volatile *addr
kernel/trace/ring_buffer.c:96:36: got long static [toplevel] *<noident>
kernel/trace/ring_buffer.c:2473:6: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:2473:6: expected unsigned long const volatile *addr
kernel/trace/ring_buffer.c:2473:6: got long *p
kernel/trace/ring_buffer.c:2473:6: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:2473:6: expected unsigned long const volatile *addr
kernel/trace/ring_buffer.c:2473:6: got long *p
kernel/trace/ring_buffer.c:2476:28: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:2476:28: expected unsigned long const volatile *addr
kernel/trace/ring_buffer.c:2476:28: got long *p
kernel/trace/ring_buffer.c:2476:28: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:2476:28: expected unsigned long const volatile *addr
kernel/trace/ring_buffer.c:2476:28: got long *p
kernel/trace/ring_buffer.c:2498:33: warning: incorrect type in argument 3 (different signedness)
kernel/trace/ring_buffer.c:2498:33: expected unsigned long *<noident>
kernel/trace/ring_buffer.c:2498:33: got long *<noident>
kernel/trace/ring_buffer.c:2503:30: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:2503:30: expected unsigned long volatile *addr
kernel/trace/ring_buffer.c:2503:30: got long *p
kernel/trace/ring_buffer.c:2505:32: warning: incorrect type in argument 2 (different signedness)
kernel/trace/ring_buffer.c:2505:32: expected unsigned long volatile *addr
kernel/trace/ring_buffer.c:2505:32: got long *p
> Impact:cleanup
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@xxxxxxxxx>
> ---
> kernel/trace/ring_buffer.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index bd38c5c..114811b 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -57,7 +57,7 @@ enum {
> RB_BUFFERS_DISABLED = 1 << RB_BUFFERS_DISABLED_BIT,
> };
>
> -static long ring_buffer_flags __read_mostly = RB_BUFFERS_ON;
> +static unsigned long ring_buffer_flags __read_mostly = RB_BUFFERS_ON;
>
> /**
> * tracing_on - enable all tracing buffers
> @@ -2466,7 +2466,7 @@ static ssize_t
> rb_simple_read(struct file *filp, char __user *ubuf,
> size_t cnt, loff_t *ppos)
> {
> - long *p = filp->private_data;
> + unsigned long *p = filp->private_data;
> char buf[64];
> int r;
>
> @@ -2482,9 +2482,9 @@ static ssize_t
> rb_simple_write(struct file *filp, const char __user *ubuf,
> size_t cnt, loff_t *ppos)
> {
> - long *p = filp->private_data;
> + unsigned long *p = filp->private_data;
> + unsigned long val;
> char buf[64];
> - long val;
> int ret;
>
> if (cnt >= sizeof(buf))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/