linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilia Mirkin <imirkin@alum.mit.edu>
To: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	willy@meta-x.org, devel@driverdev.osuosl.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] Staging: panel: Remove ULL
Date: Tue, 29 Dec 2015 15:59:26 -0500	[thread overview]
Message-ID: <CAKb7UviQSm+57Ld1XXmEx4andt3TBt11N8nDjJ9Tq2XK1VJJqw@mail.gmail.com> (raw)
In-Reply-To: <ea3ad0d79d62441a4e871cba6fb16c114905a071.1451418912.git.ksenija.stanojevic@gmail.com>

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/

  reply	other threads:[~2015-12-29 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-29 20:04 [PATCH 0/5] Staging: panel: TODO fixes Ksenija Stanojevic
2015-12-29 20:05 ` [PATCH 1/5] Staging: panel: Use u8 type Ksenija Stanojevic
2015-12-29 20:07 ` [PATCH 2/5] Staging: panel: Remove typedef pmask_t Ksenija Stanojevic
2015-12-29 20:08 ` [PATCH 3/5] Staging: panel: Remove ULL Ksenija Stanojevic
2015-12-29 20:59   ` Ilia Mirkin [this message]
2015-12-29 23:35     ` Willy Tarreau
2015-12-29 20:09 ` [PATCH 4/5] Staging: panel: Reduce value range for *name Ksenija Stanojevic
2015-12-29 20:11 ` [PATCH 5/5] Staging: panel: Make statement more readable Ksenija Stanojevic
2016-01-02  6:53   ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKb7UviQSm+57Ld1XXmEx4andt3TBt11N8nDjJ9Tq2XK1VJJqw@mail.gmail.com \
    --to=imirkin@alum.mit.edu \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@meta-x.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).