Date: Thu, 7 Apr 2016 07:45:31 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r297657 - stable/9/sys/ofed/include/linux Message-ID: <201604070745.u377jVBE082443@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604070745.u377jVBE082443>