From: Patrick McHardy <kaber@trash.net>
To: hadi@cyberus.ca
Cc: "David S. Miller" <davem@redhat.com>, netdev@oss.sgi.com
Subject: Re: [PATCH 2.6 5/5]: act_api: mark some functions static/remove unused function
Date: Thu, 04 Nov 2004 16:28:32 +0100 [thread overview]
Message-ID: <418A4AA0.8070609@trash.net> (raw)
In-Reply-To: <1099576602.1039.151.camel@jzny.localdomain>
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
jamal wrote:
>On Thu, 2004-11-04 at 01:25, Patrick McHardy wrote:
>
>
>>tc_lookup_action_id was unused
>>so I removed it.
>>
>>
>
>Please dont.
>
Ok, here is the same patch without removing tc_lookup_action_id.
It is instead surrounded by #if 0.
>I am incrementally submitting patches.
>
I was about to do more cleanup, please stop me if you are already doing
any of this:
- move the functions from include/net/pkt_act.h to act_generic.c
- convert lastuse/install/expires to USER_HZ
- fix ipt: leaks memory at destruction, ovr doesn't work, doesn't refcount
iptables module references
Is there already userspace-code for anything besides gact ?
I would like to test my changes.
Regards
Patrick
[-- Attachment #2: 5.diff --]
[-- Type: text/x-patch, Size: 3223 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/11/04 16:11:08+01:00 kaber@coreworks.de
# [PKT_SCHED]: act_api: mark some functions static
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/sched/act_api.c
# 2004/11/04 16:11:02+01:00 kaber@coreworks.de +13 -11
# [PKT_SCHED]: act_api: mark some functions static
#
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
diff -Nru a/net/sched/act_api.c b/net/sched/act_api.c
--- a/net/sched/act_api.c 2004-11-04 16:11:32 +01:00
+++ b/net/sched/act_api.c 2004-11-04 16:11:32 +01:00
@@ -88,7 +88,7 @@
}
/* lookup by name */
-struct tc_action_ops *tc_lookup_action_n(char *kind)
+static struct tc_action_ops *tc_lookup_action_n(char *kind)
{
struct tc_action_ops *a = NULL;
@@ -111,7 +111,7 @@
}
/* lookup by rtattr */
-struct tc_action_ops *tc_lookup_action(struct rtattr *kind)
+static struct tc_action_ops *tc_lookup_action(struct rtattr *kind)
{
struct tc_action_ops *a = NULL;
@@ -134,6 +134,7 @@
return a;
}
+#if 0
/* lookup by id */
struct tc_action_ops *tc_lookup_action_id(u32 type)
{
@@ -155,6 +156,7 @@
return a;
}
+#endif
int tcf_action_exec(struct sk_buff *skb,struct tc_action *act, struct tcf_result *res)
{
@@ -504,7 +506,7 @@
return err;
}
-int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr *n, u32 pid)
+static int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr *n, u32 pid)
{
struct tc_action_ops *a_o;
char act_name[4 + IFNAMSIZ + 1];
@@ -571,7 +573,7 @@
return err;
}
-void cleanup_a (struct tc_action *act)
+static void cleanup_a (struct tc_action *act)
{
struct tc_action *a;
@@ -587,7 +589,7 @@
}
}
-struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
+static struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
{
char act_name[4 + IFNAMSIZ + 1];
struct tc_action_ops *a_o = NULL;
@@ -622,7 +624,7 @@
return a_o;
}
-struct tc_action *create_a(int i)
+static struct tc_action *create_a(int i)
{
struct tc_action *act = NULL;
@@ -639,7 +641,7 @@
return act;
}
-int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
+static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
{
struct sk_buff *skb;
unsigned char *b;
@@ -709,7 +711,7 @@
return err;
}
-int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event )
+static int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event )
{
int s = 0;
@@ -793,7 +795,7 @@
}
-int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned flags)
+static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned flags)
{
struct tcamsg *t;
struct nlmsghdr *nlh;
@@ -840,7 +842,7 @@
}
-int tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr )
+static int tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr )
{
int ret = 0;
struct tc_action *act = NULL;
@@ -923,7 +925,7 @@
return ret;
}
-char *
+static char *
find_dump_kind(struct nlmsghdr *n)
{
struct rtattr *tb1, *tb2[TCA_ACT_MAX+1];
next prev parent reply other threads:[~2004-11-04 15:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4189CB70.3060703@trash.net>
2004-11-04 13:56 ` [PATCH 2.6 5/5]: act_api: mark some functions static/remove unused function jamal
2004-11-04 15:28 ` Patrick McHardy [this message]
2004-11-04 15:53 ` jamal
2004-11-04 16:24 ` Patrick McHardy
2004-11-04 16:31 ` jamal
2004-11-04 16:34 ` Jamal Hadi Salim
2004-11-04 16:50 ` Patrick McHardy
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=418A4AA0.8070609@trash.net \
--to=kaber@trash.net \
--cc=davem@redhat.com \
--cc=hadi@cyberus.ca \
--cc=netdev@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).