Add compat code for skb_put_data
PATCH 1/1 Add compat code for skb_put_data
Signed-off-by Matthias Schwarzott <[email protected]>
--- v4l/compat.h | 12 ++++++++++++ v4l/scripts/make_config_compat.pl | 1 + 2 files changed, 13 insertions(+)
v4l/compat.h +12 -0
@@ -2072,4 +2072,16 @@ static inline bool is_of_node(struct fwnode_handle *fwnode) }#endif +#ifdef NEED_SKB_PUT_DATA +static inline void *skb_put_data (struct sk_buff *skb,const void *data, +unsigned int len) +{ +void *tmp =skb_put (skb, len); + +memcpy (tmp, data, len); + +return tmp; +} +#endif +#endif /* _COMPAT_H */
v4l/scripts/make_config_compat.pl +1 -0
@@ -699,6 +699,7 @@ sub check_other_dependencies() check_files_for_func("of_fwnode_handle", "NEED_FWNODE", "include/linux/of.h"); check_files_for_func("to_of_node", "NEED_TO_OF_NODE", "include/linux/of.h"); check_files_for_func("is_of_node", "NEED_IS_OF_NODE", "include/linux/of.h"); + check_files_for_func("skb_put_data", "NEED_SKB_PUT_DATA", "include/linux/skbuff.h"); # For tests for uapi-dependent logic check_files_for_func_uapi("usb_endpoint_maxp", "NEED_USB_ENDPOINT_MAXP", "usb/ch9.h");
Signature · 1 line
2.13.3
Hans Verkuil
AppliedQuoted 1 line · Matthias Schwarzott
Signed-off-by Matthias Schwarzott <[email protected]>
Applied, much appreciated that you looked into this!
Regards.
Hans
Quoted 39 lines
--- v4l/compat.h | 12 ++++++++++++ v4l/scripts/make_config_compat.pl | 1 + 2 files changed, 13 insertions(+)v4l/compat.h +12
-0@@ -2072,4 +2072,16 @@ static inline bool is_of_node(struct fwnode_handle *fwnode) }#endif +#ifdef NEED_SKB_PUT_DATA +static inline void *skb_put_data (struct sk_buff *skb,const void *data, +unsigned int len) +{ +void *tmp =skb_put (skb, len); + +memcpy (tmp, data, len); + +return tmp; +} +#endif +#endif /* _COMPAT_H */ v4l/scripts/make_config_compat.pl +1
-0@@ -699,6 +699,7 @@ sub check_other_dependencies() check_files_for_func("of_fwnode_handle", "NEED_FWNODE", "include/linux/of.h"); check_files_for_func("to_of_node", "NEED_TO_OF_NODE", "include/linux/of.h"); check_files_for_func("is_of_node", "NEED_IS_OF_NODE", "include/linux/of.h"); + check_files_for_func("skb_put_data", "NEED_SKB_PUT_DATA", "include/linux/skbuff.h"); # For tests for uapi-dependent logic check_files_for_func_uapi("usb_endpoint_maxp", "NEED_USB_ENDPOINT_MAXP", "usb/ch9.h");