linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH spi] spi: mediatek: mtk_spi_driver can be static
  2015-08-07 14:33 [spi:topic/mtk 2/2] drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types) kbuild test robot
@ 2015-08-07 14:33 ` kbuild test robot
  2015-08-07 16:35   ` Applied "spi: mediatek: mtk_spi_driver can be static" to the spi tree Mark Brown
       [not found] ` <201508072245.3TStW9QR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2015-08-07 14:33 UTC (permalink / raw)
  To: Leilk Liu; +Cc: kbuild-all, Mark Brown, linux-spi, linux-kernel


Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 spi-mt65xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 4676b01..e62d304 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -731,7 +731,7 @@ static const struct dev_pm_ops mtk_spi_pm = {
 			   mtk_spi_runtime_resume, NULL)
 };
 
-struct platform_driver mtk_spi_driver = {
+static struct platform_driver mtk_spi_driver = {
 	.driver = {
 		.name = "mtk-spi",
 		.pm	= &mtk_spi_pm,

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [spi:topic/mtk 2/2] drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types)
@ 2015-08-07 14:33 kbuild test robot
  2015-08-07 14:33 ` [PATCH spi] spi: mediatek: mtk_spi_driver can be static kbuild test robot
       [not found] ` <201508072245.3TStW9QR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 5+ messages in thread
From: kbuild test robot @ 2015-08-07 14:33 UTC (permalink / raw)
  To: Leilk Liu; +Cc: kbuild-all, Mark Brown, linux-spi, linux-kernel

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi topic/mtk
head:   a568231f463225eb31593f71446a267a03ae0528
commit: a568231f463225eb31593f71446a267a03ae0528 [2/2] spi: mediatek: Add spi bus for Mediatek MT8173
reproduce:
  # apt-get install sparse
  git checkout a568231f463225eb31593f71446a267a03ae0528
  make ARCH=x86_64 allmodconfig
  make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types)
   drivers/spi/spi-mt65xx.c:362:24:    expected unsigned int [unsigned] val
   drivers/spi/spi-mt65xx.c:362:24:    got restricted __le32 [usertype] <noident>
   drivers/spi/spi-mt65xx.c:364:24: sparse: incorrect type in argument 1 (different base types)
   drivers/spi/spi-mt65xx.c:364:24:    expected unsigned int [unsigned] val
   drivers/spi/spi-mt65xx.c:364:24:    got restricted __le32 [usertype] <noident>
>> drivers/spi/spi-mt65xx.c:734:24: sparse: symbol 'mtk_spi_driver' was not declared. Should it be static?

Please review and possibly fold the followup patch.

vim +362 drivers/spi/spi-mt65xx.c

   346			mult_delta = mtk_spi_get_mult_delta(mdata->tx_sgl_len);
   347			mdata->xfer_len = mdata->tx_sgl_len - mult_delta;
   348			mdata->tx_sgl_len = mult_delta;
   349		} else if (mdata->rx_sgl_len) {
   350			mult_delta = mtk_spi_get_mult_delta(mdata->rx_sgl_len);
   351			mdata->xfer_len = mdata->rx_sgl_len - mult_delta;
   352			mdata->rx_sgl_len = mult_delta;
   353		}
   354	}
   355	
   356	static void mtk_spi_setup_dma_addr(struct spi_master *master,
   357					   struct spi_transfer *xfer)
   358	{
   359		struct mtk_spi *mdata = spi_master_get_devdata(master);
   360	
   361		if (mdata->tx_sgl)
 > 362			writel(cpu_to_le32(xfer->tx_dma), mdata->base + SPI_TX_SRC_REG);
   363		if (mdata->rx_sgl)
   364			writel(cpu_to_le32(xfer->rx_dma), mdata->base + SPI_RX_DST_REG);
   365	}
   366	
   367	static int mtk_spi_fifo_transfer(struct spi_master *master,
   368					 struct spi_device *spi,
   369					 struct spi_transfer *xfer)
   370	{

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Applied "spi: mediatek: mtk_spi_driver can be static" to the spi tree
  2015-08-07 14:33 ` [PATCH spi] spi: mediatek: mtk_spi_driver can be static kbuild test robot
@ 2015-08-07 16:35   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-08-07 16:35 UTC (permalink / raw)
  To: Fengguang Wu, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA

The patch

   spi: mediatek: mtk_spi_driver can be static

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 4299aaaa5da01f46f9186c4bb958200cf9c73532 Mon Sep 17 00:00:00 2001
From: kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Fri, 7 Aug 2015 22:33:11 +0800
Subject: [PATCH] spi: mediatek: mtk_spi_driver can be static

Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-mt65xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 4676b01..e62d304 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -731,7 +731,7 @@ static const struct dev_pm_ops mtk_spi_pm = {
 			   mtk_spi_runtime_resume, NULL)
 };
 
