linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: mxcmmc: Fix missing parentheses and brace
@ 2018-07-12 19:59 Kees Cook
  2018-07-14  4:16 ` Randy Dunlap
  2018-07-16 10:11 ` Ulf Hansson
  0 siblings, 2 replies; 5+ messages in thread
From: Kees Cook @ 2018-07-12 19:59 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Christoph Hellwig, linux-mmc, linux-kernel

Looks like the adjusted syntax wasn't fully build tested. This fixes
failures with powerpc builds:

drivers/mmc/host/mxcmmc.c: In function ‘mxcmci_swap_buffers’:
drivers/mmc/host/mxcmmc.c:296:51: error: expected ‘)’ before ‘;’ token
   void *buf = kmap_atomic(sg_page(sg) + sg->offset;
                                                   ^
drivers/mmc/host/mxcmmc.c:299:1: error: expected ‘,’ or ‘;’ before ‘}’ token
 }
 ^

Fixes: b189e7589f6d3 ("mmc: mxcmmc: handle highmem pages")
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/mmc/host/mxcmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 75f781c11e89..de4e6e5bf304 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -293,9 +293,10 @@ static void mxcmci_swap_buffers(struct mmc_data *data)
 	int i;
 
 	for_each_sg(data->sg, sg, data->sg_len, i) {
-		void *buf = kmap_atomic(sg_page(sg) + sg->offset;
+		void *buf = kmap_atomic(sg_page(sg) + sg->offset);
 		buffer_swap32(buf, sg->length);
 		kunmap_atomic(buf);
+	}
 }
 #else
 static inline void mxcmci_swap_buffers(struct mmc_data *data) {}
-- 
2.17.1


-- 
Kees Cook
Pixel Security

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

* Re: [PATCH] mmc: mxcmmc: Fix missing parentheses and brace
  2018-07-12 19:59 [PATCH] mmc: mxcmmc: Fix missing parentheses and brace Kees Cook
@ 2018-07-14  4:16 ` Randy Dunlap
  2018-07-16 10:11 ` Ulf Hansson
  1 sibling, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2018-07-14  4:16 UTC (permalink / raw)
  To: Kees Cook, Ulf Hansson; +Cc: Christoph Hellwig, linux-mmc, linux-kernel

On 07/12/2018 12:59 PM, Kees Cook wrote:
> Looks like the adjusted syntax wasn't fully build tested. This fixes
> failures with powerpc builds:
> 
> drivers/mmc/host/mxcmmc.c: In function ‘mxcmci_swap_buffers’:
> drivers/mmc/host/mxcmmc.c:296:51: error: expected ‘)’ before ‘;’ token
>    void *buf = kmap_atomic(sg_page(sg) + sg->offset;
>                                                    ^
> drivers/mmc/host/mxcmmc.c:299:1: error: expected ‘,’ or ‘;’ before ‘}’ token
>  }
>  ^
> 
> Fixes: b189e7589f6d3 ("mmc: mxcmmc: handle highmem pages")
> Signed-off-by: Kees Cook <keescook@chromium.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  drivers/mmc/host/mxcmmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 75f781c11e89..de4e6e5bf304 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -293,9 +293,10 @@ static void mxcmci_swap_buffers(struct mmc_data *data)
>  	int i;
>  
>  	for_each_sg(data->sg, sg, data->sg_len, i) {
> -		void *buf = kmap_atomic(sg_page(sg) + sg->offset;
> +		void *buf = kmap_atomic(sg_page(sg) + sg->offset);
>  		buffer_swap32(buf, sg->length);
>  		kunmap_atomic(buf);
> +	}
>  }
>  #else
>  static inline void mxcmci_swap_buffers(struct mmc_data *data) {}
> 


-- 
~Randy

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

* Re: [PATCH] mmc: mxcmmc: Fix missing parentheses and brace
  2018-07-12 19:59 [PATCH] mmc: mxcmmc: Fix missing parentheses and brace Kees Cook
  2018-07-14  4:16 ` Randy Dunlap
@ 2018-07-16 10:11 ` Ulf Hansson
  2018-07-31 20:27   ` Kees Cook
  1 sibling, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2018-07-16 10:11 UTC (permalink / raw)
  To: Kees Cook; +Cc: Christoph Hellwig, linux-mmc, Linux Kernel Mailing List

On 12 July 2018 at 21:59, Kees Cook <keescook@chromium.org> wrote:
> Looks like the adjusted syntax wasn't fully build tested. This fixes
> failures with powerpc builds:
>
> drivers/mmc/host/mxcmmc.c: In function ‘mxcmci_swap_buffers’:
> drivers/mmc/host/mxcmmc.c:296:51: error: expected ‘)’ before ‘;’ token
>    void *buf = kmap_atomic(sg_page(sg) + sg->offset;
>                                                    ^
> drivers/mmc/host/mxcmmc.c:299:1: error: expected ‘,’ or ‘;’ before ‘}’ token
>  }
>  ^
>
> Fixes: b189e7589f6d3 ("mmc: mxcmmc: handle highmem pages")
> Signed-off-by: Kees Cook <keescook@chromium.org>

Thanks, applied for fixes!

Kind regards
Uffe

> ---
>  drivers/mmc/host/mxcmmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 75f781c11e89..de4e6e5bf304 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -293,9 +293,10 @@ static void mxcmci_swap_buffers(struct mmc_data *data)
>         int i;
>
>         for_each_sg(data->sg, sg, data->sg_len, i) {
> -               void *buf = kmap_atomic(sg_page(sg) + sg->offset;
> +               void *buf = kmap_atomic(sg_page(sg) + sg->offset);
>                 buffer_swap32(buf, sg->length);
>                 kunmap_atomic(buf);
> +       }
>  }
>  #else
>  static inline void mxcmci_swap_buffers(struct mmc_data *data) {}
> --
> 2.17.1
>
>
> --
> Kees Cook
> Pixel Security

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

* Re: [PATCH] mmc: mxcmmc: Fix missing parentheses and brace
  2018-07-16 10:11 ` Ulf Hansson
