[U-Boot] [PATCH v11 1/2] Introduced btrfs file-system with btrload command

Tom Rini trini at ti.com
Wed Apr 3 22:40:02 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/03/2013 04:14 PM, adnan.ali at codethink.co.uk wrote:
> 
> 
> Sent from my HTC
> 
> ----- Reply message ----- From: "Tom Rini" <trini at ti.com> To:
> "Adnan Ali" <adnan.ali at codethink.co.uk> Cc: <u-boot at lists.denx.de> 
> Subject: [U-Boot] [PATCH v11 1/2] Introduced btrfs file-system
> with btrload command Date: Wed, Apr 3, 2013 7:04 pm
> 
> 
> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> 
> On 04/03/2013 01:30 PM, Adnan Ali wrote:
>> On 03/04/13 17:50, Tom Rini wrote:
>>> On Tue, Apr 02, 2013 at 03:17:38PM +0100, Adnan Ali wrote:
>>> 
>>>> Introduces btrfs file-system to read file from 
>>>> volume/sub-volumes with btrload command. This implementation 
>>>> has read-only support. This btrfs implementation is based on 
>>>> syslinux btrfs code, commit 
>>>> 269ebc845ebc8b46ef4b0be7fa0005c7fdb95b8d.
>>>> 
>>>> v11:     Mirro super block check. v10:     patch problem 
>>>> reworked. v5:      merged with master. v4:      btrls
>>>> command added.
>>>> 
>>>> Signed-off-by: Adnan Ali <adnan.ali at codethink.co.uk>
>>> With ELDK 5.3 toolchain, I see: btrfs.c: In function 
>>> 'insert_map': btrfs.c:144:4: warning: implicit declaration of 
>>> function 'malloc' [-Wimplicit-function-declaration] btrfs.c:
>>> In function 'btrfs_read_super_block': btrfs.c:281:5: warning:
>>> unused variable 'boots' [-Wunused-variable] btrfs.c:279:6:
>>> warning: unused variable 'ret' [-Wunused-variable] btrfs.c: In
>>> function 'btrfs_read_chunk_tree': btrfs.c:507:4: warning:
>>> format '%d' expects argument of type 'int', but argument 2 has
>>> type 'uint64_t' [-Wformat] btrfs.c:503:6: warning: unused
>>> variable 'status' [-Wunused-variable] btrfs.c: In function 
>>> 'btrfs_iget_by_inr': btrfs.c:563:24: warning: dereferencing 
>>> type-punned pointer will break strict-aliasing rules 
>>> [-Wstrict-aliasing] btrfs.c:583:26: warning: dereferencing 
>>> type-punned pointer will break strict-aliasing rules 
>>> [-Wstrict-aliasing] btrfs.c:591:3: warning: dereferencing 
>>> type-punned pointer will break strict-aliasing rules 
>>> [-Wstrict-aliasing] btrfs.c: In function 'btrfs_iget': 
>>> btrfs.c:607:26: warning: initialization from incompatible
>>> pointer type [enabled by default] btrfs.c:621:22: warning:
>>> dereferencing type-punned pointer will break strict-aliasing
>>> rules [-Wstrict-aliasing] btrfs.c: In function
>>> 'btrfs_readlink': btrfs.c:628:34: warning: dereferencing
>>> type-punned pointer will break strict-aliasing rules
>>> [-Wstrict-aliasing] btrfs.c:629:21: warning: dereferencing
>>> type-punned pointer will break strict-aliasing rules
>>> [-Wstrict-aliasing] btrfs.c: In function 'btrfs_readdir':
>>> btrfs.c:637:26: warning: initialization from incompatible
>>> pointer type [enabled by default] btrfs.c: In function
>>> 'btrfs_next_extent': btrfs.c:682:26: warning: initialization
>>> from incompatible pointer type [enabled by default]
>>> btrfs.c:695:25: warning: dereferencing type-punned pointer will
>>> break strict-aliasing rules [-Wstrict-aliasing] btrfs.c:720:2:
>>> warning: dereferencing type-punned pointer will break
>>> strict-aliasing rules [-Wstrict-aliasing] btrfs.c: In function
>>> 'btrfs_getfssec': btrfs.c:729:26: warning: initialization from
>>> incompatible pointer type [enabled by default] btrfs.c:730:12:
>>> warning: dereferencing type-punned pointer will break
>>> strict-aliasing rules [-Wstrict-aliasing] btrfs.c:741:8:
>>> warning: dereferencing type-punned pointer will break
>>> strict-aliasing rules [-Wstrict-aliasing] btrfs.c:729:21: 
>>> warning: unused variable 'fs' [-Wunused-variable] btrfs.c: In 
>>> function 'put_inode': btrfs.c:844:4: warning: implicit 
>>> declaration of function 'free'
>>> [-Wimplicit-function-declaration] btrfs.c: In function
>>> 'alloc_inode': btrfs.c:854:24: warning: initialization makes
>>> pointer from integer without a cast [enabled by default]
>>> btrfs.c:857:13: warning: assignment from incompatible pointer
>>> type [enabled by default] btrfs.c: In function 
>>> 'btrfs_open_file': btrfs.c:952:2: warning: implicit
>>> declaration of function 'searchdir'
>>> [-Wimplicit-function-declaration] btrfs.c: In function
>>> 'searchdir': btrfs.c:1029:14: warning: assignment makes pointer
>>> from integer without a cast [enabled by default]
>>> btrfs.c:1058:17: warning: pointer targets in assignment differ
>>> in signedness [-Wpointer-sign] btrfs.c: In function 'getfssec':
>>> btrfs.c:1114:11: warning: unused variable 'handle' 
>>> [-Wunused-variable] btrfs.c: In function 'generic_getfssec': 
>>> btrfs.c:1132:26: warning: initialization from incompatible 
>>> pointer type [enabled by default] btrfs.c:1132:21: warning: 
>>> unused variable 'fs' [-Wunused-variable] fs.c:97:3: warning: 
>>> initialization from incompatible pointer type [enabled by 
>>> default] fs.c:97:3: warning: (near initialization for 
>>> 'fstypes[2].ls') [enabled by default]
>>> 
>>> And with ELDK 4.2: btrfs.c: In function 'insert_map': 
>>> btrfs.c:144: warning: implicit declaration of function 'malloc'
>>>  btrfs.c: In function 'btrfs_read_super_block': btrfs.c:281: 
>>> warning: unused variable 'boots' btrfs.c:279: warning: unused 
>>> variable 'ret' btrfs.c: In function 'btrfs_read_chunk_tree': 
>>> btrfs.c:507: warning: format '%d' expects type 'int', but 
>>> argument 2 has type 'uint64_t' btrfs.c:503: warning: unused 
>>> variable 'status' btrfs.c: In function 'btrfs_iget':
>>> btrfs.c:607: warning: initialization from incompatible pointer
>>> type btrfs.c: In function 'btrfs_readdir': btrfs.c:637:
>>> warning: initialization from incompatible pointer type btrfs.c:
>>> In function 'btrfs_next_extent': btrfs.c:682: warning:
>>> initialization from incompatible pointer type btrfs.c: In
>>> function 'btrfs_getfssec': btrfs.c:729: warning: initialization
>>> from incompatible pointer type btrfs.c:729: warning: unused
>>> variable 'fs' btrfs.c: In function 'put_inode': btrfs.c:844:
>>> warning: implicit declaration of function 'free' btrfs.c: In
>>> function 'alloc_inode': btrfs.c:854: warning: initialization
>>> makes pointer from integer without a cast btrfs.c:857: warning:
>>> assignment from incompatible pointer type btrfs.c: In function
>>> 'btrfs_open_file': btrfs.c:952: warning: implicit declaration
>>> of function 'searchdir' btrfs.c: In function 'searchdir':
>>> btrfs.c:1029: warning: assignment makes pointer from integer
>>> without a cast btrfs.c:1058: warning: pointer targets in
>>> assignment differ in signedness btrfs.c: In function
>>> 'getfssec': btrfs.c:1114: warning: unused variable 'handle'
>>> btrfs.c: In function 'generic_getfssec': btrfs.c:1132: warning:
>>> initialization from incompatible pointer type btrfs.c:1132:
>>> warning: unused variable 'fs' fs.c:97: warning: initialization
>>> from incompatible pointer type
>>> 
>>> Please fix.  I can test ELDK 4.2 if you fix the ELDK 5.3
>>> warnings (which also show up with other toolchains).
>>> 
>> But initially you said you will do it. But ok
> 
> Sorry I was unclear.  I said I would take care of the fact that
> you're duplicating syslinux's generic inode structure as well
> inside of the btrfs code as U-Boot is bad in this regard and
> doesn't have a generic inode struct that filesystems can work from
> (and all filesystems do something like this), as a later cleanup.
> 
> Does this means you will take care of all warnings. So is this
> ready to be accepted.;)

