Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp378334lqh; Sat, 4 May 2024 05:14:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWIMKXEAQJM8Tkt4Wa5qtn+1wDLhL0G8sAJA0WOK/NViOngL1yysrRR43CvIgiTo6OAUY3NkQTX38P5s6ZfnYTZE00rafG30/C1hW9Eg== X-Google-Smtp-Source: AGHT+IEBEaGmION2fWnu0rU1xXoZcZ3N6hz73nvUSoHroZ4xw2tNVRKC/yVbzexa29kR6PSvQyoK X-Received: by 2002:a81:ac47:0:b0:61d:fd33:7e25 with SMTP id z7-20020a81ac47000000b0061dfd337e25mr4960073ywj.51.1714824893669; Sat, 04 May 2024 05:14:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714824893; cv=pass; d=google.com; s=arc-20160816; b=qF5AtbwIDCjXloMpHi7/L+pQgCBOmDBEEaP3n/LQxxjHMNx8Xt5Bx6GoBSX+eNblS4 E0yIIXGbQC1fwyoshxIZHMFN3VDY9+U/GC9jakFLEc94TyBOLhJkya4JJRSZJUnwVMAe kTnEK4sK8xFrYAsIq6WVZ6yBNrTuj+DRuvwARxuER/NDjFmzwT0/KF1VtazcoDk24MtE 6JOwrCJoqE6q+g2rRwPVAgyEA44goqYG5iNqkvhoCNR3xnZieizXQ6NTRqcndqRXyvLZ aMuWF0wGZRVyJxFusFZ5Zk/X96YTT+3b4GKNaYIN21mie9Dl3vySKxEusZ73haudRPR5 Al/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Z4uW8vkpJwjMgTh4E1Wrw1M345yEYA5oDpkU/J3ZBcI=; fh=KXdso3hycph+C6tqeso+YqAvEeCzYtD89ujQtxlmfTg=; b=y6NcwJLnojIoXc38GIHn4mxpkfDwDVbsmilfnKGzL4cmDjlPVpVkZ+NU+PWTHJh6vo 80ySXgxFMUzO3YwV60uuAWk+cHqcfR5kPTESAmV5dPCi+TlZmgBOjueL/TDPl/Tjki9R jc1Dn4uDXNGCGcwlyNjA/DXJlJplad6nbFl1Y3ITWa5d+6MvBwiAO5+j+azzkQOIBSCW SKfpOi480r031gC7dvzyr3/Is689s4oDpoKuosg8So6RctfN+pYPqVWdOFV8Gi3336DP ScDWCK2cWC4ocp/ppBE6lPgWLF4UuKGNh0Oi9NFuDC1AACW45O4N/2bJUgb/PjrGu1pI Me0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=mariuszachmann.de); spf=pass (google.com: domain of linux-kernel+bounces-168636-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168636-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id hf13-20020a05622a608d00b0043affa5ec8csi5317749qtb.419.2024.05.04.05.14.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 05:14:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168636-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=mariuszachmann.de); spf=pass (google.com: domain of linux-kernel+bounces-168636-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168636-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 651611C21082 for ; Sat, 4 May 2024 12:14:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A45A322309; Sat, 4 May 2024 12:14:38 +0000 (UTC) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5302A22616; Sat, 4 May 2024 12:14:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.254.4.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714824878; cv=none; b=psttxWOMMPGZuQ91400oTw3l4evqKrIy937vKZxto7s7DMEDibQ41h4nNC7vPXb8tAJSGKQzZbdgtr5EteyLtcuI1L7azrXLWIWWFMtQ/6p+HOB+sQ1S60hnWlymvndG80iziwHII/6Z9pfrliO1AM9bG76FwzH9DMKVrBgrxSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714824878; c=relaxed/simple; bh=DtSbZ3+OvoBO0Tvog94lU+WUttXC6WgpQYyQ3aTPybs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rZIOEX11dkcU26NWw13Atp6zcrzmzBsxkuGcIAEHHOz5SCKSjGrjkpsRFK/FlLL/mYuIeWz2wNlTyZv4blGZ0PnFw4rAXz8mOZZ4r4wBy8c5jOa3k6P4qA0ZTm5sCM2//3Si9eRaPOR7eRD5vYelS86DSAF2URzGfJQplqzzTx4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mariuszachmann.de; spf=pass smtp.mailfrom=mariuszachmann.de; arc=none smtp.client-ip=178.254.4.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mariuszachmann.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mariuszachmann.de Received: from [2.211.228.80] (helo=marius.localnet) by ms-10.1blu.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1s3EHg-00FLWC-Gz; Sat, 04 May 2024 14:14:32 +0200 From: Marius Zachmann To: linux-hwmon@vger.kernel.org, Aleksa Savic Cc: Jonas Malaco , Aleksa Savic , Jean Delvare , Guenter Roeck , 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 Message-ID: <4888670.GXAFRqVoOG@marius> In-Reply-To: <20240504092504.24158-3-savicaleksa83@gmail.com> References: <20240504092504.24158-1-savicaleksa83@gmail.com> <20240504092504.24158-3-savicaleksa83@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-Con-Id: 241080 X-Con-U: 0-mail 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 > --- > 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