Skip to contentSkip to conversation

iplink: Remove flags argument from iplink_get

PATCH New David Ahern 1 participant 1 message Oct 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iplink: Remove flags argument from iplink_get

From: David Ahern <[email protected]>

iplink_get has 1 caller and the flags arg is 0, so just remove it.

---
 ip/ip_common.h | 2 +-
 ip/ipaddress.c | 2 +-
 ip/iplink.c    | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
ip/ip_common.h +1 -1
index 200be5e23dd1..458a9cb7ff2c 100644
@@ -91,7 +91,7 @@ void vrf_reset(void);
 int netns_identify_pid(const char *pidstr, char *name, int len);
 int do_seg6(int argc, char **argv);
 
-int iplink_get(unsigned int flags, char *name, __u32 filt_mask);
+int iplink_get(char *name, __u32 filt_mask);
 int iplink_ifla_xstats(int argc, char **argv);
 
 int ip_linkaddr_list(int family, req_filter_fn_t filter_fn,
ip/ipaddress.c +1 -1
index c0c1fbbe4c74..9481f241cb36 100644
@@ -1940,7 +1940,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
 	 * the link device
 	 */
 	if (filter_dev && filter.group == -1 && do_link == 1) {
-		if (iplink_get(0, filter_dev, RTEXT_FILTER_VF) < 0) {
+		if (iplink_get(filter_dev, RTEXT_FILTER_VF) < 0) {
 			perror("Cannot send link get request");
 			delete_json_obj();
 			exit(1);
ip/iplink.c +2 -2
index 50ccb49a0263..9f39e3826c19 100644
@@ -1087,11 +1087,11 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
 	return 0;
 }
 
-int iplink_get(unsigned int flags, char *name, __u32 filt_mask)
+int iplink_get(char *name, __u32 filt_mask)
 {
 	struct iplink_req req = {
 		.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
-		.n.nlmsg_flags = NLM_F_REQUEST | flags,
+		.n.nlmsg_flags = NLM_F_REQUEST,
 		.n.nlmsg_type = RTM_GETLINK,
 		.i.ifi_family = preferred_family,
 	};
Signature · 1 line
2.11.0