[PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

Subsystems: atm, networking [general], the rest

STALE4027d REVIEWED: 2 (0M)

2 review trailers.

3 messages, 3 authors, 2015-09-17 · open the first message on its own page

[PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

From: Palmer Dabbelt <hidden>
Date: 2015-09-14 22:50:37

This used to be behind an #ifdef COMPAT_COMPAT, so most of userspace
wouldn't have seen the definition before.  Unfortunately this header
file became visible to userspace, so the definition has instead been
moved to net/atm/svc.c (the only user).

Signed-off-by: Palmer Dabbelt <redacted>
Reviewed-by: Andrew Waterman <waterman-aFE07iDfcCIb0cFwG/AQJIdd74u8MsAO@public.gmane.org>
Reviewed-by: Albert Ou <aou-aFE07iDfcCIb0cFwG/AQJIdd74u8MsAO@public.gmane.org>
---
 include/uapi/linux/atmdev.h | 4 ----
 net/atm/svc.c               | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/atmdev.h b/include/uapi/linux/atmdev.h
index 93e0ec008ca8..3dcec701501c 100644
--- a/include/uapi/linux/atmdev.h
+++ b/include/uapi/linux/atmdev.h
@@ -100,10 +100,6 @@ struct atm_dev_stats {
 					/* use backend to make new if */
 #define ATM_ADDPARTY  	_IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
  					/* add party to p2mp call */
-#ifdef CONFIG_COMPAT
-/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
-#define COMPAT_ATM_ADDPARTY  	_IOW('a', ATMIOC_SPECIAL+4,struct compat_atm_iobuf)
-#endif
 #define ATM_DROPPARTY 	_IOW('a', ATMIOC_SPECIAL+5,int)
 					/* drop party from p2mp call */
 
diff --git a/net/atm/svc.c b/net/atm/svc.c
index 3fa0a9ee98d1..9e2e6ef285e8 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.c
@@ -27,6 +27,11 @@
 #include "signaling.h"
 #include "addr.h"
 
+#ifdef CONFIG_COMPAT
+/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
+#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4, struct compat_atm_iobuf)
+#endif
+
 static int svc_create(struct net *net, struct socket *sock, int protocol,
 		      int kern);
 
-- 
2.4.6

Re: [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

From: David Howells <dhowells@redhat.com>
Date: 2015-09-17 09:57:12

Palmer Dabbelt [off-list ref] wrote:
+#ifdef CONFIG_COMPAT
+/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
+#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4, struct compat_atm_iobuf)
+#endif
I wonder if it would hurt to ditch the conditionals entirely.  It only eats
cpp namespace, not C namespace so it won't affect the output if it is not used
because the code that uses it is compiled out.

David

Re: [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c

From: Palmer Dabbelt <palmer@dabbelt.com>
Date: 2015-09-17 20:53:16

On Thu, 17 Sep 2015 02:57:12 PDT (-0700), dhowells@redhat.com wrote:
Palmer Dabbelt [off-list ref] wrote:
quoted
+#ifdef CONFIG_COMPAT
+/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */
+#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4, struct compat_atm_iobuf)
+#endif
I wonder if it would hurt to ditch the conditionals entirely.  It only eats
cpp namespace, not C namespace so it won't affect the output if it is not used
because the code that uses it is compiled out.
Makes sense to me.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help