From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 45CEF10E9 for ; Wed, 23 Aug 2023 02:11:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48F2FC433C8; Wed, 23 Aug 2023 02:11:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692756704; bh=bOWWtdMrF6LJFfQBK2OyDOfqMh/CaDEbXH4MQR6WIx8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=G/strxObU3F+RipWOvkJ6xnnffkARZQjH0Z3vyUGjNETnFW6R07oUa7NDJSn1yNXK ZmscwhsPWeU/cwMl8VWfAHOsnRWnf+IKuw5RhHg5vCBzfL0IrA2p9Y9xy/WfGM+WXm k+qtph6ry3KA87EExFLcNihAo1uKmOBnsY9rkeO3M/EHt4DhG/ScQZeK7GC2NOUbqN Bi7CWDmv567jULq25ZYlNnHPLqG981FISRLvN5BGNM/2FpBZXRD7PONfr8bkmBcyXQ gJyOiRLOptSsD6C4yBtttIrsw1dHaBzyVTtzBHVMGe3q0qEu1W+rUcuW6WxpSoabfA 9nnHUqipQXyEw== Date: Tue, 22 Aug 2023 19:11:43 -0700 From: Jakub Kicinski To: Vadim Fedorenko Cc: Jiri Pirko , Arkadiusz Kubalewski , Jonathan Lemon , Paolo Abeni , Jiri Pirko , Milena Olech , Michal Michalik , linux-arm-kernel@lists.infradead.org, poros@redhat.com, mschmidt@redhat.com, netdev@vger.kernel.org, linux-clk@vger.kernel.org, Bart Van Assche , intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH net-next v5 5/9] netdev: expose DPLL pin handle for netdevice Message-ID: <20230822191143.119c3d72@kernel.org> In-Reply-To: <20230822230037.809114-6-vadim.fedorenko@linux.dev> References: <20230822230037.809114-1-vadim.fedorenko@linux.dev> <20230822230037.809114-6-vadim.fedorenko@linux.dev> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 23 Aug 2023 00:00:33 +0100 Vadim Fedorenko wrote: > static int > dpll_msg_add_mode(struct sk_buff *msg, struct dpll_device *dpll, > @@ -340,6 +352,7 @@ dpll_cmd_pin_get_one(struct sk_buff *msg, struct dpll_pin *pin, > > ref = dpll_xa_ref_dpll_first(&pin->dpll_refs); > ASSERT_NOT_NULL(ref); > + > ret = dpll_msg_add_pin_handle(msg, pin); > if (ret) > return ret; Chunk out of place > diff --git a/include/linux/dpll.h b/include/linux/dpll.h > index 2202310c10cd..9b612038b538 100644 > --- a/include/linux/dpll.h > +++ b/include/linux/dpll.h > @@ -101,6 +101,26 @@ struct dpll_pin_properties { > struct dpll_pin_frequency *freq_supported; > }; > > +#if IS_ENABLED(CONFIG_DPLL) > + > +size_t dpll_msg_pin_handle_size(struct dpll_pin *pin); > + > +int dpll_msg_add_pin_handle(struct sk_buff *msg, struct dpll_pin *pin); > + > +#else > + > +static inline size_t dpll_msg_pin_handle_size(struct dpll_pin *pin) > +{ > + return 0; > +} > + > +static inline int dpll_msg_add_pin_handle(struct sk_buff *msg, struct dpll_pin *pin) > +{ > + return 0; > +} > + > +#endif The only empty line between #if and #endif that's needed is the one between the two static inline helpers > struct dpll_device * > dpll_device_get(u64 clock_id, u32 dev_driver_id, struct module *module); > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index 0896aaa91dd7..36a872774173 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -34,6 +34,7 @@ > #include > #include > #include > +#include Please no includes in netdevice.h, it's included in way too many places. All you need is a forward declaration of struct dpll_pin, AFAICT. > diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h > index ce3117df9cec..2e7df321f345 100644 > --- a/include/uapi/linux/if_link.h > +++ b/include/uapi/linux/if_link.h > @@ -377,6 +377,8 @@ enum { > IFLA_GSO_IPV4_MAX_SIZE, > IFLA_GRO_IPV4_MAX_SIZE, > > + IFLA_DPLL_PIN, > + No empty lines, no idea who started this trend but let's stop it. > __IFLA_MAX > };