mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luke Jones" <luke@ljones.dev>
To: "Mario Limonciello" <superm1@kernel.org>, linux-kernel@vger.kernel.org
Cc: linux-input@vger.kernel.org,
	"Benjamin Tissoires" <bentiss@kernel.org>,
	"Jiri Kosina" <jikos@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	corentin.chary@gmail.com
Subject: Re: [PATCH v4 3/9] platform/x86: asus-armoury: move existing tunings to asus-armoury module
Date: Sat, 28 Sep 2024 21:52:16 +1200	[thread overview]
Message-ID: <b0bf1b66-5f6b-484f-aaaf-ccd10459e0e8@app.fastmail.com> (raw)
In-Reply-To: <919a3891-4024-4b67-81ae-93f3c87ee37b@kernel.org>

On Sat, 28 Sep 2024, at 2:45 AM, Mario Limonciello wrote:
> On 9/26/2024 18:20, Luke Jones wrote:
>
>>>> + asus_armoury.mini_led_dev_id = 0;
>>>> + if (asus_wmi_is_present(ASUS_WMI_DEVID_MINI_LED_MODE)) {
>>>> + asus_armoury.mini_led_dev_id = ASUS_WMI_DEVID_MINI_LED_MODE;
>>>> + err = sysfs_create_group(&asus_armoury.fw_attr_kset->kobj,
>>>> + &mini_led_mode_attr_group);
>>>> + } else if (asus_wmi_is_present(ASUS_WMI_DEVID_MINI_LED_MODE2)) {
>>>> + asus_armoury.mini_led_dev_id = ASUS_WMI_DEVID_MINI_LED_MODE2;
>>>> + err = sysfs_create_group(&asus_armoury.fw_attr_kset->kobj,
>>>> + &mini_led_mode_attr_group);
>>>> + }
>>>> + if (err)
>>>> + pr_warn("Failed to create sysfs-group for mini_led\n");
>>>
>>> Shouldn't you fail and clean up here?
>> 
>> Honestly not sure. It's only a failed WMI call, and the group doesn't get created for that fail, the others might be fine. I'll defer to your advice on that.
>
> It comes down to whether failures are expected on some machines or not 
> in practice.
>
> If a machine will fail to create groups, then yeah you should allow 
> skipping.  If it doesn't then I feel you have a much more logical 
> cleanup and support strategy if you unwind on any failure.
>
> Hans or Ilpo might have some thoughts here too.

I see now that I wasn't thinking clearly about this. I was zooming in on the asus_wmi_is_present() and just somehow blinding myself to the fact that, *that* isn't the error source.

Thank you for catching, I will update the code with proper unwind and handling. 

>>> I think you should be using this mutex more.  For example what if an
>>> attribute is being written while the module is unloaded?
>> 
>> Good point. I'll adjust code to suit. However if I do, this will trickle through the other patches I've added your review tag to. Will this be okay?
>> 
>>>
>
> If they change in a material way drop my tag and I can just re-review.

Looks like they haven't :)

  reply	other threads:[~2024-09-28  9:52 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-26  9:29 [PATCH v4 0/9] platform/x86: introduce asus-armoury driver Luke D. Jones
2024-09-26  9:29 ` [PATCH v4 1/9] platform/x86: asus-wmi: export symbols used for read/write WMI Luke D. Jones
2024-09-26 15:26   ` Mario Limonciello
2024-09-26  9:29 ` [PATCH v4 2/9] hid-asus: Add MODULE_IMPORT_NS(ASUS_WMI) Luke D. Jones
2024-09-26 11:54   ` Jiri Kosina
2024-09-26  9:29 ` [PATCH v4 3/9] platform/x86: asus-armoury: move existing tunings to asus-armoury module Luke D. Jones
2024-09-26 15:48   ` Mario Limonciello
2024-09-26 23:20     ` Luke Jones
2024-09-27 14:45       ` Mario Limonciello
2024-09-28  9:52         ` Luke Jones [this message]
2024-09-26 19:10   ` Markus Elfring
2024-09-26 21:50     ` Luke Jones
2024-09-27  6:09       ` [v4 " Markus Elfring
2024-09-27  7:05         ` Luke Jones
2024-09-27  7:24           ` Markus Elfring
2024-09-27  7:43             ` Luke Jones
2024-09-27  7:48               ` Julia Lawall
2024-09-26  9:29 ` [PATCH v4 4/9] platform/x86: asus-armoury: add panel_hd_mode attribute Luke D. Jones
2024-09-26 15:17   ` Mario Limonciello
2024-09-26 22:12     ` Luke Jones
2024-09-26  9:29 ` [PATCH v4 5/9] platform/x86: asus-armoury: add the ppt_* and nv_* tuning knobs Luke D. Jones
2024-09-26 15:22   ` Mario Limonciello
2024-09-26 22:39     ` Luke Jones
2024-09-26  9:29 ` [PATCH v4 6/9] platform/x86: asus-armoury: add dgpu tgp control Luke D. Jones
2024-09-26  9:29 ` [PATCH v4 7/9] platform/x86: asus-armoury: add apu-mem control support Luke D. Jones
2024-09-26 15:25   ` Mario Limonciello
2024-09-26 22:14     ` Luke Jones
2024-09-26  9:29 ` [PATCH v4 8/9] platform/x86: asus-armoury: add core count control Luke D. Jones
2024-09-26 15:30   ` Mario Limonciello
2024-09-26 21:47     ` Luke Jones
2024-09-26 22:02       ` Mario Limonciello
2024-09-29  7:00         ` Luke Jones
2024-09-26  9:29 ` [PATCH v4 9/9] platform/x86: asus-wmi: deprecate bios features Luke D. Jones
2024-09-26 14:56   ` Mario Limonciello
2024-09-26 22:04     ` Luke Jones
2024-09-28  0:13   ` kernel test robot
2024-09-28 21:02     ` Luke Jones
2024-09-26 14:50 ` [PATCH v4 0/9] platform/x86: introduce asus-armoury driver Mario Limonciello
2024-09-26 21:44   ` Luke Jones

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=b0bf1b66-5f6b-484f-aaaf-ccd10459e0e8@app.fastmail.com \
    --to=luke@ljones.dev \
    --cc=bentiss@kernel.org \
    --cc=corentin.chary@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=superm1@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®