[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1400106425.12666.6.camel@joe-AO725>
Date: Wed, 14 May 2014 15:27:05 -0700
From: Joe Perches <joe@...ches.com>
To: Richard Weinberger <richard.weinberger@...il.com>
Cc: Jan Kara <jack@...e.cz>, Fabian Frederick <fabf@...net.be>,
linux-kernel <linux-kernel@...r.kernel.org>,
reiserfs-devel@...r.kernel.org, akpm <akpm@...ux-foundation.org>
Subject: Re: [PATCH V2] fs/reiserfs/stree.c: remove obsolete __constant
On Thu, 2014-05-15 at 00:08 +0200, Richard Weinberger wrote:
> On Thu, May 15, 2014 at 12:01 AM, Jan Kara <jack@...e.cz> wrote:
> > On Sat 03-05-14 22:33:24, Fabian Frederick wrote:
> >> __constant_cpu_to_le32 converted to cpu_to_le32
> >>
> >> Cc: reiserfs-devel@...r.kernel.org
> >> Cc: Andrew Morton <akpm@...ux-foundation.org>
> >> Signed-off-by: Fabian Frederick <fabf@...net.be>
> > Just for my education, where have you learned that __constant_...
> > functions are obsolete?
>
> IIRC checkpatch.pl barks if you use __constant_... outside of include/uapi/
I'd use not preferred and unnecessarily verbose more than obsolete.
These conversions are all tested with __builtin_constant_p
via indirection to macros like __swab32
include/uapi/linux/swab.h:#define __swab32(x) \
include/uapi/linux/swab.h- (__builtin_constant_p((__u32)(x)) ? \
include/uapi/linux/swab.h- ___constant_swab32(x) : \
include/uapi/linux/swab.h- __fswab32(x))
include/uapi/linux/swab.h:#define ___constant_swab32(x) ((__u32)( \
include/uapi/linux/swab.h- (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
include/uapi/linux/swab.h- (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
include/uapi/linux/swab.h- (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
include/uapi/linux/swab.h- (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists