[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1408221241340.23099@gentwo.org>
Date: Fri, 22 Aug 2014 12:43:25 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: Tejun Heo <htejun@...il.com>
cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Fengguang Wu <fengguang.wu@...el.com>,
Rusty Russell <rusty@...tcorp.com.au>,
Motohiro Kosaki <Motohiro.Kosaki@...fujitsu.com>,
Mike Travis <travis@....com>
Subject: Re: percpu: Define this_cpu_cpumask_var_t_ptr
On Fri, 22 Aug 2014, Tejun Heo wrote:
> On Thu, Aug 21, 2014 at 08:03:25PM -0500, Christoph Lameter wrote:
> > Its a pretty simple function (actually more a name substituion) so I
> > did not think it worth creating an inline function.
>
> Unless there are specific reasons like multi-type arg or breaking
> hellish definition order dependency, I think we're better off with
> inline functions, especially here, as the implementation will happily
> accept arguments of the wrong type.
>
It wont accept the wrong type since the this_cpu_* functions will do type
checking.
> > _t is there because I wanted to include the full "ugly" name of the
> > variable to make it similarly ugly. It is needed to make the clear
> > distinction to "struct cpumask *" which does not have these issues.
>
> The compiler can enforce that rule easily if the interface functions
> are properly typed. I think it'd be far better to go with properly
> typed accessors with less unwieldy names.
What rule are we talking about? Accessors for what?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists