public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luke Jones <luke@ljones.dev>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <markgross@kernel.org>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] asus-wmi: Add support for ROG X13 tablet mode
Date: Tue, 09 Aug 2022 15:26:39 +1200	[thread overview]
Message-ID: <F8WBGR.2I3OK4ERR79N3@ljones.dev> (raw)
In-Reply-To: <CAHp75VcjTG=fFBjjHRYT2+ARfE-VHWKJ9aV8sF4JtRVo7Ke2vQ@mail.gmail.com>

Hi Andy,
> 
>>  -       { KE_KEY, 0xFA, { KEY_PROG2 } },           /* Lid flip 
>> action */
>>  +       { KE_KEY, 0xFA, { KEY_PROG2 } }, /* Lid flip action */
> 
> Have maintainers asked you about this? Otherwise it is irrelevant 
> change.
> 

Fixed

> ...
> 
>>  +                       pr_err("This device has lid-flip-rog quirk 
>> but got ENODEV checking it. This is a bug.");
> 
> dev_err() ?

Okay, changed here and in previous patch to match it.

So that I'm clearer on dev_err(), this doesn't do something like exit 
the module does it? It's just a more detailed error print?

> 
>>  +static void lid_flip_rog_tablet_mode_get_state(struct asus_wmi 
>> *asus)
>>  +{
>>  +       int result = asus_wmi_get_devstate_simple(asus, 
>> ASUS_WMI_DEVID_LID_FLIP_ROG);
>>  +
>>  +       if (result >= 0) {
> 
> First of all, it's better to decouple assignment and definition, and
> move assignment closer to its user. This is usual pattern.
> 

I don't fully understand why you would want the separation given how 
short these two blocks are (I'll change in this and previous patch of 
course, I just don't personally understand it).

Cheers,
Luke.
> 



  reply	other threads:[~2022-08-09  3:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08  3:11 [PATCH v2 0/2] asus-wmi: add support for ROG XFlow tablet mode Luke D. Jones
2022-08-08  3:11 ` [PATCH v2 1/2] asus-wmi: Adjust tablet/lidflip handling to use enum Luke D. Jones
2022-08-08 15:48   ` Andy Shevchenko
2022-08-08 16:13     ` Hans de Goede
2022-08-08 16:24       ` Andy Shevchenko
2022-08-08 17:18         ` Hans de Goede
2022-08-08  3:11 ` [PATCH v2 2/2] asus-wmi: Add support for ROG X13 tablet mode Luke D. Jones
2022-08-08 15:52   ` Andy Shevchenko
2022-08-09  3:26     ` Luke Jones [this message]
2022-08-09  7:12       ` Andy Shevchenko
2022-08-09  7:22         ` Luke Jones
2022-08-08 15:46 ` [PATCH v2 0/2] asus-wmi: add support for ROG XFlow " Andy Shevchenko

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=F8WBGR.2I3OK4ERR79N3@ljones.dev \
    --to=luke@ljones.dev \
    --cc=andy.shevchenko@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --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