Re: 2.6.12-rc3-mm3: ALSA broken ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Fri, 27 May 2005 21:18:00 +0000,
J.A. Magallon wrote:
> 
> 
> On 05.27, Takashi Iwai wrote:
> > At Thu, 26 May 2005 23:51:58 +0000,
> > J.A. Magallon wrote:
> > 
> > > A side note. In the process of solving all this, I tried to generate a patch
> > > for 1.0.9rc4a against -mm. I noticed some things:
> > > - Your code reverts some in-kernel changes related to
> > >     if (ptr)
> > >         kfree(ptr)
> > >   The if is killed in mainline, as kfree accepts null pointers.
> > 
> > Could you point which places?
> > 
> 
> Oops, I think this is not ALSA specific code.
> I took the directory alsa-kernel, in the alsa tarball, and diffed against
> 2.6.12-rc5-mm1:
> 
> --- /usr/src/linux-2.6.12-rc5-mm1/sound/core/seq/oss/seq_oss_synth.c    2005-05-27 00:25:37.000000000 +0200
> +++ alsa-kernel/core/seq/oss/seq_oss_synth.c    2005-01-20 18:42:37.000000000 +0100
> @@ -325,10 +325,14 @@
>             }
>             snd_use_lock_free(&rec->use_lock);
>         }
> -       kfree(info->sysex);
> -       info->sysex = NULL;
> -       kfree(info->ch);
> -       info->ch = NULL;
> +       if (info->sysex) {
> +           kfree(info->sysex);
> +           info->sysex = NULL;
> +       }
> +       if (info->ch) {
> +           kfree(info->ch);
> +           info->ch = NULL;
> +       }
>     }
>     dp->synth_opened = 0;
>     dp->max_synthdev = 0;
> @@ -414,10 +418,14 @@
>                       dp->file_mode) < 0) {
>             midi_synth_dev.opened--;
>             info->opened = 0;
> -           kfree(info->sysex);
> -           info->sysex = NULL;
> -           kfree(info->ch);
> -           info->ch = NULL;
> +           if (info->sysex) {
> +               kfree(info->sysex);
> +               info->sysex = NULL;
> +           }
> +           if (info->ch) {
> +               kfree(info->ch);
> +               info->ch = NULL;
> +           }
>         }
>         return;
>     }
> 
> This looks like OSS code. Why does the tarball include OSS code ?

No, it's OSS _emulation_ code :)
I'll fix it on ALSA tree.  Thanks.

> Which is the correct way to generate a patch against a kernel tree ?

Sorry, I don't understand "which" in the above question - do you mean
alsa-kernel tree or what?  We have a git repository, so that the
latest ALSA patches can be taken...


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux