Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Apr 2016 07:44:01 +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-10@freebsd.org
Subject:   svn commit: r297656 - stable/10/sys/ofed/include/linux
Message-ID:  <201604070744.u377i14f082338@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604070744.u377i14f082338>