From: "Brian Norris" <computersforpeace@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Mike Frysinger <vapier.adi@gmail.com>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: [PATCH 2/8] mtd-utils: common.h: Add MAX() macro, fix MIN()
Date: Mon, 29 Nov 2010 00:01:56 -0800 [thread overview]
Message-ID: <1291017722-23985-2-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Add MAX() macro to common.h, to be used in future patches.
Also a style change in comma location on MIN().
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
include/common.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/common.h b/include/common.h
index 25abc0c..eb8d5fc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -34,7 +34,10 @@ extern "C" {
#endif
#ifndef MIN /* some C lib headers define this for us */
-#define MIN(a ,b) ((a) < (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#define min(a, b) MIN(a, b) /* glue for linux kernel source */
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
--
1.7.0.4
next prev parent reply other threads:[~2010-11-29 8:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 8:01 [PATCH 1/8] nanddump/nandwrite: use "simple_" str functions Brian Norris
2010-11-29 8:01 ` Brian Norris [this message]
2010-11-29 8:01 ` [PATCH 3/8] nanddump: Refactor pretty print code into an sprintf() Brian Norris
2010-11-29 8:01 ` [PATCH 4/8] nanddump: change "unsigned" to "signed" Brian Norris
2010-11-29 8:01 ` [PATCH 5/8] nanddump: check for negative inputs Brian Norris
2010-12-01 6:18 ` [PATCH v2 " Brian Norris
2010-12-01 7:12 ` [PATCH v3 " Brian Norris
2010-11-29 8:02 ` [PATCH 6/8] nanddump: choose correct "printf" format-specifier Brian Norris
2010-11-29 8:02 ` [PATCH 7/8] nandwrite: add check for negative blockalign Brian Norris
2010-11-29 8:05 ` Mike Frysinger
2010-12-01 6:11 ` Brian Norris
2010-12-01 6:19 ` [PATCH v2 " Brian Norris
2010-11-29 8:02 ` [PATCH 8/8] nandwrite: use common.h "errmsg_die" Brian Norris
2010-12-01 6:20 ` [PATCH v2 " Brian Norris
2010-12-02 3:27 ` [PATCH 1/8] nanddump/nandwrite: use "simple_" str functions Artem Bityutskiy
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=1291017722-23985-2-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier.adi@gmail.com \
/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.