2007-02-24 14:08:53

by Heikki Orsila

[permalink] [raw]
Subject: [PATCH] scsi: eata.c potential namespace collision and optimisation

This fixes a potential namespace collision and does an optimisation for
2.6.20 drivers/scsi/eata.c:

* sort() is renamed to eata_sort() to avoid conflict with kernel
proper sort(). It does _not_ conflict currently in 2.6.20 so
this is a pre-emptive change.

* in eata_sort(), one if-condition per loop iteration is avoided
by moving the comparison out of the loop

Warning: The patch compiles but is not tested with real hardware since I
don't have the card.

diffstat:
eata.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

Signed-off-by: Heikki Orsila <[email protected]>

--
Heikki Orsila Barbie's law:
[email protected] "Math is hard, let's go shopping!"
http://www.iki.fi/shd


Attachments:
(No filename) (737.00 B)
2.6.20-eata-namespace.diff (1.51 kB)
Download all attachments