xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Florian Bezdeka <florian.bezdeka@siemens.com>
To: xenomai@lists.linux.dev, jan.kiszka@siemens.com
Subject: [PATCH stable/v3.2.x 01/19] Account for switch to pde_data in 5.17
Date: Thu, 31 Aug 2023 22:37:27 +0200	[thread overview]
Message-ID: <20230828-florian-enable-stable-3-2-for-6-1-v1-1-0e08770820e8@siemens.com> (raw)
In-Reply-To: <20230828-florian-enable-stable-3-2-for-6-1-v1-0-0e08770820e8@siemens.com>

From: Jan Kiszka <jan.kiszka@siemens.com>

[ master commit 142a88155d2b96ab859a0ed5c86ffe2eb2a16053 ]

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 kernel/cobalt/include/asm-generic/xenomai/wrappers.h | 4 ++++
 kernel/cobalt/vfile.c                                | 8 ++++----
 kernel/drivers/analogy/device.c                      | 2 +-
 kernel/drivers/can/rtcan_module.c                    | 4 ++--
 kernel/drivers/can/sja1000/rtcan_sja1000_proc.c      | 2 +-
 5 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
index 05dd6c8c5..99059d2e9 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
@@ -252,4 +252,8 @@ devm_hwmon_device_register_with_groups(struct device *dev, const char *name,
 #define close_fd(__ufd)	__close_fd(current->files, __ufd)
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
+#define pde_data(i)	PDE_DATA(i)
+#endif
+
 #endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */
diff --git a/kernel/cobalt/vfile.c b/kernel/cobalt/vfile.c
index a0ec5cad1..05fa48a09 100644
--- a/kernel/cobalt/vfile.c
+++ b/kernel/cobalt/vfile.c
@@ -146,7 +146,7 @@ static void vfile_snapshot_free(struct xnvfile_snapshot_iterator *it, void *buf)
 
 static int vfile_snapshot_open(struct inode *inode, struct file *file)
 {
-	struct xnvfile_snapshot *vfile = PDE_DATA(inode);
+	struct xnvfile_snapshot *vfile = pde_data(inode);
 	struct xnvfile_snapshot_ops *ops = vfile->ops;
 	struct xnvfile_snapshot_iterator *it;
 	int revtag, ret, nrdata;
@@ -318,7 +318,7 @@ ssize_t vfile_snapshot_write(struct file *file, const char __user *buf,
 			     size_t size, loff_t *ppos)
 {
 	struct xnvfile_snapshot *vfile =
-		PDE_DATA(file->f_path.dentry->d_inode);
+		pde_data(file->f_path.dentry->d_inode);
 	struct xnvfile_input input;
 	ssize_t ret;
 
@@ -497,7 +497,7 @@ static struct seq_operations vfile_regular_ops = {
 
 static int vfile_regular_open(struct inode *inode, struct file *file)
 {
-	struct xnvfile_regular *vfile = PDE_DATA(inode);
+	struct xnvfile_regular *vfile = pde_data(inode);
 	struct xnvfile_regular_ops *ops = vfile->ops;
 	struct xnvfile_regular_iterator *it;
 	struct seq_file *seq;
@@ -566,7 +566,7 @@ ssize_t vfile_regular_write(struct file *file, const char __user *buf,
 			    size_t size, loff_t *ppos)
 {
 	struct xnvfile_regular *vfile =
-		PDE_DATA(file->f_path.dentry->d_inode);
+		pde_data(file->f_path.dentry->d_inode);
 	struct xnvfile_input input;
 	ssize_t ret;
 
diff --git a/kernel/drivers/analogy/device.c b/kernel/drivers/analogy/device.c
index 5033c5d66..69492b96b 100644
--- a/kernel/drivers/analogy/device.c
+++ b/kernel/drivers/analogy/device.c
@@ -92,7 +92,7 @@ int a4l_rdproc_devs(struct seq_file *p, void *data)
 
 static int a4l_proc_transfer_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, a4l_rdproc_transfer, PDE_DATA(inode));
+	return single_open(file, a4l_rdproc_transfer, pde_data(inode));
 }
 
 static const DEFINE_PROC_OPS(a4l_proc_transfer_ops,
diff --git a/kernel/drivers/can/rtcan_module.c b/kernel/drivers/can/rtcan_module.c
index 3d07eaed9..c071e12c6 100644
--- a/kernel/drivers/can/rtcan_module.c
+++ b/kernel/drivers/can/rtcan_module.c
@@ -265,7 +265,7 @@ static int rtcan_read_proc_info(struct seq_file *p, void *data)
 
 static int rtcan_proc_info_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, rtcan_read_proc_info, PDE_DATA(inode));
+	return single_open(file, rtcan_read_proc_info, pde_data(inode));
 }
 
 static const DEFINE_PROC_OPS(rtcan_proc_info_ops,
@@ -310,7 +310,7 @@ static int rtcan_read_proc_filter(struct seq_file *p, void *data)
 
 static int rtcan_proc_filter_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, rtcan_read_proc_filter, PDE_DATA(inode));
+	return single_open(file, rtcan_read_proc_filter, pde_data(inode));
 }
 
 static const DEFINE_PROC_OPS(rtcan_proc_filter_ops,
diff --git a/kernel/drivers/can/sja1000/rtcan_sja1000_proc.c b/kernel/drivers/can/sja1000/rtcan_sja1000_proc.c
index 4813c5009..57fd80704 100644
--- a/kernel/drivers/can/sja1000/rtcan_sja1000_proc.c
+++ b/kernel/drivers/can/sja1000/rtcan_sja1000_proc.c
@@ -47,7 +47,7 @@ static int rtcan_sja_proc_regs(struct seq_file *p, void *data)
 
 static int rtcan_sja_proc_regs_open(struct inode *inode, struct file *file)
 {
-	return single_open(file, rtcan_sja_proc_regs, PDE_DATA(inode));
+	return single_open(file, rtcan_sja_proc_regs, pde_data(inode));
 }
 
 static const DEFINE_PROC_OPS(rtcan_sja_proc_regs_ops,

-- 
2.39.2


  reply	other threads:[~2023-08-31 20:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 20:37 [PATCH 00/19] Enable stable/v3.2.x branch to be buildable with 6.1 kernels Florian Bezdeka
2023-08-31 20:37 ` Florian Bezdeka [this message]
2023-08-31 20:37 ` [PATCH stable/v3.2.x 02/19] Use linux/stddef.h instead of toolchain header Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 03/19] drivers/serial/16550A: Account for privatized defines in 5.17 Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 04/19] drivers/net: Switch to dev_addr_set and eth_hw_addr_set Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 05/19] drivers: Convert pci_set_*dma_mask to DMA API Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 06/19] drivers: Convert pci_alloc/free_consistent " Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 07/19] drivers: Convert pci_map/unmap_single/page " Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 08/19] drivers: Convert pci_dma_sync_single_for_cpu/device " Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 09/19] cobalt: Resolve cast-function-type warnings Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 10/19] drivers/net/experimental/e1000: Use fallthrough Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 11/19] drivers/spi: Convert to GPIO descriptor API Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 12/19] drivers/spi: Switch to spi_controller API Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 13/19] drivers/spi: Account for dropped return value of spi_driver.remove Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 14/19] drivers/testing/heapcheck: Replace prandom_u32 with custom implementation Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 15/19] drivers/net/pcnet32: Adjust for kernel 6.1 Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 16/19] cobalt: Adjust dev_addr_set wrapper to 5.10, 5.1 and 4.19 backports Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 17/19] cobalt/pipe: Allow building with kernels up to 6.1 Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 18/19] cobalt/x86: " Florian Bezdeka
2023-08-31 20:37 ` [PATCH stable/v3.2.x 19/19] drivers/spi: Add support for kernels < 5.1 Florian Bezdeka
2023-09-01  7:12 ` [PATCH 00/19] Enable stable/v3.2.x branch to be buildable with 6.1 kernels Jan Kiszka
2023-09-01  8:08   ` Florian Bezdeka
2023-09-01  8:25     ` Jan Kiszka

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=20230828-florian-enable-stable-3-2-for-6-1-v1-1-0e08770820e8@siemens.com \
    --to=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@lists.linux.dev \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).