From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH 4/4] power: supply: core: Constify properties
Date: Tue, 14 Apr 2020 17:57:42 +0200 [thread overview]
Message-ID: <48f5fbce-2eb3-a4dc-8f0f-bde0be0bea6f@collabora.com> (raw)
In-Reply-To: <20200413183853.1088823-5-sebastian.reichel@collabora.com>
Hi Sebastian,
On 13/4/20 20:38, Sebastian Reichel wrote:
> properties is a list of properties supported by the
> driver. It is not modified by the power-supply core
> and drivers are not supposed to change it once the
> list has been registered. Let's mark it as const for
> improved security.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> include/linux/power_supply.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 0392c9cc8f1c..6a34df65d4d1 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -225,7 +225,7 @@ struct power_supply_desc {
> enum power_supply_type type;
> const enum power_supply_usb_type *usb_types;
> size_t num_usb_types;
> - enum power_supply_property *properties;
> + const enum power_supply_property *properties;
> size_t num_properties;
>
> /*
>
next prev parent reply other threads:[~2020-04-14 15:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 18:38 [PATCH 0/4] Add support for constant power-supply property tables Sebastian Reichel
2020-04-13 18:38 ` [PATCH 1/4] power: supply: core: Constify usb_types Sebastian Reichel
2020-04-14 15:56 ` Enric Balletbo i Serra
2020-04-13 18:38 ` [PATCH 2/4] power: supply: charger-manager: Prepare for const properties Sebastian Reichel
2020-04-13 18:38 ` [PATCH 3/4] power: supply: generic-adc-battery: " Sebastian Reichel
2020-04-14 15:57 ` Enric Balletbo i Serra
2020-04-13 18:38 ` [PATCH 4/4] power: supply: core: Constify properties Sebastian Reichel
2020-04-14 15:57 ` Enric Balletbo i Serra [this message]
2020-04-14 15:55 ` [PATCH 0/4] Add support for constant power-supply property tables Enric Balletbo i Serra
2020-05-01 15:10 ` Sebastian Reichel
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=48f5fbce-2eb3-a4dc-8f0f-bde0be0bea6f@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=sre@kernel.org \
/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®