Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp335672pxj; Thu, 10 Jun 2021 23:55:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgRv3TgDmZ+6wMEW/24nmp+KIdxe9mCbwjUh4m1Z4Qye6OQJDybnxfsmD54E0Efybnx/yc X-Received: by 2002:a17:907:62a7:: with SMTP id nd39mr2287457ejc.502.1623394515941; Thu, 10 Jun 2021 23:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623394515; cv=none; d=google.com; s=arc-20160816; b=NuI8AB1o2PbcS+2nhYyiB8IaoY5zeHzN9E6MAeXTtbrlsmSHJjTg24L2QnYlY4JHME 1KP5BjPURQBH9zCRXlREZJQJH3AxN8ZUCWIuiVrjfh0Ahg6t+QFL/ODthYmr0180aNl0 QNsHaBP3FZCVk+uGgGq8l/dOxNMDMVEpeI1a+IxXAOZ/vrQysyLRMgtJVV90KnnLd6IT jOhWwtcxN9beBxAsbiL3esdzPDRQzDrQq27sIsl9Q6Uslisd/DJYYU3QnVLqRvNDhycw bO0VXEpfOb484EGonEF+oDRP+O9XoXq2sF/b9fcg4RsUBu885MTjkL+R2n8dqw4D95rA lJWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=sklyKCkqcoBClcesbRPk+D2OM57H8Au21vymPqCxTpU=; b=tpm2q8BCLLtOZcutuuq8DuP5+Ho3uFiHbtP7d8+pn8LGouVA3xyIvvCDthz6JCSbaQ oZvkh2jOMZaEVmivmJ5ThIi9tqjesU95HiUnf3tP5meCFqteRnCmpNxOUOenZ05pzH0y GwoarGUGHh1XhHx/Ir5+VfSEoTnx7O2dIdBrjAJacUOVk8mmMDjDZ4wMsNjkJpNpXIYk x0/WyXsHBqlo/kTUj4u8rXpqXAwVFw1wuMXK2Vh7ABwJBig1ysgRGk5OOT5DzCnLbzQo KYEp6aYU6GiPbSCTcjwhjQZDyHh7GYkjVaOmBEHuGxccg6cKA4IvLJ9bjpkZN1PNAsUu Rd7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AH2/OLdV"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si3972194ejr.444.2021.06.10.23.54.53; Thu, 10 Jun 2021 23:55:15 -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=@gmail.com header.s=20161025 header.b="AH2/OLdV"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230346AbhFKGzj (ORCPT + 99 others); Fri, 11 Jun 2021 02:55:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbhFKGzi (ORCPT ); Fri, 11 Jun 2021 02:55:38 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9F17C061574; Thu, 10 Jun 2021 23:53:41 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id g4so5183220pjk.0; Thu, 10 Jun 2021 23:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=sklyKCkqcoBClcesbRPk+D2OM57H8Au21vymPqCxTpU=; b=AH2/OLdVQvlbPqkJ3iD9lFMZN+QxGv4u7G7KOW18l494tp/TTBclaWaHJYXPz/JXyO JdmvFCqRQon7SWFTh02oUrFIPPn6XXDWtZb7skgDgsXOA5APBkxZrIshGZKCS+YfJaJb nJtOXEelb4ehtZYW635V8bQ1N1HB5zvM9S5u/UWBseYXltq7BTdFjIEVn6eT/WcwUJHE Nm4EBWTsJqcowQrApCQhKLAt+zOVjQ0HCPLrBOApxo2XJ3x5P2GR9+S5OZl/kVTNz445 tqdF0aDnDd0pgQ45QTJAjIfelzgZhH+UZ8ZpWstHrQrBu4Oe+zaOGAYiqHSg1Or1kPtO ojKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=sklyKCkqcoBClcesbRPk+D2OM57H8Au21vymPqCxTpU=; b=NynXLrhpGIOzPscXxNVR+nhkz/nJDCmJep3zkNDJxcokBLCws0Y6UWsuZby7mDJ5zN 66OeU9NI/WDv2+0IU9P2Fsp7q7uAJU2iy3fiDePU7g+LZmhSVSHoszJWcTreQxOj9KYY Lt4WguMbes5hieedZGawgiX4LWfoBM33YPkKlgiK0bpYnq/nUzZ1+tNYrRmg/p62Pg/3 3UB2AtqU+flWtlIlMyIPln/W0DzzBXUNxsf0njC+AdLwNxFo+Ils/P92yXi1/Y4OrjI+ aCdxsaTSxf0jQpyKhMtdCR5ZE9baQVyyVg6BpTTbJ5VgUFG67+7oJQG71j6Q+EKZ6rq3 RuoQ== X-Gm-Message-State: AOAM5300Y0nsRwBEuw0MY/B/xir2+X2JzHgZFRsUQwi8AE1L06sYCfid 2fKsOXnxyBFjxBaVKe7UZao= X-Received: by 2002:a17:90a:1b6b:: with SMTP id q98mr7960516pjq.53.1623394421237; Thu, 10 Jun 2021 23:53:41 -0700 (PDT) Received: from raspberrypi ([125.141.84.155]) by smtp.gmail.com with ESMTPSA id a13sm4332599pgm.3.2021.06.10.23.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 23:53:40 -0700 (PDT) Date: Fri, 11 Jun 2021 07:53:36 +0100 From: Austin Kim To: green.wan@sifive.com, vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, austindh.kim@gmail.com, austin.kim@lge.com Subject: [PATCH] dmaengine: sf-pdma: apply proper spinlock flags in sf_pdma_prep_dma_memcpy() Message-ID: <20210611065336.GA1121@raspberrypi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Austin Kim The second parameter of spinlock_irq[save/restore] function is flags, which is the last input parameter of sf_pdma_prep_dma_memcpy(). So declare local variable 'iflags' to be used as the second parameter of spinlock_irq[save/restore] function. Signed-off-by: Austin Kim --- drivers/dma/sf-pdma/sf-pdma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c index c4c4e8575764..f12606aeff87 100644 --- a/drivers/dma/sf-pdma/sf-pdma.c +++ b/drivers/dma/sf-pdma/sf-pdma.c @@ -94,6 +94,7 @@ sf_pdma_prep_dma_memcpy(struct dma_chan *dchan, dma_addr_t dest, dma_addr_t src, { struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan); struct sf_pdma_desc *desc; + unsigned long iflags; if (chan && (!len || !dest || !src)) { dev_err(chan->pdma->dma_dev.dev, @@ -109,10 +110,10 @@ sf_pdma_prep_dma_memcpy(struct dma_chan *dchan, dma_addr_t dest, dma_addr_t src, desc->dirn = DMA_MEM_TO_MEM; desc->async_tx = vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); - spin_lock_irqsave(&chan->vchan.lock, flags); + spin_lock_irqsave(&chan->vchan.lock, iflags); chan->desc = desc; sf_pdma_fill_desc(desc, dest, src, len); - spin_unlock_irqrestore(&chan->vchan.lock, flags); + spin_unlock_irqrestore(&chan->vchan.lock, iflags); return desc->async_tx; } -- 2.20.1