netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: Coiby Xu <coiby.xu@gmail.com>
Cc: devel@driverdev.osuosl.org, joe@perches.com,
	dan.carpenter@oracle.com, gregkh@linuxfoundation.org,
	Manish Chopra <manishc@marvell.com>,
	"supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER" 
	<GR-Linux-NIC-Dev@marvell.com>,
	"open list:QLOGIC QLGE 10Gb ETHERNET DRIVER"
	<netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] staging: qlge: replace pr_err with netdev_err
Date: Mon, 29 Jun 2020 14:30:04 +0900	[thread overview]
Message-ID: <20200629053004.GA6165@f3> (raw)
In-Reply-To: <20200627145857.15926-5-coiby.xu@gmail.com>

On 2020-06-27 22:58 +0800, Coiby Xu wrote:
[...]
>  void ql_dump_qdev(struct ql_adapter *qdev)
>  {
> @@ -1611,99 +1618,100 @@ void ql_dump_qdev(struct ql_adapter *qdev)
>  #ifdef QL_CB_DUMP
>  void ql_dump_wqicb(struct wqicb *wqicb)
>  {
> -	pr_err("Dumping wqicb stuff...\n");
> -	pr_err("wqicb->len = 0x%x\n", le16_to_cpu(wqicb->len));
> -	pr_err("wqicb->flags = %x\n", le16_to_cpu(wqicb->flags));
> -	pr_err("wqicb->cq_id_rss = %d\n",
> -	       le16_to_cpu(wqicb->cq_id_rss));
> -	pr_err("wqicb->rid = 0x%x\n", le16_to_cpu(wqicb->rid));
> -	pr_err("wqicb->wq_addr = 0x%llx\n",
> -	       (unsigned long long)le64_to_cpu(wqicb->addr));
> -	pr_err("wqicb->wq_cnsmr_idx_addr = 0x%llx\n",
> -	       (unsigned long long)le64_to_cpu(wqicb->cnsmr_idx_addr));
> +	netdev_err(qdev->ndev, "Dumping wqicb stuff...\n");

drivers/staging/qlge/qlge_dbg.c:1621:13: error: ‘qdev’ undeclared (first use in this function); did you mean ‘cdev’?
 1621 |  netdev_err(qdev->ndev, "Dumping wqicb stuff...\n");
      |             ^~~~
      |             cdev

[...]
and many more like that

Anyways, qlge_dbg.h is a dumpster. It has hundreds of lines of code
bitrotting away in ifdef land. See this comment from David Miller on the
topic of ifdef'ed debugging code:
https://lore.kernel.org/netdev/20200303.145916.1506066510928020193.davem@davemloft.net/

  reply	other threads:[~2020-06-29 20:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200627145857.15926-1-coiby.xu@gmail.com>
2020-06-27 14:58 ` [PATCH v2 1/4] staging: qlge: fix trailing */ in block comment Coiby Xu
2020-06-27 14:58 ` [PATCH v2 2/4] staging: qlge: fix else after return or break Coiby Xu
2020-06-27 14:58 ` [PATCH v2 3/4] staging: qlge: fix ql_sem_unlock Coiby Xu
2020-06-27 14:58 ` [PATCH v2 4/4] staging: qlge: replace pr_err with netdev_err Coiby Xu
2020-06-29  5:30   ` Benjamin Poirier [this message]
2020-06-29 17:43     ` Coiby Xu
2020-06-30  4:41       ` Benjamin Poirier

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=20200629053004.GA6165@f3 \
    --to=benjamin.poirier@gmail.com \
    --cc=GR-Linux-NIC-Dev@marvell.com \
    --cc=coiby.xu@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manishc@marvell.com \
    --cc=netdev@vger.kernel.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).