* [PATCH AUTOSEL 4.14 17/20] netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
[not found] <20230525184520.2004878-1-sashal@kernel.org>
@ 2023-05-25 18:45 ` Sasha Levin
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 19/20] atm: hide unused procfs functions Sasha Levin
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype Sasha Levin
2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-05-25 18:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Tom Rix, Simon Horman, Florian Westphal, Sasha Levin, pablo,
kadlec, davem, edumazet, kuba, pabeni, netfilter-devel, coreteam,
netdev
From: Tom Rix <trix@redhat.com>
[ Upstream commit 224a876e37543eee111bf9b6aa4935080e619335 ]
gcc with W=1 and ! CONFIG_NF_NAT
net/netfilter/nf_conntrack_netlink.c:3463:32: error:
‘exp_nat_nla_policy’ defined but not used [-Werror=unused-const-variable=]
3463 | static const struct nla_policy exp_nat_nla_policy[CTA_EXPECT_NAT_MAX+1] = {
| ^~~~~~~~~~~~~~~~~~
net/netfilter/nf_conntrack_netlink.c:2979:33: error:
‘any_addr’ defined but not used [-Werror=unused-const-variable=]
2979 | static const union nf_inet_addr any_addr;
| ^~~~~~~~
These variables use is controlled by CONFIG_NF_NAT, so should their definitions.
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/netfilter/nf_conntrack_netlink.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 733e61fc50433..1d0abd8529e62 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2531,7 +2531,9 @@ static int ctnetlink_exp_dump_mask(struct sk_buff *skb,
return -1;
}
+#if IS_ENABLED(CONFIG_NF_NAT)
static const union nf_inet_addr any_addr;
+#endif
static __be32 nf_expect_get_id(const struct nf_conntrack_expect *exp)
{
@@ -3031,10 +3033,12 @@ ctnetlink_change_expect(struct nf_conntrack_expect *x,
return 0;
}
+#if IS_ENABLED(CONFIG_NF_NAT)
static const struct nla_policy exp_nat_nla_policy[CTA_EXPECT_NAT_MAX+1] = {
[CTA_EXPECT_NAT_DIR] = { .type = NLA_U32 },
[CTA_EXPECT_NAT_TUPLE] = { .type = NLA_NESTED },
};
+#endif
static int
ctnetlink_parse_expect_nat(const struct nlattr *attr,
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 4.14 19/20] atm: hide unused procfs functions
[not found] <20230525184520.2004878-1-sashal@kernel.org>
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 17/20] netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT Sasha Levin
@ 2023-05-25 18:45 ` Sasha Levin
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype Sasha Levin
2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-05-25 18:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Arnd Bergmann, Jakub Kicinski, Sasha Levin, davem, edumazet,
pabeni, netdev
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit fb1b7be9b16c1f4626969ba4e95a97da2a452b41 ]
When CONFIG_PROC_FS is disabled, the function declarations for some
procfs functions are hidden, but the definitions are still build,
as shown by this compiler warning:
net/atm/resources.c:403:7: error: no previous prototype for 'atm_dev_seq_start' [-Werror=missing-prototypes]
net/atm/resources.c:409:6: error: no previous prototype for 'atm_dev_seq_stop' [-Werror=missing-prototypes]
net/atm/resources.c:414:7: error: no previous prototype for 'atm_dev_seq_next' [-Werror=missing-prototypes]
Add another #ifdef to leave these out of the build.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230516194625.549249-2-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/atm/resources.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/atm/resources.c b/net/atm/resources.c
index bada395ecdb18..9389080224f87 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -447,6 +447,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg, int compat)
return error;
}
+#ifdef CONFIG_PROC_FS
void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos)
{
mutex_lock(&atm_dev_mutex);
@@ -462,3 +463,4 @@ void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
return seq_list_next(v, &atm_devs, pos);
}
+#endif
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype
[not found] <20230525184520.2004878-1-sashal@kernel.org>
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 17/20] netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT Sasha Levin
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 19/20] atm: hide unused procfs functions Sasha Levin
@ 2023-05-25 18:45 ` Sasha Levin
2023-05-25 20:05 ` Arnd Bergmann
2 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2023-05-25 18:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Arnd Bergmann, Jakub Kicinski, Sasha Levin, andrew, hkallweit1,
netdev
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit 2e9f8ab68f42b059e80db71266c1675c07c664bd ]
mdio_bus_init() is either used as a local module_init() entry,
or it gets called in phy_device.c. In the former case, there
is no declaration, which causes a warning:
drivers/net/phy/mdio_bus.c:1371:12: error: no previous prototype for 'mdio_bus_init' [-Werror=missing-prototypes]
Remove the #ifdef around the declaration to avoid the warning..
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230516194625.549249-4-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/phy.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 8b6850707e629..1c1cc2ec0a7fc 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -940,10 +940,8 @@ int phy_ethtool_set_link_ksettings(struct net_device *ndev,
const struct ethtool_link_ksettings *cmd);
int phy_ethtool_nway_reset(struct net_device *ndev);
-#if IS_ENABLED(CONFIG_PHYLIB)
int __init mdio_bus_init(void);
void mdio_bus_exit(void);
-#endif
extern struct bus_type mdio_bus_type;
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype Sasha Levin
@ 2023-05-25 20:05 ` Arnd Bergmann
2023-06-01 9:27 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2023-05-25 20:05 UTC (permalink / raw)
To: Sasha Levin, linux-kernel, stable
Cc: Jakub Kicinski, Andrew Lunn, Heiner Kallweit, Netdev
On Thu, May 25, 2023, at 20:45, Sasha Levin wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> [ Upstream commit 2e9f8ab68f42b059e80db71266c1675c07c664bd ]
>
> mdio_bus_init() is either used as a local module_init() entry,
> or it gets called in phy_device.c. In the former case, there
> is no declaration, which causes a warning:
>
> drivers/net/phy/mdio_bus.c:1371:12: error: no previous prototype for
> 'mdio_bus_init' [-Werror=missing-prototypes]
>
> Remove the #ifdef around the declaration to avoid the warning..
Hi Sasha,
While there is nothing wrong with backporting the -Wmissing-prototypes
warning fixes I sent, there is also really no point unless you
want to backport all 140 of them and then also turn on that warning
during testing.
The option is only enabled at the W=1 level or when using sparse (C=1).
I hope to get these all done in 6.5 for the most common architectures,
but I wouldn't bother putting them into stable kernels.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype
2023-05-25 20:05 ` Arnd Bergmann
@ 2023-06-01 9:27 ` Sasha Levin
0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-06-01 9:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, stable, Jakub Kicinski, Andrew Lunn,
Heiner Kallweit, Netdev
On Thu, May 25, 2023 at 10:05:01PM +0200, Arnd Bergmann wrote:
>On Thu, May 25, 2023, at 20:45, Sasha Levin wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> [ Upstream commit 2e9f8ab68f42b059e80db71266c1675c07c664bd ]
>>
>> mdio_bus_init() is either used as a local module_init() entry,
>> or it gets called in phy_device.c. In the former case, there
>> is no declaration, which causes a warning:
>>
>> drivers/net/phy/mdio_bus.c:1371:12: error: no previous prototype for
>> 'mdio_bus_init' [-Werror=missing-prototypes]
>>
>> Remove the #ifdef around the declaration to avoid the warning..
>
>Hi Sasha,
>
>While there is nothing wrong with backporting the -Wmissing-prototypes
>warning fixes I sent, there is also really no point unless you
>want to backport all 140 of them and then also turn on that warning
>during testing.
>
>The option is only enabled at the W=1 level or when using sparse (C=1).
>I hope to get these all done in 6.5 for the most common architectures,
>but I wouldn't bother putting them into stable kernels.
I'll go drop it. In general, we've been trying to avoid W=1 fixes but
sometimes they end up sneaking in, which is also okay...
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-01 9:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230525184520.2004878-1-sashal@kernel.org>
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 17/20] netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT Sasha Levin
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 19/20] atm: hide unused procfs functions Sasha Levin
2023-05-25 18:45 ` [PATCH AUTOSEL 4.14 20/20] mdio_bus: unhide mdio_bus_init prototype Sasha Levin
2023-05-25 20:05 ` Arnd Bergmann
2023-06-01 9:27 ` Sasha Levin
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).