@ 2018-07-31 20:27   ` Kees Cook
  2018-08-01  9:41     ` Ulf Hansson
  0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2018-07-31 20:27 UTC (permalink / raw)
  To: Ulf Hansson, Linus Torvalds
  Cc: Christoph Hellwig, linux-mmc, Linux Kernel Mailing List

On Mon, Jul 16, 2018 at 3:11 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 12 July 2018 at 21:59, Kees Cook <keescook@chromium.org> wrote:
>> Looks like the adjusted syntax wasn't fully build tested. This fixes
>> failures with powerpc builds:
>>
>> drivers/mmc/host/mxcmmc.c: In function ‘mxcmci_swap_buffers’:
>> drivers/mmc/host/mxcmmc.c:296:51: error: expected ‘)’ before ‘;’ token
>>    void *buf = kmap_atomic(sg_page(sg) + sg->offset;
>>                                                    ^
>> drivers/mmc/host/mxcmmc.c:299:1: error: expected ‘,’ or ‘;’ before ‘}’ token
>>  }
>>  ^
>>
>> Fixes: b189e7589f6d3 ("mmc: mxcmmc: handle highmem pages")
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>
> Thanks, applied for fixes!

I just checked again, and while I see this in linux-next, I would
expect this to be in 4.18, since this fixes a 4.18-introduced build
failure for some PPC configurations. Can this please be included in
4.18?

Thanks!

-Kees

>
> Kind regards
> Uffe
>
>> ---
>>  drivers/mmc/host/mxcmmc.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
>> index 75f781c11e89..de4e6e5bf304 100644
>> --- a/drivers/mmc/host/mxcmmc.c
>> +++ b/drivers/mmc/host/mxcmmc.c
>> @@ -293,9 +293,10 @@ static void mxcmci_swap_buffers(struct mmc_data *data)
>>         int i;
>>
>>         for_each_sg(data->sg, sg, data->sg_len, i) {
>> -               void *buf = kmap_atomic(sg_page(sg) + sg->offset;
>> +               void *buf = kmap_atomic(sg_page(sg) + sg->offset);
>>                 buffer_swap32(buf, sg->length);
>>                 kunmap_atomic(buf);
>> +       }
>>  }
>>  #else
>>  static inline void mxcmci_swap_buffers(struct mmc_data *data) {}
>> --
>> 2.17.1
>>
>>
>> --
>> Kees Cook
>> Pixel Security



-- 
Kees Cook
Pixel Security

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

* Re: [PATCH] mmc: mxcmmc: Fix missing parentheses and brace
  2018-07-31 20:27   ` Kees Cook
@ 2018-08-01  9:41     ` Ulf Hansson
  0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2018-08-01  9:41 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, Christoph Hellwig, linux-mmc, Linux Kernel Mailing List

On 31 July 2018 at 22:27, Kees Cook <keescook@chromium.org> wrote:
> On Mon, Jul 16, 2018 at 3:11 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 12 July 2018 at 21:59, Kees Cook <keescook@chromium.org> wrote:
>>> Looks like the adjusted syntax wasn't fully build tested. This fixes
>>> failures with powerpc builds:
>>>
>>> drivers/mmc/host/mxcmmc.c: In function ‘mxcmci_swap_buffers’:
>>> drivers/mmc/host/mxcmmc.c:296:51: error: expected ‘)’ before ‘;’ token
>>>    void *buf = kmap_atomic(sg_page(sg) + sg->offset;
>>>                                                    ^
>>> drivers/mmc/host/mxcmmc.c:299:1: error: expected ‘,’ or ‘;’ before ‘}’ token
>>>  }
>>>  ^
>>>
>>> Fixes: b189e7589f6d3 ("mmc: mxcmmc: handle highmem pages")
>>> Signed-off-by: Kees Cook <keescook@chromium.org>
>>
>> Thanks, applied for fixes!
>
> I just checked again, and while I see this in linux-next, I would
> expect this to be in 4.18, since this fixes a 4.18-introduced build
> failure for some PPC configurations. Can this please be included in
> 4.18?

Yes it will, I was just about to create a PR for it.

However, I have deliberately slowed down the pace of sending fixes to
Linus, because of trying to achieve a somewhat better test coverage.

If you want to test the latest 4.18 rcs with pending fixes, we have
the pending-fixes branch in Stephen's next tree.

[...]

Kind regards
Uffe

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

end of thread, other threads:[~2018-08-01  9:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12 19:59 [PATCH] mmc: mxcmmc: Fix missing parentheses and brace Kees Cook
2018-07-14  4:16 ` Randy Dunlap
2018-07-16 10:11 ` Ulf Hansson
2018-07-31 20:27   ` Kees Cook
2018-08-01  9:41     ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).