On Wed, 13 Jun 2012 22:31:13 +0900
Akinobu Mita [off-list ref] wrote:
quoted
quoted
Should this hash_table be converted from u16 hash_table[32] to
DECLARE_BITMAP(hash_table, 16 * 32) to ensure that it is aligned
on long-word boundary?
I think hash_table is already long-word aligned because it is placed
right after a pointer.
I recommend converting to proper bitmap. Because such an implicit
assumption is easily broken by someone touching this function.
Do you mean something like:
DECLARE_BITMAP(__hash_table, 16 * 32);
u16 *hash_table = (u16 *)__hash_table;
?
Grant, what do you think about this?
Takuya
===
drivers/net/ethernet/dec/tulip/tulip_core.c:
static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev)
{
struct tulip_private *tp = netdev_priv(dev);
u16 hash_table[32];
...
}
drivers/net/ethernet/dec/tulip/de2104x.c:
static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev)
{
struct de_private *de = netdev_priv(dev);
u16 hash_table[32];
...
}