From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AD63C47082 for ; Mon, 7 Jun 2021 17:48:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C45660E0B for ; Mon, 7 Jun 2021 17:48:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C45660E0B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0RF6uS7lK/x3ChtgYVIYhTj3JcJSoaYe45phMy/JB1E=; b=4BVOjqVPj5au41 riU6sCUpM8mdIfMxIBX9p7N/unQV0mpnlnQpceEae30sObHYg2wRz42xNCIuOuRxhhUqj4eQfo+9z GyNKmcdsFGp6oQglvwPPM2naI4BZ/fGwTY4dwVnxUhSleW1GlLtH4ttFpiGVu7M1XAtQdAGcMU6j1 U8l5MeRT5tyG946PHg5w5Uidcpocxz7zT5rIKEems64G0zqk9aAGzRqabc5c8l4cxZfeYLQp2BUm1 U2gP4uH/CqhflDkkFNS2IeLW8t/+vwXcp0lch+uEYEdrcffDZH87/269dTsP9PNrrGfheJU9CJxlh 3rASFyP+xZ4aev5LpBzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqJKx-004uJh-2s; Mon, 07 Jun 2021 17:46:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqJHT-004srl-C6 for linux-arm-kernel@lists.infradead.org; Mon, 07 Jun 2021 17:43:21 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4DA6612FC; Mon, 7 Jun 2021 10:43:18 -0700 (PDT) Received: from bogus (unknown [10.57.73.170]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 670063F73D; Mon, 7 Jun 2021 10:43:16 -0700 (PDT) Date: Mon, 7 Jun 2021 18:42:57 +0100 From: Sudeep Holla To: Cristian Marussi Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com Subject: Re: [RFC PATCH 02/10] firmware: arm_scmi: Add missing xfer reinit_completion Message-ID: <20210607174142.jdirvbasvgl7q4oj@bogus> References: <20210606221232.33768-1-cristian.marussi@arm.com> <20210606221232.33768-3-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210606221232.33768-3-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210607_104319_494197_F3619B2D X-CRM114-Status: GOOD ( 15.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jun 06, 2021 at 11:12:24PM +0100, Cristian Marussi wrote: > Reusing timed out xfers in a loop can lead to issue if completion was not > properly reinitialized. > > Signed-off-by: Cristian Marussi > --- > drivers/firmware/arm_scmi/driver.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c > index bee33f9c2032..759ae4a23e74 100644 > --- a/drivers/firmware/arm_scmi/driver.c > +++ b/drivers/firmware/arm_scmi/driver.c > @@ -448,6 +448,7 @@ static int do_xfer(const struct scmi_protocol_handle *ph, > xfer->hdr.poll_completion); > > xfer->hdr.status = SCMI_SUCCESS; > + reinit_completion(&xfer->done); > What could happen after xfer_get_init->scmi_xfer_get->reinit_completion that it needs to be re-initialised again. I don't see any reason for this ? If there are, please state them explicitly. If this is needed, I would drop the one in scmi_xfer_get(). -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel