return 0xFFFFFFFF;
}
- loc = le32_to_cpu(((uint32_t *)bh->b_data)[index]);
+ loc = le32_to_cpu(((__le32 *)bh->b_data)[index]);
udf_release_data(bh);
if (st)
{
- for (i=0; i<st->reallocationTableLen; i++)
+ for (i=0; i<le16_to_cpu(st->reallocationTableLen); i++)
{
if (le32_to_cpu(st->mapEntry[i].origLocation) >= 0xFFFFFFF0)
break;
if (!st)
return 1;
- for (k=0; k<st->reallocationTableLen; k++)
+ for (k=0; k<le16_to_cpu(st->reallocationTableLen); k++)
{
if (le32_to_cpu(st->mapEntry[k].origLocation) == 0xFFFFFFFF)
{
{
st = (struct sparingTable *)sdata->s_spar_map[j]->b_data;
st->mapEntry[k].origLocation = cpu_to_le32(packet);
- udf_update_tag((char *)st, sizeof(struct sparingTable) + st->reallocationTableLen * sizeof(struct sparingEntry));
+ udf_update_tag((char *)st, sizeof(struct sparingTable) + le16_to_cpu(st->reallocationTableLen) * sizeof(struct sparingEntry));
mark_buffer_dirty(sdata->s_spar_map[j]);
}
}
else if (le32_to_cpu(st->mapEntry[k].origLocation) > packet)
break;
}
- for (l=k; l<st->reallocationTableLen; l++)
+ for (l=k; l<le16_to_cpu(st->reallocationTableLen); l++)
{
if (le32_to_cpu(st->mapEntry[l].origLocation) == 0xFFFFFFFF)
{
mapEntry.origLocation = cpu_to_le32(packet);
memmove(&st->mapEntry[k+1], &st->mapEntry[k], (l-k)*sizeof(struct sparingEntry));
st->mapEntry[k] = mapEntry;
- udf_update_tag((char *)st, sizeof(struct sparingTable) + st->reallocationTableLen * sizeof(struct sparingEntry));
+ udf_update_tag((char *)st, sizeof(struct sparingTable) + le16_to_cpu(st->reallocationTableLen) * sizeof(struct sparingEntry));
mark_buffer_dirty(sdata->s_spar_map[j]);
}
}