Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ipmi/ipmi_smbios.c
Context not available. | |||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/selinfo.h> | #include <sys/selinfo.h> | ||||
#include <sys/efi.h> | |||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/pmap.h> | #include <vm/pmap.h> | ||||
Context not available. | |||||
static void | static void | ||||
ipmi_smbios_probe(struct ipmi_get_info *info) | ipmi_smbios_probe(struct ipmi_get_info *info) | ||||
{ | { | ||||
#ifdef ARCH_MAY_USE_EFI | |||||
struct uuid efi_smbios = EFI_TABLE_SMBIOS; | |||||
dab: style(9) discourages initialization of variables in their declaration, so the initialization… | |||||
void *addr_efi; | |||||
#endif | |||||
struct smbios_eps *header; | struct smbios_eps *header; | ||||
void *table; | void *table; | ||||
u_int32_t addr; | u_int32_t addr = 0; | ||||
dabUnsubmitted Done Inline Actionsstyle(9) discourages initialization of variables in their declaration, so this would be preferred: u_int32_t addr; addr = 0; dab: style(9) discourages initialization of variables in their declaration, so this would be… | |||||
bzero(info, sizeof(struct ipmi_get_info)); | bzero(info, sizeof(struct ipmi_get_info)); | ||||
/* Find the SMBIOS table header. */ | #ifdef ARCH_MAY_USE_EFI | ||||
dabUnsubmitted Done Inline ActionsInitialize efi_smbios here: efi_smbios = EFI_TABLE_SMBIOS; dab: Initialize `efi_smbios` here:
```
efi_smbios = EFI_TABLE_SMBIOS;
``` | |||||
addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN, | if (!efi_get_table(&efi_smbios, &addr_efi)) | ||||
SMBIOS_STEP, SMBIOS_OFF); | addr = (vm_paddr_t)addr_efi; | ||||
#endif | |||||
if (addr == 0) | |||||
/* Find the SMBIOS table header. */ | |||||
addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN, | |||||
SMBIOS_STEP, SMBIOS_OFF); | |||||
if (addr == 0) | if (addr == 0) | ||||
return; | return; | ||||
Context not available. |
style(9) discourages initialization of variables in their declaration, so the initialization here should be dropped and moved to inside the condition compilation block at line 164: