From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 21 Jun 2018 11:27:18 -0400 Subject: [U-Boot] [PATCH v4 10/21] fs: Convert fs_read/write to take buffer instead of address In-Reply-To: References: <20180618152315.34233-1-agraf@suse.de> <20180618152315.34233-11-agraf@suse.de> Message-ID: <20180621152718.GX4609@bill-the-cat.ec.rr.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jun 20, 2018 at 08:02:09PM -0600, Simon Glass wrote: > kOn 18 June 2018 at 09:23, Alexander Graf wrote: > > The fs_read() and fs_write() functions are internal interfaces that > > naturally want to get pointers as arguments. Most users so far even > > have pointers and explicitly cast them into integers just to be able > > to pass them into the function. > > > > Convert them over to instead take a pointer argument for the buffer. > > That way any sandbox mapping gets greatly simplified and users of > > the API intuitively know what to do. > > > > Signed-off-by: Alexander Graf > > --- > > board/BuR/common/common.c | 2 +- > > board/gdsys/p1022/controlcenterd-id.c | 10 +++++----- > > cmd/mvebu/bubt.c | 4 ++-- > > common/splash_source.c | 4 +++- > > drivers/bootcount/bootcount_ext.c | 12 ++++++------ > > drivers/fpga/zynqpl.c | 8 +++++--- > > fs/fs.c | 20 ++++++++++---------- > > include/fs.h | 12 ++++++------ > > lib/efi_loader/efi_file.c | 6 ++---- > > 9 files changed, 40 insertions(+), 38 deletions(-) > > As mentioned before, we should not change this API. There is no need - > U-Boot uses addresses, and this just expands the scope of the sandbox > private address. What we have, in either case, is imperfect. We're basically hiding some funky details for sandbox support inside of fs_read/fs_write. That with this patch we're moving more of the sandbox wrappers around is something I don't see as a positive change. We also don't drop all casts in the callers. Some go away, some get changed, at least one gets added. In the end, I don't think this patch is a win. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: