Re: [PATCH 12/12] sata_mv NCQ-EH for FIS-based switching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



By the way.  If anyone can point out an existing EXPORTed
"count number of one bits" in a word function, then I'll very happily
submit a followup patch to remove this (below) and use that instead.

..
+static int mv_count_pmp_links(unsigned int pmp_map)
+{
+    unsigned int link_count = 0;
+
+    while (pmp_map) {
+        link_count += (pmp_map & 1);
+        pmp_map >>= 1;
+    }
+    return link_count;
+}
..

I grepped for one, but didn't find one.
But there must be several of them already out there (?)
Speed is unimportant here, so this version above
has been left simple -- no table lookups.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux