Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1394527img; Sat, 23 Mar 2019 01:35:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJFLol8mO9wJ6NNKHhEDR9TIExYgfNhZxKGcuWpYHP5/IwvXErPU/g3RLmto+ZkHbw/Ice X-Received: by 2002:a17:902:421:: with SMTP id 30mr13803533ple.142.1553330110866; Sat, 23 Mar 2019 01:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553330110; cv=none; d=google.com; s=arc-20160816; b=MQ1QwYRtMO0tChGk6Le1Pok98m/0Vo7xt/FOcjgk0iModfCQCwUGsN90yo2H776riA SZvzMAnD3n/l745mU75PlVCLXg16r8NIR3eF4kJcs/mV2TefuU+V2uKpmx/lYbKfysRt ar5ctnIqv/a86+sBtiqPLR+ZMXbrzU55eQus5mTqiYhIcxHrciC9ay6btndaroaTGy/w ghlqs5+Iqud1eyCgXCzXyR5CtasbSexB9nFmK87TpWzJZ7Bqv0YpQejalPBO7Oq3eQRN cTBkMraZUs3HtSU2CjCap+MCrSWjSMBKoQslHerg6NEkuiuhvrNV86zNsxRGucc4nr2F SKtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=/jswNjOKgHYsYeyKIft+oGJOrbPMQUtifCcL4PJzkMw=; b=oGCm4Vr32yVmwLDsYNvnlpu9R7cl6Arq0bePAdZDoOyAkgbqEjla2TUWnLRcg/LhdH ZaK/Snk10J5gcIs5aLkCIT1GaRhogdATS+PP9JWebDv9vq0cR5shldsm3ZJbQAEiNnk2 /twINq33GckJORQD3sHPzB9Ba0QR/uLRcxuvKlAvsW/Rps8KZyZxU+vzw56eWNyGL7kZ hfilGeTRry9k08nJI+T7Vfsv6Xzh78f7UYoXhGlgOw/k5rK8Gr/xLz0STvqWRuAPMW7k NQ2Ub1bbM+2pPUmQOYvLRrzyNzyswRhWWCKxxalPluYyYJcbfYQW9heVJHof5KVwJbe5 eYVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=ZlERwFy6; 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 m6si8993139pls.436.2019.03.23.01.34.54; Sat, 23 Mar 2019 01:35:10 -0700 (PDT) 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=@agner.ch header.s=dkim header.b=ZlERwFy6; 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 S1726096AbfCWIeQ (ORCPT + 99 others); Sat, 23 Mar 2019 04:34:16 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:49622 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCWIeP (ORCPT ); Sat, 23 Mar 2019 04:34:15 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id D26905C011D; Sat, 23 Mar 2019 09:34:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1553330053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/jswNjOKgHYsYeyKIft+oGJOrbPMQUtifCcL4PJzkMw=; b=ZlERwFy6zHrWy/e4mFcUEjicL96LOC2ANB2rkfSM3/cTOtpDDUO1BK5kGBj51mcGBVLu6j rGAZlpd1ZsxAC+4Hha8GviI3m3CGTXEfpKJ3mSYekBT5uBURb6zARBzrVDmvbunLd8OJ9L HtQAsQEXEizRqF8XU2DCbDRCiUpKXQw= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Sat, 23 Mar 2019 09:34:13 +0100 From: Stefan Agner To: Axel Lin Cc: Mark Brown , Leonard Crestez , Pierre-Hugues Husson , Beniamino Galvani , Liam Girdwood , linux-kernel@vger.kernel.org Subject: Re: [PATCH] regulator: rn5t618: Constify regulator_desc In-Reply-To: <20190320121057.31167-1-axel.lin@ingics.com> References: <20190320121057.31167-1-axel.lin@ingics.com> Message-ID: <6730c8bd06d5052439adaa2c66f68ea7@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.03.2019 13:10, Axel Lin wrote: > The regulator_desc never need to be modified, so define them as const as a > hint to the compiler that they can go into .rodata. > > Signed-off-by: Axel Lin Looks good to me. Reviewed-by: Stefan Agner -- Stefan > --- > drivers/regulator/rn5t618-regulator.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/regulator/rn5t618-regulator.c > b/drivers/regulator/rn5t618-regulator.c > index 790a4a73ea2c..a79c0c43b9f8 100644 > --- a/drivers/regulator/rn5t618-regulator.c > +++ b/drivers/regulator/rn5t618-regulator.c > @@ -46,7 +46,7 @@ static const struct regulator_ops rn5t618_reg_ops = { > .vsel_mask = (vmask), \ > } > > -static struct regulator_desc rn5t567_regulators[] = { > +static const struct regulator_desc rn5t567_regulators[] = { > /* DCDC */ > REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), > REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), > @@ -63,7 +63,7 @@ static struct regulator_desc rn5t567_regulators[] = { > REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000), > }; > > -static struct regulator_desc rn5t618_regulators[] = { > +static const struct regulator_desc rn5t618_regulators[] = { > /* DCDC */ > REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), > REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), > @@ -79,7 +79,7 @@ static struct regulator_desc rn5t618_regulators[] = { > REG(LDORTC2, LDOEN2, BIT(5), LDORTC2DAC, 0x7f, 900000, 3500000, 25000), > }; > > -static struct regulator_desc rc5t619_regulators[] = { > +static const struct regulator_desc rc5t619_regulators[] = { > /* DCDC */ > REG(DCDC1, DC1CTL, BIT(0), DC1DAC, 0xff, 600000, 3500000, 12500), > REG(DCDC2, DC2CTL, BIT(0), DC2DAC, 0xff, 600000, 3500000, 12500), > @@ -107,7 +107,7 @@ static int rn5t618_regulator_probe(struct > platform_device *pdev) > struct rn5t618 *rn5t618 = dev_get_drvdata(pdev->dev.parent); > struct regulator_config config = { }; > struct regulator_dev *rdev; > - struct regulator_desc *regulators; > + const struct regulator_desc *regulators; > int i; > int num_regulators = 0;