Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp24285pxj; Wed, 2 Jun 2021 23:20:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrOcEFmxgRI5fpzEjK0RKWxzt+6tHX6SgG7pxTKZmrkFN4YEUScQeZey9qBjfWoaPtQeQa X-Received: by 2002:a17:906:1806:: with SMTP id v6mr37316358eje.454.1622701213003; Wed, 02 Jun 2021 23:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622701212; cv=none; d=google.com; s=arc-20160816; b=mv6q+QRPhtxUoPnQC1bDSEQ0shqrJGM3SsSlIwgxej/HcBhXX+BloGY9zp0RW25wzt LacaU5RgLaim0TbeZD3yRpuzbnzGBF+lplDXvkbgDJNO/o8i6oZ9jrI0lkwneeJMgD7Z S5MqRT7fb+DVkMfGfl6y5HUV1IIsrXT8vM61fJhBB7fmfmeUM0DqlBgSS99fOkXtAHkv WNDwSgJ1BUGhJxqz/75a6xRQ2ROiLgS/fIFZaBfrijPtDAFHDiZSPZdbXoB/6RocVWAd 0dT2ubi9me0jEil4/XZqjMcYweCsYQW/+0vRbfCB2cWFaJ2jFHOCnnlo5amROJm1Pugs lB+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=AORJO5loH8P1GCxBtXakps2SGxdj+XmHegIFz60ntSY=; b=Pf9R+dkCoVxuEiJnZTM+WaJ/sUIn5eYPkWA49go8nIzxhjm/Wn52AmHt0ymAYnDPy0 3Fv/2e9XDX16HDc/VCpB5mtkwKc5D5VKDfWPEUy5utufztHoTKTvVNMba+1WIT/rWB+x X5FfQandMBYyM9cbwX3mP8RdYfB8yhNDxvmcvMjOs+TUOqf5ap5QtDM+Sx0MuldzT0Wj tIQAfK9nSJXVjVzvzTgsR6rx+VkTbQEE5ZwIz348bP0lWmP56TqjXZeqSoVGYYDhchkt A2ZiYOyvSYBC94f6rxlAINiREmXV9Vtrj4A9BtYL5+6mpWHfgBiSz4Bmad7l6beFdJ64 Vl8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=m+a8Q1Up; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si1667689edt.90.2021.06.02.23.19.50; Wed, 02 Jun 2021 23:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=m+a8Q1Up; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbhFCGTq (ORCPT + 99 others); Thu, 3 Jun 2021 02:19:46 -0400 Received: from mail-ot1-f51.google.com ([209.85.210.51]:33570 "EHLO mail-ot1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbhFCGTq (ORCPT ); Thu, 3 Jun 2021 02:19:46 -0400 Received: by mail-ot1-f51.google.com with SMTP id q9-20020a9d66490000b02903c741e5b703so3656652otm.0 for ; Wed, 02 Jun 2021 23:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to; bh=AORJO5loH8P1GCxBtXakps2SGxdj+XmHegIFz60ntSY=; b=m+a8Q1UpsGAwg2QV2ag3baMSuw4sbbIdKA/R3hm/N9Rbev/uihCBU+7ucdJCdo4I1B sN1FtF3Cn2NxdCrssZOG1BR3kj7NBLlERFQXgAB7OGtNUtF3rf9WinaAi86Z9EecPKOl Zp0/gqK7Ib3OXxPjeLHNnEAowBmn5c7TGgWq8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to; bh=AORJO5loH8P1GCxBtXakps2SGxdj+XmHegIFz60ntSY=; b=Dhql+oPtobgr8xAwsz0QLZ1T3wabUBKbZLWxZ24rnv95Dt08Pz9KucpUmOXWEpG0AD Y/jVVmrcsS3S5b16EIe8aAmxVlNk/uRXSI8faQLwNg3bWqEUitzRAWUIfpp/EN4w8eFh 9q9frCDtr8sztcv3c0zBgV1rsiwlMx7C3xK4ZXQAorJkRLdA0e2wavl4kJvPvIISFwwu BdXKLEvyFpzn16b+l7vEr7GH0ihh5fuw1HH999BKzCZTeHTOmQSP1vpAinkgSTEhDqUM Cl8nPUW4EZ0kNyWaqiTeEgX/mJmwqwss1ZmPEJteYeAKlOxRo4ctSJqlw3JM5iIH6MCy zbng== X-Gm-Message-State: AOAM5318zazTDekvcqzNIu85pyfZ9Er4KXGfI4XZ3nEc2WKoLaOQxMTe j2TWO0aIsOHIGWgKrvanZpIzblbn9KR+iVK2/aHecQ== X-Received: by 2002:a9d:18e:: with SMTP id e14mr9745672ote.34.1622701022184; Wed, 02 Jun 2021 23:17:02 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 2 Jun 2021 23:17:01 -0700 MIME-Version: 1.0 In-Reply-To: <20210603050530.15898-1-srivasam@codeaurora.org> References: <20210603050530.15898-1-srivasam@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Wed, 2 Jun 2021 23:17:01 -0700 Message-ID: Subject: Re: [PATCH] ASoC: qcom: Fix for DMA interrupt clear reg overwriting To: Srinivasa Rao Mandadapu , agross@kernel.org, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, bjorn.andersson@linaro.org, broonie@kernel.org, devicetree@vger.kernel.org, judyhsiao@chromium.org, lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, perex@perex.cz, plai@codeaurora.org, robh+dt@kernel.org, rohitkr@codeaurora.org, srinivas.kandagatla@linaro.org, tiwai@suse.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Srinivasa Rao Mandadapu (2021-06-02 22:05:30) > This patch fixes the DMA interrupt registers overwriting $ git grep "This patch" -- Documentation/process > issue in lpass platform interrupt handler. Can you describe the issue more? > > Signed-off-by: Srinivasa Rao Mandadapu > --- Any Fixes tag? > sound/soc/qcom/lpass-platform.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c > index 0df9481ea4c6..e02caa121fa4 100644 > --- a/sound/soc/qcom/lpass-platform.c > +++ b/sound/soc/qcom/lpass-platform.c > @@ -650,7 +650,7 @@ static irqreturn_t lpass_dma_interrupt_handler( > struct lpass_variant *v = drvdata->variant; > irqreturn_t ret = IRQ_NONE; > int rv; > - unsigned int reg = 0, val = 0; > + unsigned int reg = 0, val = 0, val_clr = 0, val_mask = 0; Why assign to 0 and then overwrite it? > struct regmap *map; > unsigned int dai_id = cpu_dai->driver->id; > > @@ -676,8 +676,9 @@ static irqreturn_t lpass_dma_interrupt_handler( > return -EINVAL; > } > if (interrupts & LPAIF_IRQ_PER(chan)) { > - > - rv = regmap_write(map, reg, LPAIF_IRQ_PER(chan) | val); > + val_clr = (LPAIF_IRQ_PER(chan) | val); Is the extra parenthesis useful? > + val_mask = LPAIF_IRQ_ALL(chan); > + rv = regmap_update_bits(map, reg, val_mask, val_clr); > if (rv) { > dev_err(soc_runtime->dev, > "error writing to irqclear reg: %d\n", rv);