From patchwork Wed Aug 31 18:22:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Urja Rannikko X-Patchwork-Id: 664653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sPYhK09nBz9sDk for ; Thu, 1 Sep 2016 04:24:48 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=jYnFBj0R; dkim-atps=neutral Received: from [127.0.0.1] (helo=ra.coresystems.de) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1bfABB-0000R2-6d; Wed, 31 Aug 2016 20:24:05 +0200 Received: from mail-wm0-f66.google.com ([74.125.82.66]) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_2) (envelope-from ) id 1bfAAz-0000Py-80 for flashrom@flashrom.org; Wed, 31 Aug 2016 20:24:03 +0200 Received: by mail-wm0-f66.google.com with SMTP id a2so241918wmc.2 for ; Wed, 31 Aug 2016 11:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ZZ49TtJqwvcucVcz5det/jqdRAFw7gihayKkyW3HmCE=; b=jYnFBj0RyCf3K26FZRlOlrAlVXALZRHaiq4kUxaHpUxKORgB5AVpr/QY4JPQ30bkwB Hb2yaB+QTwyEp6I4W2omCk4FPQxdt0eaaXuhucdSdV64gJH+QFB9vjzGiK84OiDiGIg7 69fPSzKvd6fSRxiurJAVyyq/LRPZ8hu8LH1AUs+L+qm/0Bpz3cSjROTn404L0g2n6clW 2Z/KpZBhonngAUv0KejtrRHGWMJcdylIHwEht8VTlRsWQnURabZT30fHm4k0H/9Vetw3 q3hc3oCXzwHZqjXnpjza4+dfu+PmJDaEYY2wvCVJslFlYqgY19ypWWAaK58ZudGRdJxr o7ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZZ49TtJqwvcucVcz5det/jqdRAFw7gihayKkyW3HmCE=; b=Y2/HRqRwOKA4vcsVtqnca7HtfiMrssm3TRYR+YJo9pCojfc6gB7GArlFDNAQi3JsQu gVGO/98XI4Tta+2hK7eczbXLYTuhgDI82NPacaxbikcbwFX4Z6ndc1TRV2p3ZEcHmtXd gMERiWuzVr38/K6b/XJ19EmDmCTAj4m23Tvbx/PqZyGUVyssyaP3Cy3QsR+v5TaiEdp4 9LeM53f32v3lc5JyPOMc0F+wYc6+gx/nlikph4St27lLgoNMRSGPbvw2mHx2rCKFBgC/ /PwwSvhU4oyWTLAyvlp5+SeUiGOhY6VSGlz9yAZmVtgT9oY+qmSWASPferzIApnz2ipx 51FA== X-Gm-Message-State: AE9vXwPJh8lf5/MrSsuXhpFyXCkiz4iOm9RlFzBijznnJjrMlHg5rvAu9d8xC3MYwqrRUg== X-Received: by 10.28.19.194 with SMTP id 185mr8486427wmt.51.1472667831766; Wed, 31 Aug 2016 11:23:51 -0700 (PDT) Received: from localhost.localdomain ([149.5.254.26]) by smtp.gmail.com with ESMTPSA id f10sm1084023wje.14.2016.08.31.11.23.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2016 11:23:50 -0700 (PDT) From: Urja Rannikko To: flashrom@flashrom.org Date: Wed, 31 Aug 2016 21:22:10 +0300 Message-Id: <20160831182210.18533-1-urjaman@gmail.com> X-Mailer: git-send-email 2.9.3 X-Spam-Score: -5.8 (-----) Subject: [flashrom] [PATCH] internal: Dont define functions on yet unsupported architechtures X-BeenThere: flashrom@flashrom.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: flashrom discussion and development mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: flashrom-bounces@flashrom.org Sender: "flashrom" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff This fixes a warning with newer (6.1) gcc on ARM, as tested by swiftgeek on irc. Signed-off-by: Urja Rannikko --- internal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal.c b/internal.c index 4062b64..aa5f1d1 100644 --- a/internal.c +++ b/internal.c @@ -131,6 +131,8 @@ int register_superio(struct superio s) int is_laptop = 0; int laptop_ok = 0; +/* This matches with the #if for the registration of par_master_internal */ +#if IS_X86 || IS_MIPS static void internal_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr); static void internal_chip_writew(const struct flashctx *flash, uint16_t val, @@ -155,6 +157,7 @@ static const struct par_master par_master_internal = { .chip_writel = internal_chip_writel, .chip_writen = fallback_chip_writen, }; +#endif enum chipbustype internal_buses_supported = BUS_NONE; @@ -358,6 +361,8 @@ int internal_init(void) } #endif +/* This matches with the #if for the registration of par_master_internal */ +#if IS_X86 || IS_MIPS static void internal_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) { @@ -400,3 +405,4 @@ static void internal_chip_readn(const struct flashctx *flash, uint8_t *buf, mmio_readn((void *)addr, buf, len); return; } +#endif