Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-16 Thread Mark Brown
On Sun, Aug 16, 2015 at 03:06:39PM +0100, Russell King - ARM Linux wrote: > All writel() implementations take a CPU number and write it in little > endian format. Hence, writel() almost always uses cpu_to_le32() > internally. I think the reason this keeps coming up is that people aren't

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-16 Thread Russell King - ARM Linux
On Sat, Aug 15, 2015 at 10:16:03PM +0200, Arnd Bergmann wrote: > On Tuesday 11 August 2015 18:43:09 Leilk Liu wrote: > > @@ -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

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-16 Thread Russell King - ARM Linux
On Sat, Aug 15, 2015 at 10:16:03PM +0200, Arnd Bergmann wrote: On Tuesday 11 August 2015 18:43:09 Leilk Liu wrote: @@ -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

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-16 Thread Mark Brown
On Sun, Aug 16, 2015 at 03:06:39PM +0100, Russell King - ARM Linux wrote: All writel() implementations take a CPU number and write it in little endian format. Hence, writel() almost always uses cpu_to_le32() internally. I think the reason this keeps coming up is that people aren't expecting

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-15 Thread Arnd Bergmann
On Saturday 15 August 2015 22:16:03 Arnd Bergmann wrote: > On Tuesday 11 August 2015 18:43:09 Leilk Liu wrote: > > @@ -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

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-15 Thread Arnd Bergmann
On Tuesday 11 August 2015 18:43:09 Leilk Liu wrote: > @@ -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),

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-15 Thread Arnd Bergmann
On Tuesday 11 August 2015 18:43:09 Leilk Liu wrote: @@ -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 +

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-15 Thread Arnd Bergmann
On Saturday 15 August 2015 22:16:03 Arnd Bergmann wrote: On Tuesday 11 August 2015 18:43:09 Leilk Liu wrote: @@ -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)

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-13 Thread Mark Brown
On Thu, Aug 13, 2015 at 10:11:59AM +0800, lei liu wrote: > This patch is applied, should I append a new patch or you rollback it? > Thanks. Please send an incremental patch on top of what's applied and don't top post. signature.asc Description: Digital signature

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-13 Thread Mark Brown
On Thu, Aug 13, 2015 at 10:11:59AM +0800, lei liu wrote: This patch is applied, should I append a new patch or you rollback it? Thanks. Please send an incremental patch on top of what's applied and don't top post. signature.asc Description: Digital signature

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-12 Thread lei liu
Hello Mark, This patch is applied, should I append a new patch or you rollback it? Thanks. On Wed, 2015-08-12 at 16:45 +0200, Jonas Gorski wrote: > Hi, > > On Tue, Aug 11, 2015 at 12:43 PM, Leilk Liu wrote: > > This patch fixes endian warnings detected by sparse: > > - sparse: incorrect type

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-12 Thread Jonas Gorski
Hi, On Tue, Aug 11, 2015 at 12:43 PM, Leilk Liu wrote: > 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

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-12 Thread Jonas Gorski
Hi, On Tue, Aug 11, 2015 at 12:43 PM, Leilk Liu leilk@mediatek.com wrote: 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] noident -

Re: [PATCH] spi: Mediatek: fix endian warnings

2015-08-12 Thread lei liu
Hello Mark, This patch is applied, should I append a new patch or you rollback it? Thanks. On Wed, 2015-08-12 at 16:45 +0200, Jonas Gorski wrote: Hi, On Tue, Aug 11, 2015 at 12:43 PM, Leilk Liu leilk@mediatek.com wrote: This patch fixes endian warnings detected by sparse: - sparse:

[PATCH] spi: Mediatek: fix endian warnings

2015-08-11 Thread Leilk Liu
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

[PATCH] spi: Mediatek: fix endian warnings

2015-08-11 Thread Leilk Liu
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] noident - sparse: incorrect type in argument 1 (different base types) expected