tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Inter-driver #if dependencies



On 17/05/15 22:40, Paul Goyette wrote:
My crusade for modularity has arrived at the pcppi(4) driver, and I've
discovered that there are a number of places in the code where a #if is
used to determine whether or not some _other_ driver is available to
provide certain routines.  For pcppi(4), these dependencies are for the
attimer(4) and pckbd(4) drivers.  (While I haven't yet gone searching,
I'd be willing to wager that there are other similar examples in other
drivers.)

As you say, you're proposing a solution based on looking at one example and a wager that you'll find more use cases. Furthermore, your message is unclear on if you've implemented your proposal to test that it works even for your single case.

You won the wager in the sense that the problem exists. However, I'm not at all convinced that an abstraction hell via autoconf is the best possible solution (not that I'm convinced that it isn't, either). I suggest analyzing and fixing at at least half a dozen cases in the tree before proposing a general solution. For example scsi/ata/wd/sd/usb is a good place to look at.

If you want to solve the problem just for one driver cluster, that's more than fine, but you don't need a halfway general solution for that.

Home | Main Index | Thread Index | Old Index