drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
PATCH 1/1 drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
From: Suniel Mahesh <[email protected]>
__be32_to_cpu() accepts argument of type __be32. This patch changes type of the buffer in ALLOC_CACHE_ALIGN_BUFFER macro to __be32, which is then passed to __be32_to_cpu().
This prevents sparse build warnings.drivers/mmc/mmc.c: warning: cast to restricted __be32
---
Note:
- Build was carried out with the above changes, no build errors reported.
--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +2 -2
@@ -882,8 +882,8 @@ static int sd_change_freq(struct mmc *mmc) {int err;struct mmc_cmd cmd; -ALLOC_CACHE_ALIGN_BUFFER (uint, scr,2 ); -ALLOC_CACHE_ALIGN_BUFFER (uint, switch_status,16 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, scr,2 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, switch_status,16 );struct mmc_data data;int timeout;
Signature · 1 line
1.9.1
PATCH 1/1 drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
Quoted 10 lines · sunil.m at techveda.org
From: Suniel Mahesh <[email protected]>
__be32_to_cpu()accepts argument of type__be32. This patch changes type of the buffer inALLOC_CACHE_ALIGN_BUFFERmacro to__be32, which is then passed to__be32_to_cpu().
This prevents sparse build warnings.drivers/mmc/mmc.c: warning: cast to restricted__be32Signed-off-by Suniel Mahesh <[email protected]>Signed-off-by Karthik Tummala <[email protected]>
Applied to u-boot-mmc.
Best Regards,
Jaehoon Chung
Quoted 24 lines
---
Note:
- Build was carried out with the above changes, no build errors reported.--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/mmc.c +2
-2@@ -882,8 +882,8 @@ static int sd_change_freq(struct mmc *mmc) {int err;struct mmc_cmd cmd; -ALLOC_CACHE_ALIGN_BUFFER (uint, scr,2 ); -ALLOC_CACHE_ALIGN_BUFFER (uint, switch_status,16 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, scr,2 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, switch_status,16 );struct mmc_data data;int timeout;
PATCH 1/1 drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
Quoted 9 lines · Jaehoon Chung
Quoted 8 lines · sunil.m at techveda.org
From: Suniel Mahesh <[email protected]>
__be32_to_cpu()accepts argument of type__be32. This patch changes type of the buffer inALLOC_CACHE_ALIGN_BUFFERmacro to__be32, which is then passed to__be32_to_cpu().
This prevents sparse build warnings.drivers/mmc/mmc.c: warning: cast to restricted__be32
Quoted 4 lines
Quoted 2 lines
Signed-off-by Suniel Mahesh <[email protected]>Signed-off-by Karthik Tummala <[email protected]>Applied to u-boot-mmc.
Hi, It says the patch has been applied to u-boot-mmc git tree, but I couldn't find it there applied.
http://git.denx.de/?p=u-boot/u-boot-mmc.git;a=summary
are there any issues with the patch or am I looking at the wrong place ?
Thanks
suniel
Quoted 29 lines
Best Regards,
Jaehoon ChungQuoted 24 lines
---
Note:
- Build was carried out with the above changes, no build errors reported.--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/mmc.c +2
-2@@ -882,8 +882,8 @@ static int sd_change_freq(struct mmc *mmc) {int err;struct mmc_cmd cmd; -ALLOC_CACHE_ALIGN_BUFFER (uint, scr,2 ); -ALLOC_CACHE_ALIGN_BUFFER (uint, switch_status,16 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, scr,2 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, switch_status,16 );struct mmc_data data;int timeout;
PATCH 1/1 drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
Quoted 13 lines · Suniel Mahesh
Quoted 12 lines · Jaehoon Chung
Quoted 10 lines · sunil.m at techveda.org
From: Suniel Mahesh <[email protected]>
__be32_to_cpu()accepts argument of type__be32. This patch changes type of the buffer inALLOC_CACHE_ALIGN_BUFFERmacro to__be32, which is then passed to__be32_to_cpu().
This prevents sparse build warnings.drivers/mmc/mmc.c: warning: cast to restricted__be32Signed-off-by Suniel Mahesh <[email protected]>Signed-off-by Karthik Tummala <[email protected]>
Quoted 7 lines
Quoted 1 line
Applied to u-boot-mmc.
Hi, It says the patch has been applied to u-boot-mmc git tree, but I couldn't find it there applied.
http://git.denx.de/?p=u-boot/u-boot-mmc.git;a=summaryare there any issues with the patch or am I looking at the wrong place ?
Will re-apply.
Thanks for pointing out.
Best Regards,
Jaehoon Chung
Quoted 36 lines
Thanks
sunielQuoted 29 lines
Best Regards,
Jaehoon ChungQuoted 24 lines
---
Note:
- Build was carried out with the above changes, no build errors reported.--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/mmc.c +2
-2@@ -882,8 +882,8 @@ static int sd_change_freq(struct mmc *mmc) {int err;struct mmc_cmd cmd; -ALLOC_CACHE_ALIGN_BUFFER (uint, scr,2 ); -ALLOC_CACHE_ALIGN_BUFFER (uint, switch_status,16 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, scr,2 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, switch_status,16 );struct mmc_data data;int timeout;
PATCH v2 1/1 drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
From: Suniel Mahesh <[email protected]>
__be32_to_cpu() accepts argument of type __be32. This patch changes type of the buffer in ALLOC_CACHE_ALIGN_BUFFER macro to __be32, which is then passed to __be32_to_cpu().
This prevents sparse build warnings.drivers/mmc/mmc.c: warning: cast to restricted __be32
---
Changes for v2:
- rebased on latest u-boot tree (2017.11.rc1)
- patch was accepted long time ago, but not applied to u-boot-mmc, please apply.
---
Note:
Tested on latest u-boot mainline tree, no build issues.
--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/mmc.c +2 -2
@@ -882,8 +882,8 @@ static int sd_change_freq(struct mmc *mmc) {int err;struct mmc_cmd cmd; -ALLOC_CACHE_ALIGN_BUFFER (uint, scr,2 ); -ALLOC_CACHE_ALIGN_BUFFER (uint, switch_status,16 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, scr,2 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, switch_status,16 );struct mmc_data data;int timeout;
Signature · 1 line
1.9.1
PATCH v2 1/1 drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
Quoted 10 lines · sunil.m at techveda.org
From: Suniel Mahesh <[email protected]>
__be32_to_cpu()accepts argument of type__be32. This patch changes type of the buffer inALLOC_CACHE_ALIGN_BUFFERmacro to__be32, which is then passed to__be32_to_cpu().
This prevents sparse build warnings.drivers/mmc/mmc.c: warning: cast to restricted__be32Signed-off-by Suniel Mahesh <[email protected]>Signed-off-by Karthik Tummala <[email protected]>
Applied to u-boot-mmc!
Best Regards,
Jaehoon Chung
Quoted 28 lines
---
Changes for v2:
- rebased on latest u-boot tree (2017.11.rc1)
- patch was accepted long time ago, but not applied to u-boot-mmc, please apply.
---
Note:
Tested on latest u-boot mainline tree, no build issues.--- drivers/mmc/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/mmc.c +2
-2@@ -882,8 +882,8 @@ static int sd_change_freq(struct mmc *mmc) {int err;struct mmc_cmd cmd; -ALLOC_CACHE_ALIGN_BUFFER (uint, scr,2 ); -ALLOC_CACHE_ALIGN_BUFFER (uint, switch_status,16 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, scr,2 ); +ALLOC_CACHE_ALIGN_BUFFER (__be32, switch_status,16 );struct mmc_data data;int timeout;