mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Denis Benato <benato.denis96@gmail.com>,
	Denis Benato <denis.benato@linux.dev>,
	linux-kernel@vger.kernel.org
Cc: platform-driver-x86@vger.kernel.org,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Luke D . Jones" <luke@ljones.dev>,
	"Mateusz Schyboll" <dragonn@op.pl>
Subject: Re: [PATCH 3/3] platform/x86: asus-armoury: add keyboard control firmware attributes
Date: Fri, 26 Dec 2025 13:20:11 +0100	[thread overview]
Message-ID: <158ff4a5-027e-4b0f-8dff-f3227cfddc2e@kernel.org> (raw)
In-Reply-To: <1aada2dd-c689-4e29-a47e-ab5c82f21b89@gmail.com>

On 26/12/2025 12:46, Denis Benato wrote:
> 
> On 12/26/25 12:06, Krzysztof Kozlowski wrote:
>> On 25/12/2025 15:30, Denis Benato wrote:
>>> +ASUS_ATTR_GROUP_BOOL(kbd_leds_shutdown, "kbd_leds_shutdown",
>>> +		     "Keyboard backlight while system is shutdown");
>>> +
>>>  static ssize_t gpu_mux_mode_current_value_store(struct kobject *kobj,
>>>  						struct kobj_attribute *attr,
>>>  						const char *buf, size_t count)
>>> @@ -867,6 +1043,35 @@ static bool has_valid_limit(const char *name, const struct power_limits *limits)
>>>  	return limit_value > 0;
>>>  }
>>>  
>>> +static struct asus_armoury_kbd_status *asus_init_kbd_state(void)
>>> +{
>>> +	int err;
>>> +	u32 kbd_status;
>>> +	struct asus_armoury_kbd_status *kbd_state __free(kfree) = NULL;
>> This is an undesired syntax explicitly documented as one to avoid. You
>> need here proper assignment, not NULL. Please don't use cleanup.h if you
>> do not intend to follow it because it does not make the code simpler.
> Hello and thank you for your feedback!
> 
> I have used __free here to match a previous comment from Ilpo:
> https://lore.kernel.org/all/25bd0c90-2de0-ef66-c18d-661180b71fd4@linux.intel.com/
> and I figured that since this is the same exact pattern as that it would have made
> sense to use it.
> 
> May I ask you to elaborate further please? If there is a more effective way to take
> advantage of cleanup.h I will very much consider it.

Just read the doc before using it. It is very, very clear what is the
recommended syntax,


Best regards,
Krzysztof

  reply	other threads:[~2025-12-26 12:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-25 14:30 [PATCH 0/3] platform/x86: asus-wmi: move " Denis Benato
2025-12-25 14:30 ` [PATCH 1/3] platform/x86: asus-wmi: explicitly mark more code with CONFIG_ASUS_WMI_DEPRECATED_ATTRS Denis Benato
2025-12-29 10:06   ` Ilpo Järvinen
2025-12-30 13:36     ` Denis Benato
2025-12-30 13:41       ` Ilpo Järvinen
2025-12-30 13:53         ` Denis Benato
2025-12-25 14:30 ` [PATCH 2/3] platform/x86: asus-wmi: fix sending OOBE at probe Denis Benato
2025-12-29 10:07   ` Ilpo Järvinen
2025-12-29 10:08     ` Ilpo Järvinen
2025-12-25 14:30 ` [PATCH 3/3] platform/x86: asus-armoury: add keyboard control firmware attributes Denis Benato
2025-12-26 11:06   ` Krzysztof Kozlowski
2025-12-26 11:46     ` Denis Benato
2025-12-26 12:20       ` Krzysztof Kozlowski [this message]
2025-12-29 10:33         ` Ilpo Järvinen
2025-12-29 10:24   ` Ilpo Järvinen

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=158ff4a5-027e-4b0f-8dff-f3227cfddc2e@kernel.org \
    --to=krzk@kernel.org \
    --cc=benato.denis96@gmail.com \
    --cc=denis.benato@linux.dev \
    --cc=dragonn@op.pl \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=platform-driver-x86@vger.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

Powered by JetHome