[alsa-devel] Help requested: new HSS1394 MIDI back-end

Takashi Iwai tiwai at suse.de
Mon Nov 12 10:45:54 CET 2012


At Thu, 25 Oct 2012 21:23:41 +0200,
Clemens Ladisch wrote:
> 
> +static int scs_init_hss_address(struct scs *scs)
> +{
> +	u8 data[8];
> +	int err;
> +
> +	*(__be64 *)data = cpu_to_be64(scs->hss_handler.offset);

Wouldn't it be safer to use unaligned access or a union?

> +static void scs_update(struct fw_unit *unit)
> +{
> +	struct scs *scs = dev_get_drvdata(&unit->device);
> +	int generation;
> +	u8 data[8];
> +
> +	*(__be64 *)data = cpu_to_be64(scs->hss_handler.offset);

Ditto.


Takashi


More information about the Alsa-devel mailing list