-struct platform_driver mtk_spi_driver = {
+static struct platform_driver mtk_spi_driver = {
 	.driver = {
 		.name = "mtk-spi",
 		.pm	= &mtk_spi_pm,
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [spi:topic/mtk 2/2] drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types)
       [not found] ` <201508072245.3TStW9QR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-08-11  2:44   ` lei liu
  2015-08-11  9:05     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: lei liu @ 2015-08-11  2:44 UTC (permalink / raw)
  To: kbuild test robot, Mark Brown
  Cc: kbuild-all-JC7UmRfGjtg, Mark Brown,
	linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hello Mark,

On Fri, 2015-08-07 at 22:33 +0800, kbuild test robot wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi topic/mtk
> head:   a568231f463225eb31593f71446a267a03ae0528
> commit: a568231f463225eb31593f71446a267a03ae0528 [2/2] spi: mediatek: Add spi bus for Mediatek MT8173
> reproduce:
>   # apt-get install sparse
>   git checkout a568231f463225eb31593f71446a267a03ae0528
>   make ARCH=x86_64 allmodconfig
>   make C=1 CF=-D__CHECK_ENDIAN__
> 
> 

I use these commands and also find another waring:

../drivers/spi/spi-mt65xx.c:589:25: warning: incorrect type in argument
1 (different address spaces)
../drivers/spi/spi-mt65xx.c:589:25: expected void const *ptr
../drivers/spi/spi-mt65xx.c:589:25: got void [noderef] <asn:2>*base
../drivers/spi/spi-mt65xx.c:590:36: warning: incorrect type in argument
1 (different address spaces)
../drivers/spi/spi-mt65xx.c:590:36: expected void const *ptr
../drivers/spi/spi-mt65xx.c:590:36: got void [noderef] <asn:2>*base

vi drivers/spi/spi-mt65xx.c +589

588         mdata->base = devm_ioremap_resource(&pdev->dev, res);
589         if (IS_ERR(mdata->base)) {
590                 ret = PTR_ERR(mdata->base);
591                 goto err_put_master;
592         }

should I also fix them?

> sparse warnings: (new ones prefixed by >>)
> 
> >> drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types)
>    drivers/spi/spi-mt65xx.c:362:24:    expected unsigned int [unsigned] val
>    drivers/spi/spi-mt65xx.c:362:24:    got restricted __le32 [usertype] <noident>
>    drivers/spi/spi-mt65xx.c:364:24: sparse: incorrect type in argument 1 (different base types)
>    drivers/spi/spi-mt65xx.c:364:24:    expected unsigned int [unsigned] val
>    drivers/spi/spi-mt65xx.c:364:24:    got restricted __le32 [usertype] <noident>
> >> drivers/spi/spi-mt65xx.c:734:24: sparse: symbol 'mtk_spi_driver' was not declared. Should it be static?
> 
> Please review and possibly fold the followup patch.
> 
> vim +362 drivers/spi/spi-mt65xx.c
> 
>    346			mult_delta = mtk_spi_get_mult_delta(mdata->tx_sgl_len);
>    347			mdata->xfer_len = mdata->tx_sgl_len - mult_delta;
>    348			mdata->tx_sgl_len = mult_delta;
>    349		} else if (mdata->rx_sgl_len) {
>    350			mult_delta = mtk_spi_get_mult_delta(mdata->rx_sgl_len);
>    351			mdata->xfer_len = mdata->rx_sgl_len - mult_delta;
>    352			mdata->rx_sgl_len = mult_delta;
>    353		}
>    354	}
>    355	
>    356	static void mtk_spi_setup_dma_addr(struct spi_master *master,
>    357					   struct spi_transfer *xfer)
>    358	{
>    359		struct mtk_spi *mdata = spi_master_get_devdata(master);
>    360	
>    361		if (mdata->tx_sgl)
>  > 362			writel(cpu_to_le32(xfer->tx_dma), mdata->base + SPI_TX_SRC_REG);
>    363		if (mdata->rx_sgl)
>    364			writel(cpu_to_le32(xfer->rx_dma), mdata->base + SPI_RX_DST_REG);
>    365	}
>    366	
>    367	static int mtk_spi_fifo_transfer(struct spi_master *master,
>    368					 struct spi_device *spi,
>    369					 struct spi_transfer *xfer)
>    370	{
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [spi:topic/mtk 2/2] drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types)
  2015-08-11  2:44   ` [spi:topic/mtk 2/2] drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types) lei liu
@ 2015-08-11  9:05     ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-08-11  9:05 UTC (permalink / raw)
  To: lei liu
  Cc: kbuild test robot, kbuild-all-JC7UmRfGjtg,
	linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

On Tue, Aug 11, 2015 at 10:44:55AM +0800, lei liu wrote:

> I use these commands and also find another waring:

> ../drivers/spi/spi-mt65xx.c:589:25: warning: incorrect type in argument
> 1 (different address spaces)
> ../drivers/spi/spi-mt65xx.c:589:25: expected void const *ptr
> ../drivers/spi/spi-mt65xx.c:589:25: got void [noderef] <asn:2>*base

> should I also fix them?

That'd be great if you could!  It's not 100% essential though.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-11  9:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 14:33 [spi:topic/mtk 2/2] drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types) kbuild test robot
2015-08-07 14:33 ` [PATCH spi] spi: mediatek: mtk_spi_driver can be static kbuild test robot
2015-08-07 16:35   ` Applied "spi: mediatek: mtk_spi_driver can be static" to the spi tree Mark Brown
     [not found] ` <201508072245.3TStW9QR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-08-11  2:44   ` [spi:topic/mtk 2/2] drivers/spi/spi-mt65xx.c:362:24: sparse: incorrect type in argument 1 (different base types) lei liu
2015-08-11  9:05     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).