From patchwork Thu May 17 09:59:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 136137 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2062636lji; Thu, 17 May 2018 02:59:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpODXvO3W0SKQ1JZsOsuiGHN6nsp6+AFvtFEQ0Dtcem0PqElqcZM7EGpIBiUbR8a562xAcC X-Received: by 2002:a63:6fcd:: with SMTP id k196-v6mr3573110pgc.376.1526551170917; Thu, 17 May 2018 02:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526551170; cv=none; d=google.com; s=arc-20160816; b=CAhJTLcI0RU7OZ5ueNzuL6QOYQTvuVp+PWD8CwUq6HCZ4+K9NoovAQRBud34BypTUj f2nPy+eAf14REl90ssRQzUe7U8f+mIzLF1uB+vujDYxSwF7EDjeXmrPrJ5/LopYHM38Z hIRV6DUPMoafar9lVRh7Bw5Kv7YOUs3sgxpGkoekOLB6IRd/YqmvtkIQg5DWHzX8BX+Z Z4yAofP4SkVKp0rEB9C54KWMgY9fqATm8N2Ji+UcCKWmbLNXq89FEBXHX7hJOYdENKJT jl0avjRyJTAz8ZV4vIkeHpqy4GIR66ILydbPnCDNldhQ0ir+ysYind82hMrqy2KkXEju XU0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=l10JOmUmWOhm99jtTCTUM6Fs0RAcNM4MF14HMCLR9hA=; b=XEaWSW0So/WelBwUS6i/YvwCGfZCbaDV1sTSRSFeAMZgbrXoGDCb5uj1RgXpOYkU2p qw/JB0LOBGx84qUQwX2L6MsCvPHx7zcp9E7TVKfgjCKRVEzaCnd8l1CfROdY3d5krdkZ cw0lf7xyFaMsOJSIzgGXaqOvgOhWzKjBxiuHIGg7ALI9dDNFIvWpMlnIZNEyMZfkfg/h pOtNKgaujPQzJRWCEWJXkSVvwe0yiZmxSVoapCba5/V+WqAgyvqBqbLtA9M1PjLNh91Z BLEG6W35bsGHCcBRTr9CTeDIyn8pMqtPw/9ZYlvTw9lu0QXhFmDpNCEtiHpAZdWvkCo1 H12g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aHdAXCa/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si4712040plg.491.2018.05.17.02.59.30; Thu, 17 May 2018 02:59:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aHdAXCa/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1751880AbeEQJ71 (ORCPT + 29 others); Thu, 17 May 2018 05:59:27 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33453 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274AbeEQJ7Y (ORCPT ); Thu, 17 May 2018 05:59:24 -0400 Received: by mail-wm0-f65.google.com with SMTP id x12-v6so4778359wmc.0 for ; Thu, 17 May 2018 02:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l10JOmUmWOhm99jtTCTUM6Fs0RAcNM4MF14HMCLR9hA=; b=aHdAXCa/eTyydxc35vNgDiKNXlxS5A+xxF065nGWLdaGKNwgnqFJY1dJgU5PWWW3Uu wB80HVfFBtJDyCoSfwLRFfYmkwwfVB4z2F28j/swwX7YcGpq+VTntGuCRebrAoBex7vW gehbWadzWSS3IJSAThyOCpDb4MfhuIGpm+m9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l10JOmUmWOhm99jtTCTUM6Fs0RAcNM4MF14HMCLR9hA=; b=ZYgW2KKDdMTtzTI4c7GnFJ8pcjilKaaZCoNaYPnqGQmsrMkQzqG7j55vft6Tu9pRVa JrSc58s756mlwLMijZ+OfF3DMFzPw9sWXz5k6r0t3mUqJOYeSyCUu9fcMmgEpCljHfUb prV9R27benhIjcWT3cGnemoAQ/K7kkWGB9LavZAriVF4qIqRV2IC15sSTHfRsPxEb03K qoqeCkPaXswM5HCZ2qtAg0WoFm/s+xsWXsDikMjCQ+RmMVuvQb6pmK3SDCcr2wUGilxt cZ06IddcL1+XiHZhoF+dzXZH3r4oo84mHsCd8ypu+cHxkZasNSWZI0GERyzFZrYKD07i KY6Q== X-Gm-Message-State: ALKqPwcEMlmS/+qNqFWWj2/qnzrxkhJmXFGgQe9a6muJiC3LHi0Gsf1k aReI8gmwsq2x4dL7Eq6Q7dBMpw== X-Received: by 2002:a1c:16ca:: with SMTP id 193-v6mr1215514wmw.37.1526551163790; Thu, 17 May 2018 02:59:23 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b10-v6sm9951458wrn.42.2018.05.17.02.59.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 May 2018 02:59:23 -0700 (PDT) From: Srinivas Kandagatla To: agross@codeaurora.org, vkoul@kernel.org, dmaengine@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Srinivas Kandagatla Subject: [PATCH] dmaengine: qcom: bam_dma: fix invalid assignment warning Date: Thu, 17 May 2018 10:59:16 +0100 Message-Id: <20180517095916.11362-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180517095916.11362-1-srinivas.kandagatla@linaro.org> References: <20180517095916.11362-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building kernel with W=1 throws below invalid assignment warnings. bam_dma.c:676:44: warning: invalid assignment: += bam_dma.c:676:44: left side has type unsigned long bam_dma.c:676:44: right side has type restricted __le16 bam_dma.c:921:41: warning: invalid assignment: += bam_dma.c:921:41: left side has type unsigned long bam_dma.c:921:41: right side has type restricted __le16 Fix them!. Signed-off-by: Srinivas Kandagatla --- drivers/dma/qcom/bam_dma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.16.2 diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index a05fff8a1447..fac1ac910d75 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -673,7 +673,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan, remainder = 0; } - async_desc->length += desc->size; + async_desc->length += le16_to_cpu(desc->size); desc++; } while (remainder > 0); } @@ -918,7 +918,8 @@ static enum dma_status bam_tx_status(struct dma_chan *chan, dma_cookie_t cookie, continue; for (i = 0; i < async_desc->num_desc; i++) - residue += async_desc->curr_desc[i].size; + residue += le16_to_cpu( + async_desc->curr_desc[i].size); } }