[U-Boot] [PATCH v3 3/6] fs: ext4: constify the buffer passed to write functions

Tom Rini trini at konsulko.com
Mon Feb 4 13:19:42 UTC 2019


On Mon, Feb 04, 2019 at 10:34:16AM +0100, Jean-Jacques Hiblot wrote:
> 
> On 01/02/2019 19:59, Tom Rini wrote:
> >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!
> 
> Yes I forgot about it. I sent a v4 with the changes. I had initially changed
> thisĀ  because of checkpatch:
> 
> CHECK: Prefer kernel type 'u64' over 'uint64_t'
> #51: FILE: fs/ext4/ext4_common.h:75:
> +void put_ext4(uint64_t off, const void *buf, uint32_t size);

Ah, OK.  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/20190204/d8d4f55a/attachment.sig>


More information about the U-Boot mailing list