* [PATCH] net/bridge: Fix inconsistent format argument types
@ 2021-01-13 9:36 Jiapeng Zhong
2021-01-13 12:31 ` Nikolay Aleksandrov
0 siblings, 1 reply; 4+ messages in thread
From: Jiapeng Zhong @ 2021-01-13 9:36 UTC (permalink / raw)
To: roopa; +Cc: nikolay, davem, kuba, bridge, netdev, linux-kernel, Jiapeng Zhong
Fix the following warnings:
net/bridge/br_sysfs_br.c(833): warning: %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
net/bridge/br_sysfs_br.c(817): warning: %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
net/bridge/br_sysfs_br.c(261): warning: %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
net/bridge/br_sysfs_br.c(253): warning: %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
net/bridge/br_sysfs_br.c(244): warning: %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
net/bridge/br_sysfs_br.c(236): warning: %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
---
net/bridge/br_sysfs_br.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index 7db06e3..7512921 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -233,7 +233,7 @@ static ssize_t hello_timer_show(struct device *d,
struct device_attribute *attr, char *buf)
{
struct net_bridge *br = to_bridge(d);
- return sprintf(buf, "%ld\n", br_timer_value(&br->hello_timer));
+ return sprintf(buf, "%lu\n", br_timer_value(&br->hello_timer));
}
static DEVICE_ATTR_RO(hello_timer);
@@ -241,7 +241,7 @@ static ssize_t tcn_timer_show(struct device *d, struct device_attribute *attr,
char *buf)
{
struct net_bridge *br = to_bridge(d);
- return sprintf(buf, "%ld\n", br_timer_value(&br->tcn_timer));
+ return sprintf(buf, "%lu\n", br_timer_value(&br->tcn_timer));
}
static DEVICE_ATTR_RO(tcn_timer);
@@ -250,7 +250,7 @@ static ssize_t topology_change_timer_show(struct device *d,
char *buf)
{
struct net_bridge *br = to_bridge(d);
- return sprintf(buf, "%ld\n", br_timer_value(&br->topology_change_timer));
+ return sprintf(buf, "%lu\n", br_timer_value(&br->topology_change_timer));
}
static DEVICE_ATTR_RO(topology_change_timer);
@@ -258,7 +258,7 @@ static ssize_t gc_timer_show(struct device *d, struct device_attribute *attr,
char *buf)
{
struct net_bridge *br = to_bridge(d);
- return sprintf(buf, "%ld\n", br_timer_value(&br->gc_work.timer));
+ return sprintf(buf, "%lu\n", br_timer_value(&br->gc_work.timer));
}
static DEVICE_ATTR_RO(gc_timer);
@@ -814,7 +814,7 @@ static ssize_t vlan_stats_enabled_show(struct device *d,
char *buf)
{
struct net_bridge *br = to_bridge(d);
- return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED));
+ return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED));
}
static ssize_t vlan_stats_enabled_store(struct device *d,
@@ -830,7 +830,7 @@ static ssize_t vlan_stats_per_port_show(struct device *d,
char *buf)
{
struct net_bridge *br = to_bridge(d);
- return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT));
+ return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT));
}
static ssize_t vlan_stats_per_port_store(struct device *d,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net/bridge: Fix inconsistent format argument types
2021-01-13 9:36 [PATCH] net/bridge: Fix inconsistent format argument types Jiapeng Zhong
@ 2021-01-13 12:31 ` Nikolay Aleksandrov
0 siblings, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2021-01-13 12:31 UTC (permalink / raw)
To: Jiapeng Zhong, roopa; +Cc: davem, kuba, bridge, netdev, linux-kernel
On 13/01/2021 11:36, Jiapeng Zhong wrote:
> Fix the following warnings:
>
> net/bridge/br_sysfs_br.c(833): warning: %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'signed int'.
> net/bridge/br_sysfs_br.c(817): warning: %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'signed int'.
> net/bridge/br_sysfs_br.c(261): warning: %ld in format string (no. 1)
> requires 'long' but the argument type is 'unsigned long'.
> net/bridge/br_sysfs_br.c(253): warning: %ld in format string (no. 1)
> requires 'long' but the argument type is 'unsigned long'.
> net/bridge/br_sysfs_br.c(244): warning: %ld in format string (no. 1)
> requires 'long' but the argument type is 'unsigned long'.
> net/bridge/br_sysfs_br.c(236): warning: %ld in format string (no. 1)
> requires 'long' but the argument type is 'unsigned long'.
>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
> Reported-by: Abaci Robot<abaci@linux.alibaba.com>
> ---
> net/bridge/br_sysfs_br.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
Hi,
You have sent 2 patches with the same subject.. Please squash them into a single
patch and target it to net-next, these don't need to be backported.
Thanks,
Nik
> diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
> index 7db06e3..7512921 100644
> --- a/net/bridge/br_sysfs_br.c
> +++ b/net/bridge/br_sysfs_br.c
> @@ -233,7 +233,7 @@ static ssize_t hello_timer_show(struct device *d,
> struct device_attribute *attr, char *buf)
> {
> struct net_bridge *br = to_bridge(d);
> - return sprintf(buf, "%ld\n", br_timer_value(&br->hello_timer));
> + return sprintf(buf, "%lu\n", br_timer_value(&br->hello_timer));
> }
> static DEVICE_ATTR_RO(hello_timer);
>
> @@ -241,7 +241,7 @@ static ssize_t tcn_timer_show(struct device *d, struct device_attribute *attr,
> char *buf)
> {
> struct net_bridge *br = to_bridge(d);
> - return sprintf(buf, "%ld\n", br_timer_value(&br->tcn_timer));
> + return sprintf(buf, "%lu\n", br_timer_value(&br->tcn_timer));
> }
> static DEVICE_ATTR_RO(tcn_timer);
>
> @@ -250,7 +250,7 @@ static ssize_t topology_change_timer_show(struct device *d,
> char *buf)
> {
> struct net_bridge *br = to_bridge(d);
> - return sprintf(buf, "%ld\n", br_timer_value(&br->topology_change_timer));
> + return sprintf(buf, "%lu\n", br_timer_value(&br->topology_change_timer));
> }
> static DEVICE_ATTR_RO(topology_change_timer);
>
> @@ -258,7 +258,7 @@ static ssize_t gc_timer_show(struct device *d, struct device_attribute *attr,
> char *buf)
> {
> struct net_bridge *br = to_bridge(d);
> - return sprintf(buf, "%ld\n", br_timer_value(&br->gc_work.timer));
> + return sprintf(buf, "%lu\n", br_timer_value(&br->gc_work.timer));
> }
> static DEVICE_ATTR_RO(gc_timer);
>
> @@ -814,7 +814,7 @@ static ssize_t vlan_stats_enabled_show(struct device *d,
> char *buf)
> {
> struct net_bridge *br = to_bridge(d);
> - return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED));
> + return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_STATS_ENABLED));
> }
>
> static ssize_t vlan_stats_enabled_store(struct device *d,
> @@ -830,7 +830,7 @@ static ssize_t vlan_stats_per_port_show(struct device *d,
> char *buf)
> {
> struct net_bridge *br = to_bridge(d);
> - return sprintf(buf, "%u\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT));
> + return sprintf(buf, "%d\n", br_opt_get(br, BROPT_VLAN_STATS_PER_PORT));
> }
>
> static ssize_t vlan_stats_per_port_store(struct device *d,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/bridge: Fix inconsistent format argument types
2021-01-13 9:44 Jiapeng Zhong
@ 2021-01-13 12:33 ` Nikolay Aleksandrov
0 siblings, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2021-01-13 12:33 UTC (permalink / raw)
To: Jiapeng Zhong, roopa; +Cc: davem, kuba, bridge, netdev, linux-kernel
On 13/01/2021 11:44, Jiapeng Zhong wrote:
> Fix the following warnings:
>
> net/bridge/br_sysfs_if.c(162): warning: %ld in format string (no. 1)
> requires 'long' but the argument type is 'unsigned long'.
> net/bridge/br_sysfs_if.c(155): warning: %ld in format string (no. 1)
> requires 'long' but the argument type is 'unsigned long'.
> net/bridge/br_sysfs_if.c(148): warning: %ld in format string (no. 1)
> requires 'long' but the argument type is 'unsigned long'.
>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
> Reported-by: Abaci Robot<abaci@linux.alibaba.com>
> ---
> net/bridge/br_sysfs_if.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
As I replied to your other patch with the same subject please squash them
together and send them targeted at net-next.
Thanks.
> diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
> index 7a59cdd..16a7d41 100644
> --- a/net/bridge/br_sysfs_if.c
> +++ b/net/bridge/br_sysfs_if.c
> @@ -145,21 +145,21 @@ static ssize_t show_port_state(struct net_bridge_port *p, char *buf)
> static ssize_t show_message_age_timer(struct net_bridge_port *p,
> char *buf)
> {
> - return sprintf(buf, "%ld\n", br_timer_value(&p->message_age_timer));
> + return sprintf(buf, "%lu\n", br_timer_value(&p->message_age_timer));
> }
> static BRPORT_ATTR(message_age_timer, 0444, show_message_age_timer, NULL);
>
> static ssize_t show_forward_delay_timer(struct net_bridge_port *p,
> char *buf)
> {
> - return sprintf(buf, "%ld\n", br_timer_value(&p->forward_delay_timer));
> + return sprintf(buf, "%lu\n", br_timer_value(&p->forward_delay_timer));
> }
> static BRPORT_ATTR(forward_delay_timer, 0444, show_forward_delay_timer, NULL);
>
> static ssize_t show_hold_timer(struct net_bridge_port *p,
> char *buf)
> {
> - return sprintf(buf, "%ld\n", br_timer_value(&p->hold_timer));
> + return sprintf(buf, "%lu\n", br_timer_value(&p->hold_timer));
> }
> static BRPORT_ATTR(hold_timer, 0444, show_hold_timer, NULL);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] net/bridge: Fix inconsistent format argument types
@ 2021-01-13 9:44 Jiapeng Zhong
2021-01-13 12:33 ` Nikolay Aleksandrov
0 siblings, 1 reply; 4+ messages in thread
From: Jiapeng Zhong @ 2021-01-13 9:44 UTC (permalink / raw)
To: roopa; +Cc: nikolay, davem, kuba, bridge, netdev, linux-kernel, Jiapeng Zhong
Fix the following warnings:
net/bridge/br_sysfs_if.c(162): warning: %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
net/bridge/br_sysfs_if.c(155): warning: %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
net/bridge/br_sysfs_if.c(148): warning: %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
---
net/bridge/br_sysfs_if.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
index 7a59cdd..16a7d41 100644
--- a/net/bridge/br_sysfs_if.c
+++ b/net/bridge/br_sysfs_if.c
@@ -145,21 +145,21 @@ static ssize_t show_port_state(struct net_bridge_port *p, char *buf)
static ssize_t show_message_age_timer(struct net_bridge_port *p,
char *buf)
{
- return sprintf(buf, "%ld\n", br_timer_value(&p->message_age_timer));
+ return sprintf(buf, "%lu\n", br_timer_value(&p->message_age_timer));
}
static BRPORT_ATTR(message_age_timer, 0444, show_message_age_timer, NULL);
static ssize_t show_forward_delay_timer(struct net_bridge_port *p,
char *buf)
{
- return sprintf(buf, "%ld\n", br_timer_value(&p->forward_delay_timer));
+ return sprintf(buf, "%lu\n", br_timer_value(&p->forward_delay_timer));
}
static BRPORT_ATTR(forward_delay_timer, 0444, show_forward_delay_timer, NULL);
static ssize_t show_hold_timer(struct net_bridge_port *p,
char *buf)
{
- return sprintf(buf, "%ld\n", br_timer_value(&p->hold_timer));
+ return sprintf(buf, "%lu\n", br_timer_value(&p->hold_timer));
}
static BRPORT_ATTR(hold_timer, 0444, show_hold_timer, NULL);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-13 12:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 9:36 [PATCH] net/bridge: Fix inconsistent format argument types Jiapeng Zhong
2021-01-13 12:31 ` Nikolay Aleksandrov
2021-01-13 9:44 Jiapeng Zhong
2021-01-13 12:33 ` Nikolay Aleksandrov
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).