Re: [PATCH 06/39] ALSA: seq: obsolete address mode in compatibility layer

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

 



On Aug 9 2016 21:15, Takashi Iwai wrote:
> But, why do you need to change these changes at all?  What you
> basically need is to change the call inside seq_call_port_info_ioctl()
> like:
> 
> -	err = snd_seq_do_ioctl(client, cmd, data);
> +	err = snd_seq_kernel_client_ctl(client->number, cmd, data);
> 
> Then the rest can remain intact.  Referencing client->number in each
> caller side just results in inefficient codes, obviously.

In seq_call_port_info_ioctl(), no members except for the 'number' are
used. So no need to get a pointer to the client data as an argument.

This change makes it simpler for readers to follow code of the function.
They have no need to think about the whole data, it's OK just to focus
on the numerical ID for client.


Regards

Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux