aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Donnerhacke <donner@FreeBSD.org>2021-02-07 16:39:35 +0000
committerLutz Donnerhacke <donner@FreeBSD.org>2021-02-07 16:39:35 +0000
commitcef689f45b9d5785ede463bcd23fea51bc1143ed (patch)
tree4f1064b3d84fe66745b1b69ad4b0044ad36505f6
parentbb67e52db143b699bdac1830717930b26a7b5766 (diff)
downloadsrc-cef689f45b9d5785ede463bcd23fea51bc1143ed.tar.gz
src-cef689f45b9d5785ede463bcd23fea51bc1143ed.zip
Revert "netgraph/ng_bridge: Make simple internal functions read-only"
Patch mass breaks LINT kernels. This reverts commit bb67e52db143b699bdac1830717930b26a7b5766.
-rw-r--r--sys/netgraph/netgraph.h5
-rw-r--r--sys/netgraph/ng_base.c2
-rw-r--r--sys/netgraph/ng_bridge.c10
3 files changed, 6 insertions, 11 deletions
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index 5040471c5ce0..7535472dc631 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -87,9 +87,6 @@ struct ng_item ;
typedef struct ng_item *item_p;
typedef struct ng_node *node_p;
typedef struct ng_hook *hook_p;
-typedef struct ng_item const *item_cp;
-typedef struct ng_node const *node_cp;
-typedef struct ng_hook const *hook_cp;
/* node method definitions */
typedef int ng_constructor_t(node_p node);
@@ -1142,7 +1139,7 @@ int ng_make_node_common(struct ng_type *typep, node_p *nodep);
int ng_name_node(node_p node, const char *name);
node_p ng_name2noderef(node_p node, const char *name);
int ng_newtype(struct ng_type *tp);
-ng_ID_t ng_node2ID(node_cp node);
+ng_ID_t ng_node2ID(node_p node);
item_p ng_package_data(struct mbuf *m, int flags);
item_p ng_package_msg(struct ng_mesg *msg, int flags);
item_p ng_package_msg_self(node_p here, hook_p hook, struct ng_mesg *msg);
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index 6ab39421b255..dadf86eb8dde 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -836,7 +836,7 @@ ng_ID2noderef(ng_ID_t ID)
}
ng_ID_t
-ng_node2ID(node_cp node)
+ng_node2ID(node_p node)
{
return (node ? NG_NODE_ID(node) : 0);
}
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index d5b3b520a497..4898a55f1463 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -115,7 +115,6 @@ struct ng_bridge_link {
sendUnknown : 1;/* send unknown macs out */
struct ng_bridge_link_kernel_stats stats; /* link stats */
};
-typedef struct ng_bridge_link const *link_cp; /* read only access */
/* Per-node private data */
struct ng_bridge_private {
@@ -131,7 +130,6 @@ struct ng_bridge_private {
struct callout timer; /* one second periodic timer */
};
typedef struct ng_bridge_private *priv_p;
-typedef struct ng_bridge_private const *priv_cp; /* read only access */
/* Information about a host, stored in a hash table entry */
struct ng_bridge_hent {
@@ -151,12 +149,12 @@ static ng_rcvdata_t ng_bridge_rcvdata;
static ng_disconnect_t ng_bridge_disconnect;
/* Other internal functions */
-static struct ng_bridge_host *ng_bridge_get(priv_cp priv, const u_char *addr);
+static struct ng_bridge_host *ng_bridge_get(priv_p priv, const u_char *addr);
static int ng_bridge_put(priv_p priv, const u_char *addr, link_p link);
static void ng_bridge_rehash(priv_p priv);
static void ng_bridge_remove_hosts(priv_p priv, link_p link);
static void ng_bridge_timeout(node_p node, hook_p hook, void *arg1, int arg2);
-static const char *ng_bridge_nodename(node_cp node);
+static const char *ng_bridge_nodename(node_p node);
/* Ethernet broadcast */
static const u_char ng_bridge_bcast_addr[ETHER_ADDR_LEN] =
@@ -922,7 +920,7 @@ ng_bridge_disconnect(hook_p hook)
* Find a host entry in the table.
*/
static struct ng_bridge_host *
-ng_bridge_get(priv_cp priv, const u_char *addr)
+ng_bridge_get(priv_p priv, const u_char *addr)
{
const int bucket = HASH(addr, priv->hashMask);
struct ng_bridge_hent *hent;
@@ -1133,7 +1131,7 @@ ng_bridge_timeout(node_p node, hook_p hook, void *arg1, int arg2)
* Return node's "name", even if it doesn't have one.
*/
static const char *
-ng_bridge_nodename(node_cp node)
+ng_bridge_nodename(node_p node)
{
static char name[NG_NODESIZ];