fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader
Subsystems (2)
PATCH 1/3 fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader
Add fs.c under SPL as well as it is needed for fs_loader
--- fs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/Makefile +1 -1
@@ -8,7 +8,6 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_FAT_SUPPORT) += fat/ obj-$(CONFIG_SPL_EXT_SUPPORT) += ext4/ else -obj-y += fs.o obj-$(CONFIG_FS_BTRFS) += btrfs/ obj-$(CONFIG_FS_CBFS) += cbfs/
@@ -22,4 +21,5 @@ obj-$(CONFIG_CMD_UBIFS) += ubifs/ obj-$(CONFIG_YAFFS2) += yaffs2/ obj-$(CONFIG_CMD_ZFS) += zfs/ endif +obj-y += fs.o obj-y += fs_internal.o
Signature · 1 line
1.9.1
PATCH 2/3 misc: fs_loader: Use device_get_global_by_ofnode to get to node
Instead of two staged ofnode_to_offset followed by device_get_global_by_of_offset approach, direcly use the device_get_global_by_ofnode to fetch the device.
--- drivers/misc/fs_loader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/misc/fs_loader.c +2 -3
@@ -55,11 +55,9 @@ static int select_fs_dev(struct device_platdata *plat) node =ofnode_get_by_phandle (plat->phandlepart.phandle); -int of_offset =ofnode_to_offset (node); -struct udevice *dev; - ret =device_get_global_by_of_offset (of_offset, &dev); + ret =device_get_global_by_ofnode (node, &dev);if (!ret) {struct blk_desc *desc =blk_get_by_device (dev);if (desc) {
@@ -190,6 +188,7 @@ static int fw_get_filesystem_firmware(struct device_platdata *plat, ret =fs_read (fw_priv->name, (ulong )map_to_sysmem (firmware->data), fw_priv->offset, firmware->size, &actread); +if (ret) {debug ("Error: %d Failed to read %s from flash %lld != %d.\n" , ret, fw_priv->name, actread, firmware->size);
Signature · 1 line
1.9.1
PATCH 2/3 misc: fs_loader: Use device_get_global_by_ofnode to get to node
Quoted 8 lines · Keerthy
Instead of two staged
ofnode_to_offsetfollowed bydevice_get_global_by_of_offsetapproach, direcly use thedevice_get_global_by_ofnodeto fetch the device.Signed-off-by Keerthy <[email protected]>--- drivers/misc/fs_loader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
with change below
Quoted 19 lines
drivers/misc/fs_loader.c +1
-3@@ -55,11 +55,9 @@ static int select_fs_dev(struct device_platdata *plat) node =ofnode_get_by_phandle (plat->phandlepart.phandle); -int of_offset =ofnode_to_offset (node); -struct udevice *dev; - ret =device_get_global_by_of_offset (of_offset, &dev); + ret =device_get_global_by_ofnode (node, &dev);if (!ret) {struct blk_desc *desc =blk_get_by_device (dev);if (desc) {
drivers/misc/fs_loader.c static int fw_get_filesystem_firmware(struct device_platdata *plat, · line 191
Quoted 4 lines
drivers/misc/fs_loader.c +1
-0@@ -190,6 +188,7 @@ static int fw_get_filesystem_firmware(struct device_platdata *plat, ret =fs_read (fw_priv->name, (ulong )map_to_sysmem (firmware->data), fw_priv->offset, firmware->size, &actread); +
Please drop this blank line.
Quoted 6 lines
drivers/misc/fs_loader.c +0
-1if (ret) {debug ("Error: %d Failed to read %s from flash %lld != %d.\n" , ret, fw_priv->name, actread, firmware->size); --1.9.1
PATCH 2/3 misc: fs_loader: Use device_get_global_by_ofnode to get to node
In reply to KeerthyQuoted 6 lines · Keerthy
Instead of two staged
ofnode_to_offsetfollowed bydevice_get_global_by_of_offsetapproach, direcly use thedevice_get_global_by_ofnodeto fetch the device.Signed-off-by Keerthy <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181117/36ef1fac/attachment.sig>
PATCH 3/3 misc: fs_loader: Fix compiler warning
In reply to KeerthyFix compiler warning
drivers/misc/fs_loader.c:193:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
--- drivers/misc/fs_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fs_loader.c +1 -1
@@ -190,7 +190,7 @@ static int fw_get_filesystem_firmware(struct device_platdata *plat, fw_priv->offset, firmware->size, &actread);if (ret) { -debug ("Error: %d Failed to read %s from flash %lld != %d.\n" , +debug ("Error: %d Failed to read %s from flash %lld != %zu.\n" , ret, fw_priv->name, actread, firmware->size); }else { ret = actread;
Signature · 1 line
1.9.1
PATCH 3/3 misc: fs_loader: Fix compiler warning
Quoted 10 lines · Keerthy
Fix compiler warning
drivers/misc/fs_loader.c:193:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=]Signed-off-by Keerthy <[email protected]>--- drivers/misc/fs_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 3/3 misc: fs_loader: Fix compiler warning
In reply to KeerthyQuoted 8 lines · Keerthy
Fix compiler warning
drivers/misc/fs_loader.c:193:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=]Signed-off-by Keerthy <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181117/874d4c02/attachment.sig>
PATCH 1/3 fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader
In reply to KeerthyQuoted 6 lines · Keerthy
Add
fs.cunder SPL as well as it is needed forfs_loaderSigned-off-by Keerthy <[email protected]>--- fs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 1/3 fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader
In reply to KeerthyQuoted 4 lines · Keerthy
Add
fs.cunder SPL as well as it is needed forfs_loaderSigned-off-by Keerthy <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181117/8178b378/attachment.sig>