All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Kent Overstreet <kmo@daterainc.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-bcache@vger.kernel.org
Subject: Re: New bcache compiler warning (was: Re: bcache: Minor fixes from kbuild robot)
Date: Tue, 18 Feb 2014 10:01:54 +0100	[thread overview]
Message-ID: <CAMuHMdVOwWq4AOEjiRSfZ7V_YOSE_LMK9PNJyw8-hJVY9RJekQ@mail.gmail.com> (raw)
In-Reply-To: <20140217214553.GB11655@kmo>

On Mon, Feb 17, 2014 at 10:45 PM, Kent Overstreet <kmo@daterainc.com> wrote:
> *swears* Actually, I'm just going to cast this to unsigned (that's definitely
> safe here):
>
>
> commit 70bc49d421c793f73a772ae1f50622a39c6136d9
> Author: Kent Overstreet <kmo@daterainc.com>
> Date:   Mon Feb 17 13:44:06 2014 -0800
>
>     bcache: Fix another compiler warning on m68k

JFYI, you also get this warning on other 32-bit platforms (e.g. ARM).

>     Use a bigger hammer this time

Looks like it's big enough, now ;-)

>     Signed-off-by: Kent Overstreet <kmo@daterainc.com>
>
> diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c
> index 3f74b4b074..5454164153 100644
> --- a/drivers/md/bcache/bset.c
> +++ b/drivers/md/bcache/bset.c
> @@ -23,8 +23,8 @@ void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned set)
>         for (k = i->start; k < bset_bkey_last(i); k = next) {
>                 next = bkey_next(k);
>
> -               printk(KERN_ERR "block %u key %li/%u: ", set,
> -                      (uint64_t *) k - i->d, i->keys);
> +               printk(KERN_ERR "block %u key %u/%u: ", set,
> +                      (unsigned) ((u64 *) k - i->d), i->keys);
>
>                 if (b->ops->key_dump)
>                         b->ops->key_dump(b, k);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

      parent reply	other threads:[~2014-02-18  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 21:00 New bcache compiler warning (was: Re: bcache: Minor fixes from kbuild robot) Geert Uytterhoeven
2014-02-17 21:06 ` Randy Dunlap
2014-02-17 21:11   ` Geert Uytterhoeven
2014-02-17 21:45     ` Kent Overstreet
2014-02-17 22:44       ` Randy Dunlap
2014-02-17 22:46         ` Kent Overstreet
2014-02-18  9:01       ` Geert Uytterhoeven [this message]

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=CAMuHMdVOwWq4AOEjiRSfZ7V_YOSE_LMK9PNJyw8-hJVY9RJekQ@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=kmo@daterainc.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.