From: Harvey Harrison Avoids lots of these, also is more readable. include/linux/libata.h:1210:13: warning: potentially expensive pointer subtraction Change the subtraction to addition on the other side of the comparison. Thanks to Christer Weinigel for the suggestion. Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton --- include/linux/libata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN include/linux/libata.h~ata-fix-sparse-warning-in-libatah include/linux/libata.h --- a/include/linux/libata.h~ata-fix-sparse-warning-in-libatah +++ a/include/linux/libata.h @@ -1207,7 +1207,7 @@ static inline struct ata_link *ata_port_ return ap->pmp_link; } - if (++link - ap->pmp_link < ap->nr_pmp_links) + if (++link < ap->nr_pmp_links + ap->pmp_link) return link; return NULL; } _