From patchwork Fri Jan 14 11:59:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12713605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CF59C433EF for ; Fri, 14 Jan 2022 11:59:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbiANL7z (ORCPT ); Fri, 14 Jan 2022 06:59:55 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57194 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240924AbiANL7y (ORCPT ); Fri, 14 Jan 2022 06:59:54 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 19B361F413B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642161591; bh=C2OaY+DhNtPJtmQACKGNG+vM/ZeGsj7cOskW2Yvq4yY=; h=From:To:Cc:Subject:Date:From; b=E1BpdhOfREAsM1kb5H4XmdiOodQfLrc7/B5fm1ZFE84qLmp6xn5QE8GaGsGYIQh5d 3fs2wnYLKjalX4aLqEifEKwBzNiXYCZI65EFYgv4fqe89E8rCt1z/blUidgsnBLNP7 hCOrEHoWk957bTe1vjBjKpQr1pu+zZAUFKfYc8Gg9EzMzWca51m85+lnhQ7JTbCX37 h7Z/snujy7GxfIgwlM4fiLi51WFz5e3LRJ+GxE6h8UZU2dskrI1qSB9gLms76I5cF5 SyWWaVIPAgCw9IozDVY8Ma+KhB4vIZhVdU3LyJNfUfQflKXuthSZIv4o6sDatiGXIr AxqoFjPVWhD1w== From: AngeloGioacchino Del Regno To: agross@kernel.org Cc: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, konrad.dybcio@somainline.org, marijn.suijten@somainline.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno Subject: [PATCH] rpmsg: qcom_smd: Fix redundant channel->assigned assignment Date: Fri, 14 Jan 2022 12:59:39 +0100 Message-Id: <20220114115939.146434-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org In qcom_channel_state_worker(), we are setting channel->registered to true when registering a channel, but this is getting repeated both before and after re-locking the channels_lock spinlock, which is obviously a typo. Remove the assignment done out of the spinlock to fix this redundancy. Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: AngeloGioacchino Del Regno --- drivers/rpmsg/qcom_smd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 540e027f08c4..0ee3f7ddabb0 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1298,9 +1298,7 @@ static void qcom_channel_state_worker(struct work_struct *work) spin_unlock_irqrestore(&edge->channels_lock, flags); qcom_smd_create_device(channel); - channel->registered = true; spin_lock_irqsave(&edge->channels_lock, flags); - channel->registered = true; }