backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: johannes@sipsolutions.net
Cc: backports@vger.kernel.org, john@phrozen.org,
	Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16
Date: Sun, 23 Sep 2018 19:45:33 +0200	[thread overview]
Message-ID: <20180923174535.16198-9-hauke@hauke-m.de> (raw)
In-Reply-To: <20180923174535.16198-1-hauke@hauke-m.de>

Kernel 4.16 added a new .coredump member to the driver structure which
can be implemented by drivers. Remove this member on older kernel
versions as they do not support this feature.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0088-coredump.cocci | 93 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)
 create mode 100644 patches/0088-coredump.cocci

diff --git a/patches/0088-coredump.cocci b/patches/0088-coredump.cocci
new file mode 100644
index 00000000..329e0315
--- /dev/null
+++ b/patches/0088-coredump.cocci
@@ -0,0 +1,93 @@
+@r1@
+identifier drv, fn;
+@@
+static struct pci_driver drv = {
+	.driver = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+		.coredump = fn,
++#endif
+		...
+	},
+	...
+};
+
+@r11 depends on r1@
+identifier r1.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
+
+
+@r2@
+identifier drv, fn;
+@@
+ static struct pci_driver drv = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+	.driver.coredump = fn,
++#endif
+	...
+ };
+
+@r21 depends on r2@
+identifier r2.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
+
+
+@r3@
+identifier drv, fn;
+@@
+static struct usb_driver drv = {
+	.drvwrap.driver = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+		.coredump = fn,
++#endif
+		...
+	},
+	...
+};
+
+
+@r31 depends on r3@
+identifier r3.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
+
+
+@r4@
+identifier driver, fn;
+@@
+ static struct sdio_driver driver = {
+	.drv = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+		.coredump = fn,
++#endif
+		...
+	},
+	...
+};
+
+
+@r41 depends on r4@
+identifier r4.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply	other threads:[~2018-09-23 23:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 01/10] backports: Remove ssb and bcma Hauke Mehrtens
2018-09-23 20:10   ` Johannes Berg
2018-09-23 20:18     ` Hauke Mehrtens
2018-09-24 10:48   ` Johannes Berg
2018-09-24 20:17     ` Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 02/10] backports: Remove NFC support Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 03/10] copy: Add crc32poly.h Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 04/10] dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17 Hauke Mehrtens
2018-09-23 20:20   ` Johannes Berg
2018-09-23 17:45 ` [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8 Hauke Mehrtens
2018-09-23 20:12   ` Johannes Berg
2018-09-23 20:36     ` Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18 Hauke Mehrtens
2018-09-23 20:17   ` Johannes Berg
2018-09-23 20:23     ` Hauke Mehrtens
2018-09-23 20:33       ` Johannes Berg
2018-09-23 17:45 ` [PATCH 07/10] patches: make mt76 use skb_pad() instead of __skb_pad() Hauke Mehrtens
2018-09-23 17:45 ` Hauke Mehrtens [this message]
2018-09-24  8:36   ` [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16 Johannes Berg
2018-09-24 20:20     ` Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 09/10] backports: Make netdev destructor spatch apply correctly again Hauke Mehrtens
2018-09-23 20:17   ` Johannes Berg
2018-09-23 17:45 ` [PATCH 10/10] patches: Do not remove linux/kmemleak.h include Hauke Mehrtens
2018-09-23 20:18   ` Johannes Berg
2018-09-24  8:12 ` [PATCH 00/10] backports: misc fixes to improve support of 4.19 Johannes Berg
2018-09-24 20:27   ` Hauke Mehrtens
2018-09-24 20:28     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180923174535.16198-9-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=john@phrozen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).