Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3074669imm; Thu, 17 May 2018 02:59:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZogxaMY8CJubky1EhS5P9TkrJrJtkkpnkmhA+ISXeB8CvBzT4f4pt2/RMjfYNRvt6fTHVF5 X-Received: by 2002:a17:902:b409:: with SMTP id x9-v6mr4718476plr.180.1526551192302; Thu, 17 May 2018 02:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526551192; cv=none; d=google.com; s=arc-20160816; b=jh60wv/ku8tVmSioYKoXSQTBO7rHWYlgNQ0xjnIrYVoLu4WF/eNitqBcLJlFq2wwVI s3mC+GftaBYsiNhn6F+6Fel7CR91YyOGj7NuaUPxAc5spEVEdb6eH0h4S4H8pO8Gf5Nw WXahNxKO22e48DfKQZANvG2BtElYQhdlC8yCNFlkXBA5FpNDK2qwPz2QBDAxLp/fzS6B InntZ5f1LRrzhMLfz85U+ppr48a2oISW+ga51LdVOTPmPokzmK+3jC/Snyz2aFNgHvoj xMJ3HaPHPmblJTKcAAUd76EhPQQtdEkD0ev9l4lSMl2RR2mlmTF8m9KQTOh4IZ37c19u edFg== 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 y28-v6si1679207pgc.416.2018.05.17.02.59.37; Thu, 17 May 2018 02:59:52 -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 S1751844AbeEQJ71 (ORCPT + 99 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(-) 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); } } -- 2.16.2