Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: "Sean M. Pappalardo - D.J. Pegasus" <spappalardo@mixxx.org>,
	alsa-devel@alsa-project.org,
	linux1394-devel@lists.sourceforge.net
Subject: Re: Help requested: new HSS1394 MIDI back-end
Date: Mon, 12 Nov 2012 12:33:47 +0100	[thread overview]
Message-ID: <50A0DE9B.8010906@ladisch.de> (raw)
In-Reply-To: <s5hfw4fi27h.wl%tiwai@suse.de>

Takashi Iwai wrote:
> 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?

Oops, indeed.  But safest would be to avoid playing byte-array games:

  __be64 data = cpu_to_be64(((u64)HSS1394_TAG_CHANGE_ADDRESS << 56) |
                            scs->hss_handler.offset);

Now fixed in the same branch.


Regards,
Clemens

  reply	other threads:[~2012-11-12 11:33 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <94aa86f3-5257-402a-a094-f58fccdeb846@email.android.com>
2012-05-30  4:51 ` Help requested: new HSS1394 MIDI back-end Clemens Ladisch
2012-05-30  5:12   ` [alsa-devel] " Sean M. Pappalardo - D.J. Pegasus
2012-05-30  7:18     ` Clemens Ladisch
2012-05-31 20:00       ` Clemens Ladisch
2012-06-09  6:54         ` Sean M. Pappalardo - D.J. Pegasus
2012-06-09 11:07           ` Clemens Ladisch
2012-06-09 12:41             ` Sean M. Pappalardo - D.J. Pegasus
2012-06-10 13:00             ` Clemens Ladisch
2012-10-24 11:49               ` Sean M. Pappalardo - D.J. Pegasus
2012-10-25 19:23                 ` Clemens Ladisch
2012-10-25 20:26                   ` Sean M. Pappalardo - D.J. Pegasus
2012-10-26  7:48                     ` Clemens Ladisch
2012-10-31 10:00                   ` Sean M. Pappalardo - D.J. Pegasus
2012-11-11 21:34                     ` [git pull] " Clemens Ladisch
2012-11-09  6:41                   ` Help requested: " Sean M. Pappalardo - D.J. Pegasus
2012-11-12  9:45                   ` Takashi Iwai
2012-11-12 11:33                     ` Clemens Ladisch [this message]
2012-11-12 11:40                       ` Takashi Iwai
2012-11-12 11:45                         ` [alsa-devel] " Clemens Ladisch
2012-11-12 14:26                           ` Takashi Iwai
2012-06-09  8:42         ` Sean M. Pappalardo - D.J. Pegasus
2012-06-09 10:12         ` Sean M. Pappalardo - D.J. Pegasus
2012-05-31 22:04       ` Sean M. Pappalardo - D.J. Pegasus
2012-06-01  8:22         ` Clemens Ladisch
2012-06-01 13:40           ` [alsa-devel] " Stefan Richter
     [not found] <mailman.786.1339244201.2490.alsa-devel@alsa-project.org>
2012-06-09 12:56 ` Jonathan Woithe
2012-05-25 19:43 Sean M. Pappalardo - D.J. Pegasus
2012-05-27 13:50 ` Clemens Ladisch
2012-05-27 20:59   ` Sean M. Pappalardo - D.J. Pegasus
2012-05-28 14:58     ` Clemens Ladisch
2012-05-28 20:40       ` Sean M. Pappalardo - D.J. Pegasus
2012-05-29 17:05         ` Clemens Ladisch
2012-05-29 21:52           ` Sean M. Pappalardo - D.J. Pegasus
2012-07-24 11:44             ` Clemens Ladisch
2012-08-01 17:16               ` Sean M. Pappalardo - D.J. Pegasus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A0DE9B.8010906@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=spappalardo@mixxx.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox