* [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader
@ 2018-11-05 6:04 Keerthy
2018-11-05 6:04 ` [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node Keerthy
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Keerthy @ 2018-11-05 6:04 UTC (permalink / raw)
To: u-boot
Add fs.c under SPL as well as it is needed for fs_loader
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
fs/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/Makefile b/fs/Makefile
index bad0c2c..b4ca1b3 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node
2018-11-05 6:04 [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Keerthy
@ 2018-11-05 6:04 ` Keerthy
2018-11-13 19:53 ` Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot, " Tom Rini
2018-11-05 6:04 ` [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning Keerthy
` (2 subsequent siblings)
3 siblings, 2 replies; 9+ messages in thread
From: Keerthy @ 2018-11-05 6:04 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
drivers/misc/fs_loader.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index b7bb96a..5afc941 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -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);
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning
2018-11-05 6:04 [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Keerthy
2018-11-05 6:04 ` [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node Keerthy
@ 2018-11-05 6:04 ` Keerthy
2018-11-13 19:53 ` Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot,3/3] " Tom Rini
2018-11-13 19:53 ` [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot, " Tom Rini
3 siblings, 2 replies; 9+ messages in thread
From: Keerthy @ 2018-11-05 6:04 UTC (permalink / raw)
To: u-boot
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 <j-keerthy@ti.com>
---
drivers/misc/fs_loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index 5afc941..baa5f83 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -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;
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader
2018-11-05 6:04 [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Keerthy
2018-11-05 6:04 ` [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node Keerthy
2018-11-05 6:04 ` [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning Keerthy
@ 2018-11-13 19:53 ` Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot, " Tom Rini
3 siblings, 0 replies; 9+ messages in thread
From: Simon Glass @ 2018-11-13 19:53 UTC (permalink / raw)
To: u-boot
On 4 November 2018 at 23:04, Keerthy <j-keerthy@ti.com> wrote:
> Add fs.c under SPL as well as it is needed for fs_loader
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> fs/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node
2018-11-05 6:04 ` [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node Keerthy
@ 2018-11-13 19:53 ` Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 9+ messages in thread
From: Simon Glass @ 2018-11-13 19:53 UTC (permalink / raw)
To: u-boot
On 4 November 2018 at 23:04, Keerthy <j-keerthy@ti.com> wrote:
> 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.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
> drivers/misc/fs_loader.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
with change below
>
> diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
> index b7bb96a..5afc941 100644
> --- a/drivers/misc/fs_loader.c
> +++ b/drivers/misc/fs_loader.c
> @@ -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);
> +
Please drop this blank line.
> if (ret) {
> debug("Error: %d Failed to read %s from flash %lld != %d.\n",
> ret, fw_priv->name, actread, firmware->size);
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning
2018-11-05 6:04 ` [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning Keerthy
@ 2018-11-13 19:53 ` Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot,3/3] " Tom Rini
1 sibling, 0 replies; 9+ messages in thread
From: Simon Glass @ 2018-11-13 19:53 UTC (permalink / raw)
To: u-boot
On 4 November 2018 at 23:04, Keerthy <j-keerthy@ti.com> wrote:
> 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 <j-keerthy@ti.com>
> ---
> drivers/misc/fs_loader.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [U-Boot, 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader
2018-11-05 6:04 [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Keerthy
` (2 preceding siblings ...)
2018-11-13 19:53 ` [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Simon Glass
@ 2018-11-17 14:08 ` Tom Rini
3 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2018-11-17 14:08 UTC (permalink / raw)
To: u-boot
On Mon, Nov 05, 2018 at 11:34:52AM +0530, Keerthy wrote:
> Add fs.c under SPL as well as it is needed for fs_loader
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [U-Boot, 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node
2018-11-05 6:04 ` [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node Keerthy
2018-11-13 19:53 ` Simon Glass
@ 2018-11-17 14:08 ` Tom Rini
1 sibling, 0 replies; 9+ messages in thread
From: Tom Rini @ 2018-11-17 14:08 UTC (permalink / raw)
To: u-boot
On Mon, Nov 05, 2018 at 11:34:53AM +0530, Keerthy wrote:
> 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.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [U-Boot,3/3] misc: fs_loader: Fix compiler warning
2018-11-05 6:04 ` [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning Keerthy
2018-11-13 19:53 ` Simon Glass
@ 2018-11-17 14:08 ` Tom Rini
1 sibling, 0 replies; 9+ messages in thread
From: Tom Rini @ 2018-11-17 14:08 UTC (permalink / raw)
To: u-boot
On Mon, Nov 05, 2018 at 11:34:54AM +0530, Keerthy wrote:
> 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 <j-keerthy@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-11-17 14:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-05 6:04 [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Keerthy
2018-11-05 6:04 ` [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node Keerthy
2018-11-13 19:53 ` Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot, " Tom Rini
2018-11-05 6:04 ` [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning Keerthy
2018-11-13 19:53 ` Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot,3/3] " Tom Rini
2018-11-13 19:53 ` [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader Simon Glass
2018-11-17 14:08 ` [U-Boot] [U-Boot, " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox