From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757004AbZJ3KSN (ORCPT ); Fri, 30 Oct 2009 06:18:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756974AbZJ3KSM (ORCPT ); Fri, 30 Oct 2009 06:18:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56361 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756925AbZJ3KSL (ORCPT ); Fri, 30 Oct 2009 06:18:11 -0400 Date: Fri, 30 Oct 2009 11:18:12 +0100 Message-ID: From: Takashi Iwai To: Rusty Russell Cc: linux-kernel@vger.kernel.org, "David S. Miller" , Ville Syrjala , Dmitry Torokhov , Alessandro Rubini , Michal Januszewski , Trond Myklebust , "J. Bruce Fields" , Neil Brown , linux-input@vger.kernel.org, linux-fbdev-devel@lists.sourceforge.net, linux-nfs@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 2/8] param: use ops in struct kernel_param, rather than get and set fns directly In-Reply-To: <20091022142337.EC4A85362F@mx1.suse.de> References: <20091022142337.EC4A85362F@mx1.suse.de> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 23 Oct 2009 00:51:28 +1030, Rusty Russell wrote: > > This is more kernel-ish, saves some space, and also allows us to > expand the ops without breaking all the callers who are happy for the > new members to be NULL. > > The few places which defined their own param types are changed to the > new scheme. > > Since we're touching them anyway, we change get and set to take a > const struct kernel_param (which they were, and will be again). > > To reduce churn, module_param_call creates the ops struct so the callers > don't have to change (and casts the functions to reduce warnings). > The modern version which takes an ops struct is called module_param_cb. This is nice, as it also reduces the size of struct kernel_param, so each parameter uses less footprint (who cares, though?) :) But, just wondering whether we still need to export get/set functions. They can be called from ops now, so if any, it can be defined even as an inlinefunction or a macro. thanks, Takashi