* [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint
@ 2016-07-14 9:37 Jiri Pirko
2016-07-14 9:37 ` [patch net-next 2/2] devlink: fix trace format string Jiri Pirko
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Jiri Pirko @ 2016-07-14 9:37 UTC (permalink / raw)
To: netdev
Cc: davem, arnd, rdunlap, linux-kernel, idosch, yotamg, eladr,
nogahf, ogerlitz, ivecera, rostedt, mingo, jolsa
From: Jiri Pirko <jiri@mellanox.com>
Turned on that driver->owner which is struct module is not available when
modules are disabled. Better to depend on a driver name which is
always available.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: e5224f0fe2 ("devlink: add hardware messages tracing facility")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
include/trace/events/devlink.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/trace/events/devlink.h b/include/trace/events/devlink.h
index 333c32a..77dce71 100644
--- a/include/trace/events/devlink.h
+++ b/include/trace/events/devlink.h
@@ -22,7 +22,7 @@ TRACE_EVENT(devlink_hwmsg,
TP_STRUCT__entry(
__string(bus_name, devlink->dev->bus->name)
__string(dev_name, dev_name(devlink->dev))
- __string(owner_name, devlink->dev->driver->owner->name)
+ __string(driver_name, devlink->dev->driver->name)
__field(bool, incoming)
__field(unsigned long, type)
__dynamic_array(u8, buf, len)
@@ -32,16 +32,16 @@ TRACE_EVENT(devlink_hwmsg,
TP_fast_assign(
__assign_str(bus_name, devlink->dev->bus->name);
__assign_str(dev_name, dev_name(devlink->dev));
- __assign_str(owner_name, devlink->dev->driver->owner->name);
+ __assign_str(driver_name, devlink->dev->driver->name);
__entry->incoming = incoming;
__entry->type = type;
memcpy(__get_dynamic_array(buf), buf, len);
__entry->len = len;
),
- TP_printk("bus_name=%s dev_name=%s owner_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%lu",
+ TP_printk("bus_name=%s dev_name=%s driver_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%lu",
__get_str(bus_name), __get_str(dev_name),
- __get_str(owner_name), __entry->incoming, __entry->type,
+ __get_str(driver_name), __entry->incoming, __entry->type,
(int) __entry->len, __get_dynamic_array(buf), __entry->len)
);
--
2.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [patch net-next 2/2] devlink: fix trace format string
2016-07-14 9:37 [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Jiri Pirko
@ 2016-07-14 9:37 ` Jiri Pirko
2016-07-14 17:07 ` Randy Dunlap
2016-07-15 5:16 ` David Miller
2016-07-14 17:07 ` [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Randy Dunlap
2016-07-15 5:16 ` David Miller
2 siblings, 2 replies; 9+ messages in thread
From: Jiri Pirko @ 2016-07-14 9:37 UTC (permalink / raw)
To: netdev
Cc: davem, arnd, rdunlap, linux-kernel, idosch, yotamg, eladr,
nogahf, ogerlitz, ivecera, rostedt, mingo, jolsa
From: Arnd Bergmann <arnd@arndb.de>
Including devlink.h on ARM and probably other 32-bit architectures results in
a harmless warning:
In file included from ../include/trace/define_trace.h:95:0,
from ../include/trace/events/devlink.h:51,
from ../net/core/devlink.c:30:
include/trace/events/devlink.h: In function 'trace_raw_output_devlink_hwmsg':
include/trace/events/devlink.h:42:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Werror=format=]
The correct format string for 'size_t' is %zu, not %lu, this works on all
architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e5224f0fe2ac ("devlink: add hardware messages tracing facility")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
include/trace/events/devlink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/trace/events/devlink.h b/include/trace/events/devlink.h
index 77dce71..09f1df2 100644
--- a/include/trace/events/devlink.h
+++ b/include/trace/events/devlink.h
@@ -39,7 +39,7 @@ TRACE_EVENT(devlink_hwmsg,
__entry->len = len;
),
- TP_printk("bus_name=%s dev_name=%s driver_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%lu",
+ TP_printk("bus_name=%s dev_name=%s driver_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%zu",
__get_str(bus_name), __get_str(dev_name),
__get_str(driver_name), __entry->incoming, __entry->type,
(int) __entry->len, __get_dynamic_array(buf), __entry->len)
--
2.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint
2016-07-14 9:37 [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Jiri Pirko
2016-07-14 9:37 ` [patch net-next 2/2] devlink: fix trace format string Jiri Pirko
@ 2016-07-14 17:07 ` Randy Dunlap
2016-07-14 17:11 ` Steven Rostedt
2016-07-15 5:16 ` David Miller
2 siblings, 1 reply; 9+ messages in thread
From: Randy Dunlap @ 2016-07-14 17:07 UTC (permalink / raw)
To: Jiri Pirko, netdev
Cc: davem, arnd, linux-kernel, idosch, yotamg, eladr, nogahf,
ogerlitz, ivecera, rostedt, mingo, jolsa
On 07/14/16 02:37, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> Turned on that driver->owner which is struct module is not available when
> modules are disabled. Better to depend on a driver name which is
> always available.
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: e5224f0fe2 ("devlink: add hardware messages tracing facility")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> include/trace/events/devlink.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/trace/events/devlink.h b/include/trace/events/devlink.h
> index 333c32a..77dce71 100644
> --- a/include/trace/events/devlink.h
> +++ b/include/trace/events/devlink.h
> @@ -22,7 +22,7 @@ TRACE_EVENT(devlink_hwmsg,
> TP_STRUCT__entry(
> __string(bus_name, devlink->dev->bus->name)
> __string(dev_name, dev_name(devlink->dev))
> - __string(owner_name, devlink->dev->driver->owner->name)
> + __string(driver_name, devlink->dev->driver->name)
> __field(bool, incoming)
> __field(unsigned long, type)
> __dynamic_array(u8, buf, len)
> @@ -32,16 +32,16 @@ TRACE_EVENT(devlink_hwmsg,
> TP_fast_assign(
> __assign_str(bus_name, devlink->dev->bus->name);
> __assign_str(dev_name, dev_name(devlink->dev));
> - __assign_str(owner_name, devlink->dev->driver->owner->name);
> + __assign_str(driver_name, devlink->dev->driver->name);
> __entry->incoming = incoming;
> __entry->type = type;
> memcpy(__get_dynamic_array(buf), buf, len);
> __entry->len = len;
> ),
>
> - TP_printk("bus_name=%s dev_name=%s owner_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%lu",
> + TP_printk("bus_name=%s dev_name=%s driver_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%lu",
> __get_str(bus_name), __get_str(dev_name),
> - __get_str(owner_name), __entry->incoming, __entry->type,
> + __get_str(driver_name), __entry->incoming, __entry->type,
> (int) __entry->len, __get_dynamic_array(buf), __entry->len)
> );
>
>
--
~Randy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net-next 2/2] devlink: fix trace format string
2016-07-14 9:37 ` [patch net-next 2/2] devlink: fix trace format string Jiri Pirko
@ 2016-07-14 17:07 ` Randy Dunlap
2016-07-14 17:18 ` Steven Rostedt
2016-07-15 5:16 ` David Miller
1 sibling, 1 reply; 9+ messages in thread
From: Randy Dunlap @ 2016-07-14 17:07 UTC (permalink / raw)
To: Jiri Pirko, netdev
Cc: davem, arnd, linux-kernel, idosch, yotamg, eladr, nogahf,
ogerlitz, ivecera, rostedt, mingo, jolsa
On 07/14/16 02:37, Jiri Pirko wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Including devlink.h on ARM and probably other 32-bit architectures results in
> a harmless warning:
>
> In file included from ../include/trace/define_trace.h:95:0,
> from ../include/trace/events/devlink.h:51,
> from ../net/core/devlink.c:30:
> include/trace/events/devlink.h: In function 'trace_raw_output_devlink_hwmsg':
> include/trace/events/devlink.h:42:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Werror=format=]
>
> The correct format string for 'size_t' is %zu, not %lu, this works on all
> architectures.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: e5224f0fe2ac ("devlink: add hardware messages tracing facility")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> include/trace/events/devlink.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/trace/events/devlink.h b/include/trace/events/devlink.h
> index 77dce71..09f1df2 100644
> --- a/include/trace/events/devlink.h
> +++ b/include/trace/events/devlink.h
> @@ -39,7 +39,7 @@ TRACE_EVENT(devlink_hwmsg,
> __entry->len = len;
> ),
>
> - TP_printk("bus_name=%s dev_name=%s driver_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%lu",
> + TP_printk("bus_name=%s dev_name=%s driver_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%zu",
> __get_str(bus_name), __get_str(dev_name),
> __get_str(driver_name), __entry->incoming, __entry->type,
> (int) __entry->len, __get_dynamic_array(buf), __entry->len)
>
--
~Randy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint
2016-07-14 17:07 ` [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Randy Dunlap
@ 2016-07-14 17:11 ` Steven Rostedt
0 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2016-07-14 17:11 UTC (permalink / raw)
To: Randy Dunlap
Cc: Jiri Pirko, netdev, davem, arnd, linux-kernel, idosch, yotamg,
eladr, nogahf, ogerlitz, ivecera, mingo, jolsa
On Thu, 14 Jul 2016 10:07:33 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 07/14/16 02:37, Jiri Pirko wrote:
> > From: Jiri Pirko <jiri@mellanox.com>
> >
> > Turned on that driver->owner which is struct module is not available when
> > modules are disabled. Better to depend on a driver name which is
> > always available.
> >
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Fixes: e5224f0fe2 ("devlink: add hardware messages tracing facility")
> > Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
I may as well add mine too...
Acked-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net-next 2/2] devlink: fix trace format string
2016-07-14 17:07 ` Randy Dunlap
@ 2016-07-14 17:18 ` Steven Rostedt
0 siblings, 0 replies; 9+ messages in thread
From: Steven Rostedt @ 2016-07-14 17:18 UTC (permalink / raw)
To: Randy Dunlap
Cc: Jiri Pirko, netdev, davem, arnd, linux-kernel, idosch, yotamg,
eladr, nogahf, ogerlitz, ivecera, mingo, jolsa
On Thu, 14 Jul 2016 10:07:38 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 07/14/16 02:37, Jiri Pirko wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > Including devlink.h on ARM and probably other 32-bit architectures results in
> > a harmless warning:
> >
> > In file included from ../include/trace/define_trace.h:95:0,
> > from ../include/trace/events/devlink.h:51,
> > from ../net/core/devlink.c:30:
> > include/trace/events/devlink.h: In function 'trace_raw_output_devlink_hwmsg':
> > include/trace/events/devlink.h:42:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Werror=format=]
> >
> > The correct format string for 'size_t' is %zu, not %lu, this works on all
> > architectures.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: e5224f0fe2ac ("devlink: add hardware messages tracing facility")
> > Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
>
ditto!
-- Steve
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint
2016-07-14 9:37 [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Jiri Pirko
2016-07-14 9:37 ` [patch net-next 2/2] devlink: fix trace format string Jiri Pirko
2016-07-14 17:07 ` [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Randy Dunlap
@ 2016-07-15 5:16 ` David Miller
2 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2016-07-15 5:16 UTC (permalink / raw)
To: jiri
Cc: netdev, arnd, rdunlap, linux-kernel, idosch, yotamg, eladr,
nogahf, ogerlitz, ivecera, rostedt, mingo, jolsa
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 14 Jul 2016 11:37:28 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> Turned on that driver->owner which is struct module is not available when
> modules are disabled. Better to depend on a driver name which is
> always available.
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: e5224f0fe2 ("devlink: add hardware messages tracing facility")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Applied.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch net-next 2/2] devlink: fix trace format string
2016-07-14 9:37 ` [patch net-next 2/2] devlink: fix trace format string Jiri Pirko
2016-07-14 17:07 ` Randy Dunlap
@ 2016-07-15 5:16 ` David Miller
1 sibling, 0 replies; 9+ messages in thread
From: David Miller @ 2016-07-15 5:16 UTC (permalink / raw)
To: jiri
Cc: netdev, arnd, rdunlap, linux-kernel, idosch, yotamg, eladr,
nogahf, ogerlitz, ivecera, rostedt, mingo, jolsa
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 14 Jul 2016 11:37:29 +0200
> From: Arnd Bergmann <arnd@arndb.de>
>
> Including devlink.h on ARM and probably other 32-bit architectures results in
> a harmless warning:
>
> In file included from ../include/trace/define_trace.h:95:0,
> from ../include/trace/events/devlink.h:51,
> from ../net/core/devlink.c:30:
> include/trace/events/devlink.h: In function 'trace_raw_output_devlink_hwmsg':
> include/trace/events/devlink.h:42:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Werror=format=]
>
> The correct format string for 'size_t' is %zu, not %lu, this works on all
> architectures.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: e5224f0fe2ac ("devlink: add hardware messages tracing facility")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Applied.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 2/2] devlink: fix trace format string
2016-07-13 21:03 [PATCH net-next 1/2] devlink: fix build error for CONFIG_MODULES=n Arnd Bergmann
@ 2016-07-13 21:03 ` Arnd Bergmann
0 siblings, 0 replies; 9+ messages in thread
From: Arnd Bergmann @ 2016-07-13 21:03 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, Steven Rostedt, Ingo Molnar, David S . Miller,
linux-kernel, Arnd Bergmann
Including devlink.h on ARM and probably other 32-bit architectures results in
a harmless warning:
In file included from ../include/trace/define_trace.h:95:0,
from ../include/trace/events/devlink.h:51,
from ../net/core/devlink.c:30:
include/trace/events/devlink.h: In function 'trace_raw_output_devlink_hwmsg':
include/trace/events/devlink.h:42:12: error: format '%lu' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Werror=format=]
The correct format string for 'size_t' is %zu, not %lu, this works on all
architectures.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e5224f0fe2ac ("devlink: add hardware messages tracing facility")
---
include/trace/events/devlink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/trace/events/devlink.h b/include/trace/events/devlink.h
index 26f92d3c7e9c..4b75a6f986fc 100644
--- a/include/trace/events/devlink.h
+++ b/include/trace/events/devlink.h
@@ -47,7 +47,7 @@ TRACE_EVENT(devlink_hwmsg,
__entry->len = len;
),
- TP_printk("bus_name=%s dev_name=%s owner_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%lu",
+ TP_printk("bus_name=%s dev_name=%s owner_name=%s incoming=%d type=%lu buf=0x[%*phD] len=%zu",
__get_str(bus_name), __get_str(dev_name),
__get_str(owner_name), __entry->incoming, __entry->type,
(int) __entry->len, __get_dynamic_array(buf), __entry->len)
--
2.9.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-07-15 5:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 9:37 [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Jiri Pirko
2016-07-14 9:37 ` [patch net-next 2/2] devlink: fix trace format string Jiri Pirko
2016-07-14 17:07 ` Randy Dunlap
2016-07-14 17:18 ` Steven Rostedt
2016-07-15 5:16 ` David Miller
2016-07-14 17:07 ` [patch net-next 1/2] tracing: change owner name to driver name for devlink hwmsg tracepoint Randy Dunlap
2016-07-14 17:11 ` Steven Rostedt
2016-07-15 5:16 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2016-07-13 21:03 [PATCH net-next 1/2] devlink: fix build error for CONFIG_MODULES=n Arnd Bergmann
2016-07-13 21:03 ` [PATCH net-next 2/2] devlink: fix trace format string Arnd Bergmann
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.