Message ID | 20230525133812.30841-2-srinivas.kandagatla@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp385000vqr; Thu, 25 May 2023 06:51:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BU6KtJ8YB8O35uU9xwVWGpbBpi342KzvnwfzhFIs+Os8FCgqDWV+quE53jrkNR91jOfrd X-Received: by 2002:a17:903:2441:b0:1ae:2b94:7016 with SMTP id l1-20020a170903244100b001ae2b947016mr1871661pls.55.1685022717062; Thu, 25 May 2023 06:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685022717; cv=none; d=google.com; s=arc-20160816; b=oXCtPBKrgeG6u31v5TxOOco5QlgP9G1lK4/tiFqTymi/LxOQaKN5/LFZ/VRVoYc8Gx HJc8wek/V8dny+nBLE05PCIo3q65RCe8JQvNpjZ3vkbXlADwcN69V0vRoV5K6ikwDJAO 2xAhDf7vwgtwmRLPo9FqwIGaDUWpZgRtV0sn96ge6HC1IN5eNKSdnqYNgpu3v4m77SCU ey6xhvEUkbmkgn6xlxg1AdKAA9EPrixmXQeOFuTwM1st3escwE2R92GI6IGfM7Zqn5cF 4DM+PKQy6HVg0dHzq4GqTWhJQFt8m/jmK4pUpKc65I3MxJiohPinoHgMy+oDatrgQM2m owsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3GVjrhO4+wX67tAd5gKWT8UX+KnLSIyA9RaY+rGVUm8=; b=rw2QHxCogLPI/Tg3tH6mIc2VLo5muJ7abKs/6tHFm35IomM0ebtfR8xeEgAqCLl+Tm t8o7m/LBPEANpSVD82NlTZ9OJmlsVQJ0/og2FtGvmU5q3k/bHfUMNX4l3mk5+/kVhwBX Rgtboh3A3AhayTztmRNSgs1VVn8x2iW6OeGiF9fayRmw5/2BGb9NmjIks+nj8NOe/hqa Zt4lpKoDza48CMMxeTtuThYY/EyZjAOtp8myDFka/3CWorqHAnSfyvamkJpyu/fXCnrD xMYo9obv68NO4lrni9BsRWhwUF/16WNuXXxT88F8DFfkLpJgcrgS2mci8ZXwZ6MQ1wXi /uLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X1Hw6Xzq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a170902ce8800b001afbfb0e80fsi1497668plg.453.2023.05.25.06.51.42; Thu, 25 May 2023 06:51:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X1Hw6Xzq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241201AbjEYNi7 (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Thu, 25 May 2023 09:38:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241137AbjEYNix (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 25 May 2023 09:38:53 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA491A7 for <linux-kernel@vger.kernel.org>; Thu, 25 May 2023 06:38:49 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-30789a4c537so1469096f8f.0 for <linux-kernel@vger.kernel.org>; Thu, 25 May 2023 06:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685021927; x=1687613927; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3GVjrhO4+wX67tAd5gKWT8UX+KnLSIyA9RaY+rGVUm8=; b=X1Hw6XzqT2tCaEFAbBeyu2o+ljfzQPvtuTFskLmVPUAkg/4BkcJV8Zd6VaLsby29Gg vMDO16B7GXss94RdI/jUOvLfpkyHTCixhDSG+fvY5UT3CvijIF8j9RqwWAWaHgSzN+Tv HON9LXdlJsqIxG7l5Hmuq4m//jDrI++PiFLuHvdsbL5hjsRJ2UceFXWZ+077bluACqAq jh/fE4iwx5s5zAeh4bdbuGw15gcnYAeDlvHA4IgUpOz5IgW6EZZF0snzJR0d4MLxIMhx Fb7X4++8GSf7phrVGaBFNWP/7tAp8UzF4F5GHbdaGSHjCNGMpatzDStjoDJiVO22qBQ7 cKJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685021927; x=1687613927; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3GVjrhO4+wX67tAd5gKWT8UX+KnLSIyA9RaY+rGVUm8=; b=IZU1lpZ/alscbe5wuL/9kkkR9LGvq35Se7zRZHEk4z18yBnL78d5wD9twy0moPNSim 0u4UvcvQnWfLA46sN7tl4V39iUo9vpbuKooygpgHo8SYpToS/ae7nZI1Lx49F7PMbNpq Fahnb1STvRVoqlR0jUfHdpL9xSOGUkdAZrKyw/Goapz2FR6789BpYPWZODt3+qDs0Ldc M0cHmfwobcHsvdfVfKbaOiqz8Sr1irLyNlgfYQRcsyJmFb5HrcUnecnL/6HFAnPcF0o5 S5T0Q6USjVbeElUisYMmJxzS5XUucrPYyqlg4ttb1+yqgb9I8CGfWqmakXdrYkNHcmIK KPaQ== X-Gm-Message-State: AC+VfDz7lMH3r1tZOMpCKceG8sa0u8T8/ea79Mv/q/3XsZxTtpKbAFYP lPdlHSQPwdYzVLMsp0E4tlT89w== X-Received: by 2002:a5d:4526:0:b0:306:36ef:2e3b with SMTP id j6-20020a5d4526000000b0030636ef2e3bmr2078354wra.70.1685021927652; Thu, 25 May 2023 06:38:47 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id z17-20020a5d6551000000b00301a351a8d6sm1803641wrv.84.2023.05.25.06.38.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 06:38:47 -0700 (PDT) From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> To: vkoul@kernel.org Cc: andersson@kernel.org, yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Subject: [PATCH v2 1/4] soundwire: qcom: update status correctly with mask Date: Thu, 25 May 2023 14:38:09 +0100 Message-Id: <20230525133812.30841-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230525133812.30841-1-srinivas.kandagatla@linaro.org> References: <20230525133812.30841-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766874380453225326?= X-GMAIL-MSGID: =?utf-8?q?1766874380453225326?= |
Series |
soundwire: qcom: stablity fixes
|
|
Commit Message
Srinivas Kandagatla
May 25, 2023, 1:38 p.m. UTC
SoundWire device status can be incorrectly updated without
proper mask, fix this by adding a mask before updating the status.
Fixes: c7d49c76d1d5 ("soundwire: qcom: add support to new interrupts")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/soundwire/qcom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, May 25, 2023 at 02:38:09PM +0100, Srinivas Kandagatla wrote: > SoundWire device status can be incorrectly updated without > proper mask, fix this by adding a mask before updating the status. > > Fixes: c7d49c76d1d5 ("soundwire: qcom: add support to new interrupts") > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > --- When rebasing on 6.5-rc1, I noticed that this one was apparently never merged along with the rest of the series. Any idea how this could have happened? And can we get this one into 6.5 as well? > drivers/soundwire/qcom.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c > index aad5942e5980..9440787e924b 100644 > --- a/drivers/soundwire/qcom.c > +++ b/drivers/soundwire/qcom.c > @@ -515,7 +515,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl) > status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ)); > > if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) { > - ctrl->status[dev_num] = status; > + ctrl->status[dev_num] = status & SWRM_MCP_SLV_STATUS_MASK; > return dev_num; > } > } Johan
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index aad5942e5980..9440787e924b 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -515,7 +515,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl) status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ)); if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) { - ctrl->status[dev_num] = status; + ctrl->status[dev_num] = status & SWRM_MCP_SLV_STATUS_MASK; return dev_num; } }