mirror of https://gitee.com/openkylin/linux.git
macsec: add noinline tag to avoid a frame size warning
seen with debug config: drivers/net/macsec.c: In function 'dump_secy': drivers/net/macsec.c:2597: warning: the frame size of 2216 bytes is larger than 2048 bytes [-Wframe-larger-than=] just mark it with noinline_for_stack, this is netlink dump code. v2: use 'static noinline_for_stack int' consistently Cc: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3dc93e85f9
commit
e142723700
|
@ -2175,8 +2175,9 @@ static int copy_tx_sa_stats(struct sk_buff *skb,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int copy_rx_sa_stats(struct sk_buff *skb,
|
static noinline_for_stack int
|
||||||
struct macsec_rx_sa_stats __percpu *pstats)
|
copy_rx_sa_stats(struct sk_buff *skb,
|
||||||
|
struct macsec_rx_sa_stats __percpu *pstats)
|
||||||
{
|
{
|
||||||
struct macsec_rx_sa_stats sum = {0, };
|
struct macsec_rx_sa_stats sum = {0, };
|
||||||
int cpu;
|
int cpu;
|
||||||
|
@ -2201,8 +2202,8 @@ static int copy_rx_sa_stats(struct sk_buff *skb,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int copy_rx_sc_stats(struct sk_buff *skb,
|
static noinline_for_stack int
|
||||||
struct pcpu_rx_sc_stats __percpu *pstats)
|
copy_rx_sc_stats(struct sk_buff *skb, struct pcpu_rx_sc_stats __percpu *pstats)
|
||||||
{
|
{
|
||||||
struct macsec_rx_sc_stats sum = {0, };
|
struct macsec_rx_sc_stats sum = {0, };
|
||||||
int cpu;
|
int cpu;
|
||||||
|
@ -2265,8 +2266,8 @@ static int copy_rx_sc_stats(struct sk_buff *skb,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int copy_tx_sc_stats(struct sk_buff *skb,
|
static noinline_for_stack int
|
||||||
struct pcpu_tx_sc_stats __percpu *pstats)
|
copy_tx_sc_stats(struct sk_buff *skb, struct pcpu_tx_sc_stats __percpu *pstats)
|
||||||
{
|
{
|
||||||
struct macsec_tx_sc_stats sum = {0, };
|
struct macsec_tx_sc_stats sum = {0, };
|
||||||
int cpu;
|
int cpu;
|
||||||
|
@ -2305,8 +2306,8 @@ static int copy_tx_sc_stats(struct sk_buff *skb,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int copy_secy_stats(struct sk_buff *skb,
|
static noinline_for_stack int
|
||||||
struct pcpu_secy_stats __percpu *pstats)
|
copy_secy_stats(struct sk_buff *skb, struct pcpu_secy_stats __percpu *pstats)
|
||||||
{
|
{
|
||||||
struct macsec_dev_stats sum = {0, };
|
struct macsec_dev_stats sum = {0, };
|
||||||
int cpu;
|
int cpu;
|
||||||
|
@ -2410,8 +2411,9 @@ static int nla_put_secy(struct macsec_secy *secy, struct sk_buff *skb)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dump_secy(struct macsec_secy *secy, struct net_device *dev,
|
static noinline_for_stack int
|
||||||
struct sk_buff *skb, struct netlink_callback *cb)
|
dump_secy(struct macsec_secy *secy, struct net_device *dev,
|
||||||
|
struct sk_buff *skb, struct netlink_callback *cb)
|
||||||
{
|
{
|
||||||
struct macsec_rx_sc *rx_sc;
|
struct macsec_rx_sc *rx_sc;
|
||||||
struct macsec_tx_sc *tx_sc = &secy->tx_sc;
|
struct macsec_tx_sc *tx_sc = &secy->tx_sc;
|
||||||
|
|
Loading…
Reference in New Issue