All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Using function type to cleanup the function parament
@ 2015-07-14  6:59 Minfei Huang
  2015-07-14  6:59 ` [PATCH 1/2] Define find_symbol_in_section_t as function type to simplify the code Minfei Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Minfei Huang @ 2015-07-14  6:59 UTC (permalink / raw)
  To: akpm, rob.jones, amhyung, rusty; +Cc: linux-kernel, Minfei Huang

From: Minfei Huang <mnfhuang@gmail.com>

This patchset do the cleanup. For now, we can use function type
as the parament to simplify the code.

Previously, we will declare the function as following:

bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
                                   struct module *owner,
                                   void *data), void *data);

Once we define the function as a type, we can just declare the function
as following.

bool each_symbol_section(find_symbol_in_section_t fn, void *data);

Minfei Huang (2):
  Define find_symbol_in_section_t as function type to simplify the code
  Define kallsyms_cmp_symbol_t as function type to simplify the code

 include/linux/kallsyms.h | 10 +++-------
 include/linux/module.h   | 19 +++++++++----------
 kernel/kallsyms.c        |  4 +---
 kernel/module.c          | 13 +++----------
 4 files changed, 16 insertions(+), 30 deletions(-)

-- 
2.2.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-07-16 11:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14  6:59 [PATCH 0/2] Using function type to cleanup the function parament Minfei Huang
2015-07-14  6:59 ` [PATCH 1/2] Define find_symbol_in_section_t as function type to simplify the code Minfei Huang
2015-07-14  7:04   ` Minfei Huang
2015-07-14 21:52   ` Rusty Russell
2015-07-15  2:11     ` Minfei Huang
2015-07-15 20:31     ` Andrew Morton
2015-07-16 11:29       ` Rusty Russell
2015-07-14  6:59 ` [PATCH 2/2] Define kallsyms_cmp_symbol_t " Minfei Huang
2015-07-14  7:05   ` Minfei Huang
2015-07-14  7:06 ` [PATCH 0/2] Using function type to cleanup the function parament Minfei Huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.