[PATCH] MPC8xx PCMCIA driver

Dominik Brodowski linux at dominikbrodowski.net
Thu Sep 15 00:27:46 EST 2005


On Wed, Sep 14, 2005 at 11:11:31AM -0300, Marcelo Tosatti wrote:
> On Thu, Sep 01, 2005 at 10:53:19AM +0200, Dominik Brodowski wrote:
> 
> > > +typedef struct  {
> > > +	u_int regbit;
> > > +	u_int eventbit;
> > > +} event_table_t;
> > 
> > No typedefs, please.
> 
> OK, I've converted it to a plain "struct".

Thanks.

> I think this code is just following PCMCIA style:
> 
> typedef struct pccard_mem_map { 
> 	u_char	map;
> 	u_char	flags;
> 	u_short	speed;
> 	u_long	static_start;
> 	u_int	card_start;
> 	struct resource *res;
> } pccard_mem_map;
>
> Any reason why this typedef and similar ones in ss.h 
> are wanted? 

There's no reason for this being typedef'ed, and it is contrary to the
kernel source CodingStyle. However, all pcmcia code was external at first,
that's why the CodingStyle differs.

> PCMCIA is also using u_xxx "weird data types" extensively.

Unfortunately, yes. However, I'm in the process of adapting it to the kernel
CodingStyle. I don't change something from "u_int" to "unsigned int" just for
the naming of it, though, but when I'm in the same area fixing one thing or
another, I try to take care of it. New structs, like struct pcmcia_device, 
already adhere the normal kernel policy on structs and typedefs.

Thanks,
	Dominik



More information about the Linuxppc-embedded mailing list