Re: [PATCH 1/6 v2] ARM: Add basic architecture support forVIA/WonderMedia 85xx SoC's

From: Alexey Charkov
Date: Sun Nov 07 2010 - 12:16:28 EST


2010/11/7 Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx>:
> A couple of other points - sorry, should've been in the last mail.
>
> On Sun, Nov 07, 2010 at 07:28:52PM +0300, Alexey Charkov wrote:
>> diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
>> new file mode 100644
>> index 0000000..e0c6268
>> --- /dev/null
>> +++ b/arch/arm/mach-vt8500/Kconfig
>> @@ -0,0 +1,65 @@
>> +if ARCH_VT8500
>> +
>> +config VTWM_VERSION_VT8500
>> + Â Â bool
>> + Â Â default n
>
> n is the default anyway, so specifying this is redundant.
>

Great, I'll drop it then.

>> +void __init bv07_init(void)
>> +{
>> +#ifdef CONFIG_FB_VT8500
>> + Â Â void __iomem *gpio_mux_reg = ioremap(wmt_current_regs->gpio
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â+ 0x200, 4);
>
> ioremap() is generally regarded as a function which can fail, and therefore
> needs its return value checked. ÂThere seems to be multiple instances of
> this through this patch.
>

Is it OK to simply skip the code that uses the relevant pointer if
ioremap fails (possibly issuing an error via printk)? The problem is
that these are void functions, so I can't just return -ENODEV on
failure.
--
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/