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: 10406251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7329B60247 for ; Thu, 17 May 2018 10:00:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E89F28A14 for ; Thu, 17 May 2018 10:00:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5024B28A16; Thu, 17 May 2018 10:00:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 99F6628A14 for ; Thu, 17 May 2018 10:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KWGC0nq2/ZFXUWaCY6Dyahj0WrjcrgcK/qzhusuSxNA=; b=Gq4qpQA+f+SrF65+gGZfaEs+KI JemPUaa8aFzwlnSEz11h9sllHYqijwjPsr+N5eCllSYgIuOv3vZ2o7+rhJhFomwaLSnFedwjioyZ2 U9MnVdDw19jk8wBxzcIKY/HC7FBIo91wSHQ2B8XzbAQdEXQXLejN8cnM5gegwkOnpzQy7CNE/4NW6 LTb0ecpoozTtE4auwHoEaDApO2ufZXp7DKuZkQbdRPy2+Rx1bxvqritVbs7LSA1sOJAlbJ2vGCrNg P6ZE39Qwqj9l/a4ZwIEyS1LZwuMQEGUJkx2Pe7969OBoUnSjdobT7BMhTX6EoDVCdwAHFc/giQf19 JGh5Gx5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJFhp-0002Ro-LH; Thu, 17 May 2018 10:00:17 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJFh9-0001ff-71 for linux-arm-kernel@lists.infradead.org; Thu, 17 May 2018 09:59:36 +0000 Received: by mail-wm0-x244.google.com with SMTP id x12-v6so4778361wmc.0 for ; Thu, 17 May 2018 02:59:25 -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=sqAR6hUfxQcKWgXSY2e5dQ9kK5HLT/JqeDMT3QjRnGOnhQ+xjQlUfh6kgidu43mkUq bZxnl24bZY4TrXXAocNwcBTyVI51pIRzyIbQFkWLrNjbggHqLkj0XzuL7Nc+/MxxoXZy 4no2UMiKxq6PLxDZKjSrdUzICroaQ0zfmNyvOHMoI6QZHnzvT9H/vfC30UGH73eXCvyR 8rWWxW7uTcMo2pr6CZWi5m/+95uI1SFfC2OmebueoUrs413teB1yo5i7cpDXm75y3sfk VdawCmDTIjxZyOVRd2NcB2CXdMAmaaKwSIHko+qKqxmMHXbyFFx3KEb0qIynbd5G/A9q C0KA== X-Gm-Message-State: ALKqPweAxTnvPrAoGN+Ve+LdZEosZDwEFEPLOGcDo22BoYGLoxwzZQCy 0600vBgg+uZUSWQqCkKECZmV7A== X-Google-Smtp-Source: AB8JxZqbF2kQ2eoS2+MeSUzTLrKCQXxsunC8JJLFZKvWIqZ4svrEwLMJoNuCa79taXVVV7HFI62zkw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180517_025935_250325_9691C76D X-CRM114-Status: GOOD ( 12.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Srinivas Kandagatla , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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); } }