Re: [PATCH 1/2] staging: vt6656: aes_ccmp, baseband, bssdb, card: Change BOOL to int

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

 



On Tue, 6 Dec 2011, Dan Carpenter wrote:

On Mon, Dec 05, 2011 at 10:41:54PM -0200, Marcos Paulo de Souza wrote:
On Mon, 5 Dec 2011, Dan Carpenter wrote:
On Sun, Dec 04, 2011 at 11:12:46PM -0200, Marcos Paulo de Souza wrote:
This patch change all references of BOOL to int. As asked by the TODO
file of the driver, we need to remove the ttype.h, and this file do a
typedef of int to BOOL. We don't need this.

Dan, I'm trying to remove this chunk of code:

drivers/staging/vt6656/ttype.h:

typedef int BOOL;

Are we talinkg about the same BOOL type?


Yes.


Why not use bool?  Especially inside structs bool takes up less
space than an int.  Also static analysis tools care about the type.

This typedef is about a int type.

Yes.  I know that.  But these things are used like bool not like int
so bool is the correct thing.

Bool is a different type from int, so you'll have to verify that
changing it doesn't break anything.  It's a more difficult change
but it's the right thing to do.

So, I agree with you. So, we can make some chnages and ask for people to test it? I don't have other hardware than my x86.

So, I think we can remove the typedefs of unsigned char to BYTE.

When I submit some patches chaging this, you ask me to change this to u8.

So, you think I can change this typedefs to theirs respective u8 for unsigned char, u16 for unsigned short and u32 for unsgined long?

If it ca generate some crash in other architetures, how we can change it and be sure that nothing bad could happen?

Thanks for your time.

Marcos Paulo de Souza

regards,
dan carpenter


_______________________________________________
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