All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
@ 2017-06-19  7:33 ` sunil.m at techveda.org
  2017-07-17 11:08   ` Jaehoon Chung
  0 siblings, 1 reply; 6+ messages in thread
From: sunil.m at techveda.org @ 2017-06-19  7:33 UTC (permalink / raw)
  To: u-boot

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>
---
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(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 3cdf6a4..3d4da4c 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;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
  2017-06-19  7:33 ` [U-Boot] [PATCH] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro sunil.m at techveda.org
@ 2017-07-17 11:08   ` Jaehoon Chung
  2017-08-04  9:33     ` Suniel Mahesh
  0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2017-07-17 11:08 UTC (permalink / raw)
  To: u-boot

On 06/19/2017 04:33 PM, sunil.m at 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

> ---
> 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(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 3cdf6a4..3d4da4c 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;
>  
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
  2017-07-17 11:08   ` Jaehoon Chung
@ 2017-08-04  9:33     ` Suniel Mahesh
  2017-08-18  7:30       ` Jaehoon Chung
  0 siblings, 1 reply; 6+ messages in thread
From: Suniel Mahesh @ 2017-08-04  9:33 UTC (permalink / raw)
  To: u-boot

On Monday 17 July 2017 04:38 PM, Jaehoon Chung wrote:
> On 06/19/2017 04:33 PM, sunil.m at 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.

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
> 
> Best Regards,
> Jaehoon Chung
> 
>> ---
>> 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(-)
>>
>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>> index 3cdf6a4..3d4da4c 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;
>>  
>>
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
  2017-08-04  9:33     ` Suniel Mahesh
@ 2017-08-18  7:30       ` Jaehoon Chung
  2017-10-05  6:02         ` [U-Boot] [PATCH v2] " sunil.m at techveda.org
  0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2017-08-18  7:30 UTC (permalink / raw)
  To: u-boot

On 08/04/2017 06:33 PM, Suniel Mahesh wrote:
> On Monday 17 July 2017 04:38 PM, Jaehoon Chung wrote:
>> On 06/19/2017 04:33 PM, sunil.m at 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.
> 
> 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 ? 

Will re-apply.
Thanks for pointing out.

Best Regards,
Jaehoon Chung

> 
> Thanks
> suniel
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>> ---
>>> 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(-)
>>>
>>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>>> index 3cdf6a4..3d4da4c 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;
>>>  
>>>
>>
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
  2017-08-18  7:30       ` Jaehoon Chung
@ 2017-10-05  6:02         ` sunil.m at techveda.org
  2017-10-20 11:45           ` Jaehoon Chung
  0 siblings, 1 reply; 6+ messages in thread
From: sunil.m at techveda.org @ 2017-10-05  6:02 UTC (permalink / raw)
  To: u-boot

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>
---
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;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro
  2017-10-05  6:02         ` [U-Boot] [PATCH v2] " sunil.m at techveda.org
@ 2017-10-20 11:45           ` Jaehoon Chung
  0 siblings, 0 replies; 6+ messages in thread
From: Jaehoon Chung @ 2017-10-20 11:45 UTC (permalink / raw)
  To: u-boot

On 10/05/2017 03:02 PM, sunil.m at 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;
>  
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-20 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170619073335epcas5p3ce6ccc9ced473d12b1f6ba32183bb77e@epcas5p3.samsung.com>
2017-06-19  7:33 ` [U-Boot] [PATCH] drivers: mmc: Change buffer type in ALLOC_CACHE_ALIGN_BUFFER macro sunil.m at techveda.org
2017-07-17 11:08   ` Jaehoon Chung
2017-08-04  9:33     ` Suniel Mahesh
2017-08-18  7:30       ` Jaehoon Chung
2017-10-05  6:02         ` [U-Boot] [PATCH v2] " sunil.m at techveda.org
2017-10-20 11:45           ` Jaehoon Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.