12 Nov
2012
12 Nov
'12
10:45 a.m.
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