netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Cc: Jiri Pirko <jiri@resnulli.us>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	Jonathan Lemon <jonathan.lemon@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>, Jiri Pirko <jiri@nvidia.com>,
	Milena Olech <milena.olech@intel.com>,
	Michal Michalik <michal.michalik@intel.com>,
	linux-arm-kernel@lists.infradead.org, poros@redhat.com,
	mschmidt@redhat.com, netdev@vger.kernel.org,
	linux-clk@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH net-next v5 5/9] netdev: expose DPLL pin handle for netdevice
Date: Tue, 22 Aug 2023 19:11:43 -0700	[thread overview]
Message-ID: <20230822191143.119c3d72@kernel.org> (raw)
In-Reply-To: <20230822230037.809114-6-vadim.fedorenko@linux.dev>

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 <linux/rculist.h>
>  #include <linux/workqueue.h>
>  #include <linux/dynamic_queue_limits.h>
> +#include <linux/dpll.h>

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
>  };

  reply	other threads:[~2023-08-23  2:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 23:00 [PATCH net-next v5 0/9] Create common DPLL configuration API Vadim Fedorenko
2023-08-22 23:00 ` [PATCH net-next v5 1/9] dpll: documentation on DPLL subsystem interface Vadim Fedorenko
2023-08-22 23:00 ` [PATCH net-next v5 2/9] dpll: spec: Add Netlink spec in YAML Vadim Fedorenko
2023-08-23  2:21   ` Jakub Kicinski
2023-08-23 23:46     ` Kubalewski, Arkadiusz
2023-08-22 23:00 ` [PATCH net-next v5 3/9] dpll: core: Add DPLL framework base functions Vadim Fedorenko
2023-08-22 23:00 ` [PATCH net-next v5 4/9] dpll: netlink: " Vadim Fedorenko
2023-08-22 23:00 ` [PATCH net-next v5 5/9] netdev: expose DPLL pin handle for netdevice Vadim Fedorenko
2023-08-23  2:11   ` Jakub Kicinski [this message]
2023-08-22 23:00 ` [PATCH net-next v5 6/9] ice: add admin commands to access cgu configuration Vadim Fedorenko
2023-08-22 23:00 ` [PATCH net-next v5 7/9] ice: implement dpll interface to control cgu Vadim Fedorenko
2023-08-22 23:00 ` [PATCH net-next v5 8/9] ptp_ocp: implement DPLL ops Vadim Fedorenko
2023-08-22 23:00 ` [PATCH net-next v5 9/9] mlx5: Implement SyncE support using DPLL infrastructure Vadim Fedorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230822191143.119c3d72@kernel.org \
    --to=kuba@kernel.org \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=bvanassche@acm.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jiri@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=jonathan.lemon@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=michal.michalik@intel.com \
    --cc=milena.olech@intel.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=poros@redhat.com \
    --cc=vadim.fedorenko@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).