From: Marius Zachmann <mail@mariuszachmann.de>
To: linux-hwmon@vger.kernel.org, Aleksa Savic <savicaleksa83@gmail.com>
Cc: Jonas Malaco <jonas@protocubo.io>,
Aleksa Savic <savicaleksa83@gmail.com>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] hwmon: (corsair-cpro) Use complete_all() instead of complete() in ccp_raw_event()
Date: Sat, 04 May 2024 14:14:32 +0200 [thread overview]
Message-ID: <4888670.GXAFRqVoOG@marius> (raw)
In-Reply-To: <20240504092504.24158-3-savicaleksa83@gmail.com>
On 04.05.24 at 11:25:02 MESZ, Aleksa Savic wrote
> In ccp_raw_event(), the ccp->wait_input_report completion is
> completed once. Since we're waiting for exactly one report in
> send_usb_cmd(), use complete_all() instead of complete()
> to mark the completion as spent.
>
> Fixes: 40c3a4454225 ("hwmon: add Corsair Commander Pro driver")
> Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
> ---
> drivers/hwmon/corsair-cpro.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/corsair-cpro.c b/drivers/hwmon/corsair-cpro.c
> index 8d85f66f8143..6ab4d2478b1f 100644
> --- a/drivers/hwmon/corsair-cpro.c
> +++ b/drivers/hwmon/corsair-cpro.c
> @@ -140,7 +140,7 @@ static int ccp_raw_event(struct hid_device *hdev, struct hid_report *report, u8
> return 0;
>
> memcpy(ccp->buffer, data, min(IN_BUFFER_SIZE, size));
> - complete(&ccp->wait_input_report);
> + complete_all(&ccp->wait_input_report);
>
> return 0;
> }
>
Acked-by: Marius Zachmann <mail@mariuszachmann.de>
next prev parent reply other threads:[~2024-05-04 12:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-04 9:25 [PATCH 0/3] hwmon: (corsair-cpro) Fix issues when hidraw is used Aleksa Savic
2024-05-04 9:25 ` [PATCH 1/3] hwmon: (corsair-cpro) Use a separate buffer for sending commands Aleksa Savic
2024-05-04 12:14 ` Marius Zachmann
2024-05-04 9:25 ` [PATCH 2/3] hwmon: (corsair-cpro) Use complete_all() instead of complete() in ccp_raw_event() Aleksa Savic
2024-05-04 12:14 ` Marius Zachmann [this message]
2024-05-04 9:25 ` [PATCH 3/3] hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlock Aleksa Savic
2024-05-04 12:14 ` Marius Zachmann
2024-05-04 13:37 ` [PATCH 0/3] hwmon: (corsair-cpro) Fix issues when hidraw is used Guenter Roeck
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=4888670.GXAFRqVoOG@marius \
--to=mail@mariuszachmann.de \
--cc=jdelvare@suse.com \
--cc=jonas@protocubo.io \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=savicaleksa83@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