Message ID | 1507183320-6351-1-git-send-email-sunil.m@techveda.org |
---|---|
State | Accepted |
Delegated to: | Jaehoon Chung |
Headers | show |
Series | [U-Boot,v2] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro | expand |
On 10/05/2017 03:02 PM, sunil.m@techveda.org wrote: > From: Suniel Mahesh <sunil.m@techveda.org> > > __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 > > Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> > Signed-off-by: Karthik Tummala <karthik@techveda.org> Applied to u-boot-mmc! Best Regards, Jaehoon Chung > --- > 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(-) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index 38d2e07..8716ac7 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -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; > >
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 38d2e07..8716ac7 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -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;