svn commit: r297656 - stable/10/sys/ofed/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Apr 7 07:44:03 UTC 2016
Author: hselasky
Date: Thu Apr 7 07:44:01 2016
New Revision: 297656
URL: https://svnweb.freebsd.org/changeset/base/297656
Log:
MFC r297444:
Fix bugs in currently unused bit searching loop.
Sponsored by: Mellanox Technologies
Modified:
stable/10/sys/ofed/include/linux/bitops.h
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/ofed/include/linux/bitops.h
==============================================================================
--- stable/10/sys/ofed/include/linux/bitops.h Thu Apr 7 07:41:06 2016 (r297655)
+++ stable/10/sys/ofed/include/linux/bitops.h Thu Apr 7 07:44:01 2016 (r297656)
@@ -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
mailing list