diff mbox series

[net-next] genetlink: Remove unused function genl_err_attr()

Message ID 20200916141728.34796-1-yuehaibing@huawei.com
State New
Headers show
Series [net-next] genetlink: Remove unused function genl_err_attr() | expand

Commit Message

Yue Haibing Sept. 16, 2020, 2:17 p.m. UTC
It is never used, so can remove it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 include/net/genetlink.h | 8 --------
 1 file changed, 8 deletions(-)

Comments

Cong Wang Sept. 17, 2020, 6:34 p.m. UTC | #1
On Wed, Sep 16, 2020 at 9:33 AM YueHaibing <yuehaibing@huawei.com> wrote:
>

> It is never used, so can remove it.


This is a bit confusing, it was actually used before, see commit
ab0d76f6823cc3a4e2.
David Miller Sept. 17, 2020, 11:28 p.m. UTC | #2
From: YueHaibing <yuehaibing@huawei.com>

Date: Wed, 16 Sep 2020 22:17:28 +0800

> It is never used, so can remove it.

> 

> Signed-off-by: YueHaibing <yuehaibing@huawei.com>


Applied.
Yue Haibing Sept. 18, 2020, 1:22 a.m. UTC | #3
On 2020/9/18 2:34, Cong Wang wrote:
> On Wed, Sep 16, 2020 at 9:33 AM YueHaibing <yuehaibing@huawei.com> wrote:
>>
>> It is never used, so can remove it.
> 
> This is a bit confusing, it was actually used before, see commit
> ab0d76f6823cc3a4e2.

Yes,thanks for reminding, will be careful later.
> .
>
diff mbox series

Patch

diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 6e5f1e1aa822..b9eb92f3fe86 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -101,14 +101,6 @@  static inline void genl_info_net_set(struct genl_info *info, struct net *net)
 
 #define GENL_SET_ERR_MSG(info, msg) NL_SET_ERR_MSG((info)->extack, msg)
 
-static inline int genl_err_attr(struct genl_info *info, int err,
-				const struct nlattr *attr)
-{
-	info->extack->bad_attr = attr;
-
-	return err;
-}
-
 enum genl_validate_flags {
 	GENL_DONT_VALIDATE_STRICT		= BIT(0),
 	GENL_DONT_VALIDATE_DUMP			= BIT(1),