public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD)
@ 2019-03-07 23:51 Joe Perches
  2019-03-08  7:08 ` Martin Schwidefsky
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2019-03-07 23:51 UTC (permalink / raw)
  To: Martin Schwidefsky, Heiko Carstens; +Cc: linux-s390, LKML

IS_ENABLED should generally use CONFIG_ prefaced symbols and
it doesn't appear as if there is a BLK_DEV_INITRD define.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/s390/boot/mem_detect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c
index 4cb771ba13fa..5d316fe40480 100644
--- a/arch/s390/boot/mem_detect.c
+++ b/arch/s390/boot/mem_detect.c
@@ -25,7 +25,7 @@ static void *mem_detect_alloc_extended(void)
 {
 	unsigned long offset = ALIGN(mem_safe_offset(), sizeof(u64));
 
-	if (IS_ENABLED(BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
+	if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
 	    INITRD_START < offset + ENTRIES_EXTENDED_MAX)
 		offset = ALIGN(INITRD_START + INITRD_SIZE, sizeof(u64));
 

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

* Re: [PATCH] s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD)
  2019-03-07 23:51 [PATCH] s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) Joe Perches
@ 2019-03-08  7:08 ` Martin Schwidefsky
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2019-03-08  7:08 UTC (permalink / raw)
  To: Joe Perches; +Cc: Heiko Carstens, linux-s390, LKML

On Thu, 07 Mar 2019 15:51:45 -0800
Joe Perches <joe@perches.com> wrote:

> IS_ENABLED should generally use CONFIG_ prefaced symbols and
> it doesn't appear as if there is a BLK_DEV_INITRD define.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  arch/s390/boot/mem_detect.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c
> index 4cb771ba13fa..5d316fe40480 100644
> --- a/arch/s390/boot/mem_detect.c
> +++ b/arch/s390/boot/mem_detect.c
> @@ -25,7 +25,7 @@ static void *mem_detect_alloc_extended(void)
>  {
>  	unsigned long offset = ALIGN(mem_safe_offset(), sizeof(u64));
> 
> -	if (IS_ENABLED(BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
> +	if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
>  	    INITRD_START < offset + ENTRIES_EXTENDED_MAX)
>  		offset = ALIGN(INITRD_START + INITRD_SIZE, sizeof(u64));
> 
> 

With more than the 255 embedded entries and a initrd that sits in the
wrong location that would have resulted in a corrupted ramdisk.
Nice catch, thanks. I'll add the patch to my queue.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

end of thread, other threads:[~2019-03-08  7:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-07 23:51 [PATCH] s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) Joe Perches
2019-03-08  7:08 ` Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox