mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
crypto: ux500 - Fix COMPILE_TEST warnings
This patch fixes a number of warnings encountered when this driver is built on a 64-bit platform with COMPILE_TEST. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
f6680cbdb2
commit
347bce3eab
2 changed files with 11 additions and 9 deletions
|
@ -528,9 +528,9 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx,
|
||||||
|
|
||||||
dev_dbg(ctx->device->dev, "[%s]: ", __func__);
|
dev_dbg(ctx->device->dev, "[%s]: ", __func__);
|
||||||
|
|
||||||
if (unlikely(!IS_ALIGNED((u32)sg, 4))) {
|
if (unlikely(!IS_ALIGNED((unsigned long)sg, 4))) {
|
||||||
dev_err(ctx->device->dev, "[%s]: Data in sg list isn't "
|
dev_err(ctx->device->dev, "[%s]: Data in sg list isn't "
|
||||||
"aligned! Addr: 0x%08x", __func__, (u32)sg);
|
"aligned! Addr: 0x%08lx", __func__, (unsigned long)sg);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -763,9 +763,9 @@ static int hw_crypt_noxts(struct cryp_ctx *ctx,
|
||||||
|
|
||||||
ctx->outlen = ctx->datalen;
|
ctx->outlen = ctx->datalen;
|
||||||
|
|
||||||
if (unlikely(!IS_ALIGNED((u32)indata, 4))) {
|
if (unlikely(!IS_ALIGNED((unsigned long)indata, 4))) {
|
||||||
pr_debug(DEV_DBG_NAME " [%s]: Data isn't aligned! Addr: "
|
pr_debug(DEV_DBG_NAME " [%s]: Data isn't aligned! Addr: "
|
||||||
"0x%08x", __func__, (u32)indata);
|
"0x%08lx", __func__, (unsigned long)indata);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -806,7 +806,7 @@ static int hash_process_data(struct hash_device_data *device_data,
|
||||||
* HW peripheral, otherwise we first copy data
|
* HW peripheral, otherwise we first copy data
|
||||||
* to a local buffer
|
* to a local buffer
|
||||||
*/
|
*/
|
||||||
if ((0 == (((u32)data_buffer) % 4)) &&
|
if (IS_ALIGNED((unsigned long)data_buffer, 4) &&
|
||||||
(0 == *index))
|
(0 == *index))
|
||||||
hash_processblock(device_data,
|
hash_processblock(device_data,
|
||||||
(const u32 *)data_buffer,
|
(const u32 *)data_buffer,
|
||||||
|
@ -864,7 +864,8 @@ static int hash_dma_final(struct ahash_request *req)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
dev_dbg(device_data->dev, "%s: (ctx=0x%x)!\n", __func__, (u32) ctx);
|
dev_dbg(device_data->dev, "%s: (ctx=0x%lx)!\n", __func__,
|
||||||
|
(unsigned long)ctx);
|
||||||
|
|
||||||
if (req_ctx->updated) {
|
if (req_ctx->updated) {
|
||||||
ret = hash_resume_state(device_data, &device_data->state);
|
ret = hash_resume_state(device_data, &device_data->state);
|
||||||
|
@ -969,7 +970,8 @@ static int hash_hw_final(struct ahash_request *req)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
dev_dbg(device_data->dev, "%s: (ctx=0x%x)!\n", __func__, (u32) ctx);
|
dev_dbg(device_data->dev, "%s: (ctx=0x%lx)!\n", __func__,
|
||||||
|
(unsigned long)ctx);
|
||||||
|
|
||||||
if (req_ctx->updated) {
|
if (req_ctx->updated) {
|
||||||
ret = hash_resume_state(device_data, &device_data->state);
|
ret = hash_resume_state(device_data, &device_data->state);
|
||||||
|
@ -1272,8 +1274,8 @@ void hash_get_digest(struct hash_device_data *device_data,
|
||||||
else
|
else
|
||||||
loop_ctr = SHA256_DIGEST_SIZE / sizeof(u32);
|
loop_ctr = SHA256_DIGEST_SIZE / sizeof(u32);
|
||||||
|
|
||||||
dev_dbg(device_data->dev, "%s: digest array:(0x%x)\n",
|
dev_dbg(device_data->dev, "%s: digest array:(0x%lx)\n",
|
||||||
__func__, (u32) digest);
|
__func__, (unsigned long)digest);
|
||||||
|
|
||||||
/* Copy result into digest array */
|
/* Copy result into digest array */
|
||||||
for (count = 0; count < loop_ctr; count++) {
|
for (count = 0; count < loop_ctr; count++) {
|
||||||
|
|
Loading…
Reference in a new issue