Skip to contentSkip to conversation

drbd: remove unused drbd_nl_mcgrps[] array

PATCH Applied Arnd Bergmann 3 participants 4 messages May 19 – Sep 24

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drbd: remove unused drbd_nl_mcgrps[] array

From: Arnd Bergmann <[email protected]>

After the rework, two files have a copy of drbd_nl_mcgrps[], but one of them has no references:

drivers/block/drbd/drbd_nl_gen.c:641:42: error: 'drbd_nl_mcgrps' defined but not used [-Werror=unused-const-variable=]

  641 | static const struct genl_multicast_group drbd_nl_mcgrps[] = {
      |                                          ^~~~~~~~~~~~~~

At the default warning level, -Wunused-const-variables is turned off, so this has gone unnoticed.

Remove the extra variable.

Fixes 8098eeb693c4 ("drbd: replace genl_magic with explicit netlink serialization")
---
 drivers/block/drbd/drbd_nl_gen.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/block/drbd/drbd_nl_gen.c +0 -4
index fb44b948cec8..e133e8415205 100644
@@ -638,10 +638,6 @@ const struct genl_split_ops drbd_nl_ops[32] = {
 	},
 };
 
-static const struct genl_multicast_group drbd_nl_mcgrps[] = {
-	[DRBD_NLGRP_EVENTS] = { "events", },
-};
-
 static int __drbd_cfg_context_from_attrs(struct drbd_cfg_context *s,
 		struct nlattr ***ret_nested_attribute_table,
 		struct genl_info *info)
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

After the rework, two files have a copy of drbd_nl_mcgrps[], but one of them has no references:

drivers/block/drbd/drbd_nl_gen.c:641:42: error: 'drbd_nl_mcgrps' defined but not used [-Werror=unused-const-variable=]

   641 | static const struct genl_multicast_group drbd_nl_mcgrps[] = {
       |                                          ^~~~~~~~~~~~~~
Quoted 7 lines

At the default warning level, -Wunused-const-variables is turned off, so this has gone unnoticed.

Remove the extra variable.

Fixes 8098eeb693c4 ("drbd: replace genl_magic with explicit netlink serialization")

Oops, looks like a copy/paste error on my side.
Thanks for noticing and fixing.

#2 lore raw
In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

After the rework, two files have a copy of drbd_nl_mcgrps[], but one of them has no references:

drivers/block/drbd/drbd_nl_gen.c:641:42: error: 'drbd_nl_mcgrps' defined but not used [-Werror=unused-const-variable=]

   641 | static const struct genl_multicast_group drbd_nl_mcgrps[] = {
       |                                          ^~~~~~~~~~~~~~

At the default warning level, -Wunused-const-variables is turned off, so this has gone unnoticed.

Quoted 7 lines

Remove the extra variable.

Fixes 8098eeb693c4 ("drbd: replace genl_magic with explicit netlink serialization")
---
  drivers/block/drbd/drbd_nl_gen.c | 4 ----
  1 file changed, 4 deletions(-)

@Jens ping, seems like this was never applied? I think it should also apply to the current tree.

Thanks,
Christoph

maintainer Applied
#3 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

After the rework, two files have a copy of drbd_nl_mcgrps[], but one of them has no references:

drivers/block/drbd/drbd_nl_gen.c:641:42: error: 'drbd_nl_mcgrps' defined but not used [-Werror=unused-const-variable=]

  641 | static const struct genl_multicast_group drbd_nl_mcgrps[] = {
      |                                          ^~~~~~~~~~~~~~

[...]

Applied, thanks!

[1/1] drbd: remove unused drbd_nl_mcgrps[] array

      commit: d431e03d831c043707e22311c4bdea1907166c34

Best regards,

Signature · 1 line
Jens Axboe