All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] thunderbolt: add PCI dependency
@ 2014-06-20 13:52 Arnd Bergmann
  2014-06-20 13:52 ` [PATCH 2/3] thunderbolt: include linux/slab.h for kmalloc Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-06-20 13:52 UTC (permalink / raw)
  To: Andreas Noever; +Cc: Greg Kroah-Hartman, linux-pci, linux-kernel, Arnd Bergmann

The thunderbolt drivers cannot be built if CONFIG_PCI is disabled,
better add an explicit Kconfig dependency.
The "default no" line is redundant and can be removed at the same
time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/thunderbolt/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/Kconfig b/drivers/thunderbolt/Kconfig
index 3a25529..5aab79b 100644
--- a/drivers/thunderbolt/Kconfig
+++ b/drivers/thunderbolt/Kconfig
@@ -1,6 +1,6 @@
 menuconfig THUNDERBOLT
 	tristate "Thunderbolt support for Apple devices"
-	default no
+	depends on PCI
 	help
 	  Cactus Ridge Thunderbolt Controller driver
 	  This driver is required if you want to hotplug Thunderbolt devices on
-- 
1.8.3.2


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

* [PATCH 2/3] thunderbolt: include linux/slab.h for kmalloc
  2014-06-20 13:52 [PATCH 1/3] thunderbolt: add PCI dependency Arnd Bergmann
@ 2014-06-20 13:52 ` Arnd Bergmann
  2014-06-20 13:52 ` [PATCH 3/3] thunderbolt: fix format string for size_t Arnd Bergmann
  2014-06-20 14:44 ` [PATCH 1/3] thunderbolt: add PCI dependency Andreas Noever
  2 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-06-20 13:52 UTC (permalink / raw)
  To: Andreas Noever; +Cc: Greg Kroah-Hartman, linux-pci, linux-kernel, Arnd Bergmann

The kmalloc/kzalloc/kfree functions are declared in linux/slab.h,
so we have to explicitly include that header to avoid build failures
on ARM and other architectures that don't include these implicitly
through another header.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/thunderbolt/eeprom.c | 1 +
 drivers/thunderbolt/switch.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c
index 0d5a80b..bc0449f 100644
--- a/drivers/thunderbolt/eeprom.c
+++ b/drivers/thunderbolt/eeprom.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/crc32.h>
+#include <linux/slab.h>
 #include "tb.h"
 
 /**
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 0d50e7e..26e76e4 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/slab.h>
 
 #include "tb.h"
 
-- 
1.8.3.2


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

* [PATCH 3/3] thunderbolt: fix format string for size_t
  2014-06-20 13:52 [PATCH 1/3] thunderbolt: add PCI dependency Arnd Bergmann
  2014-06-20 13:52 ` [PATCH 2/3] thunderbolt: include linux/slab.h for kmalloc Arnd Bergmann
@ 2014-06-20 13:52 ` Arnd Bergmann
  2014-06-20 14:44 ` [PATCH 1/3] thunderbolt: add PCI dependency Andreas Noever
  2 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2014-06-20 13:52 UTC (permalink / raw)
  To: Andreas Noever; +Cc: Greg Kroah-Hartman, linux-pci, linux-kernel, Arnd Bergmann

The result of "sizeof(struct tb_drom_entry_port)" is a size_t, which
is not necessarily the same as 'long', so we should use the appropriate
%z format string instead of %l.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/thunderbolt/eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c
index bc0449f..b133f3f 100644
--- a/drivers/thunderbolt/eeprom.c
+++ b/drivers/thunderbolt/eeprom.c
@@ -323,7 +323,7 @@ static int tb_drom_parse_entry(struct tb_switch *sw,
 		struct tb_drom_entry_port *entry = (void *) header;
 		if (header->len != sizeof(*entry)) {
 			tb_sw_warn(sw,
-				"port entry has size %#x (expected %#lx)\n",
+				"port entry has size %#x (expected %#zx)\n",
 				header->len, sizeof(struct tb_drom_entry_port));
 			return -EIO;
 		}
-- 
1.8.3.2


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

* Re: [PATCH 1/3] thunderbolt: add PCI dependency
  2014-06-20 13:52 [PATCH 1/3] thunderbolt: add PCI dependency Arnd Bergmann
  2014-06-20 13:52 ` [PATCH 2/3] thunderbolt: include linux/slab.h for kmalloc Arnd Bergmann
  2014-06-20 13:52 ` [PATCH 3/3] thunderbolt: fix format string for size_t Arnd Bergmann
@ 2014-06-20 14:44 ` Andreas Noever
  2014-06-20 16:46   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 5+ messages in thread
From: Andreas Noever @ 2014-06-20 14:44 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Greg Kroah-Hartman, linux-pci, linux-kernel

Thanks for the series.

Patch 2 is equivalent to patches 1 and 2 from Sachin Kamat's series.

@Greg: This series together with Sachin's patches should fix all build
errors. I'll send patches for the remaining warnings later.

Andreas

On Fri, Jun 20, 2014 at 3:52 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The thunderbolt drivers cannot be built if CONFIG_PCI is disabled,
> better add an explicit Kconfig dependency.
> The "default no" line is redundant and can be removed at the same
> time.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/thunderbolt/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thunderbolt/Kconfig b/drivers/thunderbolt/Kconfig
> index 3a25529..5aab79b 100644
> --- a/drivers/thunderbolt/Kconfig
> +++ b/drivers/thunderbolt/Kconfig
> @@ -1,6 +1,6 @@
>  menuconfig THUNDERBOLT
>         tristate "Thunderbolt support for Apple devices"
> -       default no
> +       depends on PCI
>         help
>           Cactus Ridge Thunderbolt Controller driver
>           This driver is required if you want to hotplug Thunderbolt devices on
> --
> 1.8.3.2
>

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

* Re: [PATCH 1/3] thunderbolt: add PCI dependency
  2014-06-20 14:44 ` [PATCH 1/3] thunderbolt: add PCI dependency Andreas Noever
@ 2014-06-20 16:46   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-20 16:46 UTC (permalink / raw)
  To: Andreas Noever; +Cc: Arnd Bergmann, linux-pci, linux-kernel

On Fri, Jun 20, 2014 at 04:44:05PM +0200, Andreas Noever wrote:
> Thanks for the series.
> 
> Patch 2 is equivalent to patches 1 and 2 from Sachin Kamat's series.
> 
> @Greg: This series together with Sachin's patches should fix all build
> errors. I'll send patches for the remaining warnings later.

Thanks, I'll apply patches 1 and 3 here.

greg k-h

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

end of thread, other threads:[~2014-06-20 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 13:52 [PATCH 1/3] thunderbolt: add PCI dependency Arnd Bergmann
2014-06-20 13:52 ` [PATCH 2/3] thunderbolt: include linux/slab.h for kmalloc Arnd Bergmann
2014-06-20 13:52 ` [PATCH 3/3] thunderbolt: fix format string for size_t Arnd Bergmann
2014-06-20 14:44 ` [PATCH 1/3] thunderbolt: add PCI dependency Andreas Noever
2014-06-20 16:46   ` Greg Kroah-Hartman

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.