All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] backports: add nla_put_u64_64bit()
@ 2016-05-31 14:07 Johannes Berg
  2016-05-31 19:38 ` Arend van Spriel
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2016-05-31 14:07 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Backport it simply using nla_put_u64(). This is fine for all the
current users, but probably should be fixed.

Change-Id: I0a48b90cdd081a7cba67ad592933ab266093c831
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/net/netlink.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h
index 40160b57bc7a..570d440a9d2c 100644
--- a/backport/backport-include/net/netlink.h
+++ b/backport/backport-include/net/netlink.h
@@ -189,4 +189,13 @@ static inline __le64 nla_get_le64(const struct nlattr *nla)
 }
 #endif /* < 4.4 */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+#define nla_put_u64_64bit LINUX_BACKPORT(nla_put_u64_64bit)
+static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
+				    u64 value, int padattr)
+{
+	return nla_put_u64(skb, attrtype, value);
+}
+#endif /* < 4.7 */
+
 #endif /* __BACKPORT_NET_NETLINK_H */
-- 
2.8.0.rc3

--
To unsubscribe from this list: send the line "unsubscribe backports" in

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

* Re: [PATCH] backports: add nla_put_u64_64bit()
  2016-05-31 14:07 [PATCH] backports: add nla_put_u64_64bit() Johannes Berg
@ 2016-05-31 19:38 ` Arend van Spriel
  2016-05-31 20:55   ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Arend van Spriel @ 2016-05-31 19:38 UTC (permalink / raw)
  To: Johannes Berg, backports; +Cc: Johannes Berg

On 31-05-16 16:07, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Backport it simply using nla_put_u64(). This is fine for all the
> current users, but probably should be fixed.

I submitted a patch including this a couple of weeks ago titled:
"backports: netlink: add 64-bit aligned helper functions".

Regards,
Arend

> Change-Id: I0a48b90cdd081a7cba67ad592933ab266093c831
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  backport/backport-include/net/netlink.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h
> index 40160b57bc7a..570d440a9d2c 100644
> --- a/backport/backport-include/net/netlink.h
> +++ b/backport/backport-include/net/netlink.h
> @@ -189,4 +189,13 @@ static inline __le64 nla_get_le64(const struct nlattr *nla)
>  }
>  #endif /* < 4.4 */
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
> +#define nla_put_u64_64bit LINUX_BACKPORT(nla_put_u64_64bit)
> +static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
> +				    u64 value, int padattr)
> +{
> +	return nla_put_u64(skb, attrtype, value);
> +}
> +#endif /* < 4.7 */
> +
>  #endif /* __BACKPORT_NET_NETLINK_H */
> 
--
To unsubscribe from this list: send the line "unsubscribe backports" in

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

* Re: [PATCH] backports: add nla_put_u64_64bit()
  2016-05-31 19:38 ` Arend van Spriel
@ 2016-05-31 20:55   ` Johannes Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2016-05-31 20:55 UTC (permalink / raw)
  To: Arend van Spriel, backports

On Tue, 2016-05-31 at 21:38 +0200, Arend van Spriel wrote:
> On 31-05-16 16:07, Johannes Berg wrote:
> > 
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > Backport it simply using nla_put_u64(). This is fine for all the
> > current users, but probably should be fixed.
> I submitted a patch including this a couple of weeks ago titled:
> "backports: netlink: add 64-bit aligned helper functions".
> 

Indeed you did, sorry. Ignore this one then.

johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in

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

end of thread, other threads:[~2016-05-31 20:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 14:07 [PATCH] backports: add nla_put_u64_64bit() Johannes Berg
2016-05-31 19:38 ` Arend van Spriel
2016-05-31 20:55   ` Johannes Berg

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.