Re: [PATCH 1/2] pata_legacy: export functionality to ide

From: Alan Cox
Date: Sun Aug 03 2008 - 11:40:14 EST


> conventions, it is still the best one considering the other possibilities:
>
> a) code duplication: dumb idea, bloated kernel for no reason

I think you might want to start somewhere else if that worries you. Its
also a mostly bogus reasoning as almost nobody builds with both, in fact
you have to be pretty careful if you do that or it all falls over in a
heap.

For previous cases (eg ide timing) it has actually made more sense to
split the code. The moment you get future different behaviour between
libata and old IDE on any of these devices the sharing will just break
again (eg if one or the other drops chipset support for one of those
devices or adds one for another device)

> b) evil Kconfig SELECT pulling in core libata just so that ide might be calling
> a function or two.

That would be stunningly dumb. I happen to think we have developers whose
minds extent to adding libata-common.c and pulling in a single file if we
do that. Yes people have the past done stupid stuff like pulling all of
CONFIG_IDE in for a single USB device but that was because nobody noticed
and fixed it promptly not because it was a good idea.

Alan
--
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/