mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Stuart <stuart.a.hayhurst@gmail.com>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	linux-kernel@vger.kernel.org,
	Markus Elfring <Markus.Elfring@web.de>
Subject: Re: [PATCH v3] HID: corsair-void: Add Corsair Void headset family driver
Date: Thu, 22 Aug 2024 08:02:47 +0200	[thread overview]
Message-ID: <171ecc6e-281e-4b43-8bab-c776faa89ccb@wanadoo.fr> (raw)
In-Reply-To: <CALTg27kBYb5+GOwBz4a1-xeM-21DrbUh7eQyNkW9K_m6TdSwNQ@mail.gmail.com>

Le 22/08/2024 à 03:03, Stuart a écrit :
>> Maybe is_wired could be close to other bools below, to improve avoid
>> holes in the structure?
> 
> Possibly, I put `name`, `is_wired` and `sidetone_max` together, since
> they only depend on the device model and are set once.
> 
>> Missing newline.
> 
> Done
> 
>> I'm not familiar with the hid_hw_raw_request() API, but I think that a
>> kfree(send_buf) is missing here.
> 
> The `__free(kfree)` on the declaration should take care of that

Sorry, I missed that.
You are right.

> 
>> Nitpick: No need to init.
> 
> Thanks, but that `ret` won't be in the next revision anyway
> 
>> You could save 2 lines if ret was initialized when declared.
> 
> Could I? Wouldn't it get overwritten by `hid_hw_raw_request`?

No, you are obviously right.

BTW, the return value of corsair_void_request_status() is not used.
Does it make sense to change it into avoid function?

> 
>> devm_kasprintf() would simplify this.
> 
> Well that's a lot simpler...
> 
> Thanks,
> Stuart
> 
> 


  reply	other threads:[~2024-08-22  6:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  0:22 Stuart Hayhurst
2024-08-20  7:21 ` Markus Elfring
2024-08-20 17:59   ` Stuart
2024-08-21  6:49     ` [v3] " Markus Elfring
2024-08-20  9:16 ` [PATCH v3] " Markus Elfring
2024-08-20 17:39   ` Stuart
2024-08-21  7:50 ` Christophe JAILLET
2024-08-21  8:05   ` [v3] " Markus Elfring
2024-08-22  1:03   ` [PATCH v3] " Stuart
2024-08-22  6:02     ` Christophe JAILLET [this message]
2024-08-22 15:14       ` Stuart

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=171ecc6e-281e-4b43-8bab-c776faa89ccb@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=Markus.Elfring@web.de \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuart.a.hayhurst@gmail.com \
    /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®