+ if ((ffs(dereg)-1) ap-nr_pmp_links) {
+ /* array start from 0 */
+ link = ap-pmp_link[ffs(dereg)-1];
I'd only call ffs() once - it could be a slow library function.
Any comment should note that ffs() returns 0
] driver/FSL SATA:Fix wrong Device Error Register
usage
+ if ((ffs(dereg)-1) ap-nr_pmp_links) {
+ /* array start from 0 */
+ link = ap-pmp_link[ffs(dereg)-1];
I'd only call ffs() once - it could be a slow library
] driver/FSL SATA:Fix wrong Device Error Register
usage
+ if ((ffs(dereg)-1) ap-nr_pmp_links) {
+ /* array start from 0 */
+ link = ap-pmp_link[ffs(dereg)-1];
I'd only call ffs() once - it could be a slow library