diff mbox

build: Added missing timer_setup_on_stack

Message ID 1512766859-7667-1-git-send-email-jasmin@anw.at (mailing list archive)
State New, archived
Headers show

Commit Message

Jasmin J. Dec. 8, 2017, 9 p.m. UTC
From: Jasmin Jessich <jasmin@anw.at>

Signed-off-by: Jasmin Jessich <jasmin@anw.at>
---
 v4l/compat.h                      | 5 +++++
 v4l/scripts/make_config_compat.pl | 1 +
 2 files changed, 6 insertions(+)

Comments

Jasmin J. Dec. 8, 2017, 9:06 p.m. UTC | #1
Hello Hans!

With this patch it compiles for Kernel 4.4, but not on 3.13. I will work on
that soon.

I am not sure if this patch keeps pvrusb2 working, but it compiles. I tried
first a solution by reverting 8da0edf2f90b6c74b69ad420fdd230c9bd2bd1ed. If you
prefer this, I have it on a branch and can submit it.

BR,
   Jasmin
Hans Verkuil Dec. 8, 2017, 9:12 p.m. UTC | #2
On 12/08/2017 10:06 PM, Jasmin J. wrote:
> Hello Hans!
> 
> With this patch it compiles for Kernel 4.4, but not on 3.13. I will work on
> that soon.
> 
> I am not sure if this patch keeps pvrusb2 working, but it compiles. I tried
> first a solution by reverting 8da0edf2f90b6c74b69ad420fdd230c9bd2bd1ed. If you
> prefer this, I have it on a branch and can submit it.
> 
> BR,
>    Jasmin
> 

I've applied all your patches. Thank you very much for working on this.

Let's see what the result of the nightly build will be.

In general reverting kernel patches to make a driver compile is something of a
last resort. It tends to be painful to maintain in the long run, at least, that's
been my experience.

Regards,

	Hans
Vincent McIntyre Dec. 8, 2017, 11:16 p.m. UTC | #3
On Fri, Dec 08, 2017 at 10:12:05PM +0100, Hans Verkuil wrote:
...
> 
> I've applied all your patches. Thank you very much for working on this.
> 
> Let's see what the result of the nightly build will be.
> 
> In general reverting kernel patches to make a driver compile is something of a
> last resort. It tends to be painful to maintain in the long run, at least, that's
> been my experience.
> 

Hi,

thanks both for your work on this. Not quite there yet however.

$ make allyesconfig
make -C /home/me/git/clones/media_build/v4l allyesconfig
make[1]: Entering directory '/home/me/git/clones/media_build/v4l'
No version yet, using 4.4.0-103-generic
make[2]: Entering directory '/home/me/git/clones/media_build/linux'
Syncing with dir ../media/
Applying patches for kernel 4.4.0-103-generic
patch -s -f -N -p1 -i ../backports/api_version.patch
patch -s -f -N -p1 -i ../backports/pr_fmt.patch
1 out of 1 hunk FAILED
Makefile:130: recipe for target 'apply_patches' failed
make[2]: *** [apply_patches] Error 1
make[2]: Leaving directory '/home/me/git/clones/media_build/linux'
Makefile:374: recipe for target 'allyesconfig' failed
make[1]: *** [allyesconfig] Error 2
make[1]: Leaving directory '/home/me/git/clones/media_build/v4l'
Makefile:26: recipe for target 'allyesconfig' failed
make: *** [allyesconfig] Error 2
can't select all drivers at ./build line 525
+ status=29

FWIW I also get the same failure on a 4.10 machine:
+ cat /proc/version_signature
Ubuntu 4.10.0-38.42~16.04.1-generic 4.10.17

I will have a look to see if I can spot this one.
Cheers
Vince
diff mbox

Patch

diff --git a/v4l/compat.h b/v4l/compat.h
index 4af407e..89deae1 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -2270,4 +2270,9 @@  static inline bool fwnode_device_is_available(struct fwnode_handle *fwnode)
 }
 #endif
 
+#ifdef NEED_TIMER_SETUP_ON_STACK
+#define timer_setup_on_stack(timer, callback, flags)        \
+        setup_timer_on_stack((timer), (callback), (flags))
+#endif
+
 #endif /*  _COMPAT_H */
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index 01382dd..3b073ac 100644
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -711,6 +711,7 @@  sub check_other_dependencies()
 	check_files_for_func("fwnode_reference_args", "NEED_FWNODE_REF_ARGS", "include/linux/fwnode.h");
 	check_files_for_func("fwnode_for_each_child_node", "NEED_FWNODE_FOR_EACH_CHILD_NODE", "include/linux/property.h");
 	check_files_for_func("fwnode_graph_get_port_parent", "NEED_FWNODE_GRAPH_GET_PORT_PARENT", "include/linux/property.h");
+	check_files_for_func("timer_setup_on_stack", "NEED_TIMER_SETUP_ON_STACK", "include/linux/timer.h");
 
 	# For tests for uapi-dependent logic
 	check_files_for_func_uapi("usb_endpoint_maxp", "NEED_USB_ENDPOINT_MAXP", "usb/ch9.h");