From: Jubin John <jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH 10/13] staging/rdma/hfi1: adding per SDMA engine stats to hfistats
Date: Mon, 16 Nov 2015 16:33:37 -0500 [thread overview]
Message-ID: <20151116213335.GA9452@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <20151111082215.GZ18797@mwanda>
On Wed, Nov 11, 2015 at 11:22:15AM +0300, Dan Carpenter wrote:
> On Wed, Nov 11, 2015 at 02:33:30AM -0500, Jubin John wrote:
> > @@ -8288,6 +8367,21 @@ static int init_cntrs(struct hfi1_devdata *dd)
> > dd->ndevcntrs++;
> > index++;
> > }
> > + } else if (dev_cntrs[i].flags & CNTR_SDMA) {
> > + hfi1_dbg_early(
> > + "\tProcessing per SDE counters chip enginers %u\n",
> > + dd->chip_sdma_engines);
> > + dev_cntrs[i].offset = index;
> > + for (j = 0; j < dd->chip_sdma_engines; j++) {
> > + memset(name, '\0', C_MAX_NAME);
>
> This patch is ok, but none of the memsets in this function are needed.
> You could remove them in a later patch.
>
> > + snprintf(name, C_MAX_NAME, "%s%d",
> > + dev_cntrs[i].name, j);
> > + sz += strlen(name);
> > + sz++;
> > + hfi1_dbg_early("\t\t%s\n", name);
>
> We're basically just trying to calculate a bunch of strlen()s but there
> is a lot of extra code to generate debug output. It would be better to
> remove it in a later patch.
>
> > + dd->ndevcntrs++;
> > + index++;
> > + }
>
> regards,
> dan carpenter
Hi Dan,
I will let this patch stand as-is and follow up with a clean up patch
to remove the memsets and the debug code.
Thanks,
Jubin John
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-11-16 21:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 7:33 [PATCH 01/13] staging/rdma/hfi1: Use BIT macro Jubin John
[not found] ` <1447227213-15122-1-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-11-11 7:33 ` [PATCH 02/13] staging/rdma/hfi1: Fix downgrade race Jubin John
2015-11-11 7:33 ` [PATCH 03/13] staging/rdma/hfi1: remove RxCtxRHQS from hfi1stats Jubin John
2015-11-11 7:33 ` [PATCH 04/13] staging/rdma/hfi: Remove rcv bubbles code Jubin John
2015-11-11 7:33 ` [PATCH 05/13] staging/rdma/hfi1: Add space between concatenated string elements Jubin John
2015-11-11 7:33 ` [PATCH 06/13] staging/rdma/hfi1: Move s_sde to the read mostly portion of the hfi1_qp structure Jubin John
2015-11-11 7:33 ` [PATCH 07/13] staging/rdma/hfi1: rework is_a0() and is_bx() Jubin John
2015-11-11 7:33 ` [PATCH 08/13] staging/rdma/hfi1: change krcvqs module parameter type from byte to uint Jubin John
2015-11-11 7:33 ` [PATCH 09/13] staging/rdma/hfi1: Change default krcvqs Jubin John
2015-11-11 7:33 ` [PATCH 10/13] staging/rdma/hfi1: adding per SDMA engine stats to hfistats Jubin John
[not found] ` <1447227213-15122-10-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-11-11 8:22 ` Dan Carpenter
2015-11-16 21:33 ` Jubin John [this message]
2015-11-11 7:33 ` [PATCH 11/13] staging/rdma/hfi1: Remove unneeded variable index Jubin John
2015-11-11 7:33 ` [PATCH 12/13] staging/rdma/hfi1: Read EFI variable for device description Jubin John
[not found] ` <1447227213-15122-12-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-11-11 8:44 ` Dan Carpenter
2015-11-11 14:03 ` Luick, Dean
[not found] ` <4AF12E8016D2BF46BCDFCE8FAA77A3580BC19F69-AtyAts71sc9cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-11-11 14:39 ` Dan Carpenter
2015-11-11 15:03 ` Luick, Dean
[not found] ` <4AF12E8016D2BF46BCDFCE8FAA77A3580BC19FC8-AtyAts71sc9cIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-11-11 17:24 ` gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
[not found] ` <20151111172411.GA20481-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-11-12 12:31 ` Luick, Dean
2015-11-11 7:33 ` [PATCH 13/13] staging/rdma/hfi1: Adjust EPROM partitions, add EPROM commands Jubin John
2015-11-13 13:15 ` [PATCH 01/13] staging/rdma/hfi1: Use BIT macro Sudip Mukherjee
2015-11-13 16:09 ` Jubin John
[not found] ` <20151113160921.GA31028-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-11-13 18:03 ` Jubin John
[not found] ` <20151113180344.GA10934-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-11-13 18:25 ` Jubin John
2015-11-14 7:11 ` Sudip Mukherjee
2015-11-16 21:21 ` Jubin John
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=20151116213335.GA9452@phlsvsds.ph.intel.com \
--to=jubin.john-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@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 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).