Re: [PATCH 3/6] Staging: bcm: Move typedef from CmHost.c to CmHost.h, reported by checkpatch.pl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 02, 2012 at 11:17:18PM -0500, Kevin McKinney wrote:
> This patch removes a typedef definition from CmHost.c
> and places it in the CmHost.h header file where it
> belongs.

Not really.  It's not used outside this file.  The warning is
correct, it says that you should just get rid of the typedef and use
enum some_sane_name throughout.

Typedefs are good for things which can be different type depending
on the config like.  For example, "size_t" is a good typedef and it
can be either 32bits or 64bits.

Sometimes as well you have very complicated types like:
typedef unsigned int __bitwise__ upf_t;
and that's valid.

But for a normal enum, there is only downside when people hide the
type.

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux