From: David Vrabel <david.vrabel@csr.com>
To: Tomas Winkler <tomasw@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] bluetooth: don't DMA to stack in btsdio driver
Date: Wed, 04 Nov 2009 12:22:40 +0000 [thread overview]
Message-ID: <4AF17210.2070008@csr.com> (raw)
In-Reply-To: <1ba2fa240911040256p3645aac6sea271919f1e6e651@mail.gmail.com>
Tomas Winkler wrote:
>
>> @@ -299,9 +301,9 @@ static int btsdio_probe(struct sdio_func *func,
>> const struct sdio_device_id *id)
>> {
>> struct btsdio_data *data;
>> - struct hci_dev *hdev;
>> + struct hci_dev *hdev = NULL;
>
> This kind of assignments prevent useful warning from compiler, maybe
> it's better to stage
> the error bailout.
I think that having to have an error_foo label for each error makes
writing error handling harder not easier. I'm not inclined to change
this, particular as I can't think of any "useful warnings" are prevented.
>> struct sdio_func_tuple *tuple = func->tuples;
>> - int err;
>> + int err = -ENOMEM;
> You are assuming no other code between 2 allocations, it's seems to
> me error prone.
Yeah, it's probably best to set err at the source of the error. This
code is so short it doesn't make any real practical difference. I'll
keep it in mind for the future though.
David
--
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
prev parent reply other threads:[~2009-11-04 12:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 16:41 [PATCH] bluetooth: don't DMA to stack in btsdio driver David Vrabel
2009-10-27 14:28 ` David Vrabel
2009-11-04 10:56 ` Tomas Winkler
2009-11-04 12:22 ` David Vrabel [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=4AF17210.2070008@csr.com \
--to=david.vrabel@csr.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=tomasw@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 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).