Message ID | 1442271047-4908-4-git-send-email-palmer@dabbelt.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Palmer Dabbelt <palmer@dabbelt.com> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 17 Sep 2015 02:57:12 PDT (-0700), dhowells@redhat.com wrote: > Palmer Dabbelt <palmer@dabbelt.com> 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. Makes sense to me. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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);