Re: [PATCH 10/16] gdth: gdth_get_status() return pointer to host not its index

Christoph Hellwig
2007-09-30T21:26:36Z

On Sun, Sep 30, 2007 at 10:09:20PM +0200, Boaz Harrosh wrote:
>
> - Return the interrupting host and not it's index.
> NULL if intr is not by gdth.
> - fix calling site
>
> FIXME:
> Why are we looping on all cards? the passed dev_id
> can be used for pinpointing the exact interrupting
> card. The kernel is already looping on all sharing
> cards so this code makes it O(n^2).

This is just pre-historic code that makes no sense whatover in a modern
kernel. I'd much prefer to stop doing this and use dev_id properly.

> What is that polling mode? can we pass dev_id to
> gdth_get_status() and do a poll only if dev_id is
> NULL?

Just loop over all host adapters in gdth_wait instead and pass in the
ha pointer.