Message ID | 1424687829.793543.129878334864.1.gpush@pablo |
---|---|
State | Accepted |
Headers | show |
On Mon, 2015-02-23 at 18:37 +0800, Jeremy Kerr wrote: > We don't have prerror / prlog functions when compiling outside of > skiboot. Use the FL_* macros instead. How are you compiling? Mikey > Signed-off-by: Jeremy Kerr <jk@ozlabs.org> > > --- > libflash/ecc.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/libflash/ecc.c b/libflash/ecc.c > index 9293743..b794e6a 100644 > --- a/libflash/ecc.c > +++ b/libflash/ecc.c > @@ -19,6 +19,8 @@ > #include <stdint.h> > #include <ecc.h> > > +#include "libflash.h" > + > /* > * Matrix used for ECC calculation. > * > @@ -146,7 +148,7 @@ uint8_t eccmemcpy(uint64_t *dst, uint64_t *src, uint32_t len) > > if (len & 0x7) { > /* TODO: we could probably handle this */ > - prerror("ECC data length must be 8 byte aligned length:%i\n", > + FL_ERR("ECC data length must be 8 byte aligned length:%i\n", > len); > return UE; > } > @@ -160,13 +162,13 @@ uint8_t eccmemcpy(uint64_t *dst, uint64_t *src, uint32_t len) > > badbit = eccverify(*data, *ecc); > if (badbit == UE) { > - prerror("ECC: uncorrectable error: %016lx %02x\n", > + FL_ERR("ECC: uncorrectable error: %016lx %02x\n", > (long unsigned int)*data, *ecc); > return badbit; > } > *dst = *data; > if (badbit <= UE) > - prlog(PR_INFO, "ECC: correctable error: %i\n", badbit); > + FL_INF("ECC: correctable error: %i\n", badbit); > if (badbit < 64) > *dst = *data ^ (1ul << (63 - badbit)); > dst++; >
Hi Mikey, >> We don't have prerror / prlog functions when compiling outside of >> skiboot. Use the FL_* macros instead. > > How are you compiling? Building a tool in external/. It's not in mainline yet, but uses libflash in a similar to the way to pflash. [Speaking of which, pflash doesn't compile with the ecc change either - the ecc.h header is in the skiboot include dir, not libflash. Patches coming.] Cheers, Jeremy
diff --git a/libflash/ecc.c b/libflash/ecc.c index 9293743..b794e6a 100644 --- a/libflash/ecc.c +++ b/libflash/ecc.c @@ -19,6 +19,8 @@ #include <stdint.h> #include <ecc.h> +#include "libflash.h" + /* * Matrix used for ECC calculation. * @@ -146,7 +148,7 @@ uint8_t eccmemcpy(uint64_t *dst, uint64_t *src, uint32_t len) if (len & 0x7) { /* TODO: we could probably handle this */ - prerror("ECC data length must be 8 byte aligned length:%i\n", + FL_ERR("ECC data length must be 8 byte aligned length:%i\n", len); return UE; } @@ -160,13 +162,13 @@ uint8_t eccmemcpy(uint64_t *dst, uint64_t *src, uint32_t len) badbit = eccverify(*data, *ecc); if (badbit == UE) { - prerror("ECC: uncorrectable error: %016lx %02x\n", + FL_ERR("ECC: uncorrectable error: %016lx %02x\n", (long unsigned int)*data, *ecc); return badbit; } *dst = *data; if (badbit <= UE) - prlog(PR_INFO, "ECC: correctable error: %i\n", badbit); + FL_INF("ECC: correctable error: %i\n", badbit); if (badbit < 64) *dst = *data ^ (1ul << (63 - badbit)); dst++;
We don't have prerror / prlog functions when compiling outside of skiboot. Use the FL_* macros instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> --- libflash/ecc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)