Linux Power Management development
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Armin Wolf" <W_Armin@gmx.de>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v3 1/9] power: supply: core: rename psy_has_property() to psy_desc_has_property()
Date: Wed, 4 Sep 2024 21:56:30 +0200	[thread overview]
Message-ID: <23d4b0c9-d344-49fe-a10c-e63f1f6fd83f@redhat.com> (raw)
In-Reply-To: <20240904-power-supply-extensions-v3-1-62efeb93f8ec@weissschuh.net>

Hi,

On 9/4/24 9:25 PM, Thomas Weißschuh wrote:
> The function only takes a desc as parameter, align the naming.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>  drivers/power/supply/power_supply_core.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
> index 8f6025acd10a..cff68c4fd63c 100644
> --- a/drivers/power/supply/power_supply_core.c
> +++ b/drivers/power/supply/power_supply_core.c
> @@ -1183,8 +1183,8 @@ bool power_supply_battery_bti_in_range(struct power_supply_battery_info *info,
>  }
>  EXPORT_SYMBOL_GPL(power_supply_battery_bti_in_range);
>  
> -static bool psy_has_property(const struct power_supply_desc *psy_desc,
> -			     enum power_supply_property psp)
> +static bool psy_desc_has_property(const struct power_supply_desc *psy_desc,
> +				  enum power_supply_property psp)
>  {
>  	bool found = false;
>  	int i;
> @@ -1209,7 +1209,7 @@ int power_supply_get_property(struct power_supply *psy,
>  		return -ENODEV;
>  	}
>  
> -	if (psy_has_property(psy->desc, psp))
> +	if (psy_desc_has_property(psy->desc, psp))
>  		return psy->desc->get_property(psy, psp, val);
>  	else if (power_supply_battery_info_has_prop(psy->battery_info, psp))
>  		return power_supply_battery_info_get_prop(psy->battery_info, psp, val);
> @@ -1308,7 +1308,7 @@ static int psy_register_thermal(struct power_supply *psy)
>  		return 0;
>  
>  	/* Register battery zone device psy reports temperature */
> -	if (psy_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
> +	if (psy_desc_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
>  		/* Prefer our hwmon device and avoid duplicates */
>  		struct thermal_zone_params tzp = {
>  			.no_hwmon = IS_ENABLED(CONFIG_POWER_SUPPLY_HWMON)
> @@ -1361,7 +1361,7 @@ __power_supply_register(struct device *parent,
>  		pr_warn("%s: Expected proper parent device for '%s'\n",
>  			__func__, desc->name);
>  
> -	if (psy_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) &&
> +	if (psy_desc_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) &&
>  	    (!desc->usb_types || !desc->num_usb_types))
>  		return ERR_PTR(-EINVAL);
>  
> 


  reply	other threads:[~2024-09-04 19:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 19:25 [PATCH RFC v3 0/9] power: supply: extension API Thomas Weißschuh
2024-09-04 19:25 ` [PATCH RFC v3 1/9] power: supply: core: rename psy_has_property() to psy_desc_has_property() Thomas Weißschuh
2024-09-04 19:56   ` Hans de Goede [this message]
2024-09-14  9:30   ` Sebastian Reichel
2024-09-04 19:25 ` [PATCH RFC v3 2/9] power: supply: core: register thermal zone for battery Thomas Weißschuh
2024-09-04 19:56   ` Hans de Goede
2024-09-14  9:29   ` Sebastian Reichel
2024-09-14  9:55     ` Thomas Weißschuh
2024-09-04 19:25 ` [PATCH RFC v3 3/9] power: supply: hwmon: register battery properties Thomas Weißschuh
2024-09-04 19:57   ` Hans de Goede
2024-09-14  9:35   ` Sebastian Reichel
2024-09-04 19:25 ` [PATCH RFC v3 4/9] power: supply: sysfs: " Thomas Weißschuh
2024-09-04 19:57   ` Hans de Goede
2024-09-14  9:43   ` Sebastian Reichel
2024-09-04 19:25 ` [PATCH RFC v3 5/9] power: supply: sysfs: rework uevent property loop Thomas Weißschuh
2024-09-04 19:58   ` Hans de Goede
2024-09-14  9:59   ` Sebastian Reichel
2024-09-04 19:25 ` [PATCH RFC v3 6/9] power: supply: core: implement extension API Thomas Weißschuh
2024-09-14 10:50   ` Sebastian Reichel
2024-09-14 14:25     ` Thomas Weißschuh
2024-09-16 10:58       ` Sebastian Reichel
2024-09-04 19:25 ` [PATCH RFC v3 7/9] power: supply: core: add locking around extension access Thomas Weißschuh
2024-09-04 19:25 ` [PATCH RFC v3 8/9] power: supply: test-power: implement a power supply extension Thomas Weißschuh
2024-09-04 19:25 ` [PATCH RFC v3 9/9] power: supply: cros_charge-control: use power_supply extensions Thomas Weißschuh

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=23d4b0c9-d344-49fe-a10c-e63f1f6fd83f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=W_Armin@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --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