Re: [PATCH v2]ipmi:ipmi_si_intf.c Fix warning: variable 'addr_space' set but not used

From: Sergey V.
Date: Tue Jul 06 2010 - 14:13:33 EST


On Tuesday 06 of July 2010 21:15:44 Justin P. Mattock wrote:
> This is version two of fixing a warning message generated by GCC
> CC [M] drivers/char/ipmi/ipmi_si_intf.o
> drivers/char/ipmi/ipmi_si_intf.c: In function 'try_init_spmi':
> drivers/char/ipmi/ipmi_si_intf.c:2016:8: warning: variable 'addr_space' set
but not used
>
> And also updates a broken web address.
>
> Signed-off-by: Justin P. Mattock <justinmattock@xxxxxxxxx>
>
> ---

Hello Justin.

[...]
> @@ -2021,10 +2020,6 @@ static __devinit int try_init_spmi(struct SPMITable
*spmi)
> }
>
> if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
> - addr_space = IPMI_MEM_ADDR_SPACE;
> - else
> - addr_space = IPMI_IO_ADDR_SPACE;
> -
> info = kzalloc(sizeof(*info), GFP_KERNEL);
> if (!info) {
> printk(KERN_ERR PFX "Could not allocate SI data (3)\n");

This looks like after applying this patch 'info = ...' will be part of
if statement (without indent before 'info = ...')

if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
info = kzalloc(sizeof(*info), GFP_KERNEL);

It's correct?

Thanks

> --
> 1.7.1.rc1.21.gf3bd6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/