Re: [PATCH rdma-next v3] RDMA/srp: Rename SRP sysfs name after IB device rename trigger

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

 



On 5/16/19 8:57 AM, Leon Romanovsky wrote:
> +static void srp_rename_dev(struct ib_device *device, void *client_data)
> +{
> +	struct srp_device *srp_dev = client_data;
> +	struct srp_host *host, *tmp_host;
> +> +	list_for_each_entry_safe(host, tmp_host, &srp_dev->dev_list, list) {
        ^^^^^^^^^^^^^^^^^^^^^^^^
Would list_for_each_entry() have been sufficient?

> +		char name[IB_DEVICE_NAME_MAX * 8];

Why "* 8"? Would "+ 8" have been sufficient?

Otherwise this patch looks good to me. This patch also passes the tests
I ran.

Thanks,

Bart.




[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