All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rpmsg: qcom_smd: Fix redundant channel->assigned assignment
@ 2022-01-14 11:59 AngeloGioacchino Del Regno
  0 siblings, 0 replies; only message in thread
From: AngeloGioacchino Del Regno @ 2022-01-14 11:59 UTC (permalink / raw)
  To: agross
  Cc: bjorn.andersson, mathieu.poirier, linux-arm-msm,
	linux-remoteproc, linux-kernel, kernel, konrad.dybcio,
	marijn.suijten, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno

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 <angelogioacchino.delregno@collabora.com>
---
 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;
 	}
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-14 11:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 11:59 [PATCH] rpmsg: qcom_smd: Fix redundant channel->assigned assignment AngeloGioacchino Del Regno

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.