On 27/10/2009, Myles Watson <[email protected]> wrote: > On Tue, Oct 27, 2009 at 7:32 AM, Maciej Pijanka > <[email protected]>wrote: > >> On 27/10/2009, Myles Watson <[email protected]> wrote: >> > >> > Maciej, >> > >> > Thanks for the patch. I think most of it is ready to be committed. >> > >> > Index: src/lib/clog2.c >> > =================================================================== >> > --- src/lib/clog2.c (revision 4869) >> > +++ src/lib/clog2.c (working copy) >> > @@ -7,6 +7,8 @@ >> > /* Assume 8 bits per byte */ >> > #define CHAR_BIT 8 >> > >> > +unsigned long log2(unsigned long x); >> > + >> > unsigned long log2(unsigned long x) >> > { >> > // assume 8 bits per byte. >> > >> > Things like this make me wonder if we should just turn off the warning. >> Is >> > there a header file where we can put some of these prototypes? >> >> On begining of previous patch version, was an comment about such >> things, i didn't found >> suitable header where such utility function prototypes might be added, >> if its desired to make >> include/utils.h or something similar with better name i will move >> prototypes there. >> > Sorry, I didn't look at the first version of the patch. I think that the > cleanest thing would be to have files in include that mirror the .c files. > If we have to add too many new .h files, maybe we should combine some .c > files.
I split patch, leaving part that don't require adding new headers as one, while rest is in another. > But please note in few places prototype is just before function >> because it is used only locally (for my knowledge) if not then it >> should be moved to header too. >> > If you declare it as static that will silence the warning as well. Of > course this only works when it is just used locally. I checked using grep, and it seems that resource_tree is called just from device_util.c where its declared, so might be static and moved to not-requiring new headers part of patch. > > Thanks, > Myles > -- Maciej Pijanka, PLD-Linux Developer, Reg Linux user #133161 POE/Perl user
coreboot-4869-prototypes-split-one.patch
Description: Binary data
coreboot-4869-prototypes-split-two.patch
Description: Binary data
-- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

