Message ID | 1416889101-17125-9-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
+Masahiro On 24 November 2014 at 21:18, Simon Glass <sjg@chromium.org> wrote: > This new symbol may be defined by the compiler. If it is, avoid a compiler > warning when USE_STDINT is defined. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v3: > - Add new patch to fix SIZE_MAX compiler warning when using stdint.h > > Changes in v2: None > > include/linux/kernel.h | 2 ++ > 1 file changed, 2 insertions(+) Applied to u-boot-x86.
Simon, I am not happy about this because my intention was to sync <linux/kernel.h> with that of Linux as much as possible. I have posted a new thread for open discussion because I doubt if USE_STDINT is a good idea. On Tue, 25 Nov 2014 14:47:22 -0700 Simon Glass <sjg@chromium.org> wrote: > +Masahiro > > On 24 November 2014 at 21:18, Simon Glass <sjg@chromium.org> wrote: > > This new symbol may be defined by the compiler. If it is, avoid a compiler > > warning when USE_STDINT is defined. > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > --- > > > > Changes in v3: > > - Add new patch to fix SIZE_MAX compiler warning when using stdint.h > > > > Changes in v2: None > > > > include/linux/kernel.h | 2 ++ > > 1 file changed, 2 insertions(+) > > Applied to u-boot-x86. Best Regards Masahiro Yamada
Hi Masahiro, On 26 November 2014 at 00:49, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote: > Simon, > > I am not happy about this because my intention was > to sync <linux/kernel.h> with that of Linux as much as possible. > > I have posted a new thread for open discussion > because I doubt if USE_STDINT is a good idea. > OK, let's discuss on the other thread. - Simon > > > On Tue, 25 Nov 2014 14:47:22 -0700 > Simon Glass <sjg@chromium.org> wrote: > >> +Masahiro >> >> On 24 November 2014 at 21:18, Simon Glass <sjg@chromium.org> wrote: >> > This new symbol may be defined by the compiler. If it is, avoid a compiler >> > warning when USE_STDINT is defined. >> > >> > Signed-off-by: Simon Glass <sjg@chromium.org> >> > --- >> > >> > Changes in v3: >> > - Add new patch to fix SIZE_MAX compiler warning when using stdint.h >> > >> > Changes in v2: None >> > >> > include/linux/kernel.h | 2 ++ >> > 1 file changed, 2 insertions(+) >> >> Applied to u-boot-x86. > > Best Regards > Masahiro Yamada >
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 89fcae0..0b61671 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -16,7 +16,9 @@ #define LLONG_MAX ((long long)(~0ULL>>1)) #define LLONG_MIN (-LLONG_MAX - 1) #define ULLONG_MAX (~0ULL) +#ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) +#endif #define U8_MAX ((u8)~0U) #define S8_MAX ((s8)(U8_MAX>>1))
This new symbol may be defined by the compiler. If it is, avoid a compiler warning when USE_STDINT is defined. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v3: - Add new patch to fix SIZE_MAX compiler warning when using stdint.h Changes in v2: None include/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+)