linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netlink: remove duplicated nla_need_padding_for_64bit() check
@ 2020-08-01  9:45 linmiaohe
  0 siblings, 0 replies; 3+ messages in thread
From: linmiaohe @ 2020-08-01  9:45 UTC (permalink / raw)
  To: davem, johannes.berg; +Cc: linux-kernel, linmiaohe

From: Miaohe Lin <linmiaohe@huawei.com>

The need for padding 64bit is implicitly checked by nla_align_64bit(), so
remove this explicit one.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 lib/nlattr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/nlattr.c b/lib/nlattr.c
index bc5b5cf608c4..98f596bfbfd8 100644
--- a/lib/nlattr.c
+++ b/lib/nlattr.c
@@ -816,8 +816,7 @@ EXPORT_SYMBOL(__nla_reserve);
 struct nlattr *__nla_reserve_64bit(struct sk_buff *skb, int attrtype,
 				   int attrlen, int padattr)
 {
-	if (nla_need_padding_for_64bit(skb))
-		nla_align_64bit(skb, padattr);
+	nla_align_64bit(skb, padattr);
 
 	return __nla_reserve(skb, attrtype, attrlen);
 }
-- 
2.19.1


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

* Re: [PATCH] netlink: remove duplicated nla_need_padding_for_64bit() check
  2020-08-24 11:58 linmiaohe
@ 2020-08-24 13:41 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2020-08-24 13:41 UTC (permalink / raw)
  To: linmiaohe; +Cc: johannes.berg, linux-kernel

From: linmiaohe <linmiaohe@huawei.com>
Date: Mon, 24 Aug 2020 11:58:24 +0000

> friendly ping :)

Networking patches must be posted to netdev@vger.kernel.org, so please
resubmit this properly.

Thank you.

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

* Re: [PATCH] netlink: remove duplicated nla_need_padding_for_64bit() check
@ 2020-08-24 11:58 linmiaohe
  2020-08-24 13:41 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: linmiaohe @ 2020-08-24 11:58 UTC (permalink / raw)
  To: davem, johannes.berg; +Cc: linux-kernel

friendly ping :)

>Miaohe Lin <linmiaohe@huawei.com> wrote:
>From: Miaohe Lin <linmiaohe@huawei.com>
>
>The need for padding 64bit is implicitly checked by nla_align_64bit(), so remove this explicit one.
>
>Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>---
> lib/nlattr.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/lib/nlattr.c b/lib/nlattr.c index bc5b5cf608c4..98f596bfbfd8 100644
>--- a/lib/nlattr.c
>+++ b/lib/nlattr.c
>@@ -816,8 +816,7 @@ EXPORT_SYMBOL(__nla_reserve);  struct nlattr *__nla_reserve_64bit(struct sk_buff *skb, int attrtype,
> 				   int attrlen, int padattr)
> {
>-	if (nla_need_padding_for_64bit(skb))
>-		nla_align_64bit(skb, padattr);
>+	nla_align_64bit(skb, padattr);
> 
> 	return __nla_reserve(skb, attrtype, attrlen);  }
>--
>2.19.1
>

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

end of thread, other threads:[~2020-08-24 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-01  9:45 [PATCH] netlink: remove duplicated nla_need_padding_for_64bit() check linmiaohe
2020-08-24 11:58 linmiaohe
2020-08-24 13:41 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).