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>
This commit is contained in:
Zhen Kong 2016-02-05 17:46:40 -08:00 committed by Gerrit - the friendly Code Review server
parent 664cdd33f9
commit cb2d1d68c3
2 changed files with 2 additions and 7 deletions

View file

@ -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

View file

@ -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 -