From patchwork Tue Aug 11 10:43:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leilk Liu X-Patchwork-Id: 6991411 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4B1F8C05AC for ; Tue, 11 Aug 2015 10:43:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7206F206A5 for ; Tue, 11 Aug 2015 10:43:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 573EE2068F for ; Tue, 11 Aug 2015 10:43:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934084AbbHKKnn (ORCPT ); Tue, 11 Aug 2015 06:43:43 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:56329 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S933919AbbHKKnm (ORCPT ); Tue, 11 Aug 2015 06:43:42 -0400 X-Listener-Flag: 11101 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1685036112; Tue, 11 Aug 2015 18:43:39 +0800 Received: from mhfsdcap03.localdomain (10.17.3.153) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Tue, 11 Aug 2015 18:43:37 +0800 From: Leilk Liu To: Mark Brown CC: Mark Rutland , Matthias Brugger , Sascha Hauer , , , , , , Leilk Liu Subject: [PATCH] spi: Mediatek: fix endian warnings Date: Tue, 11 Aug 2015 18:43:09 +0800 Message-ID: <1439289789-29026-1-git-send-email-leilk.liu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-MTK: N Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes endian warnings detected by sparse: - sparse: incorrect type in argument 1 (different base types) expected unsigned int [unsigned] val got restricted __le32 [usertype] - sparse: incorrect type in argument 1 (different base types) expected unsigned int [unsigned] val got restricted __le32 [usertype] Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 4676b01..ae645fa 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@ -359,9 +359,11 @@ static void mtk_spi_setup_dma_addr(struct spi_master *master, struct mtk_spi *mdata = spi_master_get_devdata(master); if (mdata->tx_sgl) - writel(cpu_to_le32(xfer->tx_dma), mdata->base + SPI_TX_SRC_REG); + writel((__force u32)cpu_to_le32(xfer->tx_dma), + mdata->base + SPI_TX_SRC_REG); if (mdata->rx_sgl) - writel(cpu_to_le32(xfer->rx_dma), mdata->base + SPI_RX_DST_REG); + writel((__force u32)cpu_to_le32(xfer->rx_dma), + mdata->base + SPI_RX_DST_REG); } static int mtk_spi_fifo_transfer(struct spi_master *master,