Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/dahdi-linux: fix build with kernel >= 6.1
@ 2022-12-29 16:43 Fabrice Fontaine
  2023-02-07 13:44 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-12-29 16:43 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E . MORIN, Fabrice Fontaine

Fix the following build failure with kernel >= 6.1

In file included from ./include/linux/string.h:20,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./include/linux/mm_types_task.h:14,
                 from ./include/linux/mm_types.h:5,
                 from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from /home/autobuild/autobuild/instance-11/output-1/build/dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c:24:
./arch/powerpc/include/asm/string.h:27:22: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
   27 | extern void * memcpy(void *,const void *,__kernel_size_t);
      |                      ^~~~~~
/home/autobuild/autobuild/instance-11/output-1/build/dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c:661:9: error: too many arguments to function ‘netif_napi_add’
  661 |         netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
      |         ^~~~~~~~~~~~~~
In file included from ./include/net/inet_sock.h:19,
                 from ./include/linux/udp.h:16,
                 from /home/autobuild/autobuild/instance-11/output-1/build/dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c:38:
./include/linux/netdevice.h:2562:1: note: declared here
 2562 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/d7ce103a886329c68c04ebe05571be8f95a873ce

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0004-next-fix-kernel-6-1-build.patch      | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/dahdi-linux/0004-next-fix-kernel-6-1-build.patch

diff --git a/package/dahdi-linux/0004-next-fix-kernel-6-1-build.patch b/package/dahdi-linux/0004-next-fix-kernel-6-1-build.patch
new file mode 100644
index 0000000000..b910c4b775
--- /dev/null
+++ b/package/dahdi-linux/0004-next-fix-kernel-6-1-build.patch
@@ -0,0 +1,32 @@
+From a759a578277bde98eba7ef4bf86bdf819a900de9 Mon Sep 17 00:00:00 2001
+From: John Thomson <git@johnthomson.fastmail.com.au>
+Date: Sun, 23 Oct 2022 13:42:52 +1000
+Subject: [PATCH] fix kernel 6.1 build
+
+kernel 6.1 includes b48b89f9c189 ("net: drop the weight argument from netif_napi_add") [0]
+
+[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b48b89f9c189d24eb5e2b4a0ac067da5a24ee86d
+
+Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
+[Retrieved from:
+https://github.com/asterisk/dahdi-linux/pull/14/commits/a759a578277bde98eba7ef4bf86bdf819a900de9]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ include/dahdi/kernel.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
+index 35e93bc4..fd64a15e 100644
+--- a/include/dahdi/kernel.h
++++ b/include/dahdi/kernel.h
+@@ -58,6 +58,10 @@
+ 
+ #include <linux/poll.h>
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
++#define netif_napi_add netif_napi_add_weight
++#endif
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
+ #include <linux/pci.h>
+ #include <linux/dma-mapping.h>
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/dahdi-linux: fix build with kernel >= 6.1
  2022-12-29 16:43 [Buildroot] [PATCH 1/1] package/dahdi-linux: fix build with kernel >= 6.1 Fabrice Fontaine
@ 2023-02-07 13:44 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-07 13:44 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Yann E . MORIN, buildroot

On Thu, 29 Dec 2022 17:43:15 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failure with kernel >= 6.1
> 
> In file included from ./include/linux/string.h:20,
>                  from ./include/linux/bitmap.h:11,
>                  from ./include/linux/cpumask.h:12,
>                  from ./include/linux/mm_types_task.h:14,
>                  from ./include/linux/mm_types.h:5,
>                  from ./include/linux/buildid.h:5,
>                  from ./include/linux/module.h:14,
>                  from /home/autobuild/autobuild/instance-11/output-1/build/dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c:24:
> ./arch/powerpc/include/asm/string.h:27:22: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
>    27 | extern void * memcpy(void *,const void *,__kernel_size_t);
>       |                      ^~~~~~
> /home/autobuild/autobuild/instance-11/output-1/build/dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c:661:9: error: too many arguments to function ‘netif_napi_add’
>   661 |         netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
>       |         ^~~~~~~~~~~~~~
> In file included from ./include/net/inet_sock.h:19,
>                  from ./include/linux/udp.h:16,
>                  from /home/autobuild/autobuild/instance-11/output-1/build/dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c:38:
> ./include/linux/netdevice.h:2562:1: note: declared here
>  2562 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
>       | ^~~~~~~~~~~~~~
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/d7ce103a886329c68c04ebe05571be8f95a873ce
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../0004-next-fix-kernel-6-1-build.patch      | 32 +++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 package/dahdi-linux/0004-next-fix-kernel-6-1-build.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-07 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-29 16:43 [Buildroot] [PATCH 1/1] package/dahdi-linux: fix build with kernel >= 6.1 Fabrice Fontaine
2023-02-07 13:44 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox