Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+11 -9
+4 -4
drivers/crypto/ux500/cryp/cryp_core.c
··· 528 528 529 529 dev_dbg(ctx->device->dev, "[%s]: ", __func__); 530 530 531 - if (unlikely(!IS_ALIGNED((u32)sg, 4))) { 531 + if (unlikely(!IS_ALIGNED((unsigned long)sg, 4))) { 532 532 dev_err(ctx->device->dev, "[%s]: Data in sg list isn't " 533 - "aligned! Addr: 0x%08x", __func__, (u32)sg); 533 + "aligned! Addr: 0x%08lx", __func__, (unsigned long)sg); 534 534 return -EFAULT; 535 535 } 536 536 ··· 763 763 764 764 ctx->outlen = ctx->datalen; 765 765 766 - if (unlikely(!IS_ALIGNED((u32)indata, 4))) { 766 + if (unlikely(!IS_ALIGNED((unsigned long)indata, 4))) { 767 767 pr_debug(DEV_DBG_NAME " [%s]: Data isn't aligned! Addr: " 768 - "0x%08x", __func__, (u32)indata); 768 + "0x%08lx", __func__, (unsigned long)indata); 769 769 return -EINVAL; 770 770 } 771 771
+7 -5
drivers/crypto/ux500/hash/hash_core.c
··· 806 806 * HW peripheral, otherwise we first copy data 807 807 * to a local buffer 808 808 */ 809 - if ((0 == (((u32)data_buffer) % 4)) && 809 + if (IS_ALIGNED((unsigned long)data_buffer, 4) && 810 810 (0 == *index)) 811 811 hash_processblock(device_data, 812 812 (const u32 *)data_buffer, ··· 864 864 if (ret) 865 865 return ret; 866 866 867 - dev_dbg(device_data->dev, "%s: (ctx=0x%x)!\n", __func__, (u32) ctx); 867 + dev_dbg(device_data->dev, "%s: (ctx=0x%lx)!\n", __func__, 868 + (unsigned long)ctx); 868 869 869 870 if (req_ctx->updated) { 870 871 ret = hash_resume_state(device_data, &device_data->state); ··· 970 969 if (ret) 971 970 return ret; 972 971 973 - dev_dbg(device_data->dev, "%s: (ctx=0x%x)!\n", __func__, (u32) ctx); 972 + dev_dbg(device_data->dev, "%s: (ctx=0x%lx)!\n", __func__, 973 + (unsigned long)ctx); 974 974 975 975 if (req_ctx->updated) { 976 976 ret = hash_resume_state(device_data, &device_data->state); ··· 1274 1272 else 1275 1273 loop_ctr = SHA256_DIGEST_SIZE / sizeof(u32); 1276 1274 1277 - dev_dbg(device_data->dev, "%s: digest array:(0x%x)\n", 1278 - __func__, (u32) digest); 1275 + dev_dbg(device_data->dev, "%s: digest array:(0x%lx)\n", 1276 + __func__, (unsigned long)digest); 1279 1277 1280 1278 /* Copy result into digest array */ 1281 1279 for (count = 0; count < loop_ctr; count++) {