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: 10406243 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 205F660230 for ; Thu, 17 May 2018 09:59:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E80B28A12 for ; Thu, 17 May 2018 09:59:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 030EB28A15; Thu, 17 May 2018 09:59:47 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 787F628A12 for ; Thu, 17 May 2018 09:59:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751907AbeEQJ7p (ORCPT ); Thu, 17 May 2018 05:59:45 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33455 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbeEQJ7Z (ORCPT ); Thu, 17 May 2018 05:59:25 -0400 Received: by mail-wm0-f68.google.com with SMTP id x12-v6so4778360wmc.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=lQrvI9ZEp74L4/hr2Vq5WuVlDlruA7wrzQQkBRaC6Hu+eRZMJFHQ/yzadQsxjfJDfn hVPl3liRZ7T2eBa6lK537fM2oB07gFOFnx3VuVkaGgvQDnssC5JPoh4mxUdqXJpSL50X bqsxO+OrhWR7izcUrBM3Nmz7RZqZJiNIp1c5Mwpz0oXJCA9pI4rPLsiaMl4xVyfoy92y +ChEfAbVS43jH2W0MPek/vDFNcpk6W9Ek3rK5shWsIt81LxYtsi+oUOMLSDFWFLuk/Fd l6zxPK8TKtCOPHuZlsiBAjCnUk0A36zNF21qYbnp5loa3X3TOxS5wnl0kOW7IR+yhPW0 5syQ== X-Gm-Message-State: ALKqPwecxAxkiwDbo1zsFzs/W4MiUt+5TcTbiZcgPwkq6m/RMfDvkhZ8 OOb8WYxyOi5l6WZS3bQiNKMPYQ== 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 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: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.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); } }