[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210626140245.GA15724@hoboy.vegasvil.org>
Date: Sat, 26 Jun 2021 07:02:45 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, kuba@...nel.org,
Maciej Machnikowski <maciej.machnikowski@...el.com>,
netdev@...r.kernel.org, Jacob Keller <jacob.e.keller@...el.com>
Subject: Re: [PATCH net-next 2/5] ice: add support for auxiliary input/output
pins
On Fri, Jun 25, 2021 at 11:57:30AM -0700, Tony Nguyen wrote:
> @@ -783,6 +1064,17 @@ static long ice_ptp_create_clock(struct ice_pf *pf)
> info = &pf->ptp.info;
> dev = ice_pf_to_dev(pf);
>
> + /* Allocate memory for kernel pins interface */
> + if (info->n_pins) {
> + info->pin_config = devm_kcalloc(dev, info->n_pins,
> + sizeof(*info->pin_config),
> + GFP_KERNEL);
> + if (!info->pin_config) {
> + info->n_pins = 0;
> + return -ENOMEM;
> + }
> + }
How is this supposed to worK?
- If n_pins is non-zero, there must also be a ptp_caps.verify method,
but you don't provide one.
- You allocate the pin_config, but you don't set the .name or .index fields.
Thanks,
Richard
Powered by blists - more mailing lists