From: Hans de Goede <hdegoede@redhat.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Mark Gross <mgross@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Platform: OLPC: Constify static struct regulator_ops
Date: Mon, 8 Feb 2021 20:01:11 +0100 [thread overview]
Message-ID: <1c0f6456-56cd-0778-fda1-98d810963225@redhat.com> (raw)
In-Reply-To: <20210206232152.58046-1-rikard.falkeborn@gmail.com>
Hi,
On 2/7/21 12:21 AM, Rikard Falkeborn wrote:
> The only usage of it is to assign its address to the ops field in the
> regulator_desc struct, which is a pointer to const struct regulator_ops.
> Make it const to allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/olpc/olpc-ec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c
> index 72dbbea0005c..4ff5c3a12991 100644
> --- a/drivers/platform/olpc/olpc-ec.c
> +++ b/drivers/platform/olpc/olpc-ec.c
> @@ -386,7 +386,7 @@ static int dcon_regulator_is_enabled(struct regulator_dev *rdev)
> return ec->dcon_enabled ? 1 : 0;
> }
>
> -static struct regulator_ops dcon_regulator_ops = {
> +static const struct regulator_ops dcon_regulator_ops = {
> .enable = dcon_regulator_enable,
> .disable = dcon_regulator_disable,
> .is_enabled = dcon_regulator_is_enabled,
>
prev parent reply other threads:[~2021-02-08 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 23:21 Rikard Falkeborn
2021-02-08 19:01 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c0f6456-56cd-0778-fda1-98d810963225@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rikard.falkeborn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®