No, it means you need to fix the warnings in the code as-is (as many
of them are unrelated to what I'm talking about) and at a future point
in time I will clean up the generic problem of a lack of a struct
inode (and a few other things) in <fs.h> that all filesystems can make
use of.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRXJOiAAoJENk4IS6UOR1WBs0P/1GOPFu8Dk5jT6+flJhiYnu6
4sNiBqqk2M1L07aTK2EdFMrRn14ogQ1vC8hVyDtMeHMD5ElZH4/LYeC+l5qNTan9
t0W0eSndIRV6ZF4M42eN7zS6jqJ9lSj18R1aLiLNOsGxaFVLp7ndZumI2WHPWcBX
y+8dnkI1TFosfckNCBclk3IZXDrQBXiwC36uuN6Lw0mCAsrvaIGOegC6jRwG4xC7
G9zs1JHGwTSycLxXGIP+DGU0Vilr7jnaWfMG1eYJpEkW4fwB5DW9TehRNRMhsxpV
mlSXSKx5YJRAQWvn2qwMzeO5kaFzmcgFC2wUgy3hEACYuakfsQq7/hWhUz//0U2s
Y13uFJJRf1mf4JPZh2OfsZ45sqXnAWlDuKmI42u8QHO3k/LmdL4Kfa03KDkDFmFi
kWWlJWrpxRphOKezKUPshc0z5zqaJBujClD8eLHnxkIN+qKSCtGap046xXtqrDUf
pHAUURbKv5X0auia6VLAhu6mXiAZqMSOyjgQcn92e6H4OLCEFldffamW8TEKmWf5
vcvEHoP+OnetGxztkzfEXl+VxySAzvhiqO2qfvL2lCWVlr4lsVv+huMeDN3b4WDN
0Ce/BZTKwigF3QchqbxSD0vxL9e3F5utOl1QjUWnNmx85aA1IN731tAGOS3brSKx
89FGOgFzhbQQ+GzZUyvC
=GLbO
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list