Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1799826pxj; Sat, 5 Jun 2021 03:33:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg9yNbyULdLb1BYLVGzJefAWJy8zu1tDrOUT3YHGHGAtlQ3tSkSixIbLFxJPBfF7HVN1fG X-Received: by 2002:a05:6402:157:: with SMTP id s23mr9935048edu.282.1622889227313; Sat, 05 Jun 2021 03:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622889227; cv=none; d=google.com; s=arc-20160816; b=gtbnKroq4b/wrbMphA6neyAIPchN7HpsEgs63V5CJx93ZZu09CG0QS1YEC6sUlwddX OpnyZEx/+mK5IMrLRkAQAWMToChZEF8HWQDTLRritWeVmwWYOyXqs5mDbEhrdvVn/kb+ 7ylAlZj2+pb9LmQRavqDVNVJ770NsS+ooqLgeEhClpOlZVI/OVYCv6CObxZL43ET6Eya T22zxcvGt6KdE88y44SXImVKh6if6TDGnPfM2fW7XpCnE0ajzMSBD/WVGM04IZgw/VO4 9aV2/SX9j668T7aGoJNq6r8PFSBTi/IFWnwVc/oVpE3QuHRD7GegkPAEqeBAxIt8XX2C w1/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:to:subject:dmarc-filter:sender:dkim-signature; bh=ibQev18T9V9fkVqRTgCod7cdmgA96I6rIWCsroTRfWI=; b=ny7HXjiNFUV/rxPtPbeTjwv5+R373HL5Ia/1Eao9UoYEPHCUAXKbockGposx5zS6cj 4/qEmh84qLDb8lII5G8D0J0pzZMed5UEhRBScl5OdBDV1CFzRoe6T4hKlWLhr45fH/+q c3vHI1fIZ6AbBKwRfmTGb9fsMXPnjhD4ReQIxWWN7twHoof+Fl2m3pdEvbBNV9xNzGsH q166hSGT4kKMB9ZSSUPlVuizMBePrAmFW7C1y+E3j8LRSmILBDtToXMB+2kjegeHXwm3 Cp21y5mVME7G48WeUEZasysJuZhodXlffbEVHq2/6bG7EsNy5lbPcLt48/hxnivhK1r+ 95hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=q2fcjChz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si8077598ede.412.2021.06.05.03.33.23; Sat, 05 Jun 2021 03:33:47 -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=@mg.codeaurora.org header.s=smtp header.b=q2fcjChz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhFEKdc (ORCPT + 99 others); Sat, 5 Jun 2021 06:33:32 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:33937 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbhFEKdb (ORCPT ); Sat, 5 Jun 2021 06:33:31 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1622889104; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: To: Subject: Sender; bh=ibQev18T9V9fkVqRTgCod7cdmgA96I6rIWCsroTRfWI=; b=q2fcjChzC2jP33eUdh+Hxgt+zasYlUYoCCV5aZMwOtmX+csZ/3VPHOzYKS46VXLKssIUKeb4 XDg8YMklrYMNO0MH3ydVfXHrwpSDd+l7SLWY+aquiIG11Mj2E6fmC/vFU8EYE5A/fPNqLDCC 7RoCEatfqRREFV9H10W+RVnyuyM= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 60bb527bf726fa41889cfaa3 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sat, 05 Jun 2021 10:31:23 GMT Sender: srivasam=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B2347C43145; Sat, 5 Jun 2021 10:31:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.212.90] (unknown [157.48.166.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: srivasam) by smtp.codeaurora.org (Postfix) with ESMTPSA id AE40FC433F1; Sat, 5 Jun 2021 10:31:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AE40FC433F1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=srivasam@codeaurora.org Subject: Re: [PATCH] ASoC: qcom: Fix for DMA interrupt clear reg overwriting To: Stephen Boyd , 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 References: <20210603050530.15898-1-srivasam@codeaurora.org> From: Srinivasa Rao Mandadapu Organization: Qualcomm India Private Limited. Message-ID: Date: Sat, 5 Jun 2021 16:01:10 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, Thanks for Your Time for review comments!!! On 6/3/2021 11:47 AM, Stephen Boyd wrote: > Quoting Srinivasa Rao Mandadapu (2021-06-02 22:05:30) >> This patch fixes the DMA interrupt registers overwriting > $ git grep "This patch" -- Documentation/process Okay will change description. > >> issue in lpass platform interrupt handler. > Can you describe the issue more? Sure. will elaborate 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? Okay. Will remove initialization. > >> 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? Not exactly. Will remove it. > >> + 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); -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.