From: Johannes Berg <johannes@sipsolutions.net>
To: Takashi Iwai <tiwai@suse.de>
Cc: linuxppc-dev@ozlabs.org, alsa-devel@alsa-project.org
Subject: Re: [RFC 2/8] snd-aoa: add aoa core
Date: Fri, 02 Jun 2006 15:46:14 +0200 [thread overview]
Message-ID: <1149255974.11092.14.camel@johannes.berg> (raw)
In-Reply-To: <s5hverj4qsd.wl%tiwai@suse.de>
[-- Attachment #1.1: Type: text/plain, Size: 1764 bytes --]
On Fri, 2006-06-02 at 15:42 +0200, Takashi Iwai wrote:
> > +static void attach_codec_to_fabric(struct aoa_codec *c)
>
> Doesn't this need to return an error?
> I'm afraid that module count is unblanced in the error path of
> aoa_corec_[un]register().
Not sure, I'll have to take a look.
> > + printk("snd-aoa: fabric didn't like codec %s\n", c->name);
>
> Add KERN_* prefix.
Uh, right.
> > + rt->implementation_private = 0;
> > + INIT_WORK(&rt->headphone_notify.work, pmf_handle_notify, &rt->headphone_notify);
> > + INIT_WORK(&rt->line_in_notify.work, pmf_handle_notify, &rt->line_in_notify);
> > + INIT_WORK(&rt->line_out_notify.work, pmf_handle_notify, &rt->line_out_notify);
>
> Too long lines.
Heh, I knew I'd get this at lots of places, I'll work on it.
> > + pmf_gpio_all_amps_off(rt);
> > + rt->implementation_private = 0;
> > + if (rt->headphone_notify.gpio_private)
> > + pmf_unregister_irq_client(rt->headphone_notify.gpio_private);
> > + if (rt->line_in_notify.gpio_private)
> > + pmf_unregister_irq_client(rt->line_in_notify.gpio_private);
> > + if (rt->line_out_notify.gpio_private)
> > + pmf_unregister_irq_client(rt->line_out_notify.gpio_private);
>
> Don't need kfree(gpio_private)?
Indeed, forgot that.
> > + strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver)-1);
> > + strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname)-1);
> > + strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname)-1);
> > + strlcpy(alsa_card->mixername, name, sizeof(alsa_card->mixername)-1);
>
> Pass sizeof() without -1. strlcpy() takes the size of the buffer
> including nul-terminator.
Yeah, I was confused about the API. Will fix those too.
Thanks,
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 793 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
[-- Attachment #3: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
next prev parent reply other threads:[~2006-06-02 13:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 11:58 [RFC 0/8] snd-aoa: add snd-aoa Johannes Berg
2006-06-01 11:58 ` [RFC 1/8] snd-aoa: add aoa header files Johannes Berg
2006-06-01 11:58 ` [RFC 2/8] snd-aoa: add aoa core Johannes Berg
2006-06-02 13:42 ` Takashi Iwai
2006-06-02 13:46 ` Johannes Berg [this message]
2006-06-01 11:58 ` [RFC 3/8] snd-aoa: add soundbus Johannes Berg
2006-06-02 13:53 ` Takashi Iwai
2006-06-02 14:07 ` Johannes Berg
[not found] ` <1149257225.11092.22.camel@johannes.berg>
2006-06-02 14:21 ` Takashi Iwai
2006-06-02 14:41 ` Andreas Schwab
2006-06-02 14:44 ` Johannes Berg
2006-06-02 14:45 ` Takashi Iwai
2006-06-01 11:58 ` [RFC 4/8] snd-aoa: add i2sbus Johannes Berg
2006-06-02 14:23 ` Takashi Iwai
2006-06-06 11:17 ` Johannes Berg
[not found] ` <1149592647.5928.49.camel@johannes.berg>
2006-06-06 14:00 ` Takashi Iwai
[not found] ` <s5h8xoamliv.wl%tiwai@suse.de>
2006-06-07 11:40 ` Johannes Berg
2006-06-07 12:41 ` Takashi Iwai
2006-06-07 12:45 ` Johannes Berg
2006-06-07 12:49 ` Takashi Iwai
2006-06-07 12:52 ` Johannes Berg
2006-06-07 12:58 ` Takashi Iwai
[not found] ` <s5hpshl5dhh.wl%tiwai@suse.de>
2006-06-07 13:01 ` Johannes Berg
2006-06-01 11:58 ` [RFC 5/8] snd-aoa: add codecs Johannes Berg
2006-06-02 14:31 ` Takashi Iwai
2006-06-06 11:36 ` Johannes Berg
2006-06-01 11:58 ` [RFC 6/8] snd-aoa: add layout-id fabric Johannes Berg
2006-06-01 11:58 ` [RFC 7/8] snd-aoa: add Kconfig and Makefile Johannes Berg
2006-06-01 11:58 ` [RFC 8/8] snd-aoa: wire up aoa in sound/ Johannes Berg
2006-06-02 14:43 ` [RFC 0/8] snd-aoa: add snd-aoa Takashi Iwai
2006-06-02 14:56 ` Johannes Berg
2006-06-02 15:23 ` Takashi Iwai
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=1149255974.11092.14.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=alsa-devel@alsa-project.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox