From patchwork Wed Nov 6 16:31:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 21385 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A1E1820DB9 for ; Wed, 6 Nov 2013 16:31:44 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rp8sf16309033pbb.9 for ; Wed, 06 Nov 2013 08:31:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=wvjxSCsSMogiJVF5y2QzSOX/d462tWW2AXYzVjueAJc=; b=RJYxw5WieS1e9fk4D/PNenr8/CdmuawZ7zG23K/XKu+gkVDIrX34XLoBvMuIRlMEDT JlEnoyx64Em7x6cpAhflNXlTcGSjQfRwRK6psr+XLiSgrqag8MEm3pLt4hyNlKz4L44l ld3ptpc1/1u+JmAo2DFSSJw/CDo+o1Mrx1Uo1n1paulzWOcpOPnfvWb3Cuc+32er6SyM wKGtQaRcTIocCltamHmafMbsot6f+m9et4q5n6nW90LM3z8yEc3RNY2Hy1Soz7SPGQv4 d95CkvJsD78ponuUHl3jOcP3tv9/wLTdajLIN2MmE3uye/KJpolFR1+2jhtdOy9qICer 64kQ== X-Gm-Message-State: ALoCoQkD8rdaAb4VubfSzDgUoE/KqiuU3/LrmsNfxLaWQ3WFmDeyeXSED8m8e4B4IwC+ccdfMxo2 X-Received: by 10.66.121.226 with SMTP id ln2mr1468850pab.37.1383755503431; Wed, 06 Nov 2013 08:31:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.63.37 with SMTP id d5ls740823qes.17.gmail; Wed, 06 Nov 2013 08:31:43 -0800 (PST) X-Received: by 10.58.46.171 with SMTP id w11mr3120607vem.5.1383755503271; Wed, 06 Nov 2013 08:31:43 -0800 (PST) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id f10si8665429vck.20.2013.11.06.08.31.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 08:31:43 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id hu8so6989257vcb.28 for ; Wed, 06 Nov 2013 08:31:43 -0800 (PST) X-Received: by 10.58.232.228 with SMTP id tr4mr1000245vec.34.1383755503168; Wed, 06 Nov 2013 08:31:43 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp295981vcz; Wed, 6 Nov 2013 08:31:42 -0800 (PST) X-Received: by 10.194.201.225 with SMTP id kd1mr3298567wjc.35.1383755502399; Wed, 06 Nov 2013 08:31:42 -0800 (PST) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mx.google.com with ESMTPS id gh6si4192267wic.41.2013.11.06.08.31.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 08:31:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.170 is neither permitted nor denied by best guess record for domain of ard.biesheuvel@linaro.org) client-ip=209.85.212.170; Received: by mail-wi0-f170.google.com with SMTP id ex4so5091020wid.5 for ; Wed, 06 Nov 2013 08:31:41 -0800 (PST) X-Received: by 10.194.143.100 with SMTP id sd4mr842275wjb.69.1383755501825; Wed, 06 Nov 2013 08:31:41 -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 e1sm26508912wij.6.2013.11.06.08.31.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 08:31:41 -0800 (PST) From: Ard Biesheuvel To: catalin.marinas@arm.com, linux-arm-kernel@lists.linaro.org Cc: patches@linaro.org, Ard Biesheuvel Subject: [PATCH trivial] arm64: constify hwcap_str Date: Wed, 6 Nov 2013 17:31:34 +0100 Message-Id: <1383755494-17158-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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]);