mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/5] linux/kernel.h: rename USHORT_MAX, SHORT_MAX, SHORT_MIN
Date: Wed, 21 Jan 2015 14:09:18 +0900	[thread overview]
Message-ID: <1421816959-19004-5-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1421816959-19004-1-git-send-email-yamada.m@jp.panasonic.com>

Linux uses SHRT_* instead of SHORT_*.  The <limits.h> of C does
the same.  Let's follow this standard.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 fs/parseopt.c          | 2 +-
 include/linux/kernel.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/parseopt.c b/fs/parseopt.c
index fbe53cf..12dbe18 100644
--- a/fs/parseopt.c
+++ b/fs/parseopt.c
@@ -26,7 +26,7 @@ again:
 	}
 
 	v = simple_strtoul(start + optlen + 1, &endp, 0);
-	if (v > USHORT_MAX)
+	if (v > USHRT_MAX)
 		return;
 
 	if (*endp == ',' || *endp == '\0')
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 33cf62e..4d7e41e 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -4,9 +4,9 @@
 #include <linux/compiler.h>
 #include <linux/barebox-wrapper.h>
 
-#define USHORT_MAX	((u16)(~0U))
-#define SHORT_MAX	((s16)(USHORT_MAX>>1))
-#define SHORT_MIN	(-SHORT_MAX - 1)
+#define USHRT_MAX	((u16)(~0U))
+#define SHRT_MAX	((s16)(USHRT_MAX>>1))
+#define SHRT_MIN	((s16)(-SHRT_MAX - 1))
 #define INT_MAX		((int)(~0U>>1))
 #define INT_MIN		(-INT_MAX - 1)
 #define UINT_MAX	(~0U)
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-01-21  5:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21  5:09 [PATCH 0/5] rafactor _*MAX, *_MIN macros Masahiro Yamada
2015-01-21  5:09 ` [PATCH 1/5] fs: ubifs: remove redundant macro defines Masahiro Yamada
2015-01-21  5:09 ` [PATCH 2/5] lib: decompress: remove redundant INT_MAX define Masahiro Yamada
2015-01-21  5:09 ` [PATCH 3/5] linux/kernel.h: move *_MAX, *_MIN macros Masahiro Yamada
2015-01-21  5:09 ` Masahiro Yamada [this message]
2015-01-21  5:09 ` [PATCH 5/5] linux/kernel.h: add more " Masahiro Yamada
2015-01-21  6:30 ` [PATCH 0/5] rafactor _*MAX, " Jean-Christophe PLAGNIOL-VILLARD
2015-01-21 13:59 ` Sascha Hauer

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=1421816959-19004-5-git-send-email-yamada.m@jp.panasonic.com \
    --to=yamada.m@jp.panasonic.com \
    --cc=barebox@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox