linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH rfc 2/2] nvmet: add nvmet ctrl logging helpers
Date: Wed, 18 Jul 2018 15:25:18 +0300	[thread overview]
Message-ID: <d804c6d8-ba28-a3ea-8c1f-242b9aa5b18f@grimberg.me> (raw)
In-Reply-To: <BYAPR04MB4502D84E243118923DD7493F865D0@BYAPR04MB4502.namprd04.prod.outlook.com>


> diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h
> index 6811258ab8ff..73751ded2174 100644
> --- a/drivers/nvme/target/nvmet.h
> +++ b/drivers/nvme/target/nvmet.h
> @@ -280,6 +280,13 @@ struct nvmet_req {
>  ???????? printk(KERN_WARNING "nvmet port%d: " fmt, \
>  ???????????????? le32_to_cpu((port)->disc_addr.portid), ##a)
>   
> +#define ctrl_err(ctrl, fmt, a...)????????????? \
> +?????? printk(KERN_ERR "nvmet ctrl%d: " fmt, (ctrl)->cntlid, ##a)
> +#define ctrl_info(ctrl, fmt, a...)???????????? \
> +?????? printk(KERN_INFO "nvmet ctrl%d: " fmt, (ctrl)->cntlid, ##a)
> +#define ctrl_warn(ctrl, fmt, a...)???????????? \
> +?????? printk(KERN_WARNING "nvmet ctrl%d: " fmt, (ctrl)->cntlid, ##a)
> +
> 
> [CK] Can we use pr_XXX for above helpers instead of printk()?

This would add pr_fmt() to the print which would look like:
"nvme-loop: nvmet ctrl1: XXX". Wanted to clean it up like
dev_XXX logging.

      reply	other threads:[~2018-07-18 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 10:53 [PATCH rfc 0/2] nvmet nice logging helpers Sagi Grimberg
2018-07-16 10:53 ` [PATCH rfc 1/2] nvmet: add nvmet port " Sagi Grimberg
2018-07-16 10:53 ` [PATCH rfc 2/2] nvmet: add nvmet ctrl " Sagi Grimberg
2018-07-16 22:11   ` Chaitanya Kulkarni
2018-07-18 12:25     ` Sagi Grimberg [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=d804c6d8-ba28-a3ea-8c1f-242b9aa5b18f@grimberg.me \
    --to=sagi@grimberg.me \
    /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).