Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4211403imu; Mon, 28 Jan 2019 20:08:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN4ZTqOlqvCajJo8yPLqPq1y/t5ycjzIAxk7mFTvv5ShA4c+v6d08g4FpCvNX0Pi6dcG3c9T X-Received: by 2002:a17:902:b18b:: with SMTP id s11mr24307848plr.56.1548734917994; Mon, 28 Jan 2019 20:08:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1548734917; cv=pass; d=google.com; s=arc-20160816; b=ZVnyAHFszA9WkW6zbJxibJavXhyeT6umaEtoCD/SRn6QHjF5871bU1I+elzzeyoB3E 7xwuU6NN9rTcyFThq6VUY/l1u9RdjFZ26hHc5AZhkwZCy+bxr+1T343qICPVGrUUyMOF 8hTFwIqgyJgIZkVCCweuP5MehMdd6gvb2hMMuvvSw92xMYqRWZ2Opo2HJe6H9z9rkb0/ t1yK6oqyEytai4g9Mh7w1fN6N1dD8cIwVh6zNuLMiSGwgU57CDc6gla9yOx9rk2aEQgS V+m1UZyYcQ9WiFU4Hgn5pSjKqgS/gz7ljxYkH7VIc6/Mt4txLks57WA1L0qCi0ZTJItW Srbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:domainkey-signature; bh=eVWPnxIpahyQ5RTzqIJ8nl/MJQnNarrN5F3AafkBOQg=; b=1A5myAl7vMTalZBd8ddBd6m/lv7egg9eyVdXhwGgxvARxA6uKFLgt9DFelVhy0E+6v HF0gnZkk5PsZEDSFEnsAXJayrBepT3Dfz2K9x60PhjuNv+OITBIAeji+fk/w4IYBGVWN CCv1H9nwp7ZYDNGSvUyLqORoKFp0AbEpCjhlKxnGFEUUiQLpV/QmTQSziqx/NmBonnqG suyHdktXFhYOjIj2yXFit6imgA04hNPFHD2Fvsit8EbxRTikfngMsdIr1nz5S9mBfpGq zP3HkoTkv6xXx3aGUmelEI+2gA08v4Ey4aKUQR11iEk06lkqHhk6eguFK+81Ss2vM6ne RtvA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zoho.com header.s=default header.b=IEeywxed; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zoho.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j91si36315055pld.395.2019.01.28.20.08.22; Mon, 28 Jan 2019 20:08:37 -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; dkim=pass header.i=@zoho.com header.s=default header.b=IEeywxed; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zoho.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727304AbfA2EGd (ORCPT + 99 others); Mon, 28 Jan 2019 23:06:33 -0500 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25495 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726843AbfA2EGd (ORCPT ); Mon, 28 Jan 2019 23:06:33 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1548734777; cv=none; d=zoho.com; s=zohoarc; b=Q5gVPtcGSRqwYxnkRDf14d/27v3U3egy2ycN2vfGIAShRfktN34fOYSG6AGDT0doBPX900+Ns0wj3ApKaTYU3hmEcxUR4OMySZewbzvW8JgV7ZglLinKBsgNMQwfINrMe2o3RS+MmOmMKhZmF1pkUxtFjxRwE2t7PKPzJyQRXhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1548734777; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=eVWPnxIpahyQ5RTzqIJ8nl/MJQnNarrN5F3AafkBOQg=; b=M5vm8XPXiFTpUNJ55oSfEahHh80C1coew9VBqZoPClY8guYdIzeRURfb4y3mYL8eKnGaR1RypOHg2xlrt+t8EHmbou/ES8YBzCPaad3vJAAj8xdlz/7G4C0jHEYuTEw3ve2BxYMA+Hz2AgnSa38oeYKHMfleme0l9PpK+a4KOYw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=subject:to:references:cc:from:message-id:date:user-agent:mime-version:in-reply-to:content-type; b=ENtkCpX2UfsxP+q5+IwiYFSh+eWNAcCTqEHLWeF7xnYn/h+vsqHeNjkIyPDVCpQk25/JwBFpV+9Y G3WJKybOOiXEZUcHVMTDTeHIvUHV1mhaHzCLwJkc19xqXJoGWpWO DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1548734777; s=default; d=zoho.com; i=zhouyanjie@zoho.com; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; l=1762; bh=eVWPnxIpahyQ5RTzqIJ8nl/MJQnNarrN5F3AafkBOQg=; b=IEeywxedqkDKNjden8PI2MUeAcCywJCZ2rGbV1kcmTzFJ6fmz0l/IL9lh/npLQHt ngPYlhhty/18KBsmM8Ie9yABrwqsLyOHFTr7PlJs2t4Y33DgqrxIAucKcBwMwD4SPWC IVzd1cLgpbG1M6DRTa+ufdHteCg5V2SwwOIjd/To= Received: from [192.168.88.133] (171.221.112.7 [171.221.112.7]) by mx.zohomail.com with SMTPS id 1548734775058984.7677012084524; Mon, 28 Jan 2019 20:06:15 -0800 (PST) Subject: Re: [PATCH RESEND 4/4] Pinctrl: Ingenic: Fix const declaration. To: Joe Perches , Paul Cercueil References: <1548410393-6981-1-git-send-email-zhouyanjie@zoho.com> <1548410393-6981-5-git-send-email-zhouyanjie@zoho.com> <1548439157.1804.1@crapouillou.net> 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 From: Zhou Yanjie Message-ID: <5C4FD12A.2050005@zoho.com> Date: Tue, 29 Jan 2019 12:06:02 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I would prefer to keep it. There are many other drivers that also use=20 this header file. On 2019=E5=B9=B401=E6=9C=8829=E6=97=A5 03:22, Joe Perches wrote: > 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[] =3D { "mmc-1bit", >>> "mmc-4bit", }; >>> static const struct function_desc jz4740_functions[] =3D { >>> =09{ "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 >> =E2=80=98const=E2=80=99 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 { > =09const char *name; > -=09const char **group_names; > +=09const char * const *group_names; > =09int num_group_names; > =09void *data; > }; > >