linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: <bvanassche@acm.org>, <dledford@redhat.com>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 -next] RDMA/srp: use DEVICE_ATTR_*() macro
Date: Fri, 28 May 2021 20:56:05 +0800	[thread overview]
Message-ID: <0a12ba49-b020-2417-3618-2a42ff147838@huawei.com> (raw)
In-Reply-To: <20210528123334.GI1096940@ziepe.ca>

On 2021/5/28 20:33, Jason Gunthorpe wrote:
> 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?

Ok, v3 on the way.
> 
> Thanks,
> Jason
> .
> 

      reply	other threads:[~2021-05-28 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 12:30 [PATCH v2 -next] RDMA/srp: use DEVICE_ATTR_*() macro YueHaibing
2021-05-28 12:33 ` Jason Gunthorpe
2021-05-28 12:56   ` YueHaibing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a12ba49-b020-2417-3618-2a42ff147838@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).