Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1419007 > unrolled thread
| Started by | chengang@emindsoft.com.cn |
|---|---|
| First post | 2016-06-10 06:00 +0200 |
| Last post | 2016-06-10 11:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH trivial] include/linux/memory_hotplug.h: Clean up code chengang@emindsoft.com.cn - 2016-06-10 06:00 +0200
Re: [PATCH trivial] include/linux/memory_hotplug.h: Clean up code kbuild test robot <lkp@intel.com> - 2016-06-10 08:10 +0200
Re: [PATCH trivial] include/linux/memory_hotplug.h: Clean up code Chen Gang <chengang@emindsoft.com.cn> - 2016-06-10 11:10 +0200
| From | chengang@emindsoft.com.cn |
|---|---|
| Date | 2016-06-10 06:00 +0200 |
| Subject | [PATCH trivial] include/linux/memory_hotplug.h: Clean up code |
| Message-ID | <rIlLX-7Pi-1@gated-at.bofh.it> |
From: Chen Gang <chengang@emindsoft.com.cn>
Use one line instead of two lines for pgdat_resize_init, since one line
is still within 80 columns.
Let the second line function parameter almost align with the first line
parameter.
Use pr_warn instead of printk, so also let the line within 80 columns.
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
include/linux/memory_hotplug.h | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 01033fa..714f3ea 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -48,8 +48,7 @@ void pgdat_resize_unlock(struct pglist_data *pgdat, unsigned long *flags)
{
spin_unlock_irqrestore(&pgdat->node_size_lock, *flags);
}
-static inline
-void pgdat_resize_init(struct pglist_data *pgdat)
+static inline void pgdat_resize_init(struct pglist_data *pgdat)
{
spin_lock_init(&pgdat->node_size_lock);
}
@@ -105,12 +104,12 @@ extern bool memhp_auto_online;
extern bool is_pageblock_removable_nolock(struct page *page);
extern int arch_remove_memory(u64 start, u64 size);
extern int __remove_pages(struct zone *zone, unsigned long start_pfn,
- unsigned long nr_pages);
+ unsigned long nr_pages);
#endif /* CONFIG_MEMORY_HOTREMOVE */
/* reasonably generic interface to expand the physical pages in a zone */
extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn,
- unsigned long nr_pages);
+ unsigned long nr_pages);
#ifdef CONFIG_NUMA
extern int memory_add_physaddr_to_nid(u64 start);
@@ -223,7 +222,7 @@ static inline void zone_seqlock_init(struct zone *zone) {}
static inline int mhp_notimplemented(const char *func)
{
- printk(KERN_WARNING "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
+ pr_warn("%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
dump_stack();
return -ENOSYS;
}
@@ -270,18 +269,18 @@ static inline void remove_memory(int nid, u64 start, u64 size) {}
#endif /* CONFIG_MEMORY_HOTREMOVE */
extern int walk_memory_range(unsigned long start_pfn, unsigned long end_pfn,
- void *arg, int (*func)(struct memory_block *, void *));
+ void *arg, int (*func)(struct memory_block *, void *));
extern int add_memory(int nid, u64 start, u64 size);
extern int add_memory_resource(int nid, struct resource *resource, bool online);
extern int zone_for_memory(int nid, u64 start, u64 size, int zone_default,
- bool for_device);
+ bool for_device);
extern int arch_add_memory(int nid, u64 start, u64 size, bool for_device);
extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages);
extern bool is_memblock_offlined(struct memory_block *mem);
extern void remove_memory(int nid, u64 start, u64 size);
extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn);
extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms,
- unsigned long map_offset);
+ unsigned long map_offset);
extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map,
unsigned long pnum);
extern int zone_can_shift(unsigned long pfn, unsigned long nr_pages,
--
1.9.3
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-06-10 08:10 +0200 |
| Message-ID | <rInNL-Wc-3@gated-at.bofh.it> |
| In reply to | #1419007 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
[auto build test ERROR on next-20160609]
[also build test ERROR on v4.7-rc2]
[cannot apply to v4.7-rc2 v4.7-rc1 v4.6-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/chengang-emindsoft-com-cn/include-linux-memory_hotplug-h-Clean-up-code/20160610-114959
config: blackfin-TCM-BF537_defconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 4.6.3
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=blackfin
All errors (new ones prefixed by >>):
In file included from include/linux/mmzone.h:741:0,
from include/linux/gfp.h:5,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from include/linux/moduleloader.h:5,
from arch/blackfin/kernel/module.c:9:
include/linux/memory_hotplug.h: In function 'mhp_notimplemented':
>> include/linux/memory_hotplug.h:225:2: error: 'mod' undeclared (first use in this function)
include/linux/memory_hotplug.h:225:2: note: each undeclared identifier is reported only once for each function it appears in
vim +/mod +225 include/linux/memory_hotplug.h
219 static inline void zone_span_writelock(struct zone *zone) {}
220 static inline void zone_span_writeunlock(struct zone *zone) {}
221 static inline void zone_seqlock_init(struct zone *zone) {}
222
223 static inline int mhp_notimplemented(const char *func)
224 {
> 225 pr_warn("%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
226 dump_stack();
227 return -ENOSYS;
228 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Chen Gang <chengang@emindsoft.com.cn> |
|---|---|
| Date | 2016-06-10 11:10 +0200 |
| Message-ID | <rIqBX-2Fu-7@gated-at.bofh.it> |
| In reply to | #1419047 |
On 6/10/16 14:11, kbuild test robot wrote:
> Hi,
>
> [auto build test ERROR on next-20160609]
> [also build test ERROR on v4.7-rc2]
> [cannot apply to v4.7-rc2 v4.7-rc1 v4.6-rc7]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
Oh, my patch is for linux-next 20160609 tree, can not apply to v4.7-rc2
directly.
[...]
>
> In file included from include/linux/mmzone.h:741:0,
> from include/linux/gfp.h:5,
> from include/linux/kmod.h:22,
> from include/linux/module.h:13,
> from include/linux/moduleloader.h:5,
> from arch/blackfin/kernel/module.c:9:
> include/linux/memory_hotplug.h: In function 'mhp_notimplemented':
>>> include/linux/memory_hotplug.h:225:2: error: 'mod' undeclared (first use in this function)
> include/linux/memory_hotplug.h:225:2: note: each undeclared identifier is reported only once for each function it appears in
>
> vim +/mod +225 include/linux/memory_hotplug.h
>
> 219 static inline void zone_span_writelock(struct zone *zone) {}
> 220 static inline void zone_span_writeunlock(struct zone *zone) {}
> 221 static inline void zone_seqlock_init(struct zone *zone) {}
> 222
> 223 static inline int mhp_notimplemented(const char *func)
> 224 {
> > 225 pr_warn("%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func);
> 226 dump_stack();
> 227 return -ENOSYS;
> 228 }
>
After "grep -rn pr_fmt * | grep define" under arch/, for me, it is
blackfin's issue:
we need use
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
instead of
#define pr_fmt(fmt) "module %s: " fmt, mod->name
I shall send one blackfin patch for it.
Thanks.
--
Chen Gang (陈刚)
Managing Natural Environments is the Duty of Human Beings.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web