Re: [linuxsh-dev] [PATCH] ALSA driver for Yamaa AICA on SegaDreamcast

From: Adrian McMenamin
Date: Mon Apr 17 2006 - 16:00:40 EST



>
> > + /* AICA has no capture ability */
> > + if ((err =
> > + snd_pcm_new(dreamcastcard->card, "AICA PCM", pcm_index, 1, 0,
> > + &pcm)) < 0)
> > + return err;
>
> Weird notation, linux kernel style would be:
>
> err = snc_pcm_new(...);
> if (unlikely(err < 0))
> return err;
>
> please refactor accordingly.
>

Actually this sort of formulation is common in the kernel as any grep
will show. In fact I copied it directly from the guide to writing ALSA
drivers:

http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x447.htm

But I am happy to change it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/