Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3820876imu; Mon, 28 Jan 2019 11:23:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN4tsVLHOxYJ9BbEIXQ9zhxKLGyWxM9frLOOe7Ppc8SP4fzHzcuH8H9UpQkDjyoZPemCaPeD X-Received: by 2002:a17:902:6909:: with SMTP id j9mr22315328plk.196.1548703438557; Mon, 28 Jan 2019 11:23:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548703438; cv=none; d=google.com; s=arc-20160816; b=NcCXZlIP0dcYAri4NvJqyneSoWEa/W4rsNigZjGF2fC943F8vfbST0BqLQjWSjazJn AvblqIMWf/S0OQx2bLaWQ1BV8G1vxiW1iA/psA7MsD0AgJ3a48Cspb47e2v5oF/ZoQZ4 ilnDRE1Wh2RYOLB5jAJ+UuJcnDWbzyLrNmVrfDgRURDFlLqWWi6K+lZ7wj5eiUPymgnd lX3bPMu+WWTJcthWH/h3/0EZ4v00xcG9Ik14A2fkPI3fTwZsyMpECLgKICLLALuyL+es fZApv4kcMN5b8CwkIPikP8iXaznO72CqS5/+AGok0hR27ekBbSWaiVV6wEqr7wkPbfPW 8MpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Bv8bQuiqc4Y4SCQnLtgEAgiyM7ROKOWPcyaqRBE4nEY=; b=mPdPYjeIsxULVylB9WEmDVoMyW27Jkon+WFV4y81MyN2DOqvwd2cip0JXdTFWLoBR3 mUUpqxVpXMfOKARVTb44cTLWGI8euJt88lvxOBimMIWUn75SC85EpWk9AC5EA8EFEz4w LmIbSGGDiQXxv985DfxrAdgPRPyzl5KR0ZtCFd4AACZHZ0RHW6YFjtKLSXFhdtLYgnjn wbeWRkAo2r0n59l3atrEF+SpgK98bqI9YngWymbw71TCt/k3UEAUO1+HVsD4VHrePoUV JGzQqEptCxqtyLh/21heheq3fzFjCzQJRi4PkM75tzkhvrRJ6PxC5sNUjU13yrbnviuU vXSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c31si33281034pgc.465.2019.01.28.11.23.43; Mon, 28 Jan 2019 11:23:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbfA1TWs (ORCPT + 99 others); Mon, 28 Jan 2019 14:22:48 -0500 Received: from smtprelay0008.hostedemail.com ([216.40.44.8]:50229 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727052AbfA1TWs (ORCPT ); Mon, 28 Jan 2019 14:22:48 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id B8534100E86C3; Mon, 28 Jan 2019 19:22:46 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:152:355:379:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2893:3138:3139:3140:3141:3142:3352:3622:3867:3870:3871:3873:3874:4321:4384:4605:5007:10004:10400:10848:11026:11232:11658:11914:12043:12296:12438:12555:12740:12895:13069:13311:13357:13894:14181:14659:14721:21080:21451:21627:30029:30054:30070:30090:30091,0,RBL:172.58.30.243:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:28,LUA_SUMMARY:none X-HE-Tag: team06_34fe5ce20c907 X-Filterd-Recvd-Size: 2586 Received: from XPS-9350 (unknown [172.58.30.243]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Mon, 28 Jan 2019 19:22:43 +0000 (UTC) Message-ID: Subject: Re: [PATCH RESEND 4/4] Pinctrl: Ingenic: Fix const declaration. From: Joe Perches To: Paul Cercueil , Zhou Yanjie Cc: linus.walleij@linaro.org, linux-mips@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, paul.burton@mips.com, syq@debian.org, jiaxun.yang@flygoat.com, 772753199@qq.com Date: Mon, 28 Jan 2019 11:22:42 -0800 In-Reply-To: <1548439157.1804.1@crapouillou.net> References: <1548410393-6981-1-git-send-email-zhouyanjie@zoho.com> <1548410393-6981-5-git-send-email-zhouyanjie@zoho.com> <1548439157.1804.1@crapouillou.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-01-25 at 14:59 -0300, Paul Cercueil wrote: > On Fri, Jan 25, 2019 at 6:59 AM, Zhou Yanjie > wrote: > > Warning is reported when checkpatch indicates that > > "static const char * array" should be changed to > > "static const char * const". [] > > diff --git a/drivers/pinctrl/pinctrl-ingenic.c [] > > @@ -172,23 +172,25 @@ static const struct group_desc jz4740_groups[] [] > > +static const char * const jz4740_mmc_groups[] = { "mmc-1bit", > > "mmc-4bit", }; > > static const struct function_desc jz4740_functions[] = { > > { "mmc", jz4740_mmc_groups, ARRAY_SIZE(jz4740_mmc_groups), }, > > With this patch applied I get this: > > drivers/pinctrl/pinctrl-ingenic.c:196:11: attention : initialization > discards > ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] > { "mmc", jz4740_mmc_groups, ARRAY_SIZE(jz4740_mmc_groups), }, > ^~~~~~~~~~~~~~~~~ You could change group_names to const char * const group_names in pinmux.h --- drivers/pinctrl/pinmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h index 3319535c76cb..2b903774ba5c 100644 --- a/drivers/pinctrl/pinmux.h +++ b/drivers/pinctrl/pinmux.h @@ -122,7 +122,7 @@ static inline void pinmux_init_device_debugfs(struct dentry *devroot, */ struct function_desc { const char *name; - const char **group_names; + const char * const *group_names; int num_group_names; void *data; };