Skip to contentSkip to conversation

mmc: mxcmmc: Fix missing parentheses and brace

PATCH Applied Kees Cook 3 participants 5 messages Jul 12, 2018 – Aug 1, 2018

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 mmc: mxcmmc: Fix missing parentheses and brace

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")
---
 drivers/mmc/host/mxcmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/mxcmmc.c +2 -1
index 75f781c11e89..de4e6e5bf304 100644
@@ -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) {}
Signature · 6 lines
2.17.1


-- 
Kees Cook
Pixel Security
Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Kees Cook

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

Quoted 8 lines
   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")

Thanks.

Quoted 21 lines
---
 drivers/mmc/host/mxcmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/mxcmmc.c +2 -1
index 75f781c11e89..de4e6e5bf304 100644
@@ -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) {}
Signature · 1 line
~Randy
Applied
#2 lore raw
In reply to Kees Cook
Quoted 5 lines · Kees Cook

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

Quoted 8 lines
   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")

Thanks, applied for fixes!

Kind regards
Uffe

Quoted 27 lines
---
 drivers/mmc/host/mxcmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/mxcmmc.c +2 -2
index 75f781c11e89..de4e6e5bf304 100644
@@ -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

author
#3 lore raw
Quoted 12 lines · Ulf Hansson
Quoted 11 lines · Kees Cook

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
}
^

Quoted 4 lines
Quoted 2 lines
Fixes b189e7589f6d3 ("mmc: mxcmmc: handle highmem pages")

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

Quoted 31 lines

Kind regards
Uffe

Quoted 27 lines
---
 drivers/mmc/host/mxcmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/mxcmmc.c +2 -2
index 75f781c11e89..de4e6e5bf304 100644
@@ -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

Signature · 2 lines
Kees Cook
Pixel Security
#4 lore raw
Quoted 16 lines · Kees Cook
Quoted 15 lines · Ulf Hansson
Quoted 13 lines · Kees Cook

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")
Quoted 6 lines
Quoted 1 line

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