From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Fwd: Re: [PATCH] IB/core: Make device counter infrastructure dynamic
Date: Fri, 20 May 2016 14:53:09 +0300 [thread overview]
Message-ID: <20160520115309.GA25500@leon.nu> (raw)
In-Reply-To: <490a5365-ce89-f4a5-3547-32c37757da1d-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2585 bytes --]
On Thu, May 19, 2016 at 11:15:45PM -0400, Doug Ledford wrote:
> Reply-all didn't include the list for some reason :-/
>
>
> -------- Forwarded Message --------
> Subject: Re: [PATCH] IB/core: Make device counter infrastructure dynamic
> Date: Thu, 19 May 2016 18:13:22 -0400
> From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Organization: Red Hat, Inc.
> To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> CC: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>, Mark
> Bloch <markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> On 05/19/2016 05:50 PM, Jason Gunthorpe wrote:
> > On Thu, May 19, 2016 at 05:35:13PM -0400, Doug Ledford wrote:
> >
> >> + return sprintf(buf, "%d msecs (rounded from jiffies), 0-10000 allowed "
> >> + "range\n", msecs);
> >
> > sysfs files should not have usage commentary like that, just use the
> > %d
>
> I had that originally, and I'll pull this out when the stuff is
> documented somewhere else (either in the code or Documentation).
There is Documentation/infiniband/sysfs.txt [1], which looks as a good
candidate for this.
[1] http://lxr.free-electrons.com/source/Documentation/infiniband/sysfs.txt
>
> >> +char *names[] = {
> >
> > static const char * const names[] = {
> >
> > For Kees
>
> Fixed (in all places)
>
> >> + [NR_COUNTERS] = NULL
> >
> > Don't really need this, just use ARRAY_SIZE(names) in place of
> > NR_COUTNERS
>
> The original code required a NULL terminated array. Given that the attr
> array requires a NULL terminated array, and these are used to set that
> up, I'm not sure I mind burning an extra NULL for the semantic match,
> even though it's no longer necessary.
I disagree with your statement that removing BUILD_BUG_ON() checks is
a positive thing. In this case, we are talking about constant array
which is not going to be changed till new code will be added and compiled
again.
The questions which can be asked, do we need so much BUILD_BUG_ON checks?
Can we minimize the number of them?
>
> > Trailing comments are not the kdoc standard for structure members,
> > IIRC.
>
> That falls in the same category as the lifespan sysfs file. I tend to
> document things in place while I'm writing, and then erase the
> documentation when the final version is complete and the real docs are
> in place.
In such case, it is better to send as RFC to present that this patch is
not in its final stage yet.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-05-20 11:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fb1272e0-8c87-e51a-2220-5fdde598311f@redhat.com>
[not found] ` <fb1272e0-8c87-e51a-2220-5fdde598311f-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-20 3:15 ` Fwd: Re: [PATCH] IB/core: Make device counter infrastructure dynamic Doug Ledford
[not found] ` <490a5365-ce89-f4a5-3547-32c37757da1d-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-20 3:17 ` Doug Ledford
2016-05-20 11:53 ` Leon Romanovsky [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=20160520115309.GA25500@leon.nu \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.