From: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>,
akpm@linux-foundation.org, bhutchings@solarflare.com,
grundler@parisc-linux.org, arnd@arndb.de,
benh@kernel.crashing.org, avi@redhat.com, mtosatti@redhat.com,
linux-net-drivers@solarflare.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [PATCH 2/5] drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function
Date: Wed, 13 Jun 2012 23:00:13 +0900 [thread overview]
Message-ID: <20120613230013.3cc59bf908616e94bb4ccef2@gmail.com> (raw)
In-Reply-To: <CAC5umygutE35hVObuooWj=ADP6PZDy4cqLtxGnRtxRX8uTtGSw@mail.gmail.com>
On Wed, 13 Jun 2012 22:31:13 +0900
Akinobu Mita <akinobu.mita@gmail.com> wrote:
> >> 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];
...
}
next prev parent reply other threads:[~2012-06-13 14:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 4:00 [PATCH 0/5] Introduce generic set_bit_le() -v2 Takuya Yoshikawa
2012-06-13 4:02 ` [PATCH 1/5] sfc: Use standard __{clear,set}_bit_le() functions Takuya Yoshikawa
2012-06-13 4:03 ` [PATCH 2/5] drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function Takuya Yoshikawa
2012-06-13 9:43 ` Akinobu Mita
2012-06-13 12:41 ` Takuya Yoshikawa
2012-06-13 13:31 ` Akinobu Mita
2012-06-13 14:00 ` Takuya Yoshikawa [this message]
2012-06-13 15:14 ` Ben Hutchings
2012-06-13 15:21 ` Grant Grundler
2012-06-13 22:28 ` Takuya Yoshikawa
2012-06-14 9:36 ` Akinobu Mita
2012-06-14 14:28 ` Takuya Yoshikawa
2012-06-13 4:03 ` [PATCH 3/5] bitops: Introduce generic {clear,set}_bit_le() Takuya Yoshikawa
2012-06-13 4:04 ` [PATCH 4/5] powerpc: bitops: Introduce {clear,set}_bit_le() Takuya Yoshikawa
2012-06-17 21:49 ` Benjamin Herrenschmidt
2012-06-13 4:05 ` [PATCH 5/5] KVM: Replace test_and_set_bit_le() in mark_page_dirty_in_slot() with set_bit_le() Takuya Yoshikawa
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=20120613230013.3cc59bf908616e94bb4ccef2@gmail.com \
--to=takuya.yoshikawa@gmail.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=avi@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=bhutchings@solarflare.com \
--cc=grundler@parisc-linux.org \
--cc=kvm@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@solarflare.com \
--cc=mtosatti@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=yoshikawa.takuya@oss.ntt.co.jp \
/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;
as well as URLs for NNTP newsgroup(s).