From patchwork Fri Apr 4 17:24:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Emilio_L=C3=B3pez?= X-Patchwork-Id: 337072 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D74EB1400A4 for ; Sat, 5 Apr 2014 04:27:59 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WW7u4-0006Es-DS; Fri, 04 Apr 2014 17:27:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WW7u2-00023S-8B; Fri, 04 Apr 2014 17:27:42 +0000 Received: from yotta.elopez.com.ar ([2a00:1768:1004:d00d:c0de:4:f00d:cafe]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WW7tz-00022P-9s for linux-arm-kernel@lists.infradead.org; Fri, 04 Apr 2014 17:27:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=elopez.com.ar; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From; bh=2PeD+2Ijifp/zFHUCpikgzzlUHVd0vRTQJ56ciPcp0c=; b=Yfl29V1Gch2SCRmto+YznpkRzO5yAumTgW0a88x4P8LH1zoWvtUuqW351ehUUcfl8mycLRou1PQ6u7UsUx9AYS1ahazVwXtDSMgmZBe/afwqlkw8o39FHgkTIyD57R9rwK2f2k9awZMBQaN2xLFLzxfRUI/kaKTw57rmcfH/zbTJaIZOGtdFZP0Dzdyrs0x5wHQiL7WszuHwxmznf3khTQ6sl9RkSk8CeNtgxdg/pF/+qEe1oCyXsXSfmj25BCKqn/hC1YdGUbxGarijS59nOg3i+AT/QGFrXw4lUDY1tG3+/LBrDy2J3W98iS48Wd685TpdhSLC745KzWVfAP1hCA==; Received: from 201-212-135-39.cab.prima.net.ar ([201.212.135.39] helo=desktop.lan) by yotta.elopez.com.ar with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.82) id 1WW7tN-00049I-N0; Fri, 04 Apr 2014 14:27:02 -0300 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= To: Maxime Ripard , wim@iguana.be, carlo.caione@gmail.com Subject: [PATCH] watchdog: sunxi: Fix compilation with C=2 Date: Fri, 4 Apr 2014 14:24:25 -0300 Message-Id: <1396632265-16124-1-git-send-email-emilio@elopez.com.ar> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140404_132739_683482_3616C3E5 X-CRM114-Status: UNSURE ( 8.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: =?UTF-8?q?Emilio=20L=C3=B3pez?= , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org When compiling sunxi_defconfig while using C=2, the following error causes the compilation to fail: drivers/watchdog/sunxi_wdt.c:60:15: error: constant 0b0001 is not a valid number Fix it by using hex notation instead of the non-standard binary one Signed-off-by: Emilio López Reviewed-by: Guenter Roeck --- drivers/watchdog/sunxi_wdt.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c index cd00a78..693b9d2 100644 --- a/drivers/watchdog/sunxi_wdt.c +++ b/drivers/watchdog/sunxi_wdt.c @@ -57,17 +57,17 @@ struct sunxi_wdt_dev { */ static const int wdt_timeout_map[] = { - [1] = 0b0001, /* 1s */ - [2] = 0b0010, /* 2s */ - [3] = 0b0011, /* 3s */ - [4] = 0b0100, /* 4s */ - [5] = 0b0101, /* 5s */ - [6] = 0b0110, /* 6s */ - [8] = 0b0111, /* 8s */ - [10] = 0b1000, /* 10s */ - [12] = 0b1001, /* 12s */ - [14] = 0b1010, /* 14s */ - [16] = 0b1011, /* 16s */ + [1] = 0x1, /* 1s */ + [2] = 0x2, /* 2s */ + [3] = 0x3, /* 3s */ + [4] = 0x4, /* 4s */ + [5] = 0x5, /* 5s */ + [6] = 0x6, /* 6s */ + [8] = 0x7, /* 8s */ + [10] = 0x8, /* 10s */ + [12] = 0x9, /* 12s */ + [14] = 0xA, /* 14s */ + [16] = 0xB, /* 16s */ }; static int sunxi_wdt_ping(struct watchdog_device *wdt_dev)