All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] can: pch_can: fix sparse warnings and section mismatch
@ 2010-10-27  8:38 Marc Kleine-Budde
  2010-10-27  8:38 ` [PATCH 1/2] can: pch_can: fix sparse warning Marc Kleine-Budde
       [not found] ` <1288168706-870-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2010-10-27  8:38 UTC (permalink / raw)
  To: socketcan-core-0fE9KPoRgkgATYTw5x5z8w; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA

Hello,

this patch fixes two problems found during compile time, a sparse warning
and a section mismatch.

These patches apply to net-2.6/master

cheers, Marc

---

The following changes since commit 7a876b0efcba3804da3051313445fa7be751cab7:

  IPv6: Temp addresses are immediately deleted. (2010-10-26 12:35:13 -0700)

are available in the git repository at:
  git://git.pengutronix.de/git/mkl/linux-2.6.git can/pch_can-for-net-2.6

Marc Kleine-Budde (2):
      can: pch_can: fix sparse warning
      can: pch_can: fix section mismatch warning by using a whitelisted name

 drivers/net/can/pch_can.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

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

* [PATCH 1/2] can: pch_can: fix sparse warning
  2010-10-27  8:38 [PATCH 0/2] can: pch_can: fix sparse warnings and section mismatch Marc Kleine-Budde
@ 2010-10-27  8:38 ` Marc Kleine-Budde
       [not found]   ` <1288168706-870-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
       [not found] ` <1288168706-870-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2010-10-27  8:38 UTC (permalink / raw)
  To: socketcan-core; +Cc: netdev, Marc Kleine-Budde, Tomoya MORINAGA

This patch fixes the following sparse warning:

drivers/net/can/pch_can.c:231:26: warning: incorrect type in argument 1 (different address spaces)
drivers/net/can/pch_can.c:231:26:    expected unsigned int [usertype] *addr
drivers/net/can/pch_can.c:231:26:    got unsigned int [noderef] <asn:2>*<noident>

Let pch_can_bit_{set,clear} first parameter be a void __iomem pointer.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
 drivers/net/can/pch_can.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 55ec324..c63209f 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -213,12 +213,12 @@ static DEFINE_PCI_DEVICE_TABLE(pch_pci_tbl) = {
 };
 MODULE_DEVICE_TABLE(pci, pch_pci_tbl);
 
-static inline void pch_can_bit_set(u32 *addr, u32 mask)
+static inline void pch_can_bit_set(void __iomem *addr, u32 mask)
 {
 	iowrite32(ioread32(addr) | mask, addr);
 }
 
-static inline void pch_can_bit_clear(u32 *addr, u32 mask)
+static inline void pch_can_bit_clear(void __iomem *addr, u32 mask)
 {
 	iowrite32(ioread32(addr) & ~mask, addr);
 }
-- 
1.7.2.3


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

* [PATCH 2/2] can: pch_can: fix section mismatch warning by using a whitelisted name
       [not found] ` <1288168706-870-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-10-27  8:38   ` Marc Kleine-Budde
  2010-10-30 23:28     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2010-10-27  8:38 UTC (permalink / raw)
  To: socketcan-core-0fE9KPoRgkgATYTw5x5z8w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Marc Kleine-Budde

This patch fixes the following section mismatch warning:

WARNING: drivers/net/can/pch_can.o(.data+0x18):
Section mismatch in reference from the variable pch_can_pcidev
to the variable .devinit.rodata:pch_pci_tbl
The variable pch_can_pcidev references
the variable __devinitconst pch_pci_tbl

This is actually a false positive which is fixed by giving the offending
variable a whitelisted name, it's renamed to "pch_can_pci_driver".
This makes sense because the variable is of the type "struct pci_driver".

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
 drivers/net/can/pch_can.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index c63209f..6727182 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -1437,7 +1437,7 @@ probe_exit_endev:
 	return rc;
 }
 
-static struct pci_driver pch_can_pcidev = {
+static struct pci_driver pch_can_pci_driver = {
 	.name = "pch_can",
 	.id_table = pch_pci_tbl,
 	.probe = pch_can_probe,
@@ -1448,13 +1448,13 @@ static struct pci_driver pch_can_pcidev = {
 
 static int __init pch_can_pci_init(void)
 {
-	return pci_register_driver(&pch_can_pcidev);
+	return pci_register_driver(&pch_can_pci_driver);
 }
 module_init(pch_can_pci_init);
 
 static void __exit pch_can_pci_exit(void)
 {
-	pci_unregister_driver(&pch_can_pcidev);
+	pci_unregister_driver(&pch_can_pci_driver);
 }
 module_exit(pch_can_pci_exit);
 
-- 
1.7.2.3

_______________________________________________
Socketcan-core mailing list
Socketcan-core@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/socketcan-core

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

* Re: [PATCH 1/2] can: pch_can: fix sparse warning
       [not found]   ` <1288168706-870-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-10-30 23:28     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-10-30 23:28 UTC (permalink / raw)
  To: mkl-bIcnvbaLZ9MEGnE8C9+IrQ
  Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w, netdev-u79uwXL29TY76Z2rM5mHXA

From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Date: Wed, 27 Oct 2010 10:38:25 +0200

> This patch fixes the following sparse warning:
> 
> drivers/net/can/pch_can.c:231:26: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/can/pch_can.c:231:26:    expected unsigned int [usertype] *addr
> drivers/net/can/pch_can.c:231:26:    got unsigned int [noderef] <asn:2>*<noident>
> 
> Let pch_can_bit_{set,clear} first parameter be a void __iomem pointer.
> 
> Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

Applied.

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

* Re: [PATCH 2/2] can: pch_can: fix section mismatch warning by using a whitelisted name
  2010-10-27  8:38   ` [PATCH 2/2] can: pch_can: fix section mismatch warning by using a whitelisted name Marc Kleine-Budde
@ 2010-10-30 23:28     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-10-30 23:28 UTC (permalink / raw)
  To: mkl; +Cc: socketcan-core, netdev, tomoya-linux

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 27 Oct 2010 10:38:26 +0200

> This patch fixes the following section mismatch warning:
> 
> WARNING: drivers/net/can/pch_can.o(.data+0x18):
> Section mismatch in reference from the variable pch_can_pcidev
> to the variable .devinit.rodata:pch_pci_tbl
> The variable pch_can_pcidev references
> the variable __devinitconst pch_pci_tbl
> 
> This is actually a false positive which is fixed by giving the offending
> variable a whitelisted name, it's renamed to "pch_can_pci_driver".
> This makes sense because the variable is of the type "struct pci_driver".
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Applied.

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

end of thread, other threads:[~2010-10-30 23:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-27  8:38 [PATCH 0/2] can: pch_can: fix sparse warnings and section mismatch Marc Kleine-Budde
2010-10-27  8:38 ` [PATCH 1/2] can: pch_can: fix sparse warning Marc Kleine-Budde
     [not found]   ` <1288168706-870-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-10-30 23:28     ` David Miller
     [not found] ` <1288168706-870-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-10-27  8:38   ` [PATCH 2/2] can: pch_can: fix section mismatch warning by using a whitelisted name Marc Kleine-Budde
2010-10-30 23:28     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.