Patchwork Drop unneeded header from i82371eb_enable_rom.c

login
register
about
Submitter Keith Hui
Date 2010-10-01 04:31:47
Message ID <AANLkTimqGrjawxPNPti9D6ZixzkOrEY_M8HxPqYoP0ZT@mail.gmail.com>
Download mbox | patch
Permalink /patch/2014/
State Rejected
Headers show

Comments

Keith Hui - 2010-10-01 04:31:47
A "I am alive" ping kind of patch while I continue to figure out ACPI
for 440BX boards among other things.

Drops <stdint.h> from the file. My coreboot still compiles fine
without it. abuild tested.

Signed-off-by: Keith Hui <buurin@gmail.com>
Uwe Hermann - 2010-10-02 12:43:04
On Fri, Oct 01, 2010 at 12:31:47AM -0400, Keith Hui wrote:
> A "I am alive" ping kind of patch while I continue to figure out ACPI
> for 440BX boards among other things.
> 
> Drops <stdint.h> from the file. My coreboot still compiles fine
> without it. abuild tested.
> 
> Signed-off-by: Keith Hui <buurin@gmail.com>

Hm, not sure about this one. The file _does_ use stuff from stdint.h
directly, so technically having the #include is correct. On the other
hand, that .c file is included itself from romstage.c usually and
that file already #includes stdint.h (directly or indirectly itself).

Note that we're currently trying to move away from including .c files
directly, as soon as that is done and the files are compiled separately
the #include may very well be required then (well, I think).


Uwe.
Stefan Reinauer - 2010-10-02 15:34:58
On 10/2/10 2:43 PM, Uwe Hermann wrote:
> Hm, not sure about this one. The file _does_ use stuff from stdint.h


What's the general feeling about types... Should we get rid of the
stdint.h usage and go for u8/u16/u32/s8/s16/s32 completely?

Stefan
Uwe Hermann - 2010-10-02 15:52:05
On Sat, Oct 02, 2010 at 05:34:58PM +0200, Stefan Reinauer wrote:
>  On 10/2/10 2:43 PM, Uwe Hermann wrote:
> > Hm, not sure about this one. The file _does_ use stuff from stdint.h
> 
> 
> What's the general feeling about types... Should we get rid of the
> stdint.h usage and go for u8/u16/u32/s8/s16/s32 completely?

Definately, long-term we should use u8 etc. in the whole code base.

However, currently u8 and friends are also defined in our stdint.h so
that's a different issue (or we move the u8 defines).


Uwe.
ron minnich - 2010-10-02 16:11:31
On Sat, Oct 2, 2010 at 8:34 AM, Stefan Reinauer
<stefan.reinauer@coresystems.de> wrote:
>  On 10/2/10 2:43 PM, Uwe Hermann wrote:
>> Hm, not sure about this one. The file _does_ use stuff from stdint.h
>
>
> What's the general feeling about types... Should we get rid of the
> stdint.h usage and go for u8/u16/u32/s8/s16/s32 completely?


I always felt we should get rid of stdint.h and define our own. Using
stdint.h leaves you hostage to whatever the gcc guys may do with that
file in the future.

ron
Peter Stuge - 2010-10-02 19:06:05
Stefan Reinauer wrote:
> What's the general feeling about types... Should we get rid of the
> stdint.h usage and go for u8/u16/u32/s8/s16/s32 completely?

I like the short ones too.


//Peter
Carl-Daniel Hailfinger - 2010-10-02 20:49:28
On 02.10.2010 21:06, Peter Stuge wrote:
> Stefan Reinauer wrote:
>   
>> What's the general feeling about types... Should we get rid of the
>> stdint.h usage and go for u8/u16/u32/s8/s16/s32 completely?
>>     
>
> I like the short ones too.
>   

+1

Regards,
Carl-Daniel

Patch

Index: i82371eb_enable_rom.c
===================================================================
--- i82371eb_enable_rom.c	(revision 5888)
+++ i82371eb_enable_rom.c	(working copy)
@@ -18,7 +18,6 @@ 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#include <stdint.h>
 #include "i82371eb.h"
 
 static void i82371eb_enable_rom(device_t dev)