[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20111208061920.GK3374@mwanda>
Date: Thu, 8 Dec 2011 09:19:21 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Marcos Paulo de Souza <marcos.mage@...il.com>
Cc: linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCH 1/2] staging: vt6656: aes_ccmp, baseband, bssdb, card:
Change BOOL to int
On Wed, Dec 07, 2011 at 07:28:07PM +0000, Marcos Paulo de Souza wrote:
> 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?
>
What I'm saying is that so often people see the TODO or the output
from checkpatch and think, "This is easy, I can just use sed and
replace the old code." Sometimes that's the right thing to do, but
sometime the original code is not right, like here where it should
be using bool but it's using int. So go slowly.
> If it ca generate some crash in other architetures, how we can
> change it and be sure that nothing bad could happen?
>
Check if the data is part of the userspace or hardware API or we
care about the exact size of the struct for some reason. If it is
then we have to leave it as int. Otherwise it should be bool or a
bitfield.
regards,
dan carpenter
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists