From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 02/13] batman-adv: Prefix send local static functions with batadv_
Date: Wed, 16 May 2012 20:23:14 +0200 [thread overview]
Message-ID: <1337192605-8652-2-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1337192605-8652-1-git-send-email-sven@narfation.org>
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
send.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/send.c b/send.c
index ef4b4b3..e19265a 100644
--- a/send.c
+++ b/send.c
@@ -28,7 +28,7 @@
#include "gateway_common.h"
#include "originator.h"
-static void send_outstanding_bcast_packet(struct work_struct *work);
+static void batadv_send_outstanding_bcast_packet(struct work_struct *work);
/* send out an already prepared packet to the given address via the
* specified batman interface
@@ -97,7 +97,7 @@ void batadv_schedule_bat_ogm(struct hard_iface *hard_iface)
bat_priv->bat_algo_ops->bat_ogm_schedule(hard_iface);
}
-static void forw_packet_free(struct forw_packet *forw_packet)
+static void batadv_forw_packet_free(struct forw_packet *forw_packet)
{
if (forw_packet->skb)
kfree_skb(forw_packet->skb);
@@ -106,9 +106,9 @@ static void forw_packet_free(struct forw_packet *forw_packet)
kfree(forw_packet);
}
-static void _add_bcast_packet_to_list(struct bat_priv *bat_priv,
- struct forw_packet *forw_packet,
- unsigned long send_time)
+static void _batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv,
+ struct forw_packet *forw_packet,
+ unsigned long send_time)
{
INIT_HLIST_NODE(&forw_packet->list);
@@ -119,7 +119,7 @@ static void _add_bcast_packet_to_list(struct bat_priv *bat_priv,
/* start timer for this packet */
INIT_DELAYED_WORK(&forw_packet->delayed_work,
- send_outstanding_bcast_packet);
+ batadv_send_outstanding_bcast_packet);
queue_delayed_work(batadv_event_workqueue, &forw_packet->delayed_work,
send_time);
}
@@ -172,7 +172,7 @@ int batadv_add_bcast_packet_to_list(struct bat_priv *bat_priv,
/* how often did we send the bcast packet ? */
forw_packet->num_packets = 0;
- _add_bcast_packet_to_list(bat_priv, forw_packet, delay);
+ _batadv_add_bcast_packet_to_list(bat_priv, forw_packet, delay);
return NETDEV_TX_OK;
packet_free:
@@ -185,7 +185,7 @@ out:
return NETDEV_TX_BUSY;
}
-static void send_outstanding_bcast_packet(struct work_struct *work)
+static void batadv_send_outstanding_bcast_packet(struct work_struct *work)
{
struct hard_iface *hard_iface;
struct delayed_work *delayed_work =
@@ -224,13 +224,13 @@ static void send_outstanding_bcast_packet(struct work_struct *work)
/* if we still have some more bcasts to send */
if (forw_packet->num_packets < 3) {
- _add_bcast_packet_to_list(bat_priv, forw_packet,
- msecs_to_jiffies(5));
+ _batadv_add_bcast_packet_to_list(bat_priv, forw_packet,
+ msecs_to_jiffies(5));
return;
}
out:
- forw_packet_free(forw_packet);
+ batadv_forw_packet_free(forw_packet);
atomic_inc(&bat_priv->bcast_queue_left);
}
@@ -264,7 +264,7 @@ out:
if (!forw_packet->own)
atomic_inc(&bat_priv->batman_queue_left);
- forw_packet_free(forw_packet);
+ batadv_forw_packet_free(forw_packet);
}
void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
@@ -296,7 +296,7 @@ void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
spin_unlock_bh(&bat_priv->forw_bcast_list_lock);
- /* send_outstanding_bcast_packet() will lock the list to
+ /* batadv_send_outstanding_bcast_packet() will lock the list to
* delete the item from the list
*/
pending = cancel_delayed_work_sync(&forw_packet->delayed_work);
@@ -304,7 +304,7 @@ void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
if (pending) {
hlist_del(&forw_packet->list);
- forw_packet_free(forw_packet);
+ batadv_forw_packet_free(forw_packet);
}
}
spin_unlock_bh(&bat_priv->forw_bcast_list_lock);
@@ -331,7 +331,7 @@ void batadv_purge_outstanding_packets(struct bat_priv *bat_priv,
if (pending) {
hlist_del(&forw_packet->list);
- forw_packet_free(forw_packet);
+ batadv_forw_packet_free(forw_packet);
}
}
spin_unlock_bh(&bat_priv->forw_bat_list_lock);
--
1.7.10
next prev parent reply other threads:[~2012-05-16 18:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 17:38 [B.A.T.M.A.N.] Remaining cleanup/prefixing patches Sven Eckelmann
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 01/13] batman-adv: Prefix routing local static functions with batadv_ Sven Eckelmann
2012-05-16 18:23 ` Sven Eckelmann [this message]
2012-05-18 8:26 ` [B.A.T.M.A.N.] [PATCH 02/13] batman-adv: Prefix send " Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 03/13] batman-adv: Prefix soft-interface " Sven Eckelmann
2012-05-18 8:28 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 04/13] batman-adv: Prefix translation-table " Sven Eckelmann
2012-05-18 8:34 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 05/13] batman-adv: Prefix unicast " Sven Eckelmann
2012-05-18 8:36 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 06/13] batman-adv: Prefix vis " Sven Eckelmann
2012-05-18 9:58 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 07/13] batman-adv: Prefix main " Sven Eckelmann
2012-05-18 12:37 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 08/13] batman-adv: Mark only locally used symbol batadv_tt_local_crc as static Sven Eckelmann
2012-05-18 12:44 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 09/13] batman-adv: Replace simple function like defines with functions Sven Eckelmann
2012-05-18 14:41 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 10/13] batman-adv: Prefix remaining function like macros with batadv_ Sven Eckelmann
2012-05-18 15:00 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 11/13] batman-adv: Directly print to seq_file in vis Sven Eckelmann
2012-05-18 15:03 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 12/13] batman-adv: Remove unused define BAT_ATTR_HIF_UINT Sven Eckelmann
2012-05-18 15:16 ` [B.A.T.M.A.N.] [PATCH] batman-adv: Prefix bat_sysfs local static functions with batadv_ Sven Eckelmann
2012-05-18 16:01 ` Marek Lindner
2012-05-16 18:23 ` [B.A.T.M.A.N.] [PATCH 13/13] batman-adv: Use typedef instead of define for type dat_addr_t Sven Eckelmann
2012-05-18 16:03 ` Marek Lindner
2012-05-18 8:24 ` [B.A.T.M.A.N.] [PATCH 01/13] batman-adv: Prefix routing local static functions with batadv_ Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337192605-8652-2-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox