diff options
author | 2018-03-16 18:27:03 +1100 | |
---|---|---|
committer | 2018-06-07 11:48:20 +1000 | |
commit | 6473a21d8bfe0eb923e4adfd2b536e79ca248081 (patch) | |
tree | 871dc02ffa021a469b8b8dc95fed5841926ac69b /fdtoverlay.c | |
parent | d5db5382c5e583d184e4484662eb87f1999d4a46 (diff) |
Consolidate utilfdt_read_len() variants
There are no less than _four_ variants on utilfdt_read() which is a bit
excessive. The _len() variants are particularly pointless, since we can
achieve the same thing with very little extra verbosity by using the usual
convention of ignoring return parameters if they're NULL. So, get rid of
them (we keep the shorter names without _len, but add now-optional len
parameters).
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'fdtoverlay.c')
-rw-r--r-- | fdtoverlay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fdtoverlay.c b/fdtoverlay.c index 62a942d..2a2c89c 100644 --- a/fdtoverlay.c +++ b/fdtoverlay.c @@ -63,7 +63,7 @@ static int do_fdtoverlay(const char *input_filename, off_t blob_len, ov_len, total_len; int i, ret = -1; - blob = utilfdt_read_len(input_filename, &blob_len); + blob = utilfdt_read(input_filename, &blob_len); if (!blob) { fprintf(stderr, "\nFailed to read base blob %s\n", input_filename); @@ -84,7 +84,7 @@ static int do_fdtoverlay(const char *input_filename, /* read and keep track of the overlay blobs */ total_len = 0; for (i = 0; i < argc; i++) { - ovblob[i] = utilfdt_read_len(argv[i], &ov_len); + ovblob[i] = utilfdt_read(argv[i], &ov_len); if (!ovblob[i]) { fprintf(stderr, "\nFailed to read overlay %s\n", argv[i]); |