summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadim Taha <ntaha@google.com>2016-01-28 17:16:44 -0800
committerNadim Taha <ntaha@chromium.org>2016-01-29 02:59:58 +0000
commitdb7194fbe47479bdab69666e2e1717a33d299dcb (patch)
tree5e565db4fc98e307b23bcac5067fabc49d09a805
parent26bbc59b4629f44a93b87ed8c21e5f80699c7779 (diff)
downloadchrome-ec-db7194fbe47479bdab69666e2e1717a33d299dcb.tar.gz
common: Fixes the SFDP_BITFIELD() macro.
BUG=none BRANCH=none TEST=<redacted> Change-Id: If6e2732a29e084417ba1d2f80732ac412028342a Signed-off-by: Nadim Taha <ntaha@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/324622 Reviewed-by: Ewout van Bekkum <ewout@chromium.org>
-rw-r--r--include/sfdp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sfdp.h b/include/sfdp.h
index d9b3c13903..4f7ddfb21e 100644
--- a/include/sfdp.h
+++ b/include/sfdp.h
@@ -27,7 +27,7 @@
* Helper macros to construct SFDP defined double words (32b). Note reserved or
* unused fields must always be set to all 1's.
*/
-#define SFDP_BITFIELD(name, value) (((value) & name ## _MASK) << name ## _SHIFT)
+#define SFDP_BITFIELD(name, value) (((value) << name ## _SHIFT) & name ## _MASK)
#define SFDP_UNUSED(hi, lo) (((1ULL << ((hi) - (lo) + 1)) - 1UL) << (lo))
/******************************************************************************/