Skip to contentSkip to conversation

x86: hd0_info and hd1_info are obsolete and unused fields

PATCH In review Paolo Pisati 2 participants 2 messages Jul 20, 2015 – Jul 21, 2015 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: hd0_info and hd1_info are obsolete and unused fields

hd0_info and hd1_info are not used anymore, don't reference them in the code

---
 arch/x86/kernel/kexec-bzimage64.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/kernel/kexec-bzimage64.c +0 -4
index 3666a84..c0ae428 100644
@@ -218,10 +218,6 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,
 	/* Default APM info */
 	memset(&params->apm_bios_info, 0, sizeof(params->apm_bios_info));
 
-	/* Default drive info */
-	memset(&params->hd0_info, 0, sizeof(params->hd0_info));
-	memset(&params->hd1_info, 0, sizeof(params->hd1_info));
-
 	if (image->type == KEXEC_TYPE_CRASH) {
 		ret = crash_setup_memmap_entries(image, params);
 		if (ret)
Signature · 1 line
2.1.4
#1 lore raw
Quoted 12 lines · Paolo Pisati

hd0_info and hd1_info are not used anymore, don't reference them in the code

---
 arch/x86/kernel/kexec-bzimage64.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/kernel/kexec-bzimage64.c +0 -0
index 3666a84..c0ae428 100644

arch/x86/kernel/kexec-bzimage64.c setup_boot_parameters(struct kimage *image, struct boot_params *params, · line 223

Quoted 10 lines
arch/x86/kernel/kexec-bzimage64.c +0 -4
@@ -218,10 +218,6 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,
 	/* Default APM info */
 	memset(&params->apm_bios_info, 0, sizeof(params->apm_bios_info));
 
-	/* Default drive info */
-	memset(&params->hd0_info, 0, sizeof(params->hd0_info));
-	memset(&params->hd1_info, 0, sizeof(params->hd1_info));
-
 	if (image->type == KEXEC_TYPE_CRASH) {
 		ret = crash_setup_memmap_entries(image, params);
 		if (ret)

But they are not unused: we pass them to secondary kernel images, via kcrash for example.

So it makes sense to zero out these parameters.

Thanks,

Ingo