From patchwork Mon Feb 23 10:37:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Kerr X-Patchwork-Id: 442415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 101BC140182 for ; Mon, 23 Feb 2015 21:37:17 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id E7A961A0B95 for ; Mon, 23 Feb 2015 21:37:16 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42CB81A09EC for ; Mon, 23 Feb 2015 21:37:14 +1100 (AEDT) Received: by ozlabs.org (Postfix, from userid 1023) id 2CA3414012C; Mon, 23 Feb 2015 21:37:14 +1100 (AEDT) MIME-Version: 1.0 Message-Id: <1424687829.793543.129878334864.1.gpush@pablo> To: skiboot@lists.ozlabs.org From: Jeremy Kerr Date: Mon, 23 Feb 2015 18:37:09 +0800 Subject: [Skiboot] [PATCH] libflash: Use FL_* logging functions X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" We don't have prerror / prlog functions when compiling outside of skiboot. Use the FL_* macros instead. Signed-off-by: Jeremy Kerr --- 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 #include +#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++;