From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Tatyana Nikolova
<tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH rdma-core 08/10] i40iw: Control debug error prints using env variable
Date: Thu, 8 Dec 2016 20:48:13 +0200 [thread overview]
Message-ID: <20161208184813.GG9722@mtr-leonro.local> (raw)
In-Reply-To: <20161208182225.GA32232-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
On Thu, Dec 08, 2016 at 11:22:25AM -0700, Jason Gunthorpe wrote:
> On Thu, Dec 08, 2016 at 12:16:39PM -0600, Tatyana Nikolova wrote:
>
> > +extern unsigned int i40iw_dbg;
> > +#define i40iw_debug(fmt, args...) \
> > + if (i40iw_dbg) \
> > + fprintf(stderr, PFX "%s: " fmt, __FUNCTION__, ##args)
> > +
>
> No, this is an unsafe way to use defines, wrap it in do / while (0)
>
> I would also welcome providing general infrastructure for this -
> every drvier seems to have this same basic approach.
+1,
The amount of copypasta in rdma-core drives me crazy.
>
> Jason
> --
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2016-12-08 18:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 18:16 [PATCH rdma-core 00/10] i40iw: Fixes and optimizations Tatyana Nikolova
[not found] ` <1481221001-1044-1-git-send-email-tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-12-08 18:16 ` [PATCH rdma-core 01/10] i40iw: Optimize setting fragments Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 02/10] i40iw: Remove unnecessary parameter Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 03/10] i40iw: Fix incorrect assignment of SQ head Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 04/10] i40iw: Optimize inline data copy Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 05/10] i40iw: Remove unnecessary check for moving CQ head Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 06/10] i40iw: Return correct error codes for destroy QP and CQ Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 07/10] i40iw: Do not destroy QP/CQ if lock is held Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 08/10] i40iw: Control debug error prints using env variable Tatyana Nikolova
[not found] ` <1481221001-1044-9-git-send-email-tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-12-08 18:22 ` Jason Gunthorpe
[not found] ` <20161208182225.GA32232-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-12-08 18:48 ` Leon Romanovsky [this message]
2016-12-08 18:16 ` [PATCH rdma-core 09/10] i40iw: Use 2M huge pages for CQ/QP memory if available Tatyana Nikolova
2016-12-08 18:16 ` [PATCH rdma-core 10/10] i40iw: Remove SQ size constraint Tatyana Nikolova
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=20161208184813.GG9722@mtr-leonro.local \
--to=leonro-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=e1000-rdma-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@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