All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Eatmon <reatmon@ti.com>
To: Praneeth Bajjuri <praneeth@ti.com>,
	Denys Dmytriyenko <denys@konsulko.com>,
	<meta-ti@lists.yoctoproject.org>
Subject: [meta-ti][master/scarthgap][PATCH 4/4] debugss-module-drv: Add patch for kernel 6.11 change
Date: Fri, 4 Oct 2024 10:18:57 -0500	[thread overview]
Message-ID: <20241004151857.24578-4-reatmon@ti.com> (raw)
In-Reply-To: <20241004151857.24578-1-reatmon@ti.com>

There was a change to the return value for a function pointer in the
kernel v6.11.  This patch adapts the module to the kernel change.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 .../dsptop/debugss-module-drv_git.bb          |  5 +-
 ...kernel-6.11-changed-return-value-for.patch | 58 +++++++++++++++++++
 2 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch

diff --git a/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb b/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb
index 81e544f7..74ceed9d 100644
--- a/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb
+++ b/meta-ti-extras/recipes-bsp/dsptop/debugss-module-drv_git.bb
@@ -18,4 +18,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 include dsptop.inc
 
-SRC_URI += "file://0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch"
+SRC_URI += "\
+    file://0001-debugss_kmodule-Add-include-for-mod_devicetable.h.patch \
+    file://0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch \
+"
diff --git a/meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch b/meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch
new file mode 100644
index 00000000..4e9727a0
--- /dev/null
+++ b/meta-ti-extras/recipes-bsp/dsptop/files/0002-debugss_kmodule-kernel-6.11-changed-return-value-for.patch
@@ -0,0 +1,58 @@
+From aaddf1fa8b92db23ae2ebc83826c2bb5f5c87c35 Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <reatmon@ti.com>
+Date: Thu, 3 Oct 2024 14:25:18 -0500
+Subject: [PATCH] debugss_kmodule: kernel 6.11 changed return value for remove
+ slot
+
+In kernel version 6.11 the function footprint changed for the remove
+slot to return a void instead of an int. [1]
+
+Add ifdef checking code to look for kernel version and pick the correct
+return code.
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/platform_device.h?id=0edb555a65d1ef047a9805051c36922b52a38a9d
+
+Upstream-Status: Inactive-Upstream [lastcommit: 2021-04-20]
+
+Signed-off-by: Ryan Eatmon <reatmon@ti.com>
+---
+ debugss_kmodule.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/debugss_kmodule.c b/debugss_kmodule.c
+index 9e084eb..4191be8 100644
+--- a/debugss_kmodule.c
++++ b/debugss_kmodule.c
+@@ -27,6 +27,7 @@
+ #include "debugss_kmodule.h"
+ 
+ #include <linux/mod_devicetable.h>
++#include <linux/version.h>
+ 
+ /* un-comment the line below to enable printing for kernel debug messages */
+ //#define DEBUGSS_DRV_DEBUG
+@@ -1132,7 +1133,11 @@ static int dra7xx_debugss_probe(struct platform_device *pdev)
+ 	return retval;
+ }
+ 
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0))
+ static int dra7xx_debugss_remove(struct platform_device *pdev)
++#else
++static void dra7xx_debugss_remove(struct platform_device *pdev)
++#endif
+ {
+ 	__D("%s:\n",__FUNCTION__);
+ 
+@@ -1145,7 +1150,9 @@ static int dra7xx_debugss_remove(struct platform_device *pdev)
+ 	/* Un-prepare debugSS clock */
+ 	clk_disable_unprepare(sys_clk_in1);
+ 
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0))
+ 	return 0;
++#endif
+ }
+ 
+ static const struct of_device_id dra7xx_debugss_of_match[] = {
+-- 
+2.17.1
+
-- 
2.17.1



  parent reply	other threads:[~2024-10-04 15:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 15:18 [meta-ti][master/scarthgap][PATCH 1/4] linux-ti-staging: Add v6.12 recipe Ryan Eatmon
2024-10-04 15:18 ` [meta-ti][master/scarthgap][PATCH 2/4] u-boot-ti-staging: Add v2024.10 recipe Ryan Eatmon
2024-10-08 19:59   ` Denys Dmytriyenko
2024-10-04 15:18 ` [meta-ti][master/scarthgap][PATCH 3/4] ti-bsp: Add ti-6_12 Ryan Eatmon
2024-10-08 19:55   ` Denys Dmytriyenko
2024-10-08 19:57     ` Ryan Eatmon
2024-10-04 15:18 ` Ryan Eatmon [this message]
2024-10-08 19:58 ` [meta-ti][master/scarthgap][PATCH 1/4] linux-ti-staging: Add v6.12 recipe Denys Dmytriyenko
2024-10-08 20:50   ` Ryan Eatmon
2025-12-19 17:31 ` Romain Naour
2025-12-19 20:58   ` Bajjuri, Praneeth
2025-12-22 11:34     ` Romain Naour
2025-12-22 19:39       ` Bajjuri, Praneeth

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=20241004151857.24578-4-reatmon@ti.com \
    --to=reatmon@ti.com \
    --cc=denys@konsulko.com \
    --cc=meta-ti@lists.yoctoproject.org \
    --cc=praneeth@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.