From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH iproute2-next v2 2/6] ipaddress: Simplify print_linkinfo_brief() and it's usage Date: Wed, 31 Jan 2018 20:43:57 -0700 Message-ID: <4601967d-fc05-1d33-55c0-f36a24a2753d@gmail.com> References: <1517335761-22095-1-git-send-email-serhe.popovych@gmail.com> <1517335761-22095-3-git-send-email-serhe.popovych@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Serhey Popovych , netdev@vger.kernel.org Return-path: Received: from mail-pg0-f48.google.com ([74.125.83.48]:46889 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbeBADni (ORCPT ); Wed, 31 Jan 2018 22:43:38 -0500 Received: by mail-pg0-f48.google.com with SMTP id s9so11732587pgq.13 for ; Wed, 31 Jan 2018 19:43:38 -0800 (PST) In-Reply-To: <1517335761-22095-3-git-send-email-serhe.popovych@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 1/30/18 11:09 AM, Serhey Popovych wrote: > Improve print_linkinfo_brief() and it's callers: > > 1) Get rid of custom @struct filter pointer @pfilter: it is NULL in > all callers anyway and global @filter is used. > Looks like I somehow dropped a vrf change that was going to use that. Send a standalone patch to revert 63891c70137f (straight revert does not work so some fixup is needed) and then a follow on for the second part of this change. > 2) Simplify calling code in ipaddr_list_flush_or_save() by > introducing intermediate variable of @struct nlmsghdr, drop > duplicated code: print_linkinfo_brief() never returns values other > than <= 0 so we can move print_selected_addrinfo() outside of each > block. > > Signed-off-by: Serhey Popovych > --- > ip/ip_common.h | 3 +-- > ip/ipaddress.c | 60 ++++++++++++++++++++++++-------------------------------- > ip/iplink.c | 2 +- > 3 files changed, 28 insertions(+), 37 deletions(-) >