* [PATCH] build: Added missing timer_setup_on_stack
@ 2017-12-08 21:00 Jasmin J.
2017-12-08 21:06 ` Jasmin J.
0 siblings, 1 reply; 8+ messages in thread
From: Jasmin J. @ 2017-12-08 21:00 UTC (permalink / raw)
To: linux-media; +Cc: hverkuil, d.scheller, jasmin
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(+)
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");
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] build: Added missing timer_setup_on_stack
2017-12-08 21:00 [PATCH] build: Added missing timer_setup_on_stack Jasmin J.
@ 2017-12-08 21:06 ` Jasmin J.
2017-12-08 21:12 ` Hans Verkuil
0 siblings, 1 reply; 8+ messages in thread
From: Jasmin J. @ 2017-12-08 21:06 UTC (permalink / raw)
To: linux-media; +Cc: hverkuil, d.scheller
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] build: Added missing timer_setup_on_stack
2017-12-08 21:06 ` Jasmin J.
@ 2017-12-08 21:12 ` Hans Verkuil
2017-12-08 23:16 ` Vincent McIntyre
0 siblings, 1 reply; 8+ messages in thread
From: Hans Verkuil @ 2017-12-08 21:12 UTC (permalink / raw)
To: Jasmin J., linux-media; +Cc: d.scheller
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] build: Added missing timer_setup_on_stack
2017-12-08 21:12 ` Hans Verkuil
@ 2017-12-08 23:16 ` Vincent McIntyre
2017-12-08 23:29 ` Jasmin J.
0 siblings, 1 reply; 8+ messages in thread
From: Vincent McIntyre @ 2017-12-08 23:16 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Jasmin J., linux-media, d.scheller
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] build: Added missing timer_setup_on_stack
2017-12-08 23:16 ` Vincent McIntyre
@ 2017-12-08 23:29 ` Jasmin J.
2017-12-09 8:00 ` Hans Verkuil
0 siblings, 1 reply; 8+ messages in thread
From: Jasmin J. @ 2017-12-08 23:29 UTC (permalink / raw)
To: Vincent McIntyre, Hans Verkuil; +Cc: linux-media, d.scheller
Hello Vincent!
> Not quite there yet however.
I always test with several Kernel headers ...
> 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
I have tested the patches on Linux Mint 18.1 (Kernel 4.4.0-62-generic):
Applying patches for kernel 4.4.0-62-generic
patch -f -N -p1 -i ../backports/api_version.patch
checking file drivers/media/cec/cec-api.c
Hunk #1 succeeded at 95 (offset 2 lines).
checking file drivers/media/v4l2-core/v4l2-ioctl.c
Hunk #1 succeeded at 1004 (offset 4 lines).
checking file drivers/media/media-device.c
patching file drivers/media/cec/cec-api.c
Hunk #1 succeeded at 95 (offset 2 lines).
patching file drivers/media/v4l2-core/v4l2-ioctl.c
Hunk #1 succeeded at 1004 (offset 4 lines).
patching file drivers/media/media-device.c
patch -f -N -p1 -i ../backports/pr_fmt.patch
checking file drivers/media/common/saa7146/saa7146_core.c
checking file drivers/media/common/saa7146/saa7146_fops.c
checking file drivers/media/common/saa7146/saa7146_hlp.c
checking file drivers/media/common/saa7146/saa7146_i2c.c
checking file drivers/media/common/saa7146/saa7146_video.c
checking file drivers/media/common/siano/smscoreapi.h
Apply this patch, so we can see on which file it stops:
diff --git a/linux/Makefile b/linux/Makefile
index ce39f82..5fc5150 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -147,9 +147,9 @@ apply_patches apply-patches:
touch .patches_applied; \
rm -f mm/frame_vector.c; \
for i in $$PATCHES; do \
- echo patch -s -f -N -p1 -i ../backports/$$i; \
- patch -s -f -N -p1 -i ../backports/$$i --dry-run || exit 1; \
- patch -s -f -N -p1 -i ../backports/$$i; \
+ echo patch -f -N -p1 -i ../backports/$$i; \
+ patch -f -N -p1 -i ../backports/$$i --dry-run || exit 1; \
+ patch -f -N -p1 -i ../backports/$$i; \
mv .patches_applied .patches_applied.old; \
echo $$i > .patches_applied; \
cat .patches_applied.old >> .patches_applied; \
@@ -165,8 +165,8 @@ unapply_patches unapply-patches:
@if [ -e .patches_applied ]; then \
echo "Unapplying patches"; \
for i in `cat .patches_applied|grep -v '^#'`; do \
- echo patch -s -f -R -p1 -i ../backports/$$i; \
- patch -s -f -R -p1 -i ../backports/$$i || break; \
+ echo patch -f -R -p1 -i ../backports/$$i; \
+ patch -f -R -p1 -i ../backports/$$i || break; \
done; \
rm -f mm/frame_vector.c; \
rm -f .patches_applied; fi
BR,
Jasmin
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] build: Added missing timer_setup_on_stack
2017-12-08 23:29 ` Jasmin J.
@ 2017-12-09 8:00 ` Hans Verkuil
2017-12-10 6:27 ` Vincent McIntyre
0 siblings, 1 reply; 8+ messages in thread
From: Hans Verkuil @ 2017-12-09 8:00 UTC (permalink / raw)
To: Jasmin J., Vincent McIntyre; +Cc: linux-media, d.scheller
I misapplied a pr_fmt patch. It's now fixed.
Hans
On 12/09/2017 12:29 AM, Jasmin J. wrote:
> Hello Vincent!
>
>> Not quite there yet however.
> I always test with several Kernel headers ...
>
>> 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
> I have tested the patches on Linux Mint 18.1 (Kernel 4.4.0-62-generic):
> Applying patches for kernel 4.4.0-62-generic
> patch -f -N -p1 -i ../backports/api_version.patch
> checking file drivers/media/cec/cec-api.c
> Hunk #1 succeeded at 95 (offset 2 lines).
> checking file drivers/media/v4l2-core/v4l2-ioctl.c
> Hunk #1 succeeded at 1004 (offset 4 lines).
> checking file drivers/media/media-device.c
> patching file drivers/media/cec/cec-api.c
> Hunk #1 succeeded at 95 (offset 2 lines).
> patching file drivers/media/v4l2-core/v4l2-ioctl.c
> Hunk #1 succeeded at 1004 (offset 4 lines).
> patching file drivers/media/media-device.c
> patch -f -N -p1 -i ../backports/pr_fmt.patch
> checking file drivers/media/common/saa7146/saa7146_core.c
> checking file drivers/media/common/saa7146/saa7146_fops.c
> checking file drivers/media/common/saa7146/saa7146_hlp.c
> checking file drivers/media/common/saa7146/saa7146_i2c.c
> checking file drivers/media/common/saa7146/saa7146_video.c
> checking file drivers/media/common/siano/smscoreapi.h
>
> Apply this patch, so we can see on which file it stops:
> diff --git a/linux/Makefile b/linux/Makefile
> index ce39f82..5fc5150 100644
> --- a/linux/Makefile
> +++ b/linux/Makefile
> @@ -147,9 +147,9 @@ apply_patches apply-patches:
> touch .patches_applied; \
> rm -f mm/frame_vector.c; \
> for i in $$PATCHES; do \
> - echo patch -s -f -N -p1 -i ../backports/$$i; \
> - patch -s -f -N -p1 -i ../backports/$$i --dry-run || exit 1; \
> - patch -s -f -N -p1 -i ../backports/$$i; \
> + echo patch -f -N -p1 -i ../backports/$$i; \
> + patch -f -N -p1 -i ../backports/$$i --dry-run || exit 1; \
> + patch -f -N -p1 -i ../backports/$$i; \
> mv .patches_applied .patches_applied.old; \
> echo $$i > .patches_applied; \
> cat .patches_applied.old >> .patches_applied; \
> @@ -165,8 +165,8 @@ unapply_patches unapply-patches:
> @if [ -e .patches_applied ]; then \
> echo "Unapplying patches"; \
> for i in `cat .patches_applied|grep -v '^#'`; do \
> - echo patch -s -f -R -p1 -i ../backports/$$i; \
> - patch -s -f -R -p1 -i ../backports/$$i || break; \
> + echo patch -f -R -p1 -i ../backports/$$i; \
> + patch -f -R -p1 -i ../backports/$$i || break; \
> done; \
> rm -f mm/frame_vector.c; \
> rm -f .patches_applied; fi
>
>
> BR,
> Jasmin
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-12-10 14:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 21:00 [PATCH] build: Added missing timer_setup_on_stack Jasmin J.
2017-12-08 21:06 ` Jasmin J.
2017-12-08 21:12 ` Hans Verkuil
2017-12-08 23:16 ` Vincent McIntyre
2017-12-08 23:29 ` Jasmin J.
2017-12-09 8:00 ` Hans Verkuil
2017-12-10 6:27 ` Vincent McIntyre
2017-12-10 14:26 ` Jasmin J.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox