All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: leon@kernel.org, zyjzyj2000@gmail.com, jhack@hpe.com,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH for-next 01/16] RDMA/rxe: Add ibdev_dbg macros for rxe
Date: Wed, 2 Nov 2022 09:57:55 -0300	[thread overview]
Message-ID: <Y2JpU2hJaTghhgAn@nvidia.com> (raw)
In-Reply-To: <20221101202238.32836-2-rpearsonhpe@gmail.com>

On Tue, Nov 01, 2022 at 03:22:25PM -0500, Bob Pearson wrote:
> Add macros borrowed from siw to call dynamic debug macro ibdev_dbg.
> 
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe.h | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe.h b/drivers/infiniband/sw/rxe/rxe.h
> index 30fbdf3bc76a..1c5186c26bce 100644
> --- a/drivers/infiniband/sw/rxe/rxe.h
> +++ b/drivers/infiniband/sw/rxe/rxe.h
> @@ -38,6 +38,25 @@
>  
>  #define RXE_ROCE_V2_SPORT		(0xc000)
>  
> +#define rxe_dbg(rxe, fmt, ...) ibdev_dbg(&rxe->ib_dev,			\
> +		"%s: " fmt, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_uc(uc, fmt, ...) ibdev_dbg(uc->ibpd.device,		\
> +		"uc#%d %s: " fmt, uc->elem.index, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_pd(pd, fmt, ...) ibdev_dbg(pd->ibpd.device,		\
> +		"pd#%d %s: " fmt, pd->elem.index, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_ah(ah, fmt, ...) ibdev_dbg(ah->ibah.device,		\
> +		"ah#%d %s: " fmt, ah->elem.index, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_srq(srq, fmt, ...) ibdev_dbg(srq->ibsrq.device,	\
> +		"srq#%d %s: " fmt, srq->elem.index, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_qp(qp, fmt, ...) ibdev_dbg(qp->ibqp.device,		\
> +		"qp#%d %s: " fmt, qp->elem.index, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_cq(cq, fmt, ...) ibdev_dbg(cq->ibcq.device,		\
> +		"cq#%d %s: " fmt, cq->elem.index, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_mr(mr, fmt, ...) ibdev_dbg(mr->ibmr.device,		\
> +		"mr#%d %s:  " fmt, mr->elem.index, __func__, ##__VA_ARGS__)
> +#define rxe_dbg_mw(mw, fmt, ...) ibdev_dbg(mw->ibmw.device,		\
> +		"mw#%d %s:  " fmt, mw->elem.index, __func__, ##__VA_ARGS__)

All the macro arguments here need to be enclosed in brackets if they
are not a singular expression:

 #define rxe_dbg_mw(mw, fmt, ...) ibdev_dbg((mw)->ibmw.device,		\
 		"mw#%d %s:  " fmt, (mw)->elem.index, __func__, ##__VA_ARGS__)

Jason

  reply	other threads:[~2022-11-02 12:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 20:22 [PATCH for-next 00/16] Use ibdev_dbg instead of pr_xxx Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 01/16] RDMA/rxe: Add ibdev_dbg macros for rxe Bob Pearson
2022-11-02 12:57   ` Jason Gunthorpe [this message]
2022-11-03 17:11     ` Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 02/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_comp.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 03/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_cq in rxe_cq.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 04/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_mr in rxe_mr.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 05/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_mw in rxe_mw.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 06/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_net.c Bob Pearson
2022-11-02  6:59   ` kernel test robot
2022-11-01 20:22 ` [PATCH for-next 07/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_qp.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 08/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_req.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 09/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_resp.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 10/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_srq in rxe_srq.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 11/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe_verbs.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 12/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_av.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 13/16] RDMA/rxe: Replace pr_xxx by rxe_dbg_qp in rxe_task.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 14/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 15/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe_icrc.c Bob Pearson
2022-11-01 20:22 ` [PATCH for-next 16/16] RDMA/rxe: Replace pr_xxx by rxe_dbg in rxe_mmap.c Bob Pearson

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=Y2JpU2hJaTghhgAn@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=jhack@hpe.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    /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.