lkml.org 
[lkml]   [2014]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH -next 2/2] bcache: Use max_t() when comparing different types
    From
    Date
    On Thu, 2014-02-06 at 10:00 +0100, Geert Uytterhoeven wrote:
    > On Mon, Feb 3, 2014 at 2:47 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
    > > On Wed, Jan 15, 2014 at 12:06 PM, Joe Perches <joe@perches.com> wrote:
    > >> On Wed, 2014-01-15 at 10:06 +0100, Geert Uytterhoeven wrote:
    > >>> drivers/md/bcache/btree.c: In function ‘insert_u64s_remaining’:
    > >>> drivers/md/bcache/btree.c:1816: warning: comparison of distinct pointer types lacks a cast
    > >> []
    > >>> diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
    > >> []
    > >>> @@ -1813,7 +1813,7 @@ static size_t insert_u64s_remaining(struct btree *b)
    > >>> if (b->keys.ops->is_extents)
    > >>> ret -= KEY_MAX_U64S;
    > >>>
    > >>> - return max(ret, 0L);
    > >>> + return max_t(ssize_t, ret, 0L);
    > >>
    > >> why not
    > >> return max(ret, 0);
    > >
    > > Indeed, that also works, on both 32-bit and 64-bit.
    > > Will resend, now all the issues moved from -next to Linus' tree.
    >
    > However, sparse doesn't like it, so we'll have to go for v1?

    Seems so.

    --
    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/

    \
     
     \ /
      Last update: 2014-02-06 10:41    [W:5.344 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site