From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [RFC] ath10k: improve logging to include dev id
Date: Mon, 25 Aug 2014 12:43:20 +0300 [thread overview]
Message-ID: <87mwas6h1j.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQnJYK0Sf6jy+tXHrTM06gXCjTxv_JKdK=01+jz5RgZ+tQ@mail.gmail.com> (Michal Kazior's message of "Mon, 25 Aug 2014 11:26:33 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 25 August 2014 11:18, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> This makes it a lot easier to log and debug
>>> messages if there's more than 1 ath10k device on a
>>> system.
>>>
>>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>>
>> Did only a quick review and test but looks good to me except one problem
>> in pci.c, see below. But there are some conflicts now, can you rebase
>> please? I hope it's not too much work to fix them.
>
> I've rebased this in my internal tree already.
Nice :)
>> I'll also summarise the "meat" of the changes so that it's easier for
>> others to review:
>>
> [...]
>>> @@ -2566,12 +2576,12 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
>>> struct ath10k_pci *ar_pci;
>>> u32 chip_id;
>>>
>>> - ath10k_dbg(ATH10K_DBG_PCI, "pci probe\n");
>>> + dev_printk(KERN_DEBUG, &pdev->dev, "pci probe\n");
>>
>> But this doesn't look right. A leftover from testing, perhaps?
>
> At this point there's no "ar" yet. The "ar" is allocated a few lines
> below. If the allocation fails then there's no "ar" so dev_err() is
> used explicitly in the failpath.
Ah, of course.
> I think these are just 2 exceptions we can't do differently, can we?
Using dev_err() is okay, but this debug print has the problem that it's
now always printed. I see few options:
1) we create __ath10k_dbg(dev, mask, fmt, ...)
2) we move the debug print after ar is created
3) we remove the debug print entirely
I vote for 2)
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
prev parent reply other threads:[~2014-08-25 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 7:40 [RFC] ath10k: improve logging to include dev id Michal Kazior
2014-08-25 9:18 ` Kalle Valo
2014-08-25 9:26 ` Michal Kazior
2014-08-25 9:43 ` Kalle Valo [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=87mwas6h1j.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox