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: 21386 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2171020DB9 for ; Wed, 6 Nov 2013 16:32:53 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id k18sf17810542qcv.1 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: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=E2KtyBD43rDvdWM+IRWTDSLC7K6nBlHNU/4nzU8K8Zr0egF3cj65t+xtcqpIBlM/nz mlN9EAoujOaZ58YJplBdGBP1nndaJ+IEw2hkWj5vbu+0nYx1tb9ljB1CVL4iylqsEE4g ft/VxKccM6a5OJ+nx3es77k+55MtUcef/C+9GuhH4fFcAc305fYOrA184cWsYCQ1X868 S00AcW6D2TWh2qThXnNiq+Wc0OsepaCpuYmmxdO6vTx8i7Df7+r0Iq7Nxx4Vc72yHFAH OgUrGvjfK1l1n1zZM6JfAE5Uw45TJazPdWCEEt1hQRD2YtXM7oPguBmna90bwwYilcJH JduA== X-Gm-Message-State: ALoCoQmtkyEYVUSJu42kJO0Ct/byh+l615mPzOr9WlU0fT7Um5DoODRFwj1DI/zkFNGJeYuam6/j X-Received: by 10.58.237.102 with SMTP id vb6mr1252339vec.31.1383755572921; Wed, 06 Nov 2013 08:32:52 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.3.129 with SMTP id c1ls699391qec.84.gmail; Wed, 06 Nov 2013 08:32:52 -0800 (PST) X-Received: by 10.58.100.244 with SMTP id fb20mr3114992veb.6.1383755572784; Wed, 06 Nov 2013 08:32:52 -0800 (PST) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id nh5si7329955vec.30.2013.11.06.08.32.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 08:32:52 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.171 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.171; Received: by mail-vc0-f171.google.com with SMTP id ik5so6724459vcb.2 for ; Wed, 06 Nov 2013 08:32:52 -0800 (PST) X-Received: by 10.52.28.243 with SMTP id e19mr2346573vdh.36.1383755572702; Wed, 06 Nov 2013 08:32:52 -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 u4csp296044vcz; Wed, 6 Nov 2013 08:32:52 -0800 (PST) X-Received: by 10.180.221.67 with SMTP id qc3mr3242689wic.14.1383755571926; Wed, 06 Nov 2013 08:32:51 -0800 (PST) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx.google.com with ESMTPS id bw20si3807543wib.12.2013.11.06.08.32.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 08:32:51 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.51 is neither permitted nor denied by best guess record for domain of ard.biesheuvel@linaro.org) client-ip=74.125.82.51; Received: by mail-wg0-f51.google.com with SMTP id l18so5077381wgh.6 for ; Wed, 06 Nov 2013 08:32:51 -0800 (PST) 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 Cc: patches@linaro.org, Ard Biesheuvel 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-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.171 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]);