[PATCH 3/6] Staging: bcm: Move typedef from CmHost.c to CmHost.h, reported by checkpatch.pl
Dan Carpenter
dan.carpenter at oracle.com
Tue Jan 3 07:26:27 PST 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://driverdev.linuxdriverproject.org/pipermail/devel/attachments/20120103/1158c231/attachment.asc>
More information about the devel
mailing list