Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299112 > unrolled thread

[PATCH 3/5] Staging: panel: Remove ULL

Started byKsenija Stanojevic <ksenija.stanojevic@gmail.com>
First post2015-12-29 21:10 +0100
Last post2015-12-30 00:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/5] Staging: panel: Remove ULL Ksenija Stanojevic <ksenija.stanojevic@gmail.com> - 2015-12-29 21:10 +0100
    Re: [PATCH 3/5] Staging: panel: Remove ULL Ilia Mirkin <imirkin@alum.mit.edu> - 2015-12-29 22:00 +0100
      Re: [PATCH 3/5] Staging: panel: Remove ULL Willy Tarreau <w@1wt.eu> - 2015-12-30 00:40 +0100

#1299112 — [PATCH 3/5] Staging: panel: Remove ULL

FromKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Date2015-12-29 21:10 +0100
Subject[PATCH 3/5] Staging: panel: Remove ULL
Message-ID<qL8KK-5c0-25@gated-at.bofh.it>
Remove ULL since it's useless.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
 drivers/staging/panel/panel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 7138ee7..6dc3efb 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -2047,10 +2047,10 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value,
 	u8 im, om;
 	__u64 m, v;
 
-	om = 0ULL;
-	im = 0ULL;
-	m = 0ULL;
-	v = 0ULL;
+	om = 0;
+	im = 0;
+	m = 0;
+	v = 0;
 	while (*name) {
 		int in, out, bit, neg;
 
@@ -2076,9 +2076,9 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value,
 
 		bit = (out * 5) + in;
 
-		m |= 1ULL << bit;
+		m |= 1 << bit;
 		if (!neg)
-			v |= 1ULL << bit;
+			v |= 1 << bit;
 		name++;
 	}
 	*mask = m;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1299136

FromIlia Mirkin <imirkin@alum.mit.edu>
Date2015-12-29 22:00 +0100
Message-ID<qL9x7-5sz-1@gated-at.bofh.it>
In reply to#1299112
On Tue, Dec 29, 2015 at 3:08 PM, Ksenija Stanojevic
<ksenija.stanojevic@gmail.com> wrote:
> Remove ULL since it's useless.
>
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
>  drivers/staging/panel/panel.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
> index 7138ee7..6dc3efb 100644
> --- a/drivers/staging/panel/panel.c
> +++ b/drivers/staging/panel/panel.c
> @@ -2047,10 +2047,10 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value,
>         u8 im, om;
>         __u64 m, v;
>
> -       om = 0ULL;
> -       im = 0ULL;
> -       m = 0ULL;
> -       v = 0ULL;
> +       om = 0;
> +       im = 0;
> +       m = 0;
> +       v = 0;
>         while (*name) {
>                 int in, out, bit, neg;
>
> @@ -2076,9 +2076,9 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value,
>
>                 bit = (out * 5) + in;
>
> -               m |= 1ULL << bit;
> +               m |= 1 << bit;

m and v are 64-bit, if bit can be >= 32, then you definitely do need
the ULL here...

>                 if (!neg)
> -                       v |= 1ULL << bit;
> +                       v |= 1 << bit;
>                 name++;
>         }
>         *mask = m;
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1299167

FromWilly Tarreau <w@1wt.eu>
Date2015-12-30 00:40 +0100
Message-ID<qLc1Y-76R-25@gated-at.bofh.it>
In reply to#1299136
On Tue, Dec 29, 2015 at 03:59:26PM -0500, Ilia Mirkin wrote:
> On Tue, Dec 29, 2015 at 3:08 PM, Ksenija Stanojevic
> <ksenija.stanojevic@gmail.com> wrote:
> > Remove ULL since it's useless.
> >
> > Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> > ---
> >  drivers/staging/panel/panel.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
> > index 7138ee7..6dc3efb 100644
> > --- a/drivers/staging/panel/panel.c
> > +++ b/drivers/staging/panel/panel.c
> > @@ -2047,10 +2047,10 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value,
> >         u8 im, om;
> >         __u64 m, v;
> >
> > -       om = 0ULL;
> > -       im = 0ULL;
> > -       m = 0ULL;
> > -       v = 0ULL;
> > +       om = 0;
> > +       im = 0;
> > +       m = 0;
> > +       v = 0;
> >         while (*name) {
> >                 int in, out, bit, neg;
> >
> > @@ -2076,9 +2076,9 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value,
> >
> >                 bit = (out * 5) + in;
> >
> > -               m |= 1ULL << bit;
> > +               m |= 1 << bit;
> 
> m and v are 64-bit, if bit can be >= 32, then you definitely do need
> the ULL here...

If that's it, indeed. I thought they were 8-bit from a previous patch.
I'm sorry for having suggested this cleanup, I've not put my nose in
this code for quite a while I must confess :-/

Regards,
Willy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web