Merge branch 'akpm' (Andrew's patch-bomb)
Merge Andrew's first set of patches: "Non-MM patches: - lots of misc bits - tree-wide have_clk() cleanups - quite a lot of printk tweaks. I draw your attention to "printk: convert the format for KERN_<LEVEL> to a 2 byte pattern" which looks a bit scary. But afaict it's solid. - backlight updates - lib/ feature work (notably the addition and use of memweight()) - checkpatch updates - rtc updates - nilfs updates - fatfs updates (partial, still waiting for acks) - kdump, proc, fork, IPC, sysctl, taskstats, pps, etc - new fault-injection feature work" * Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (128 commits) drivers/misc/lkdtm.c: fix missing allocation failure check lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table() fault-injection: add tool to run command with failslab or fail_page_alloc fault-injection: add selftests for cpu and memory hotplug powerpc: pSeries reconfig notifier error injection module memory: memory notifier error injection module PM: PM notifier error injection module cpu: rewrite cpu-notifier-error-inject module fault-injection: notifier error injection c/r: fcntl: add F_GETOWNER_UIDS option resource: make sure requested range is included in the root range include/linux/aio.h: cpp->C conversions fs: cachefiles: add support for large files in filesystem caching pps: return PTR_ERR on error in device_create taskstats: check nla_reserve() return sysctl: suppress kmemleak messages ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION ipc: compat: use signed size_t types for msgsnd and msgrcv ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC ipc: add COMPAT_SHMLBA support ...
This commit is contained in:
@@ -571,16 +571,6 @@ static void disk_dtr(struct dm_dirty_log *log)
|
||||
destroy_log_context(lc);
|
||||
}
|
||||
|
||||
static int count_bits32(uint32_t *addr, unsigned size)
|
||||
{
|
||||
int count = 0, i;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
count += hweight32(*(addr+i));
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static void fail_log_device(struct log_c *lc)
|
||||
{
|
||||
if (lc->log_dev_failed)
|
||||
@@ -629,7 +619,8 @@ static int disk_resume(struct dm_dirty_log *log)
|
||||
|
||||
/* copy clean across to sync */
|
||||
memcpy(lc->sync_bits, lc->clean_bits, size);
|
||||
lc->sync_count = count_bits32(lc->clean_bits, lc->bitset_uint32_count);
|
||||
lc->sync_count = memweight(lc->clean_bits,
|
||||
lc->bitset_uint32_count * sizeof(uint32_t));
|
||||
lc->sync_search = 0;
|
||||
|
||||
/* set the correct number of regions in the header */
|
||||
|
Reference in New Issue
Block a user