]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: pktgen: fix code style (WARNING: macros should not use a trailing semicolon)
authorPeter Seiderer <ps.report@gmx.net>
Thu, 10 Apr 2025 07:17:45 +0000 (09:17 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 14 Apr 2025 21:51:32 +0000 (14:51 -0700)
Fix checkpatch code style warnings:

  WARNING: macros should not use a trailing semicolon
  #180: FILE: net/core/pktgen.c:180:
  +#define func_enter() pr_debug("entering %s\n", __func__);

  WARNING: macros should not use a trailing semicolon
  #234: FILE: net/core/pktgen.c:234:
  +#define   if_lock(t)           mutex_lock(&(t->if_lock));

  CHECK: Unnecessary parentheses around t->if_lock
  #235: FILE: net/core/pktgen.c:235:
  +#define   if_unlock(t)           mutex_unlock(&(t->if_lock));

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/pktgen.c

index b745fae0939e24cd43752784fccbd6eadb05dc5b..d26c0588dd8ab5321c36e5b247a70ab00f53a50a 100644 (file)
 #define MAX_IMIX_ENTRIES 20
 #define IMIX_PRECISION 100 /* Precision of IMIX distribution */
 
-#define func_enter() pr_debug("entering %s\n", __func__);
+#define func_enter() pr_debug("entering %s\n", __func__)
 
 #define PKT_FLAGS                                                      \
        pf(IPV6)                /* Interface in IPV6 Mode */            \
@@ -231,8 +231,8 @@ static char *pkt_flag_names[] = {
 #define M_QUEUE_XMIT           2       /* Inject packet into qdisc */
 
 /* If lock -- protects updating of if_list */
-#define   if_lock(t)           mutex_lock(&(t->if_lock));
-#define   if_unlock(t)           mutex_unlock(&(t->if_lock));
+#define   if_lock(t)      mutex_lock(&(t->if_lock))
+#define   if_unlock(t)    mutex_unlock(&(t->if_lock))
 
 /* Used to help with determining the pkts on receive */
 #define PKTGEN_MAGIC 0xbe9be955