From patchwork Tue Jun 28 02:41:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9201719 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 12EC0607D3 for ; Tue, 28 Jun 2016 02:43:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05D1C285E0 for ; Tue, 28 Jun 2016 02:43:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE832285E3; Tue, 28 Jun 2016 02:43:29 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 8EED8285E0 for ; Tue, 28 Jun 2016 02:43:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752054AbcF1CnH (ORCPT ); Mon, 27 Jun 2016 22:43:07 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:44672 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbcF1CmL (ORCPT ); Mon, 27 Jun 2016 22:42:11 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9G02B9RNH5GR40@mailout3.samsung.com>; Tue, 28 Jun 2016 11:41:29 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.113]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id AE.CB.05174.9D3E1775; Tue, 28 Jun 2016 11:41:29 +0900 (KST) X-AuditID: cbfee68d-f79876d000001436-b7-5771e3d96252 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id E5.27.04429.8D3E1775; Mon, 27 Jun 2016 19:41:29 -0700 (MST) Received: from samsunx.samsung ([10.113.63.54]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O9G00A9QNH1H050@mmp2.samsung.com>; Tue, 28 Jun 2016 11:41:28 +0900 (KST) From: Andi Shyti To: Kukjin Kim , Krzysztof Kozlowski , Mark Brown Cc: Jaehoon Chung , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: [PATCH v2 5/5] spi: s3c64xx: use unsigned type for fifo handling variables Date: Tue, 28 Jun 2016 11:41:15 +0900 Message-id: <1467081676-8442-6-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1467081676-8442-1-git-send-email-andi.shyti@samsung.com> References: <1467081676-8442-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFLMWRmVeSWpSXmKPExsWyRsSkUPfm48Jwg62dghbbjzxjtVj84zmT xdSHT9gsbvxqY7V4/cLQov/xa2aLTY+vsVpc3jWHzWLG+X1MFo0fb7I7cHlcX/KJ2WPTqk42 j81L6j36tqxi9Pi8SS6ANYrLJiU1J7MstUjfLoErY9GFNewF1zkqJn3az9rA2M/excjJISFg IvFo8SIWCFtM4sK99WxdjFwcQgIrGCU23vjFClP0adpdFojELEaJV3ufMUM4HxklGj9fAGtn E9CUaLr9gw3EFhEolnhy9T8rSBGzwDdGiQUnJzKCJIQFQiX6lxxkBrFZBFQl5h7dB7aCV8BV Ysf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FQiDclsbIqtSg/vqg0J7X4EKMp0GETmaVEk/OBSSCvJN7Q2MTMyNLI3NDCyNhcSZz3 8f91YUIC6YklqdmpqQWpRTB9TBycUg2MXDNypxzf8eSN7UKP208W7OXeI8XAu//ViW2eyQ83 tN/sWaPy4aFDj7lE0mu9xaYbV+SxT5g7662Z3IKcTSzvig4mzxP59vHcR+1/jJVNP8Oz+i9J 5EfM1F+Q+sepxfHhhe+++pYPxU7E1Qdqut9jy1zE4fV3dmeLUsRlgcJlrIZRWz/5NHxbqsRS nJFoqMVcVJwIAN8s8ZjKAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The 'quirks' variable cannot ever be negative, therefore use u8 instead of int. The 8 bit size is given from the fact that currently the quirks variable has very few statuses. The rx_lvl_offset and tx_st_done store shift values, so that u8 is a proper size. fifo_lvl_mask stores a series of masks, to be in we will keep the 32 bit size. Signed-off-by: Andi Shyti Signed-off-by: Jaehoon Chung --- drivers/spi/spi-s3c64xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 6d8486f..6c9503a 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -150,10 +150,10 @@ struct s3c64xx_spi_dma_data { * which is provided as driver data to the driver. */ struct s3c64xx_spi_port_config { - int fifo_lvl_mask[MAX_SPI_PORTS]; - int rx_lvl_offset; - int tx_st_done; - int quirks; + u32 fifo_lvl_mask[MAX_SPI_PORTS]; + u8 rx_lvl_offset; + u8 tx_st_done; + u8 quirks; bool high_speed; bool clk_from_cmu; };