All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Stuart <stuart.a.hayhurst@gmail.com>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] HID: corsair-void: Add Corsair Void headset family driver
Date: Tue, 11 Feb 2025 13:02:45 +0100	[thread overview]
Message-ID: <183b2a4e-d8bb-454f-8ac7-f74ca9d56269@kernel.org> (raw)
In-Reply-To: <CALTg27mzuJsvrQneDKD9ni=tYspaap7=NfLgsBak4hALu+1jzw@mail.gmail.com>

On 11. 02. 25, 12:30, Stuart wrote:
>> And what about having one work for all three (reg, up, unreg) as I
>> suggested. As I wrote, IMO, you would need no lock then. Only flags to
>> see what to do there.
> 
> I wasn't super keen on that because it felt like forcing three otherwise
> separate things into one, but it makes sense if I look at it as corsair_void's
> work function.
> 
> Is there a guarantee that the same work item won't run twice at the same time?

It's a single work, it cannot run twice.

> Do I need to make a work queue for that? I'm also not sure how to pass
> arguments to the work function. I'm sure all of that is answered by some
> documentation somewhere, but I couldn't find it myself when I looked previously.

E.g. set_bit() (one bit per OP) to something like 'unsigned long flags' 
in 'struct corsair_void_drvdata'. But it depends if you want to preserve 
order of actions... (Which was not guaranteed with separate queues 
anyway, so I assume not?)

thanks,
-- 
js
suse labs

  reply	other threads:[~2025-02-11 12:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 23:30 [PATCH v5] HID: corsair-void: Add Corsair Void headset family driver Stuart Hayhurst
2024-10-11 11:12 ` Jiri Kosina
2025-02-10  7:26 ` Jiri Slaby
2025-02-10  7:32   ` Jiri Slaby
2025-02-10 16:15     ` Stuart
2025-02-10 17:43       ` Jiri Slaby
2025-02-10 18:31         ` Stuart
2025-02-10 19:34           ` Jiri Slaby
2025-02-10 20:32             ` Stuart
2025-02-11  5:36               ` Jiri Slaby
2025-02-11 11:30                 ` Stuart
2025-02-11 12:02                   ` Jiri Slaby [this message]
2025-02-11 12:44                     ` Stuart
2025-02-11 17:40                       ` Jiri Slaby

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=183b2a4e-d8bb-454f-8ac7-f74ca9d56269@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.