From: Kalle Valo <kvalo@adurom.com>
To: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-wireless@vger.kernel.org,
hch@lst.de, s.L-H@gmx.de
Subject: Re: [PATCH 2/4] ar5523: Add driver header file
Date: Sun, 21 Oct 2012 22:58:53 +0300 [thread overview]
Message-ID: <87hapnzjeq.fsf@purkki.adurom.net> (raw)
In-Reply-To: <50793F05.7030604@gmail.com> (Pontus Fuchs's message of "Sat, 13 Oct 2012 12:14:29 +0200")
Pontus Fuchs <pontus.fuchs@gmail.com> writes:
> On 2012-10-13 07:41, Kalle Valo wrote:
>> Pontus Fuchs <pontus.fuchs@gmail.com> writes:
>>
>>> +#define ar5523_err(ar, format, arg...) \
>>> +do { \
>>> + if (!test_bit(AR5523_USB_DISCONNECTED, &ar->flags)) { \
>>> + dev_err(&(ar)->dev->dev, format, ## arg); \
>>> + } \
>>> +} while (0)
>> This looks suspicious and might hide something important. It's better to
>> fix the real cause than to workaround it in the error log printer. Do
>> you know why this was added?
>
> Yes. The purpose is to hide all the USB errors that happens when you
> hot-unplug the dongle. There can be quite a few URBs in flight and
> all of them will fail with -ENODEV or -ESHUTDOWN. Instead of checking
> for these errors in all the usb submissions and callbacks I added this
> flag. Do you still a problem with this approach?
IMHO it's bad style to hide that inside a logging macro and might hide
some other bugs. It's better to check the state explicitly in the
callback.
But again this isn't anything important, just something I noticed while
reviewing the code. Do what you think is best.
--
Kalle Valo
next prev parent reply other threads:[~2012-10-21 19:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 20:01 [PATCH 0/4] Driver for the ar5523 chipset Pontus Fuchs
2012-10-11 20:01 ` [PATCH 1/4] ar5523: Add main driver file Pontus Fuchs
2012-10-15 20:54 ` Luis R. Rodriguez
2012-10-11 20:01 ` [PATCH 2/4] ar5523: Add driver header file Pontus Fuchs
2012-10-13 5:41 ` Kalle Valo
2012-10-13 10:14 ` Pontus Fuchs
2012-10-13 15:45 ` Christoph Hellwig
2012-10-21 19:58 ` Kalle Valo [this message]
2012-10-11 20:01 ` [PATCH 3/4] ar5523: Add Firmware API " Pontus Fuchs
2012-10-11 20:01 ` [PATCH 4/4] ar5523: Add Kconfig and Makefile Pontus Fuchs
2012-10-11 20:31 ` [PATCH 0/4] Driver for the ar5523 chipset Greg KH
2012-10-12 6:52 ` Pontus Fuchs
2012-10-12 7:28 ` Mohammed Shafi
2012-10-12 8:36 ` Pontus Fuchs
2012-10-12 8:23 ` Julian Calaby
2012-10-12 8:33 ` Pontus Fuchs
2012-10-12 11:45 ` Chadd, Adrian
2012-10-30 17:08 ` Adrian Chadd
2012-11-01 17:41 ` Pontus Fuchs
2012-10-12 7:11 ` Kalle Valo
2012-10-12 14:33 ` John W. Linville
2012-10-13 5:38 ` Kalle Valo
2012-10-13 10:25 ` Pontus Fuchs
2012-10-21 16:35 ` Kalle Valo
2012-10-13 15:41 ` Christoph Hellwig
2012-10-13 15:39 ` Christoph Hellwig
2012-10-22 22:43 ` Greg KH
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=87hapnzjeq.fsf@purkki.adurom.net \
--to=kvalo@adurom.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-wireless@vger.kernel.org \
--cc=pontus.fuchs@gmail.com \
--cc=s.L-H@gmx.de \
/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.