summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhen Kong <zkong@codeaurora.org>2016-02-05 17:46:40 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-29 13:51:51 -0700
commitcb2d1d68c30c525a5eedfe9f67a2a3843c71bc67 (patch)
treec2dfd267c22541a0c17a0f1c7a32ef276516e3fa
parent664cdd33f956accabebd29edba6c220b1580744d (diff)
qseecom: fix macro QSEECOM_ALIGN definition issue
In macro QSEECOM_ALIGN, change (x + QSEECOM_ALIGN_SIZE) to (x + QSEECOM_ALIGN_MASK); otherwise, when x is already aligned, QSEECOM_ALIGN(x) will get (x + QSEECOM_ALIGN_SIZE), but it should be x. Also, remove the dulplicate QSEECOM_ALIGN definition in hdcp.c and mpq_sdmx.c, since they already include "qseecom_kernel.h" Change-Id: I9dbcadb618372fce71c2ff7ab62ca691afe7c7fa Signed-off-by: Zhen Kong <zkong@codeaurora.org>
-rw-r--r--drivers/misc/hdcp.c5
-rw-r--r--drivers/misc/qseecom_kernel.h4
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/misc/hdcp.c b/drivers/misc/hdcp.c
index 460ffc79f566..33ec0c15efa6 100644
--- a/drivers/misc/hdcp.c
+++ b/drivers/misc/hdcp.c
@@ -97,11 +97,6 @@
*/
#define SLEEP_SET_HW_KEY_MS 220
-#define QSEECOM_ALIGN_SIZE 0x40
-#define QSEECOM_ALIGN_MASK (QSEECOM_ALIGN_SIZE - 1)
-#define QSEECOM_ALIGN(x)\
- ((x + QSEECOM_ALIGN_SIZE) & (~QSEECOM_ALIGN_MASK))
-
/* hdcp command status */
#define HDCP_SUCCESS 0
diff --git a/drivers/misc/qseecom_kernel.h b/drivers/misc/qseecom_kernel.h
index 8f981903c3a1..40426b749f60 100644
--- a/drivers/misc/qseecom_kernel.h
+++ b/drivers/misc/qseecom_kernel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, 2016 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, 2016-2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -19,7 +19,7 @@
#define QSEECOM_ALIGN_SIZE 0x40
#define QSEECOM_ALIGN_MASK (QSEECOM_ALIGN_SIZE - 1)
#define QSEECOM_ALIGN(x) \
- ((x + QSEECOM_ALIGN_SIZE) & (~QSEECOM_ALIGN_MASK))
+ ((x + QSEECOM_ALIGN_MASK) & (~QSEECOM_ALIGN_MASK))
/*
* struct qseecom_handle -