* [PATCH 1/6] thunderbolt: Fix build error in eeprom.c
@ 2014-06-20 9:02 Sachin Kamat
2014-06-20 9:02 ` [PATCH 2/6] thunderbolt: Fix build error in switch.c Sachin Kamat
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Sachin Kamat @ 2014-06-20 9:02 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, andreas.noever, spk.linux
Fixes the below error:
drivers/thunderbolt/eeprom.c:407:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration]
drivers/thunderbolt/eeprom.c:444:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
drivers/thunderbolt/eeprom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c
index 0d5a80b2d07a..bc0449f581c2 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"
/**
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/6] thunderbolt: Fix build error in switch.c
2014-06-20 9:02 [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Sachin Kamat
@ 2014-06-20 9:02 ` Sachin Kamat
2014-06-20 9:02 ` [PATCH 3/6] thunderbolt: Use NULL instead of 0 " Sachin Kamat
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Sachin Kamat @ 2014-06-20 9:02 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, andreas.noever, spk.linux
Fixes the below error:
drivers/thunderbolt/switch.c:347:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration]
drivers/thunderbolt/switch.c:381:2: error: implicit declaration of function ‘kcalloc’ [-Werror=implicit-function-declaration]
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
drivers/thunderbolt/switch.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 0d50e7e7b29b..26e76e4aa835 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.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/6] thunderbolt: Use NULL instead of 0 in switch.c
2014-06-20 9:02 [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Sachin Kamat
2014-06-20 9:02 ` [PATCH 2/6] thunderbolt: Fix build error in switch.c Sachin Kamat
@ 2014-06-20 9:02 ` Sachin Kamat
2014-06-20 9:02 ` [PATCH 4/6] thunderbolt: Use NULL instead of 0 in ctl.c Sachin Kamat
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Sachin Kamat @ 2014-06-20 9:02 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, andreas.noever, spk.linux
The function returns a pointer. Hence return NULL instead of 0.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
drivers/thunderbolt/switch.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 26e76e4aa835..aeb982969629 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -260,11 +260,11 @@ struct tb_switch *get_switch_at_route(struct tb_switch *sw, u64 route)
if (route == 0)
return sw;
if (next_port > sw->config.max_port_number)
- return 0;
+ return NULL;
if (tb_is_upstream_port(&sw->ports[next_port]))
- return 0;
+ return NULL;
if (!sw->ports[next_port].remote)
- return 0;
+ return NULL;
return get_switch_at_route(sw->ports[next_port].remote->sw,
route >> TB_ROUTE_SHIFT);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/6] thunderbolt: Use NULL instead of 0 in ctl.c
2014-06-20 9:02 [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Sachin Kamat
2014-06-20 9:02 ` [PATCH 2/6] thunderbolt: Fix build error in switch.c Sachin Kamat
2014-06-20 9:02 ` [PATCH 3/6] thunderbolt: Use NULL instead of 0 " Sachin Kamat
@ 2014-06-20 9:02 ` Sachin Kamat
2014-06-20 9:02 ` [PATCH 5/6] thunderbolt: Use NULL instead of 0 in nhi.c Sachin Kamat
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Sachin Kamat @ 2014-06-20 9:02 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, andreas.noever, spk.linux
The function returns a pointer. Hence return NULL instead of 0.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
drivers/thunderbolt/ctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
index d04fee4acb2e..4c6da92edcb4 100644
--- a/drivers/thunderbolt/ctl.c
+++ b/drivers/thunderbolt/ctl.c
@@ -305,13 +305,13 @@ static struct ctl_pkg *tb_ctl_pkg_alloc(struct tb_ctl *ctl)
{
struct ctl_pkg *pkg = kzalloc(sizeof(*pkg), GFP_KERNEL);
if (!pkg)
- return 0;
+ return NULL;
pkg->ctl = ctl;
pkg->buffer = dma_pool_alloc(ctl->frame_pool, GFP_KERNEL,
&pkg->frame.buffer_phy);
if (!pkg->buffer) {
kfree(pkg);
- return 0;
+ return NULL;
}
return pkg;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/6] thunderbolt: Use NULL instead of 0 in nhi.c
2014-06-20 9:02 [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Sachin Kamat
` (2 preceding siblings ...)
2014-06-20 9:02 ` [PATCH 4/6] thunderbolt: Use NULL instead of 0 in ctl.c Sachin Kamat
@ 2014-06-20 9:02 ` Sachin Kamat
2014-06-20 9:02 ` [PATCH 6/6] thunderbolt: Staticize nhi_ids Sachin Kamat
2014-06-20 14:28 ` [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Andreas Noever
5 siblings, 0 replies; 7+ messages in thread
From: Sachin Kamat @ 2014-06-20 9:02 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, andreas.noever, spk.linux
'descriptors' is a pointer. Use NULL isntead of 0.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
drivers/thunderbolt/nhi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 346b41e7d5d1..0fc137af89f5 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -416,7 +416,7 @@ void ring_free(struct tb_ring *ring)
ring->size * sizeof(*ring->descriptors),
ring->descriptors, ring->descriptors_dma);
- ring->descriptors = 0;
+ ring->descriptors = NULL;
ring->descriptors_dma = 0;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 6/6] thunderbolt: Staticize nhi_ids
2014-06-20 9:02 [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Sachin Kamat
` (3 preceding siblings ...)
2014-06-20 9:02 ` [PATCH 5/6] thunderbolt: Use NULL instead of 0 in nhi.c Sachin Kamat
@ 2014-06-20 9:02 ` Sachin Kamat
2014-06-20 14:28 ` [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Andreas Noever
5 siblings, 0 replies; 7+ messages in thread
From: Sachin Kamat @ 2014-06-20 9:02 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh, andreas.noever, spk.linux
'nhi_ids' is local to this file.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
drivers/thunderbolt/nhi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
index 0fc137af89f5..2054fbf8b382 100644
--- a/drivers/thunderbolt/nhi.c
+++ b/drivers/thunderbolt/nhi.c
@@ -632,7 +632,7 @@ static const struct dev_pm_ops nhi_pm_ops = {
.restore_noirq = nhi_resume_noirq,
};
-struct pci_device_id nhi_ids[] = {
+static struct pci_device_id nhi_ids[] = {
/*
* We have to specify class, the TB bridges use the same device and
* vendor (sub)id.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/6] thunderbolt: Fix build error in eeprom.c
2014-06-20 9:02 [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Sachin Kamat
` (4 preceding siblings ...)
2014-06-20 9:02 ` [PATCH 6/6] thunderbolt: Staticize nhi_ids Sachin Kamat
@ 2014-06-20 14:28 ` Andreas Noever
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Noever @ 2014-06-20 14:28 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, Greg KH, spk.linux
The series looks good. Thanks a lot for fixing these.
On Fri, Jun 20, 2014 at 11:02 AM, Sachin Kamat <sachin.kamat@samsung.com> wrote:
> Fixes the below error:
> drivers/thunderbolt/eeprom.c:407:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration]
> drivers/thunderbolt/eeprom.c:444:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
>
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> ---
> drivers/thunderbolt/eeprom.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c
> index 0d5a80b2d07a..bc0449f581c2 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"
>
> /**
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-20 14:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 9:02 [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Sachin Kamat
2014-06-20 9:02 ` [PATCH 2/6] thunderbolt: Fix build error in switch.c Sachin Kamat
2014-06-20 9:02 ` [PATCH 3/6] thunderbolt: Use NULL instead of 0 " Sachin Kamat
2014-06-20 9:02 ` [PATCH 4/6] thunderbolt: Use NULL instead of 0 in ctl.c Sachin Kamat
2014-06-20 9:02 ` [PATCH 5/6] thunderbolt: Use NULL instead of 0 in nhi.c Sachin Kamat
2014-06-20 9:02 ` [PATCH 6/6] thunderbolt: Staticize nhi_ids Sachin Kamat
2014-06-20 14:28 ` [PATCH 1/6] thunderbolt: Fix build error in eeprom.c Andreas Noever
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).