[alsa-devel] [PATCH 06/39] ALSA: seq: obsolete address mode in compatibility layer

Takashi Sakamoto o-takashi at sakamocchi.jp
Tue Aug 9 14:32:30 CEST 2016


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


More information about the Alsa-devel mailing list