Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 533cb5b0 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

[XFRM]: constify 'struct xfrm_type'

parent 2216b483
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -202,7 +202,7 @@ struct xfrm_state


	/* Reference to data common to all the instances of this
	/* Reference to data common to all the instances of this
	 * transformer. */
	 * transformer. */
	struct xfrm_type	*type;
	const struct xfrm_type	*type;
	struct xfrm_mode	*inner_mode;
	struct xfrm_mode	*inner_mode;
	struct xfrm_mode	*outer_mode;
	struct xfrm_mode	*outer_mode;


@@ -279,7 +279,7 @@ struct xfrm_state_afinfo {
	unsigned int		proto;
	unsigned int		proto;
	unsigned int		eth_proto;
	unsigned int		eth_proto;
	struct module		*owner;
	struct module		*owner;
	struct xfrm_type	*type_map[IPPROTO_MAX];
	const struct xfrm_type	*type_map[IPPROTO_MAX];
	struct xfrm_mode	*mode_map[XFRM_MODE_MAX];
	struct xfrm_mode	*mode_map[XFRM_MODE_MAX];
	int			(*init_flags)(struct xfrm_state *x);
	int			(*init_flags)(struct xfrm_state *x);
	void			(*init_tempsel)(struct xfrm_state *x, struct flowi *fl,
	void			(*init_tempsel)(struct xfrm_state *x, struct flowi *fl,
@@ -322,8 +322,8 @@ struct xfrm_type
	u32			(*get_mtu)(struct xfrm_state *, int size);
	u32			(*get_mtu)(struct xfrm_state *, int size);
};
};


extern int xfrm_register_type(struct xfrm_type *type, unsigned short family);
extern int xfrm_register_type(const struct xfrm_type *type, unsigned short family);
extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family);
extern int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family);


struct xfrm_mode {
struct xfrm_mode {
	/*
	/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -300,7 +300,7 @@ static void ah_destroy(struct xfrm_state *x)
}
}




static struct xfrm_type ah_type =
static const struct xfrm_type ah_type =
{
{
	.description	= "AH4",
	.description	= "AH4",
	.owner		= THIS_MODULE,
	.owner		= THIS_MODULE,
+1 −1
Original line number Original line Diff line number Diff line
@@ -600,7 +600,7 @@ static int esp_init_state(struct xfrm_state *x)
	return err;
	return err;
}
}


static struct xfrm_type esp_type =
static const struct xfrm_type esp_type =
{
{
	.description	= "ESP4",
	.description	= "ESP4",
	.owner		= THIS_MODULE,
	.owner		= THIS_MODULE,
+1 −1
Original line number Original line Diff line number Diff line
@@ -437,7 +437,7 @@ static int ipcomp_init_state(struct xfrm_state *x)
	goto out;
	goto out;
}
}


static struct xfrm_type ipcomp_type = {
static const struct xfrm_type ipcomp_type = {
	.description	= "IPCOMP4",
	.description	= "IPCOMP4",
	.owner		= THIS_MODULE,
	.owner		= THIS_MODULE,
	.proto	     	= IPPROTO_COMP,
	.proto	     	= IPPROTO_COMP,
+1 −1
Original line number Original line Diff line number Diff line
@@ -38,7 +38,7 @@ static void ipip_destroy(struct xfrm_state *x)
{
{
}
}


static struct xfrm_type ipip_type = {
static const struct xfrm_type ipip_type = {
	.description	= "IPIP",
	.description	= "IPIP",
	.owner		= THIS_MODULE,
	.owner		= THIS_MODULE,
	.proto	     	= IPPROTO_IPIP,
	.proto	     	= IPPROTO_IPIP,
Loading