Skip to content

Commit

Permalink
Merge branch 'akpm' (incoming from Andrew Morton)
Browse files Browse the repository at this point in the history
Merge misc fixes from Andrew Morton:
 "21 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
  mm/balloon_compaction: fix deflation when compaction is disabled
  sh: fix sh770x SCIF memory regions
  zram: avoid NULL pointer access in concurrent situation
  mm/slab_common: don't check for duplicate cache names
  ocfs2: fix d_splice_alias() return code checking
  mm: rmap: split out page_remove_file_rmap()
  mm: memcontrol: fix missed end-writeback page accounting
  mm: page-writeback: inline account_page_dirtied() into single caller
  lib/bitmap.c: fix undefined shift in __bitmap_shift_{left|right}()
  drivers/rtc/rtc-bq32k.c: fix register value
  memory-hotplug: clear pgdat which is allocated by bootmem in try_offline_node()
  drivers/rtc/rtc-s3c.c: fix initialization failure without rtc source clock
  kernel/kmod: fix use-after-free of the sub_info structure
  drivers/rtc/rtc-pm8xxx.c: rework to support pm8941 rtc
  mm, thp: fix collapsing of hugepages on madvise
  drivers: of: add return value to of_reserved_mem_device_init()
  mm: free compound page with correct order
  gcov: add ARM64 to GCOV_PROFILE_ALL
  fsnotify: next_i is freed during fsnotify_unmount_inodes.
  mm/compaction.c: avoid premature range skip in isolate_migratepages_range
  ...
  • Loading branch information
Linus Torvalds committed Oct 29, 2014
2 parents d506aa6 + 4d88e6f commit a7ca10f
Show file tree
Hide file tree
Showing 27 changed files with 394 additions and 349 deletions.
6 changes: 3 additions & 3 deletions arch/sh/kernel/cpu/sh3/setup-sh770x.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static struct plat_sci_port scif0_platform_data = {
};

static struct resource scif0_resources[] = {
DEFINE_RES_MEM(0xfffffe80, 0x100),
DEFINE_RES_MEM(0xfffffe80, 0x10),
DEFINE_RES_IRQ(evt2irq(0x4e0)),
};

Expand All @@ -143,7 +143,7 @@ static struct plat_sci_port scif1_platform_data = {
};

static struct resource scif1_resources[] = {
DEFINE_RES_MEM(0xa4000150, 0x100),
DEFINE_RES_MEM(0xa4000150, 0x10),
DEFINE_RES_IRQ(evt2irq(0x900)),
};

Expand All @@ -169,7 +169,7 @@ static struct plat_sci_port scif2_platform_data = {
};

static struct resource scif2_resources[] = {
DEFINE_RES_MEM(0xa4000140, 0x100),
DEFINE_RES_MEM(0xa4000140, 0x10),
DEFINE_RES_IRQ(evt2irq(0x880)),
};

Expand Down
3 changes: 2 additions & 1 deletion drivers/base/dma-contiguous.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages,
#undef pr_fmt
#define pr_fmt(fmt) fmt

static void rmem_cma_device_init(struct reserved_mem *rmem, struct device *dev)
static int rmem_cma_device_init(struct reserved_mem *rmem, struct device *dev)
{
dev_set_cma_area(dev, rmem->priv);
return 0;
}

static void rmem_cma_device_release(struct reserved_mem *rmem,
Expand Down
10 changes: 6 additions & 4 deletions drivers/block/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ static ssize_t mem_used_total_show(struct device *dev,
{
u64 val = 0;
struct zram *zram = dev_to_zram(dev);
struct zram_meta *meta = zram->meta;

down_read(&zram->init_lock);
if (init_done(zram))
if (init_done(zram)) {
struct zram_meta *meta = zram->meta;
val = zs_get_total_pages(meta->mem_pool);
}
up_read(&zram->init_lock);

return scnprintf(buf, PAGE_SIZE, "%llu\n", val << PAGE_SHIFT);
Expand Down Expand Up @@ -173,16 +174,17 @@ static ssize_t mem_used_max_store(struct device *dev,
int err;
unsigned long val;
struct zram *zram = dev_to_zram(dev);
struct zram_meta *meta = zram->meta;

err = kstrtoul(buf, 10, &val);
if (err || val != 0)
return -EINVAL;

down_read(&zram->init_lock);
if (init_done(zram))
if (init_done(zram)) {
struct zram_meta *meta = zram->meta;
atomic_long_set(&zram->stats.max_used_pages,
zs_get_total_pages(meta->mem_pool));
}
up_read(&zram->init_lock);

return len;
Expand Down
14 changes: 9 additions & 5 deletions drivers/of/of_reserved_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,23 +243,27 @@ static inline struct reserved_mem *__find_rmem(struct device_node *node)
* This function assign memory region pointed by "memory-region" device tree
* property to the given device.
*/
void of_reserved_mem_device_init(struct device *dev)
int of_reserved_mem_device_init(struct device *dev)
{
struct reserved_mem *rmem;
struct device_node *np;
int ret;

np = of_parse_phandle(dev->of_node, "memory-region", 0);
if (!np)
return;
return -ENODEV;

rmem = __find_rmem(np);
of_node_put(np);

if (!rmem || !rmem->ops || !rmem->ops->device_init)
return;
return -EINVAL;

ret = rmem->ops->device_init(rmem, dev);
if (ret == 0)
dev_info(dev, "assigned reserved memory node %s\n", rmem->name);

rmem->ops->device_init(rmem, dev);
dev_info(dev, "assigned reserved memory node %s\n", rmem->name);
return ret;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ config RTC_DRV_LPC32XX

config RTC_DRV_PM8XXX
tristate "Qualcomm PMIC8XXX RTC"
depends on MFD_PM8XXX
depends on MFD_PM8XXX || MFD_SPMI_PMIC
help
If you say yes here you get support for the
Qualcomm PMIC8XXX RTC.
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-bq32k.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static int trickle_charger_of_init(struct device *dev, struct device_node *node)
dev_err(dev, "bq32k: diode and resistor mismatch\n");
return -EINVAL;
}
reg = 0x25;
reg = 0x45;
break;

default:
Expand Down
Loading

0 comments on commit a7ca10f

Please sign in to comment.