[PATCH 01/15] net: hbl_cn: add habanalabs Core Network driver

Markus Elfring Markus.Elfring at web.de
Mon Jun 17 14:05:57 UTC 2024


…
> +++ b/drivers/net/ethernet/intel/hbl_cn/common/hbl_cn.c
> @@ -0,0 +1,5954 @@
…
> +int hbl_cn_read_spmu_counters(struct hbl_cn_port *cn_port, u64 out_data[], u32 *num_out_data)
> +{
…
> +	mutex_lock(&cn_port->cnt_lock);
> +	rc = port_funcs->spmu_sample(cn_port, *num_out_data, out_data);
> +	mutex_unlock(&cn_port->cnt_lock);
> +
> +	return rc;
> +}
…

Would you become interested to apply a statement like “guard(mutex)(&cn_port->cnt_lock);”?
https://elixir.bootlin.com/linux/v6.10-rc4/source/include/linux/mutex.h#L196

Regards,
Markus


More information about the dri-devel mailing list