[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210528123334.GI1096940@ziepe.ca>
Date: Fri, 28 May 2021 09:33:34 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: YueHaibing <yuehaibing@...wei.com>
Cc: bvanassche@....org, dledford@...hat.com,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 -next] RDMA/srp: use DEVICE_ATTR_*() macro
On Fri, May 28, 2021 at 08:30:39PM +0800, YueHaibing wrote:
> @@ -3040,22 +3040,22 @@ static ssize_t show_allow_ext_sg(struct device *dev,
> return sysfs_emit(buf, "%s\n", target->allow_ext_sg ? "true" : "false");
> }
>
> -static DEVICE_ATTR(id_ext, S_IRUGO, show_id_ext, NULL);
> -static DEVICE_ATTR(ioc_guid, S_IRUGO, show_ioc_guid, NULL);
> -static DEVICE_ATTR(service_id, S_IRUGO, show_service_id, NULL);
> -static DEVICE_ATTR(pkey, S_IRUGO, show_pkey, NULL);
> -static DEVICE_ATTR(sgid, S_IRUGO, show_sgid, NULL);
> -static DEVICE_ATTR(dgid, S_IRUGO, show_dgid, NULL);
> -static DEVICE_ATTR(orig_dgid, S_IRUGO, show_orig_dgid, NULL);
> -static DEVICE_ATTR(req_lim, S_IRUGO, show_req_lim, NULL);
> -static DEVICE_ATTR(zero_req_lim, S_IRUGO, show_zero_req_lim, NULL);
> -static DEVICE_ATTR(local_ib_port, S_IRUGO, show_local_ib_port, NULL);
> -static DEVICE_ATTR(local_ib_device, S_IRUGO, show_local_ib_device, NULL);
> -static DEVICE_ATTR(ch_count, S_IRUGO, show_ch_count, NULL);
> -static DEVICE_ATTR(comp_vector, S_IRUGO, show_comp_vector, NULL);
> -static DEVICE_ATTR(tl_retry_count, S_IRUGO, show_tl_retry_count, NULL);
> -static DEVICE_ATTR(cmd_sg_entries, S_IRUGO, show_cmd_sg_entries, NULL);
> -static DEVICE_ATTR(allow_ext_sg, S_IRUGO, show_allow_ext_sg, NULL);
> +static DEVICE_ATTR_RO(id_ext);
> +static DEVICE_ATTR_RO(ioc_guid);
> +static DEVICE_ATTR_RO(service_id);
> +static DEVICE_ATTR_RO(pkey);
> +static DEVICE_ATTR_RO(sgid);
> +static DEVICE_ATTR_RO(dgid);
> +static DEVICE_ATTR_RO(orig_dgid);
> +static DEVICE_ATTR_RO(req_lim);
> +static DEVICE_ATTR_RO(zero_req_lim);
> +static DEVICE_ATTR_RO(local_ib_port);
> +static DEVICE_ATTR_RO(local_ib_device);
> +static DEVICE_ATTR_RO(ch_count);
> +static DEVICE_ATTR_RO(comp_vector);
> +static DEVICE_ATTR_RO(tl_retry_count);
> +static DEVICE_ATTR_RO(cmd_sg_entries);
> +static DEVICE_ATTR_RO(allow_ext_sg);
can you also organize this so the ATTR's are placed after their
functions, as is normal?
Thanks,
Jason
Powered by blists - more mailing lists