<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On Friday 12 August 2016 06:34 AM,
Cyril Bur wrote:<br>
</div>
<blockquote cite="mid:20160812010416.7624-1-cyril.bur@au1.ibm.com"
type="cite">
<pre wrap="">It appears the inital patch was incomplete and coverity has caught</pre>
</blockquote>
<br>
s/inital/initial<br>
<br>
<blockquote cite="mid:20160812010416.7624-1-cyril.bur@au1.ibm.com"
type="cite">
<pre wrap="">
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 <a class="moz-txt-link-rfc2396E" href="mailto:cyril.bur@au1.ibm.com"><cyril.bur@au1.ibm.com></a>
---
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);</pre>
</blockquote>
<br>
Yeah, now it looks good, as it was meaningless to <br>
pass the reference of ecc, as we are not changing<br>
anything.<br>
<br>
Reviewed-by: Mukesh Ojha <a class="moz-txt-link-rfc2396E"
href="mailto:mukesh02@linux.vnet.ibm.com"><mukesh02@linux.vnet.ibm.com></a><br>
<br>
<br>
-Mukesh<br>
<blockquote cite="mid:20160812010416.7624-1-cyril.bur@au1.ibm.com"
type="cite">
<pre wrap="">
if (rc)
goto out_free_ffs;
}
</pre>
</blockquote>
<br>
</body>
</html>