[Skiboot] [PATCH] core/flash: More pointer vs value fixes
Mukesh Ojha
mukesh02 at linux.vnet.ibm.com
Fri Aug 12 15:22:24 AEST 2016
On Friday 12 August 2016 06:34 AM, Cyril Bur wrote:
> It appears the inital patch was incomplete and coverity has caught
s/inital/initial
> more issues. The initial patch addressed one aspect of passing
> pointers instead of values, actual function prototypes needed to be
> changed and callers adjusted.
>
> Fixes coverity 134277 and 134278
>
> Fixes: 81a538a ("core/flash: Fix passing pointer instead of value")
> Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
> ---
> core/flash.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/core/flash.c b/core/flash.c
> index da435a0..1e4ac9e 100644
> --- a/core/flash.c
> +++ b/core/flash.c
> @@ -438,7 +438,7 @@ struct flash_hostboot_header {
> /* start and total size include ECC */
> static int flash_find_subpartition(struct blocklevel_device *bl, uint32_t subid,
> uint32_t *start, uint32_t *total_size,
> - bool *ecc)
> + bool ecc)
> {
> struct flash_hostboot_header *header;
> char eyecatcher[5];
> @@ -456,7 +456,7 @@ static int flash_find_subpartition(struct blocklevel_device *bl, uint32_t subid,
>
> /* Get the TOC */
> rc = flash_read_corrected(bl, *start, header,
> - FLASH_SUBPART_HEADER_SIZE, *ecc);
> + FLASH_SUBPART_HEADER_SIZE, ecc);
> if (rc) {
> prerror("FLASH: flash subpartition TOC read failed %i\n", rc);
> goto end;
> @@ -603,7 +603,7 @@ static int flash_load_resource(enum resource_id id, uint32_t subid,
> /* Find the sub partition if required */
> if (subid != RESOURCE_SUBID_NONE) {
> rc = flash_find_subpartition(flash->bl, subid, &part_start,
> - &part_size, &ecc);
> + &part_size, ecc);
Yeah, now it looks good, as it was meaningless to
pass the reference of ecc, as we are not changing
anything.
Reviewed-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
-Mukesh
> if (rc)
> goto out_free_ffs;
> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20160812/c9431c06/attachment.html>
More information about the Skiboot
mailing list