public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [PATCH 1/2] staging: vt6656: aes_ccmp, baseband, bssdb, card: Change BOOL to int
Date: Thu, 8 Dec 2011 09:19:21 +0300	[thread overview]
Message-ID: <20111208061920.GK3374@mwanda> (raw)
In-Reply-To: <alpine.LNX.2.00.1112071922560.2146@darkstar.example.net>

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      parent reply	other threads:[~2011-12-08  6:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05  1:12 [PATCH 1/2] staging: vt6656: aes_ccmp, baseband, bssdb, card: Change BOOL to int Marcos Paulo de Souza
2011-12-05  6:55 ` Dan Carpenter
2011-12-06  0:41   ` Marcos Paulo de Souza
2011-12-06  6:10     ` Dan Carpenter
     [not found]       ` <alpine.LNX.2.00.1112071922560.2146@darkstar.example.net>
2011-12-08  6:19         ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111208061920.GK3374@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcos.mage@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox