[RFC] [PATCH] arm & sh: factorised duplicated clkdev.c

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Sep 1 07:12:20 EDT 2010


> > +
> > +static __inline__ struct clk_lookup_alloc *arch_kzalloc(size_t size)
> 
> No need to use __inline__ here - use inline instead.
> 
> > +static __inline__ struct clk_lookup_alloc *arch_kzalloc(size_t size)
> 
> Ditto.
> 
> > @@ -120,12 +124,12 @@ struct clk_lookup_alloc {
> >  	char	con_id[MAX_CON_ID];
> >  };
> >  
> > -struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id,
> > -	const char *dev_fmt, ...)
> > +struct clk_lookup * __init_refok
> > +clkdev_alloc(struct clk *clk, const char *con_id, const char *dev_fmt, ...)
> 
> This looks like a nasty hack to get around the problem of calling a
> boot-time only allocator - but I guess given what sh is doing we don't
> have much choice here.
> 
> The choice of 'arch_kzalloc' is imho very poor - it potentially could
> clash with some other use.  Maybe __clkdev_alloc() instead?
ok I'll update

Best Regards,
J.



More information about the linux-arm-kernel mailing list