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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> +++ 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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux