[U-Boot] [PATCH v3 3/6] fs: ext4: constify the buffer passed to write functions
Tom Rini
trini at konsulko.com
Fri Feb 1 18:59:08 UTC 2019
On Fri, Feb 01, 2019 at 07:40:21PM +0100, Jean-Jacques Hiblot wrote:
> There is no need to modify the buffer passed to ext4fs_write_file().
> The memset() call is not required here and was likely copied from the
> equivalent part of the ext4fs_read_file() function where we do need it.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
>
> ---
>
> Changes in v3:
> - reworded commit log
>
> Changes in v2: None
>
> fs/ext4/ext4_common.c | 2 +-
> fs/ext4/ext4_common.h | 2 +-
> fs/ext4/ext4_write.c | 11 +++++------
> include/ext4fs.h | 2 +-
> 4 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
> index 67e2471bd3..b881482c39 100644
> --- a/fs/ext4/ext4_common.c
> +++ b/fs/ext4/ext4_common.c
> @@ -190,7 +190,7 @@ uint32_t ext4fs_div_roundup(uint32_t size, uint32_t n)
> return res;
> }
>
> -void put_ext4(uint64_t off, void *buf, uint32_t size)
> +void put_ext4(u64 off, const void *buf, u32 size)
You missed my comment here, sorry. The rest of the function (and file?)
is uintXX_t not uXX so please just add const here. 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/20190201/78cfd51c/attachment.sig>
More information about the U-Boot
mailing list