Skip to contentSkip to conversation

sh: mm: Fix build error

PATCH In review Guenter Roeck 3 participants 3 messages Apr 13, 2020 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: mm: Fix build error

415 | if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)

      |     ^

arch/sh/mm/init.c:424:1: error: expected expression before '}' token
424 | }

Obviously never even compile tested.

Fixes a332976e0184 ("mm/memory_hotplug: add pgprot_t to mhp_params")
Cc Logan Gunthorpe <[email protected]>
Cc Stephen Rothwell <[email protected]>
---
 arch/sh/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/mm/init.c +1 -1
index b9de2d4fa57e..8d2a68aea1fc 100644
@@ -412,7 +412,7 @@ int arch_add_memory(int nid, u64 start, u64 size,
 	unsigned long nr_pages = size >> PAGE_SHIFT;
 	int ret;
 
-	if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)
+	if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
 		return -EINVAL;
 
 	/* We only have ZONE_NORMAL, so this is easy.. */
Signature · 1 line
2.17.1
#1 lore raw

Hi Guenter,

Quoted 32 lines · On Mon, 13 Apr 2020 09:15:42 -0700 Guenter Roeck <[email protected]> wrote:

415 | if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)

      |     ^

arch/sh/mm/init.c:424:1: error: expected expression before '}' token
424 | }

Obviously never even compile tested.

Fixes a332976e0184 ("mm/memory_hotplug: add pgprot_t to mhp_params")
Cc Logan Gunthorpe <[email protected]>
Cc Stephen Rothwell <[email protected]>
---
 arch/sh/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/mm/init.c +1 -1
index b9de2d4fa57e..8d2a68aea1fc 100644
@@ -412,7 +412,7 @@ int arch_add_memory(int nid, u64 start, u64 size,
 	unsigned long nr_pages = size >> PAGE_SHIFT;
 	int ret;
 
-	if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)
+	if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
 		return -EINVAL;
 
 	/* We only have ZONE_NORMAL, so this is easy.. */
Signature · 1 line
2.17.1

I'll put this in my fixes tree until someone else picks it up. Now that the patch has reached Linus' tree (and its SHA1 is stable), the Fixes line should be

Fixes bfeb022f8fe4 ("mm/memory_hotplug: add pgprot_t to mhp_params")
Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
Quoted 5 lines · Stephen Rothwell

I'll put this in my fixes tree until someone else picks it up. Now that the patch has reached Linus' tree (and its SHA1 is stable), the Fixes line should be

Fixes bfeb022f8fe4 ("mm/memory_hotplug: add pgprot_t to mhp_params")

Masahiroy already sent a fix for this that Andrew has picked up:

http://lkml.kernel.org/r/[email protected]

Logan