Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low
@ 2026-10-12 15:04 Sang-Heon Jeon
  2026-10-12 15:09 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sang-Heon Jeon @ 2026-10-12 15:04 UTC (permalink / raw)
  To: Alexander Gordeev, Heiko Carstens, Vasily Gorbik
  Cc: Christian Borntraeger, linux-s390, Sven Schnelle

memblock_alloc_low() returns zeroed memory, so the memset after the
allocation in sclp_early_get_core_info() is redundant.

So remove the memset.

No functional change.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
 drivers/s390/char/sclp_early.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c
index 22dd797e6229..821b61727d1f 100644
--- a/drivers/s390/char/sclp_early.c
+++ b/drivers/s390/char/sclp_early.c
@@ -138,7 +138,6 @@ int __init sclp_early_get_core_info(struct sclp_core_info *info)
 	if (!sccb)
 		return -ENOMEM;
 
-	memset(sccb, 0, length);
 	sccb->header.length = length;
 	sccb->header.control_mask[2] = 0x80;
 	if (sclp_early_cmd(SCLP_CMDW_READ_CPU_INFO, sccb)) {

base-commit: 9fd7fca66735307fd7afa3450882a55ef80f2add
-- 
2.43.0


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

* Re: [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low
  2026-10-12 15:04 [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low Sang-Heon Jeon
@ 2026-10-12 15:09 ` sashiko-bot
  2026-10-12 15:18 ` Alexander Gordeev
  2026-10-13  9:05 ` Heiko Carstens
  2 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-10-12 15:09 UTC (permalink / raw)
  To: Sang-Heon Jeon
  Cc: Alexander Gordeev, Heiko Carstens, Christian Borntraeger,
	linux-s390, Vasily Gorbik

> memblock_alloc_low() returns zeroed memory, so the memset after the
> allocation in sclp_early_get_core_info() is redundant.
> 
> So remove the memset.
> 
> No functional change.
> 
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261012150404.555918-1-ekffu200098@gmail.com?part=1


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

* Re: [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low
  2026-10-12 15:04 [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low Sang-Heon Jeon
  2026-10-12 15:09 ` sashiko-bot
@ 2026-10-12 15:18 ` Alexander Gordeev
  2026-10-13  1:50   ` Sang-Heon Jeon
  2026-10-13  9:05 ` Heiko Carstens
  2 siblings, 1 reply; 5+ messages in thread
From: Alexander Gordeev @ 2026-10-12 15:18 UTC (permalink / raw)
  To: Sang-Heon Jeon
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-s390,
	Sven Schnelle

On Tue, Oct 13, 2026 at 12:04:02AM +0900, Sang-Heon Jeon wrote:
> memblock_alloc_low() returns zeroed memory, so the memset after the
> allocation in sclp_early_get_core_info() is redundant.
> 
> So remove the memset.
> 
> No functional change.

Well, actually there is :)

> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---
>  drivers/s390/char/sclp_early.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c
> index 22dd797e6229..821b61727d1f 100644
> --- a/drivers/s390/char/sclp_early.c
> +++ b/drivers/s390/char/sclp_early.c
> @@ -138,7 +138,6 @@ int __init sclp_early_get_core_info(struct sclp_core_info *info)
>  	if (!sccb)
>  		return -ENOMEM;
>  
> -	memset(sccb, 0, length);
>  	sccb->header.length = length;
>  	sccb->header.control_mask[2] = 0x80;
>  	if (sclp_early_cmd(SCLP_CMDW_READ_CPU_INFO, sccb)) {

Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>

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

* Re: [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low
  2026-10-12 15:18 ` Alexander Gordeev
@ 2026-10-13  1:50   ` Sang-Heon Jeon
  0 siblings, 0 replies; 5+ messages in thread
From: Sang-Heon Jeon @ 2026-10-13  1:50 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-s390,
	Sven Schnelle

2026년 10월 13일 (화) 오전 12:18, Alexander Gordeev <agordeev@linux.ibm.com>님이 작성:
>
> On Tue, Oct 13, 2026 at 12:04:02AM +0900, Sang-Heon Jeon wrote:
> > memblock_alloc_low() returns zeroed memory, so the memset after the
> > allocation in sclp_early_get_core_info() is redundant.
> >
> > So remove the memset.
> >
> > No functional change.
>
> Well, actually there is :)

Yeah, really haha :)

> > Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> > ---
> >  drivers/s390/char/sclp_early.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c
> > index 22dd797e6229..821b61727d1f 100644
> > --- a/drivers/s390/char/sclp_early.c
> > +++ b/drivers/s390/char/sclp_early.c
> > @@ -138,7 +138,6 @@ int __init sclp_early_get_core_info(struct sclp_core_info *info)
> >       if (!sccb)
> >               return -ENOMEM;
> >
> > -     memset(sccb, 0, length);
> >       sccb->header.length = length;
> >       sccb->header.control_mask[2] = 0x80;
> >       if (sclp_early_cmd(SCLP_CMDW_READ_CPU_INFO, sccb)) {
>
> Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>

Thanks for reviewing!

Best regards,
Sang-Heon Jeon

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

* Re: [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low
  2026-10-12 15:04 [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low Sang-Heon Jeon
  2026-10-12 15:09 ` sashiko-bot
  2026-10-12 15:18 ` Alexander Gordeev
@ 2026-10-13  9:05 ` Heiko Carstens
  2 siblings, 0 replies; 5+ messages in thread
From: Heiko Carstens @ 2026-10-13  9:05 UTC (permalink / raw)
  To: Sang-Heon Jeon
  Cc: Alexander Gordeev, Vasily Gorbik, Christian Borntraeger,
	linux-s390, Sven Schnelle

On Tue, Oct 13, 2026 at 12:04:02AM +0900, Sang-Heon Jeon wrote:
> memblock_alloc_low() returns zeroed memory, so the memset after the
> allocation in sclp_early_get_core_info() is redundant.
> 
> So remove the memset.
> 
> No functional change.
> 
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---
>  drivers/s390/char/sclp_early.c | 1 -
>  1 file changed, 1 deletion(-)

Applied, thanks!

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

end of thread, other threads:[~2026-10-13  9:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 15:04 [PATCH] s390/sclp: Remove redundant memset after memblock_alloc_low Sang-Heon Jeon
2026-10-12 15:09 ` sashiko-bot
2026-10-12 15:18 ` Alexander Gordeev
2026-10-13  1:50   ` Sang-Heon Jeon
2026-10-13  9:05 ` Heiko Carstens

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