From patchwork Thu Jun 1 17:21:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13264333 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 643C84252C for ; Thu, 1 Jun 2023 17:22:02 +0000 (UTC) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 581CBB3 for ; Thu, 1 Jun 2023 10:21:56 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-53fb64b3368so605047a12.0 for ; Thu, 01 Jun 2023 10:21:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685640115; x=1688232115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yYVY+x2MA+Z15O+ZfNyclLRXKUSIqBWKOHC9+V73ZDc=; b=rthupSDB0mFhPo8Og7fGQJ1IoHgxkvbME8b1ug5K5ZfSCqMzClJLC3AOiBNu76F6I2 E/lrFbqb4C/rDXHuZvtB+gLP80/PPh/qQqVh8t47kLDm3bGtwbx5EaWFvH0n1RsCoro9 mIKMUHeDyJhSq14bmF2ALkhiOZY9Bn/UMjJtOBiaP4rCu5MS71OmDXUn3O/AP8ejJSnd Z4WtnrTHIGi1//JTuQCBKAThvdCdoychcDBSkK9fmJ1pEgbzgQBXW3xFgod2l836Qmm2 Q195YrBsduMttEvQF5F/DhzrneOVtSiW6RCSFBAqlz+fJvftBoY5X7FvIXw5XPhr9IAv 5cmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685640115; x=1688232115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yYVY+x2MA+Z15O+ZfNyclLRXKUSIqBWKOHC9+V73ZDc=; b=OPgEzxVUMrATy9DamrqruMik4vCjWsmV103A2luZt/A/5KEqjpdKf6XaQinB4khnrS 830bAv6kRLZ0j45rVjYIRuqbSzcyPiGXgQcNq20kppNW6K4qWTSsnskxzsh8gS9WxRUf yuO77s0RQNyDOwYnqCbbio8KIcXZYg2VWkazuDi0GiByMa8V6YNA1vy7rzmvhNZvJVuZ l7O6Ih8y3KTFIN20sxhaD0OvMxDvHC0KMfNgJQlSPHBN8OTQYTGO2sPq50aYYu7TGKRM JqXCZVwXR1DrwHx284eKE/dJeI9afLw5iCT0XUJGI0fwCgsXMsGU4ouwDz3A45RAdp0H QoUQ== X-Gm-Message-State: AC+VfDzFtr9QaZ391+VL3hGah1iCydANxyVWlDJmoJqh1syIHlSq7CDt CQN0ALya/5aHZMJNJXjMLwPicr6B5GPh+yMFvVtqRA== X-Google-Smtp-Source: ACHHUZ7JsO61Yiq0q//J/+yCE6D6omwpYh/Gzzr127idGYobajbpk4ZxgDgYk2C0zj07jjn62pw7yw== X-Received: by 2002:a05:6a21:6d84:b0:10c:4ff5:38b7 with SMTP id wl4-20020a056a216d8400b0010c4ff538b7mr8405992pzb.6.1685640115514; Thu, 01 Jun 2023 10:21:55 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k6-20020a170902760600b001b1920cffdasm2378945pll.204.2023.06.01.10.21.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:21:54 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 1/7] utils: make local cmdline functions static Date: Thu, 1 Jun 2023 10:21:39 -0700 Message-Id: <20230601172145.51357-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601172145.51357-1-stephen@networkplumber.org> References: <20230601172145.51357-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com No need to expose these parts of command line parsing. Signed-off-by: Stephen Hemminger --- include/utils.h | 3 --- lib/utils.c | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/utils.h b/include/utils.h index 0f1b3bef34d8..0b5d86a26488 100644 --- a/include/utils.h +++ b/include/utils.h @@ -139,7 +139,6 @@ int get_addr_rta(inet_prefix *dst, const struct rtattr *rta, int family); int get_addr_ila(__u64 *val, const char *arg); int read_prop(const char *dev, char *prop, long *value); -int get_hex(char c); int get_integer(int *val, const char *arg, int base); int get_unsigned(unsigned *val, const char *arg, int base); int get_time_rtt(unsigned *val, const char *arg, int *raw); @@ -304,8 +303,6 @@ unsigned int print_name_and_link(const char *fmt, #define ntohll(x) ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)) extern int cmdlineno; -ssize_t getcmdline(char **line, size_t *len, FILE *in); -int makeargs(char *line, char *argv[], int maxargs); char *int_to_str(int val, char *buf); int get_guid(__u64 *guid, const char *arg); diff --git a/lib/utils.c b/lib/utils.c index 8dc302bdfe02..01f3a5f7e4ea 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -96,7 +96,7 @@ out: return -1; } -int get_hex(char c) +static int get_hex(char c) { if (c >= 'A' && c <= 'F') return c - 'A' + 10; @@ -1289,7 +1289,7 @@ unsigned int print_name_and_link(const char *fmt, int cmdlineno; /* Like glibc getline but handle continuation lines and comments */ -ssize_t getcmdline(char **linep, size_t *lenp, FILE *in) +static ssize_t getcmdline(char **linep, size_t *lenp, FILE *in) { ssize_t cc; char *cp; @@ -1336,7 +1336,7 @@ ssize_t getcmdline(char **linep, size_t *lenp, FILE *in) } /* split command line into argument vector */ -int makeargs(char *line, char *argv[], int maxargs) +static int makeargs(char *line, char *argv[], int maxargs) { static const char ws[] = " \t\r\n"; char *cp = line; From patchwork Thu Jun 1 17:21:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13264334 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA92B4252C for ; Thu, 1 Jun 2023 17:22:02 +0000 (UTC) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B87819F for ; Thu, 1 Jun 2023 10:21:57 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1b065154b79so19148475ad.1 for ; Thu, 01 Jun 2023 10:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685640116; x=1688232116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gGbHI0EP2JdmUgp0kX9QSWkRivCDca1WWwkFWiYqH7I=; b=t8MqQ6AjMDejliTsWSNbj4XVIOJlNg4DY4JV4xqLQf6UF9BeLjkjr4WUDJrKbB+833 Vuc9J17iOU/ywajhsdIkILvqwQd38FTV7gl2IEgXbfR3Im4332mxCpLyc/EqvgeSRorW BAGu7sqU5Tf+2b5/AxDdB4RrUkgD0a5IPDXvuin2vFznZ944k1lUWv1TZCyknM/vQtvQ IDYZnNo4je1hPsl2sYkUWd7Un/EK5lZCaSvxunGwVcrqcmS1WLyI8MelDVyZ8MBzNmci MhWHS/7teM9On+7zrWOdsAasUrOLwPmJxLQoXmT9El1RxwIpcsZpIFsCyWGmEKOkFYP7 svXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685640116; x=1688232116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gGbHI0EP2JdmUgp0kX9QSWkRivCDca1WWwkFWiYqH7I=; b=F8y6azlFV3k06l8M0DKfQy1JDqBwo0wO1t2EFO9LjeF6wmWrHaaCsvXjYR3Zbav0Zg IbWlMXF6PEcR8JQoTXSUQIGc70ReVePxLvfNvsM3jCvMbpjpaDhqPrLfqBIHuCpzMk3P vMGRq2qFDNu7h2NZUrG/it82gIsxHlQ6TEsMj3Y7Ez6Yr3WScPWGznHdBLbQFxRX5Qk7 zgtjHRrfwqw6fO+5F+Uy8E3AhnODYfnaeD+3jRy56/Xo7xnjhFUUaLKn7KsBLgTtrK+/ Bff8ZZpP0PKZ1ARb3ydSndHSjdm7iq55FJWj46v9p6vlAH4jrlEfvEuBz5RRoyf7kOiC xZog== X-Gm-Message-State: AC+VfDz25HEUo0JTKEFyWuf1rIyHmqL6NyXtGaPoL97sTXnPzlD89FwD sLn/VdOj261gFdfMQd1qfQnzJ3VYhH9DpHbiXUNcYQ== X-Google-Smtp-Source: ACHHUZ4UYYNSQM01gzoabDyd4j3ZU5/JPHg0+/GrEEJ8W+H8dyMTOCrHGIykBx92BpwLl2N9RI3vCA== X-Received: by 2002:a17:903:22ce:b0:1b0:3ab6:5140 with SMTP id y14-20020a17090322ce00b001b03ab65140mr3243656plg.4.1685640116366; Thu, 01 Jun 2023 10:21:56 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k6-20020a170902760600b001b1920cffdasm2378945pll.204.2023.06.01.10.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:21:55 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 2/7] libnetlink: drop unused rtnl_talk_iov Date: Thu, 1 Jun 2023 10:21:40 -0700 Message-Id: <20230601172145.51357-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601172145.51357-1-stephen@networkplumber.org> References: <20230601172145.51357-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com Function was defined but not used in current iproute2 code. Signed-off-by: Stephen Hemminger --- include/libnetlink.h | 3 --- lib/libnetlink.c | 6 ------ 2 files changed, 9 deletions(-) diff --git a/include/libnetlink.h b/include/libnetlink.h index c91a22314548..39ed87a7976e 100644 --- a/include/libnetlink.h +++ b/include/libnetlink.h @@ -177,9 +177,6 @@ int rtnl_echo_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, int json, int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, struct nlmsghdr **answer) __attribute__((warn_unused_result)); -int rtnl_talk_iov(struct rtnl_handle *rtnl, struct iovec *iovec, size_t iovlen, - struct nlmsghdr **answer) - __attribute__((warn_unused_result)); int rtnl_talk_suppress_rtnl_errmsg(struct rtnl_handle *rtnl, struct nlmsghdr *n, struct nlmsghdr **answer) __attribute__((warn_unused_result)); diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 68360b0f4c96..7edcd28569fd 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -1168,12 +1168,6 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, return __rtnl_talk(rtnl, n, answer, true, NULL); } -int rtnl_talk_iov(struct rtnl_handle *rtnl, struct iovec *iovec, size_t iovlen, - struct nlmsghdr **answer) -{ - return __rtnl_talk_iov(rtnl, iovec, iovlen, answer, true, NULL); -} - int rtnl_talk_suppress_rtnl_errmsg(struct rtnl_handle *rtnl, struct nlmsghdr *n, struct nlmsghdr **answer) { From patchwork Thu Jun 1 17:21:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13264335 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DD7F4252C for ; Thu, 1 Jun 2023 17:22:04 +0000 (UTC) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3525F1A1 for ; Thu, 1 Jun 2023 10:21:58 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b021cddb74so5738035ad.0 for ; Thu, 01 Jun 2023 10:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685640117; x=1688232117; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9j3narrsxe03huzqvKsSsW9jWi72TLYmmQBkxj0a2/Q=; b=KEYx5twPd+O8SA7JfI1OmQDyCGO+RfmBgA8+b1bhzTRsdGE5JXm9ZjX2I3zNs36QNt MSNrFV/EPqv1rlH276g+w3nC3+YVr6lJyuuxhk9kKU1JoY9CqaVxwK9oHiblKSXDGQPV owM5/BpCr71G9me5zvSAZR9S9o98TxxBm/LMCV9DkpRkInxblJ+4c5OcsmNbBsmis4OM 29VL1cZXTCadFvyzP5YoZUwJEVmoSDj5qJgi1IduQcS1CfV9dP+Pe6pKe18fiO4xyA63 XquN9N8CWLsSHKOKutjbAOHAQN3O0TNpa9mGasAjYj5j//Bx9knWhHbFEMUDiHFge5sh fSYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685640117; x=1688232117; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9j3narrsxe03huzqvKsSsW9jWi72TLYmmQBkxj0a2/Q=; b=IdXhsE3OJcZfFrtOTM2YSSLxtayPlqfODc/8tlkgZmu06DsjynpEhtogkgVOlwo4we jbskQBkbUnyIbZrlqyuQMDQf9/T6GpwhAwFf7Zz8Jr4lZUxFJyMFRg6LJAmp93KdfvYE iqV+k/VIN01DzXUgTSnD5zvIeuAohmMlBzAlJD6gj5OApZsrsx3KnOSz5PeGVa5lVRxC wn/5DPs6TG24Z+I7SGPgJg5clTkSHjUaCN/QZHFDpuYE1WCDfdwgERY9bZzPP4pKpOed NHI8EHVuqU3XEcADgKGDUVXfUHNMyKM+y6tLvteKJkrLmbQ1B5fqutLIAroBCdu8XBAG G19Q== X-Gm-Message-State: AC+VfDx5+0ruSz9whgD0olZMHUPSkrrmPnx8fRbMnyfmeeEOQWoCEGMF wEmFAxALRea5RCBR7tILQaTTwgBZ3VeyDw6k/gFzKg== X-Google-Smtp-Source: ACHHUZ69Pkn5lUIVNzFfEdC4BcORl/qWiATSJSkJVB+EKH3nAoSMnrs87OUraUJi1/5b3OyEobO9kQ== X-Received: by 2002:a17:902:dac7:b0:1ac:8837:de9 with SMTP id q7-20020a170902dac700b001ac88370de9mr134946plx.3.1685640117453; Thu, 01 Jun 2023 10:21:57 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k6-20020a170902760600b001b1920cffdasm2378945pll.204.2023.06.01.10.21.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:21:56 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger , Roopa Prabhu , Nikolay Aleksandrov , bridge@lists.linux-foundation.org Subject: [PATCH iproute2 3/7] bridge: make print_vlan_info static Date: Thu, 1 Jun 2023 10:21:41 -0700 Message-Id: <20230601172145.51357-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601172145.51357-1-stephen@networkplumber.org> References: <20230601172145.51357-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com Function defined and used in only one file. Signed-off-by: Stephen Hemminger Acked-by: Nikolay Aleksandrov --- bridge/br_common.h | 1 - bridge/vlan.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge/br_common.h b/bridge/br_common.h index 1bdee65844c1..704e76b0acb2 100644 --- a/bridge/br_common.h +++ b/bridge/br_common.h @@ -6,7 +6,6 @@ #define MDB_RTR_RTA(r) \ ((struct rtattr *)(((char *)(r)) + RTA_ALIGN(sizeof(__u32)))) -void print_vlan_info(struct rtattr *tb, int ifindex); int print_linkinfo(struct nlmsghdr *n, void *arg); int print_mdb_mon(struct nlmsghdr *n, void *arg); int print_fdb(struct nlmsghdr *n, void *arg); diff --git a/bridge/vlan.c b/bridge/vlan.c index 5b304ea94224..dfc62f83a5df 100644 --- a/bridge/vlan.c +++ b/bridge/vlan.c @@ -18,6 +18,7 @@ static unsigned int filter_index, filter_vlan; static int vlan_rtm_cur_ifidx = -1; +static void print_vlan_info(struct rtattr *tb, int ifindex); enum vlan_show_subject { VLAN_SHOW_VLAN, @@ -1309,7 +1310,7 @@ static int vlan_global_show(int argc, char **argv) return 0; } -void print_vlan_info(struct rtattr *tb, int ifindex) +static void print_vlan_info(struct rtattr *tb, int ifindex) { struct rtattr *i, *list = tb; int rem = RTA_PAYLOAD(list); From patchwork Thu Jun 1 17:21:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13264336 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 684A34700F for ; Thu, 1 Jun 2023 17:22:04 +0000 (UTC) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 131981A6 for ; Thu, 1 Jun 2023 10:21:59 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5289ce6be53so1836295a12.0 for ; Thu, 01 Jun 2023 10:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685640118; x=1688232118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yi+TlvcFR4h2vJbs4es2njLEIso9YCrBEu0B3+5RTO4=; b=anCTUNL3PkCXWLZ6a9rUnQYrehDhhPIsbLh7fxbKO3pQBkcI+A3toi4TPDltq41qsc c3oJVSTcEHFu9FC3QcFzEmaP00cQ+0o4fAuMRyzFL+tC2YVPFZMVIIjIUHKxTJIk0WWW F0DTkoaVIxhNfweHAOcacBtU+1ZXi3qng6L9gfEvEnZfCzgxKoO9bAnHigexNluxGA1f PizAMOWByo9uSwDGVYuXEKoFZEYtLV5G/BLonn7PyUJKNmKGuo1obU3zL/hjQF5BHwCk xxd9ZBpLTnE3tw9SEcIBsKzm136sJMjE2Jy5PNR+1F+VasJh7kWgDyPffwSjdZAqJh01 WYZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685640118; x=1688232118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yi+TlvcFR4h2vJbs4es2njLEIso9YCrBEu0B3+5RTO4=; b=EQh06uklhk/6tCMzaFNZMrWsFmElgaUCxKnc9dyKPsxFdP+Tsk95uSpQWBJ26Zd9hf BuWCF+P6Ib7DmieGcyoSNjbXNl7aSIVxaUKp2MDnx7F0mwNedrDIsCnpdBAkI5Ave+dv eHnwDfdPE+y1E10OZ3mVmM3fRTs7TgBFsefopUFdAbkg+GqNx3rLIctgeTibc2hUNO/V uou61tBetwT96LBBZOEa6EI0MvaTTzSiCXKl9HOiPX+qIzOPK6tVP7jMbY7py3b3CE3l WA/S6d4LFqYyLhKXKZWZdDGsA7v4DVtveF1q7kIWZJgzdsj78A2odzOpNwHNLUBWUli+ ll6g== X-Gm-Message-State: AC+VfDzlPl4ELjYikAEmyy3EPgjXDQ/x7lYc/EyFaMd5UQd2h03XN/cZ 37jYn/qua0ZXqpG6uuVQxcdr/aMr7l/0smal29eFLQ== X-Google-Smtp-Source: ACHHUZ46b2SvWEaiWcIs1uRdjltgbEaK1yNnGzBg4aP9StdRkYuz7qWvyubq6p+b4f48NnzRZWRzow== X-Received: by 2002:a17:902:e550:b0:1ac:6fc3:6beb with SMTP id n16-20020a170902e55000b001ac6fc36bebmr3328296plf.9.1685640118286; Thu, 01 Jun 2023 10:21:58 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k6-20020a170902760600b001b1920cffdasm2378945pll.204.2023.06.01.10.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:21:58 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 4/7] rt_names: drop unused rtnl_addrprot_a2n Date: Thu, 1 Jun 2023 10:21:42 -0700 Message-Id: <20230601172145.51357-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601172145.51357-1-stephen@networkplumber.org> References: <20230601172145.51357-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com This function is defined but never used in current code. Signed-off-by: Stephen Hemminger --- include/rt_names.h | 1 - lib/rt_names.c | 33 --------------------------------- 2 files changed, 34 deletions(-) diff --git a/include/rt_names.h b/include/rt_names.h index e96d80f30554..9003e67785b3 100644 --- a/include/rt_names.h +++ b/include/rt_names.h @@ -14,7 +14,6 @@ const char *rtnl_dsfield_get_name(int id); const char *rtnl_group_n2a(int id, char *buf, int len); int rtnl_rtprot_a2n(__u32 *id, const char *arg); -int rtnl_addrprot_a2n(__u32 *id, const char *arg); int rtnl_rtscope_a2n(__u32 *id, const char *arg); int rtnl_rttable_a2n(__u32 *id, const char *arg); int rtnl_rtrealm_a2n(__u32 *id, const char *arg); diff --git a/lib/rt_names.c b/lib/rt_names.c index 51d11fd056b1..8af3bca3245b 100644 --- a/lib/rt_names.c +++ b/lib/rt_names.c @@ -255,39 +255,6 @@ numeric: return buf; } -int rtnl_addrprot_a2n(__u32 *id, const char *arg) -{ - static char *cache; - static unsigned long res; - char *end; - int i; - - if (cache && strcmp(cache, arg) == 0) { - *id = res; - return 0; - } - - if (!rtnl_addrprot_tab_initialized) - rtnl_addrprot_initialize(); - - for (i = 0; i < 256; i++) { - if (rtnl_addrprot_tab[i] && - strcmp(rtnl_addrprot_tab[i], arg) == 0) { - cache = rtnl_addrprot_tab[i]; - res = i; - *id = res; - return 0; - } - } - - res = strtoul(arg, &end, 0); - if (!end || end == arg || *end || res > 255) - return -1; - *id = res; - return 0; -} - - static char *rtnl_rtscope_tab[256] = { [RT_SCOPE_UNIVERSE] = "global", [RT_SCOPE_NOWHERE] = "nowhere", From patchwork Thu Jun 1 17:21:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13264337 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F06D48221 for ; Thu, 1 Jun 2023 17:22:04 +0000 (UTC) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCEB91A8 for ; Thu, 1 Jun 2023 10:21:59 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-651ffcc1d3dso375995b3a.3 for ; Thu, 01 Jun 2023 10:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685640119; x=1688232119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TmhCnQReURl+m9p4HFEiVz0yBfpJy1/p0N1zQPsiHYI=; b=bfBMQ57EKlY/fjhqqdDe1Ptp2GsihQbRDMchE5n8pRMQa3BYB6LoDfTDVLLwukniSj AkGOM1Cv641M3WaVpXmh95cOXug414qRvRteD8H+cLjBDiJ/E6YrIfMw5kWkFHESXNNa AJ41jjYEHQzDYlBCplNeWkxtgvRr2kPEmjUHQg1t5qYjW9KhqPR6wGwqbFFyuKYb+LZg 0TkXDahvZiQtCBiUlAMT7VyKV+uYaIG1DQ9NFvHODXwefYR2/SmdFKxAFLlZWzXuhQZI KPBJjrv2xyVrxKfNEIKRrJDm8FSZlZ8nj1v4c0ipWFC6SNJ8xVUuTXqC3XuQTiKHy9h5 72Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685640119; x=1688232119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TmhCnQReURl+m9p4HFEiVz0yBfpJy1/p0N1zQPsiHYI=; b=FNtgDbA5ZgZLH+pWmWeeLhapb9ZvyJooRKYUk4yI/4JsISMO7WwLV6U6X/pIP0AkYX BamFAcZGRVs4AR1y0WFZAL1uHThzk1lWZJyrurlGDT4NJAvWBLA1U4AJOfDJfSHCtqx8 JwCMFBAkQ5PEB52GNoetmNW3z4f+4lkM5ncROFRIG7dFaTT3nAVBeBl+I7bHQK7hFHmp GZHf38h1eKUynjlZKZ6iCeP1SHzBrnW8Ppe+7qlRIVSYwq3vLSQg8Y5mbQNtpR5hPiKr 4tYqw6uYK5zhgwMU7aZ3Us58BBYF4je8wFJSlj0wnSfYtCzftpn+gKA5/kJgdSiCtTum 9pHQ== X-Gm-Message-State: AC+VfDxj2SwV2fVsskuzfikh0N9j+hklYDb9MMkj6u4JS+Ig1e+lvl3m 8SHuOCK16LXTv+Ow0QpdO37dAzrz6aXqSqykYySPyw== X-Google-Smtp-Source: ACHHUZ5qvxrsqPmB1CvdWVIKnAN7uKQPqJ8aAt6c3mwC7UuTfZAiQMHGtrvK/ZMkdr5TW9NhRXrwfA== X-Received: by 2002:a05:6a20:3c8f:b0:10c:a627:7ede with SMTP id b15-20020a056a203c8f00b0010ca6277edemr8270687pzj.58.1685640119054; Thu, 01 Jun 2023 10:21:59 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k6-20020a170902760600b001b1920cffdasm2378945pll.204.2023.06.01.10.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:21:58 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 5/7] ip: make print_rta_gateway static Date: Thu, 1 Jun 2023 10:21:43 -0700 Message-Id: <20230601172145.51357-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601172145.51357-1-stephen@networkplumber.org> References: <20230601172145.51357-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com Function only used in one file. Signed-off-by: Stephen Hemminger --- ip/ip_common.h | 2 -- ip/iproute.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ip/ip_common.h b/ip/ip_common.h index 4a20ec3cba62..b65c2b41dc87 100644 --- a/ip/ip_common.h +++ b/ip/ip_common.h @@ -226,8 +226,6 @@ void print_num(FILE *fp, unsigned int width, uint64_t count); void print_rt_flags(FILE *fp, unsigned int flags); void print_rta_ifidx(FILE *fp, __u32 ifidx, const char *prefix); void __print_rta_gateway(FILE *fp, unsigned char family, const char *gateway); -void print_rta_gateway(FILE *fp, unsigned char family, - const struct rtattr *rta); void size_columns(unsigned int cols[], unsigned int n, ...); void print_stats64(FILE *fp, struct rtnl_link_stats64 *s, const struct rtattr *carrier_changes, const char *what); diff --git a/ip/iproute.c b/ip/iproute.c index 7909c4a210cc..fdf1f9a9dd0a 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -558,7 +558,7 @@ void __print_rta_gateway(FILE *fp, unsigned char family, const char *gateway) } } -void print_rta_gateway(FILE *fp, unsigned char family, const struct rtattr *rta) +static void print_rta_gateway(FILE *fp, unsigned char family, const struct rtattr *rta) { const char *gateway = format_host_rta(family, rta); From patchwork Thu Jun 1 17:21:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13264338 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E14B942501 for ; Thu, 1 Jun 2023 17:22:05 +0000 (UTC) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FC5C136 for ; Thu, 1 Jun 2023 10:22:00 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-65292f79456so159701b3a.2 for ; Thu, 01 Jun 2023 10:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685640120; x=1688232120; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xv6eJw2DiGVgYMv8ombmduKjli5mYs0yS1xccHR83qU=; b=hodt/n241Ypc+onmI570qU+QrfsukXXEopLbt3exynwkAUlEaKgWPYGPsigHJqB9/9 Cz4uG2jNUnhuETZ+mhvqScscOD34vyRvi5OmqZfaYGEfxlsfo3hnUn2GtSyUF7MhIR8y S+uzi90HJ+nVV3g03GjdeA+uP2s9EBHvVB2dQhNgwGniPC5nDrDYKMTA2SUAsowFsBcq rh1Z4C+5jyWl4S2QY+PN9GRyK8XnA6EJZAgvv6BN5VxwybSNJQep9/kxm96x1ClSnaAn Ux+4O90Dq70ljqr2xUsJ90pUgPdLyTta/DORyQvtLIUJvfcerrY6/6XcpcFgw2ltF9oP n1bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685640120; x=1688232120; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xv6eJw2DiGVgYMv8ombmduKjli5mYs0yS1xccHR83qU=; b=BpK4NNWc9Gz2RmVmFkNOzdlTShFHDyUPRXpRPplZ9bDlWafof59+KVV4FWkC7yi1nI vhKH/3WrqKgAs0RJrpvSVHVQVWog/SrLSaRkWTyxdCVnbJeiz4zEwt/bsZCN0kUvqF/j Y4kGJuUuwoRFeXeYn12RPIkvwDT5EjaNjHyn72vlaHU9DT4tYtuja/qsjvjjnduRvyBg Fp9mj06/IIdOh4FMy6N3Xmg1N4weNDybCT7eXTC3AbQ6jYMcaToasGfFkM76Sk/zimJQ JB0InNPWu/fIPna/sRrdoDJH2mxNVobQLENaZS5xcV753J5VLx6JF80C7+4rPxpOsI2t KN2Q== X-Gm-Message-State: AC+VfDy24EbteSloo5NGoehNGsXAriUtw35VGbAlXFxw32AFJ19tyJAu E6THbMjHtVfg7bpbStQ4ZR3vH1fSnxd80Fdm9Naseg== X-Google-Smtp-Source: ACHHUZ6QkodgP/YEl7b4jlfpPIEkoKKULZ53b0TeuaTNW2zYiWz30CJEdftLSoBYoVRJv65+NAm9Pw== X-Received: by 2002:a05:6a20:3d85:b0:10e:457f:254c with SMTP id s5-20020a056a203d8500b0010e457f254cmr8657016pzi.2.1685640119876; Thu, 01 Jun 2023 10:21:59 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k6-20020a170902760600b001b1920cffdasm2378945pll.204.2023.06.01.10.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:21:59 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger Subject: [PATCH iproute2 6/7] xfrm: make xfrm_stat_print_nokeys static Date: Thu, 1 Jun 2023 10:21:44 -0700 Message-Id: <20230601172145.51357-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601172145.51357-1-stephen@networkplumber.org> References: <20230601172145.51357-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com This function is only used in one file. Signed-off-by: Stephen Hemminger --- ip/xfrm.h | 1 - ip/xfrm_state.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ip/xfrm.h b/ip/xfrm.h index 33c42730375d..5238fc8b2b88 100644 --- a/ip/xfrm.h +++ b/ip/xfrm.h @@ -90,7 +90,6 @@ struct xfrm_filter { extern struct xfrm_filter filter; int xfrm_state_print(struct nlmsghdr *n, void *arg); -int xfrm_state_print_nokeys(struct nlmsghdr *n, void *arg); int xfrm_policy_print(struct nlmsghdr *n, void *arg); int do_xfrm_state(int argc, char **argv); int do_xfrm_policy(int argc, char **argv); diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c index aa0dce072dff..a7b3d0e14156 100644 --- a/ip/xfrm_state.c +++ b/ip/xfrm_state.c @@ -1027,7 +1027,7 @@ int xfrm_state_print(struct nlmsghdr *n, void *arg) return __do_xfrm_state_print(n, arg, false); } -int xfrm_state_print_nokeys(struct nlmsghdr *n, void *arg) +static int xfrm_state_print_nokeys(struct nlmsghdr *n, void *arg) { return __do_xfrm_state_print(n, arg, true); } From patchwork Thu Jun 1 17:21:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 13264339 X-Patchwork-Delegate: stephen@networkplumber.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B5C542501 for ; Thu, 1 Jun 2023 17:22:06 +0000 (UTC) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97749194 for ; Thu, 1 Jun 2023 10:22:01 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1b024e29657so5816965ad.3 for ; Thu, 01 Jun 2023 10:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685640121; x=1688232121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xhxu59+g2xdBYdCqkBzRHbNxdDSdgN+pLU+lskMvwP8=; b=03CSQEalSJLBvaVa2qsswCs67vujP19SY8jJWmHj5iKEstvc60bBLPkAsNUsOT/kC5 Vvf80OIi45VhsAvyXi7te4wJfGSmbAVVCuvLaPjpgVgAATrHbfIKOAa0URXGNjQTDcDh nsarZE64dvVxKfiIZ0ZpiGyDCU0UGePUnvWEsJL1/LgJV1WG06KmZDricT80TehhK3j6 4fOkTZPFrW4KU9BwY1+PQyi+7meMANchtDEaqpdn53Hh31mUU2p+OsXTNO0ZskJzdtTJ BXk1/6kMQMiQ09TINh3w5+yjfj59D06zQmvlRps8z3qT6eTl6JZFL38syMRHzE1AfYwk Rr1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685640121; x=1688232121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xhxu59+g2xdBYdCqkBzRHbNxdDSdgN+pLU+lskMvwP8=; b=hLkB1/zvYDA9qlu+FIPK7Oh5IbMfoFOwioRTBJcCS6+1day+tTHrdNgwBwVqD4m1oj rgcVH7/ZjIjL5ikRHAm87W4Y6kcS8Jvt8L3PisEVpYvsl5pABnvkjSnHsZo/WPJPP6z5 +fr/JOXG+bMTAFzGlUIosDEzeh3syTCAXYQgfTqmFDtuDx1/WdoXZmEIVx2hNRCyqQpB L4qwVo+MHT7yBjged8U2CKin95flSTx4XqaeluiIXUJ8WHfx1hfIszXUUhQCse3vurj+ oeQt19XXuQ+rifaioPqWglmCtVF07W+8gCkIGrr7STjW5dIrSh/rlSXomjgaxIlo92gn YBMg== X-Gm-Message-State: AC+VfDwTY33rlnDWFkf/K8BaNOT9H/YkrpQBww3i15hP7879Q17knTMO ZZ8DlqOFQWaI51cDJfI/PCxurQWRcy25vfbJoYLfpg== X-Google-Smtp-Source: ACHHUZ49k5ls7shHIhvg16TbFhRFvgsx9yNlKVVjnz5yxUwuGVOirGRCtvmIlW377hRyPwQ6e5kZWw== X-Received: by 2002:a17:903:1105:b0:1ab:675:3e31 with SMTP id n5-20020a170903110500b001ab06753e31mr24124plh.37.1685640120792; Thu, 01 Jun 2023 10:22:00 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k6-20020a170902760600b001b1920cffdasm2378945pll.204.2023.06.01.10.22.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 10:22:00 -0700 (PDT) From: Stephen Hemminger To: netdev@vger.kernel.org Cc: Stephen Hemminger , Leon Romanovsky Subject: [PATCH iproute2 7/7] rdma: make rd_attr_check static Date: Thu, 1 Jun 2023 10:21:45 -0700 Message-Id: <20230601172145.51357-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601172145.51357-1-stephen@networkplumber.org> References: <20230601172145.51357-1-stephen@networkplumber.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: dsahern@gmail.com Function defined and used in only one file. Signed-off-by: Stephen Hemminger --- rdma/rdma.h | 1 - rdma/utils.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rdma/rdma.h b/rdma/rdma.h index 8b421db807a6..0bf77f4dcf9e 100644 --- a/rdma/rdma.h +++ b/rdma/rdma.h @@ -131,7 +131,6 @@ int rd_sendrecv_msg(struct rd *rd, unsigned int seq); void rd_prepare_msg(struct rd *rd, uint32_t cmd, uint32_t *seq, uint16_t flags); int rd_dev_init_cb(const struct nlmsghdr *nlh, void *data); int rd_attr_cb(const struct nlattr *attr, void *data); -int rd_attr_check(const struct nlattr *attr, int *typep); /* * Print helpers diff --git a/rdma/utils.c b/rdma/utils.c index a33ff420f8cb..8a091c05e0a2 100644 --- a/rdma/utils.c +++ b/rdma/utils.c @@ -475,7 +475,7 @@ static const enum mnl_attr_data_type nldev_policy[RDMA_NLDEV_ATTR_MAX] = { [RDMA_NLDEV_ATTR_RES_RAW] = MNL_TYPE_BINARY, }; -int rd_attr_check(const struct nlattr *attr, int *typep) +static int rd_attr_check(const struct nlattr *attr, int *typep) { int type;