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

2011-02-18 Thread David Laight
+ 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

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

2011-02-18 Thread Kushwaha Prabhakar-B32579
] 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

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

2011-02-18 Thread Kushwaha Prabhakar-B32579
] 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