From 84e2306e94549acd19e5d19734ddff3c2847e032 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Fri, 5 Apr 2013 10:41:27 +0000 Subject: irda: use GFP_KERNEL in irda_create() irda_create() is called from user context only, therefore has no need for GFP_ATOMIC. Signed-off-by: Mathias Krause Signed-off-by: David S. Miller --- net/irda/af_irda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/irda') diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index e493b3397ae..1c2dc90fbaa 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -1120,7 +1120,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol, } /* Allocate networking socket */ - sk = sk_alloc(net, PF_IRDA, GFP_ATOMIC, &irda_proto); + sk = sk_alloc(net, PF_IRDA, GFP_KERNEL, &irda_proto); if (sk == NULL) return -ENOMEM; -- cgit v1.2.3 From e1e3c806dab8bdf5d748653edc67b2d97804a666 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Fri, 5 Apr 2013 10:41:28 +0000 Subject: irda: use GFP_KERNEL in irda_connect_response() The only call site of irda_connect_response() is irda_accept() -- a function called from user context only. Therefore it has no need for GFP_ATOMIC. Signed-off-by: Mathias Krause Signed-off-by: David S. Miller --- net/irda/af_irda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/irda') diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 1c2dc90fbaa..0578d4fa00a 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -305,8 +305,7 @@ static void irda_connect_response(struct irda_sock *self) IRDA_DEBUG(2, "%s()\n", __func__); - skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, - GFP_ATOMIC); + skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_KERNEL); if (skb == NULL) { IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", __func__); -- cgit v1.2.3 From c17277f7d7c502afe1062587913d47881ba0f116 Mon Sep 17 00:00:00 2001 From: Mathias Krause Date: Fri, 5 Apr 2013 11:02:07 +0000 Subject: TTY: ircomm, use GFP_KERNEL in ircomm_open() Hi Greg, I'm unsure if you or Dave should take that one as it's for one a TTY patch but also living under net/. So I'm uncertain and let you decide! Thanks, Mathias -- >8 -- Subject: [PATCH] TTY: ircomm, use GFP_KERNEL in ircomm_open() We're clearly running in non-atomic context as our only call site is able to call wait_event_interruptible(). So we're safe to use GFP_KERNEL here instead of GFP_ATOMIC. Signed-off-by: Mathias Krause Acked-by: Greg Kroah-Hartman Signed-off-by: David S. Miller --- net/irda/ircomm/ircomm_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/irda') diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c index 52079f19bbb..b797daac063 100644 --- a/net/irda/ircomm/ircomm_core.c +++ b/net/irda/ircomm/ircomm_core.c @@ -117,7 +117,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) IRDA_ASSERT(ircomm != NULL, return NULL;); - self = kzalloc(sizeof(struct ircomm_cb), GFP_ATOMIC); + self = kzalloc(sizeof(struct ircomm_cb), GFP_KERNEL); if (self == NULL) return NULL; -- cgit v1.2.3 From 133b94245c54bb2d8832bfb15975b931bc00d914 Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Fri, 19 Apr 2013 17:10:45 +0000 Subject: irda: irlmp_reasons[] can be static Signed-off-by: Fengguang Wu Acked-by: Dan Carpenter Signed-off-by: David S. Miller --- net/irda/irlmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/irda') diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c index 1064621da6f..98ad6ec4bd3 100644 --- a/net/irda/irlmp.c +++ b/net/irda/irlmp.c @@ -58,7 +58,7 @@ int sysctl_discovery_slots = 6; /* 6 slots by default */ int sysctl_lap_keepalive_time = LM_IDLE_TIMEOUT * 1000 / HZ; char sysctl_devname[65]; -const char *irlmp_reasons[] = { +static const char *irlmp_reasons[] = { "ERROR, NOT USED", "LM_USER_REQUEST", "LM_LAP_DISCONNECT", -- cgit v1.2.3