Message ID | 20180701110804.32415-6-afaerber@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Sun, Jul 01, 2018 at 01:07:54PM CEST, afaerber@suse.de wrote: >linux-next and 4.18-rc2 both identify as LINUX_VERSION(4,18,0), but >commit a11e1d432b51f63ba698d044441284a661f01144 (Revert changes to >convert to ->poll_mask() and aio IOCB_CMD_POLL) reverted .poll_mask >to .poll again. > >Signed-off-by: Andreas Färber <afaerber@suse.de> >--- > net/lora/dgram.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/net/lora/dgram.c b/net/lora/dgram.c >index 4d931fd3778a..ef56fd90e762 100644 >--- a/net/lora/dgram.c >+++ b/net/lora/dgram.c >@@ -217,7 +217,11 @@ const struct proto_ops dgram_proto_ops = { > .socketpair = sock_no_socketpair, > .accept = sock_no_accept, > .getname = dgram_getname, >+#if 0 /* LINUX_VERSION_CODE >= LINUX_VERSION(4, 18, 0) */ >+ .poll_mask = datagram_poll_mask, >+#else I guess that you sent this patch by mistake... > .poll = datagram_poll, >+#endif > .ioctl = dgram_ioctl, > .listen = sock_no_listen, > .shutdown = sock_no_shutdown, >-- >2.16.4 >
Am 02.07.2018 um 18:22 schrieb Jiri Pirko: > Sun, Jul 01, 2018 at 01:07:54PM CEST, afaerber@suse.de wrote: >> linux-next and 4.18-rc2 both identify as LINUX_VERSION(4,18,0), but >> commit a11e1d432b51f63ba698d044441284a661f01144 (Revert changes to >> convert to ->poll_mask() and aio IOCB_CMD_POLL) reverted .poll_mask >> to .poll again. >> >> Signed-off-by: Andreas Färber <afaerber@suse.de> >> --- >> net/lora/dgram.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/net/lora/dgram.c b/net/lora/dgram.c >> index 4d931fd3778a..ef56fd90e762 100644 >> --- a/net/lora/dgram.c >> +++ b/net/lora/dgram.c >> @@ -217,7 +217,11 @@ const struct proto_ops dgram_proto_ops = { >> .socketpair = sock_no_socketpair, >> .accept = sock_no_accept, >> .getname = dgram_getname, >> +#if 0 /* LINUX_VERSION_CODE >= LINUX_VERSION(4, 18, 0) */ >> + .poll_mask = datagram_poll_mask, >> +#else > > I guess that you sent this patch by mistake... No mistake, it's clearly marked as "HACK", and the cover letter states this is not for merging but for the design discussion. You wanted to see patches for discussing the topic, so I sent you my current draft. On my development machine with -rc2 I still use .poll_mask. I will be able to drop the patch once we have -rc3 built, unless .poll_mask gets reintroduced later in the cycle. If you know of some macro to check whether we're -rc2 or -rc3 of 4.18 I'm all ears, otherwise grep'ing in the Makefile and defining some custom macro would be an alternative. Some other places in this series have similar, not-commented-out compatibility code to allow me to test individual modules quickly without having to build and boot a full kernel for every change. Like some sk function got/lost a parameter at some point. Originally I kept compatibility with openSUSE Leap 42.3's 4.4 kernel, now 15.0's 4.12. https://github.com/afaerber/lora-modules has a Makefile and load.sh script for that purpose, plus a small C example to send a packet. Cheers, Andreas
diff --git a/net/lora/dgram.c b/net/lora/dgram.c index 4d931fd3778a..ef56fd90e762 100644 --- a/net/lora/dgram.c +++ b/net/lora/dgram.c @@ -217,7 +217,11 @@ const struct proto_ops dgram_proto_ops = { .socketpair = sock_no_socketpair, .accept = sock_no_accept, .getname = dgram_getname, +#if 0 /* LINUX_VERSION_CODE >= LINUX_VERSION(4, 18, 0) */ + .poll_mask = datagram_poll_mask, +#else .poll = datagram_poll, +#endif .ioctl = dgram_ioctl, .listen = sock_no_listen, .shutdown = sock_no_shutdown,
linux-next and 4.18-rc2 both identify as LINUX_VERSION(4,18,0), but commit a11e1d432b51f63ba698d044441284a661f01144 (Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL) reverted .poll_mask to .poll again. Signed-off-by: Andreas Färber <afaerber@suse.de> --- net/lora/dgram.c | 4 ++++ 1 file changed, 4 insertions(+)