From: Ben Hutchings <bhutchings@solarflare.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>,
<akpm@linux-foundation.org>, <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 16:14:17 +0100 [thread overview]
Message-ID: <1339600457.2612.2.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <20120613230013.3cc59bf908616e94bb4ccef2@gmail.com>
On Wed, 2012-06-13 at 23:00 +0900, Takuya Yoshikawa wrote:
> 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;
> ?
[...]
Could this driver perhaps use:
union hash_table {
DECLARE_BITMAP(bits, 16 * 32);
__le16 words[32];
};
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-06-13 15:14 UTC|newest]
Thread overview: 17+ 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
2012-06-13 15:14 ` Ben Hutchings [this message]
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
2012-08-07 11:07 [PATCH 0/5 - RESEND] Introduce generic set_bit_le() Takuya Yoshikawa
2012-08-07 11:09 ` [PATCH 2/5] drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function 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=1339600457.2612.2.camel@bwh-desktop.uk.solarflarecom.com \
--to=bhutchings@solarflare.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=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=takuya.yoshikawa@gmail.com \
--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
all inboxes | Powered by JetHome®