From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Benc Subject: Re: [RFC 4/5] netlink: prepare validate extack setting for recursion Date: Wed, 19 Sep 2018 11:10:48 +0200 Message-ID: <20180919111048.092376b2@redhat.com> References: <20180918131212.20266-1-johannes@sipsolutions.net> <20180918131212.20266-4-johannes@sipsolutions.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Johannes Berg To: Johannes Berg Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50832 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730605AbeISOrs (ORCPT ); Wed, 19 Sep 2018 10:47:48 -0400 In-Reply-To: <20180918131212.20266-4-johannes@sipsolutions.net> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 18 Sep 2018 15:12:11 +0200, Johannes Berg wrote: > static int validate_nla(const struct nlattr *nla, int maxtype, > const struct nla_policy *policy, > - const char **error_msg) > + struct netlink_ext_ack *extack, bool *extack_set) Can't the extack_set be included in the struct netlink_ext_ack? One less parameter to pass around and the NL_SET_* macros could check this on their own. This way, it can be also easily turned to a more complex mechanism, such as the one Marcelo proposed. Thanks, Jiri