tech-kern archive

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

Re: Inter-driver #if dependencies



On 18/05/15 01:02, Paul Goyette wrote:
On Mon, 18 May 2015, Antti Kantee wrote:

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.

I'm certainly willing to implement the mechanism, as a proof-of-concept,
for the pcppi/attimer/pckbd cluster, if there's a reasonable chance of
the effort being useful.

I'm certainly not willing to spend the next 6 months (or more) of my
life "analyzing and fixing at least half a dozen cases" without some
encouragement that the effort won't be wasted.

If you've actually got some constructive feedback on my suggestion,
please provide it.

Is giving pointers to related use cases that you're in your own words not aware of not constructive?

"If you want to solve the problem just for one driver cluster, that's more than fine". In other words, if you don't want to spend effort on a general solution, implement what you need privately in pcppi land. Everyone still wins and will be thankful your efforts, unlike in the event of a haphazardly researched autoconf interface. There's no need to start making a list of things that you're not willing to do.

Home | Main Index | Thread Index | Old Index