RE: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: James Bottomley <James.Bottomley@...>, Miller, Mike (OS Dev) <Mike.Miller@...>
Cc: Hisashi Hifumi <hifumi.hisashi@...>, <akpm@...>, <jens.axboe@...>, <linux-kernel@...>, <linux-scsi@...>
Date: Thursday, April 19, 2007 - 12:27 pm

Something like 

if (sizeof(blah) > 4) {
   do all the assignments with shifts
}

might be slighly better since the CDB is already zeroed
by cmd_alloc() and doesn't need to be zeroed a 2nd time.

-- steve

-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@SteelEye.com]
Sent: Thu 4/19/2007 11:22 AM
To: Miller, Mike (OS Dev)
Cc: Hisashi Hifumi; akpm@linux-foundation.org; jens.axboe@oracle.com; linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; Cameron, Steve
Subject: RE: [PATCH] cciss: Fix warnings during compilation under 32bitenvironment
 
On Thu, 2007-04-19 at 16:12 +0000, Miller, Mike (OS Dev) wrote:

It's not such a bad option.  The sizeof() test is compile time
determinable, so the compiler simply zeros the fields in the
CONFIG_LBD=n case and does the shift for CONFIG_LBD=y.  It certainly
never compiles to four inline condition checks.

James



-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [PATCH] cciss: Fix warnings during compilation under 32b..., Cameron, Steve, (Thu Apr 19, 12:27 pm)
Re: [PATCH] cciss: Fix warnings during compilation under 32b..., John Anthony Kazos Jr., (Fri Apr 20, 5:39 pm)
[PATCH] utilities: add helper functions for safe 64-bit inte..., John Anthony Kazos Jr., (Fri Apr 20, 8:55 pm)
Re: [PATCH] utilities: add helper functions for safe 64-bit ..., John Anthony Kazos Jr., (Sat Apr 21, 9:06 am)
Re: [PATCH] utilities: add helper functions for safe 64-bit ..., Christoph Hellwig, (Sun Apr 22, 5:18 am)
Re: [PATCH] utilities: add helper functions for safe 64-bit ..., Christoph Hellwig, (Sun Apr 22, 8:35 am)