On Monday 30 January 2006 08:04, Tejun Heo wrote:I object. Using array is intentional. Slave aware controllers (PATA / ata_piix) will use [0..1], most SATA controllers will use only [0], and PM aware ones will use [0..15]. The intention was requiring low level drivers of only what they know and normalize them in the core layer.But what you pass along is basically an unbounded array, which is
eg. Current std SATA reset routines consider the argument as *class (a single class value) and it's intentional. As long as a lldd is aware of only one device per port, it's allowed/recommeded to consider the passed classes argument as a pointer to single class value. The rest is upto the core libata layer.
a bug waiting to happen.
So please let the core layer pass a bounded array here or provide
a function from core layer to set that and check the index.