s390/sclp: Remove redundant memset after memblock_alloc_low
PATCH 1/1 s390/sclp: Remove redundant memset after memblock_alloc_low
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.
--- drivers/s390/char/sclp_early.c | 1 - 1 file changed, 1 deletion(-)
drivers/s390/char/sclp_early.c +0 -1
@@ -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
Signature · 1 line
2.43.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 8 lines
memblock_alloc_low()returns zeroed memory, so the memset after the allocation insclp_early_get_core_info()is redundant.So remove the memset.
No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 6 lines · Sang-Heon Jeon
memblock_alloc_low()returns zeroed memory, so the memset after the allocation insclp_early_get_core_info()is redundant.So remove the memset.
No functional change.
Well, actually there is :)
Quoted 10 lines
Signed-off-by Sang-Heon Jeon <[email protected]>--- drivers/s390/char/sclp_early.c | 1 - 1 file changed, 1 deletion(-)drivers/s390/char/sclp_early.c +0
-0
drivers/s390/char/sclp_early.c int __init sclp_early_get_core_info(struct sclp_core_info *info) · line 143
Quoted 7 lines
drivers/s390/char/sclp_early.c +0
-1@@ -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)) {
2026년 10월 13일 (화) 오전 12:18, Alexander Gordeev <[email protected]>님이 작성:
Quoted 10 lines · Sang-Heon Jeon
Quoted 6 lines
memblock_alloc_low()returns zeroed memory, so the memset after the allocation insclp_early_get_core_info()is redundant.So remove the memset.
No functional change.
Well, actually there is :)
Yeah, really haha :)
Quoted 13 lines
Quoted 13 lines
Signed-off-by Sang-Heon Jeon <[email protected]>--- drivers/s390/char/sclp_early.c | 1 - 1 file changed, 1 deletion(-)drivers/s390/char/sclp_early.c +0
-0@@ -138,7 +138,6 @@ int __init sclp_early_get_core_info(struct sclp_core_info *info)if (!sccb)return -ENOMEM ;
Quoted 6 lines
drivers/s390/char/sclp_early.c int __init sclp_early_get_core_info(struct sclp_core_info *info) · line 143
Quoted 4 lines
drivers/s390/char/sclp_early.c +0
-1-memset (sccb,0 , length); sccb->header.length = length; sccb->header.control_mask[2 ] =0x80 ;if (sclp_early_cmd (SCLP_CMDW_READ_CPU_INFO , sccb)) {
Thanks for reviewing!
Best regards,
Sang-Heon Jeon
Quoted 11 lines · Sang-Heon Jeon
memblock_alloc_low()returns zeroed memory, so the memset after the allocation insclp_early_get_core_info()is redundant.So remove the memset.
No functional change.
Signed-off-by Sang-Heon Jeon <[email protected]>--- drivers/s390/char/sclp_early.c | 1 - 1 file changed, 1 deletion(-)
Applied, thanks!