[Skiboot] [PATCH] opal-prd: fix for 64-bit pnor sizes

Jeremy Kerr jk at ozlabs.org
Tue Sep 13 14:14:28 AEST 2016


Current builds of opal-prd are failing with:

  pnor.c: In function ‘pnor_init’:
  pnor.c:48:43: error: passing argument 3 of ‘blocklevel_get_info’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    rc = blocklevel_get_info(pnor->bl, NULL, &(pnor->size), &(pnor->erasesize));
                                             ^
  In file included from ./libflash/libflash.h:21:0,
                   from ./libflash/libffs.h:19,
                   from pnor.c:17:
  ./libflash/blocklevel.h:64:5: note: expected ‘uint64_t * {aka long unsigned int *}’ but argument is of type ‘uint32_t * {aka unsigned int *}’
   int blocklevel_get_info(struct blocklevel_device *bl, const char **name, uint64
       ^

Commit c043065cf changed the type of PNOR sizes to a uint64_t, so we
need to update our pnor code to match.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
Cc: Michael Neuling <mikey at neuling.org>
---
 external/opal-prd/pnor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/external/opal-prd/pnor.h b/external/opal-prd/pnor.h
index 729a969..4ff449c 100644
--- a/external/opal-prd/pnor.h
+++ b/external/opal-prd/pnor.h
@@ -7,7 +7,7 @@
 struct pnor {
 	char			*path;
 	struct ffs_handle	*ffsh;
-	uint32_t		size;
+	uint64_t		size;
 	uint32_t		erasesize;
 	struct blocklevel_device *bl;
 };
-- 
2.7.4



More information about the Skiboot mailing list