From patchwork Wed Nov 6 16:32:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 3148301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 35690BEEB2 for ; Wed, 6 Nov 2013 16:33:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7376120454 for ; Wed, 6 Nov 2013 16:33:34 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A68A20452 for ; Wed, 6 Nov 2013 16:33:33 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve62n-0001Qr-Ta; Wed, 06 Nov 2013 16:33:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve62l-0005RI-5m; Wed, 06 Nov 2013 16:33:23 +0000 Received: from mail-we0-f178.google.com ([74.125.82.178]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve62i-0005Pu-0a for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2013 16:33:20 +0000 Received: by mail-we0-f178.google.com with SMTP id q59so5089193wes.23 for ; Wed, 06 Nov 2013 08:32:52 -0800 (PST) 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=wvjxSCsSMogiJVF5y2QzSOX/d462tWW2AXYzVjueAJc=; b=E/EWUAnDxKQ5o9tLig0DZ39gKgp48aovtGyesaqQXVg6QSFIYs5G78l8l36pVBElGr 8SIPtBz1LQs95JxSiqGqIzOOeJa9I7sQdrjamIQjj1HE0+0ZplDXjx40slplSvt8Nfab iKsQ0AmPlWK8ctDh3n1j4PLQuWSWRc00ADLvhQRkC7QvOVRUAcUfP0DDJflw2kXMeuoA PY+gMH8NITIj/ueXWWOsdlEx2r2kBiNFCJIznlsyOD4hw56S5I59fyvyjfSN5hMY66y4 al3DwAtAZoQCPX9IrGCfOFdMPl614QnYsquVXJYHq3jNrnKzJJnNoyF5zeTVMy5ScoQ1 d5VA== X-Gm-Message-State: ALoCoQlZDa+un8nRQCWjCuVPV7qWMnGILhl3543KJN1fhKZWFBTJg7E2zOKAwc1HOXPZ1ffsr1u8 X-Received: by 10.194.1.139 with SMTP id 11mr3263145wjm.33.1383755571204; Wed, 06 Nov 2013 08:32:51 -0800 (PST) Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id td6sm26028392wic.10.2013.11.06.08.32.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 08:32:50 -0800 (PST) From: Ard Biesheuvel To: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH trivial] arm64: constify hwcap_str Date: Wed, 6 Nov 2013 17:32:47 +0100 Message-Id: <1383755567-17244-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131106_113320_151397_B84F5E17 X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: Ard Biesheuvel , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Turn hwcap_str from a 'writable array of pointers to const char[]' to a multidimensional const char[][]. Signed-off-by: Ard Biesheuvel --- This is something I noticed when looking at Steve Capper's hwcaps patch: really no point in having a writable array of 8-byte pointers in .data keeping track of these hwcap strings. arch/arm64/kernel/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 055cfb8..b6aa6b4 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -301,10 +301,10 @@ static int __init topology_init(void) } subsys_initcall(topology_init); -static const char *hwcap_str[] = { +static const char hwcap_str[][8] = { "fp", "asimd", - NULL + "" }; static int c_show(struct seq_file *m, void *v) @@ -328,7 +328,7 @@ static int c_show(struct seq_file *m, void *v) /* dump out the processor features */ seq_puts(m, "Features\t: "); - for (i = 0; hwcap_str[i]; i++) + for (i = 0; hwcap_str[i][0]; i++) if (elf_hwcap & (1 << i)) seq_printf(m, "%s ", hwcap_str[i]);