Thread (2 messages) 2 messages, 2 authors, 2011-03-08

RE: [PATCH][v2] driver/FSL SATA:Fix wrong Device Error Register usage

From: David Laight <hidden>
Date: 2011-03-08 11:42:07
Also in: linux-ide

=20
 Case when ffs return will never arise.This scenario is=20
already been discussed
 on linuxppc-dev@lists.ozlabs.org. Please see below explanation:
 sata_fsl_error_intr() is called during device error.The=20
mentioned scenario
 will never comes. It can be observed via code:-
        if (cereg) {   --> cereg is set on command error.=20
Means there is at least 1 device present.
This all relies on the hardware working properly, and
nothing else accidentally clearing the device 'error'
bit mask.

Being slightly defensive when the out of range value
causes an array subscript error seems sensible.

It isn't as though the code size or execution time
matters here.

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help