svn commit: r297657 - stable/9/sys/ofed/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Apr 7 07:45:32 UTC 2016
Author: hselasky
Date: Thu Apr 7 07:45:31 2016
New Revision: 297657
URL: https://svnweb.freebsd.org/changeset/base/297657
Log:
MFC r297444:
Fix bugs in currently unused bit searching loop.
Sponsored by: Mellanox Technologies
Modified:
stable/9/sys/ofed/include/linux/bitops.h
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/ofed/include/linux/bitops.h
==============================================================================
--- stable/9/sys/ofed/include/linux/bitops.h Thu Apr 7 07:44:01 2016 (r297656)
+++ stable/9/sys/ofed/include/linux/bitops.h Thu Apr 7 07:45:31 2016 (r297657)
@@ -138,11 +138,11 @@ find_last_bit(unsigned long *addr, unsig
if (mask)
return (bit + __flsl(mask));
}
- while (--pos) {
+ while (pos--) {
addr--;
bit -= BITS_PER_LONG;
if (*addr)
- return (bit + __flsl(mask));
+ return (bit + __flsl(*addr));
}
return (size);
}
More information about the svn-src-stable-9
mailing list