From patchwork Thu Nov 7 17:50:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 21402 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 23A5925E16 for ; Thu, 7 Nov 2013 17:50:17 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id qd12sf3317663ieb.2 for ; Thu, 07 Nov 2013 09:50:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-disposition; bh=/p+XZffe5wwq1l8rX19mqfXiZYu8fJ8hXlUeFY1VWfU=; b=HTqDoWuqSenCQUhe+FZIubsJsrTFnJslVUBBZAnFEhfDY8M4Uz1JdkZwFa8RedxrqY AxXZagM0rKXzON5ZG8U83WATOgczpustgWaibtUmS2ixH1p3x3Vm44qBCVRw0b06W9qN JMKhkjzyE0cnccSsqH+sy+2sm7ixpdWXTC223vsIr10qPzYE/gR7NgVPgJqwTvVHOhtF 5SdbqFBdqarS64vbLZoCG+nGKJUcFwa7GQyCANUR0bKTk7i1+P0np9WzNb9hO9VCQKyH zB+20cimeH9iTb3ne/2CELkHKihHy/euMg+bqgb6pNx1x9LSqNjzg6u4184vv8Y3Zsy5 OQWQ== X-Gm-Message-State: ALoCoQlROL6fyWxPR9vb608NVO441RiJK67G15q6LdbZ4MtBpmX7a7WqmkdqkrEKgMOjfEInp1Qw X-Received: by 10.50.17.101 with SMTP id n5mr1515630igd.2.1383846616499; Thu, 07 Nov 2013 09:50:16 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.133.201 with SMTP id pe9ls1207616qeb.23.gmail; Thu, 07 Nov 2013 09:50:16 -0800 (PST) X-Received: by 10.52.166.200 with SMTP id zi8mr1825686vdb.38.1383846616363; Thu, 07 Nov 2013 09:50:16 -0800 (PST) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id vh9si2047355vcb.100.2013.11.07.09.50.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Nov 2013 09:50:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.53; Received: by mail-vb0-f53.google.com with SMTP id i11so629046vbh.12 for ; Thu, 07 Nov 2013 09:50:16 -0800 (PST) X-Received: by 10.220.173.134 with SMTP id p6mr1370625vcz.36.1383846616056; Thu, 07 Nov 2013 09:50:16 -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 u4csp38097vcz; Thu, 7 Nov 2013 09:50:15 -0800 (PST) X-Received: by 10.180.87.69 with SMTP id v5mr3662438wiz.45.1383846615129; Thu, 07 Nov 2013 09:50:15 -0800 (PST) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com. [217.140.96.21]) by mx.google.com with ESMTPS id or5si3186485wjc.93.2013.11.07.09.50.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 Nov 2013 09:50:15 -0800 (PST) Received-SPF: pass (google.com: domain of catalin.marinas@arm.com designates 217.140.96.21 as permitted sender) client-ip=217.140.96.21; Received: from arm.com (e102109-lin.cambridge.arm.com [10.1.203.24]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id rA7HoEc8007588; Thu, 7 Nov 2013 17:50:14 GMT Date: Thu, 7 Nov 2013 17:50:11 +0000 From: Catalin Marinas To: Ard Biesheuvel Cc: "linux-arm-kernel@lists.infradead.org" , "patches@linaro.org" Subject: Re: [PATCH trivial] arm64: constify hwcap_str Message-ID: <20131107175010.GI13674@arm.com> References: <1383755567-17244-1-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1383755567-17244-1-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: catalin.marinas@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.53 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: , Content-Disposition: inline On Wed, Nov 06, 2013 at 04:32:47PM +0000, Ard Biesheuvel wrote: > 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. I don't see a problem (few bytes wasted). If you want to make it read-only, this would do: diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 9cf30f49610d..84a770fd7003 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -308,7 +308,7 @@ static int __init topology_init(void) } subsys_initcall(topology_init); -static const char *hwcap_str[] = { +static const char *const hwcap_str[] = { "fp", "asimd", NULL