From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753140AbbGNG4O (ORCPT ); Tue, 14 Jul 2015 02:56:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59393 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751843AbbGNGzC (ORCPT ); Tue, 14 Jul 2015 02:55:02 -0400 From: Minfei Huang To: akpm@linux-foundation.org, rob.jones@codethink.co.uk, amhyung@kernel.org, rusty@rustcorp.com.au Cc: linux-kernel@vger.kernel.org, Minfei Huang Subject: [PATCH 0/2] Using function type to cleanup the function parament Date: Tue, 14 Jul 2015 14:59:11 +0800 Message-Id: <1436857153-18874-1-git-send-email-mhuang@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Minfei Huang 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