Re: [PATCH] 2.5.5-pre1 IDE cleanup 9

From: Martin Dalecki (dalecki@evision-ventures.com)
Date: Fri Feb 22 2002 - 10:12:19 EST


Jeff Garzik wrote:

>>#ifdef CONFIG_BLK_DEV_ALI15X3
>>extern unsigned int pci_init_ali15x3(struct pci_dev *, const char *);
>>...
>>#define PCI_ALI15X3 &pci_init_ali15x3
>>#else
>>...
>>#define PCI_ALI15X3 NULL
>>#endif
>>
>>This should rather look like:
>>
>>#ifdef CONFIG_BLK_DEV_ALI15X3
>>extern unsigned int pci_init_ali15x3(struct pci_dev *);
>>#else
>>#define pci_init_ali15x3 NULL
>>#endif
>>
>
> For what the code is trying to accomplish, the code is correct.

Of course it's semantically correct. But the usage of an explicitly
taken function pointer refference is usually a shure sign for a C
beginner at work. I know and you know that this &xxx == xxx semantics is
a workarount for pure K&R C implementation quriks.

> I agree the above change is also correct... probably the author wanted
> to reduce the size of the -huge- data table where PCI_ALI15X3 symbol is
> used.

Yes but he just didn't recognize that the whole huge list is the true
cause of grief ;-).

>>And be replaces entierly by register_chipset(...) blah blah or
>>therlike ;-) as well as module initialization lists.
>>
>
> When we have "modprobe piix4_ide" loading the IDE subsystem, you are
> correct.

That's the intention yes.

> IDE is currently driven by an inward->outward setup of module
> initialization, which is fundamentally the opposite of what we want,
> which is chipset_drvr -> core initialization.

Just one word: Amen.

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



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:41 EST