Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-net-drivers@solarflare.com>
Subject: Re: [PATCH RESEND net-next 06/16] sfc: Introduce and use MCDI_DECLARE_BUF macro
Date: Fri, 23 Aug 2013 11:26:10 +0100	[thread overview]
Message-ID: <1377253570.2586.15.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <20130822.220236.2202751653391527307.davem@davemloft.net>

On Thu, 2013-08-22 at 22:02 -0700, David Miller wrote:
> From: Ben Hutchings <bhutchings@solarflare.com>
> Date: Thu, 22 Aug 2013 20:26:49 +0100
> 
> > MCDI_DECLARE_BUF declares a variable as an MCDI buffer of the
> > requested length, adding any necessary padding.
> > 
> > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> 
> There really isn't a guarentee that a u8 array is going to
> aligned appropriately to write dwords there using casts like
> you do.

Yes, but this has been wrong for years.

> Since you're here macro'izing the declaration, take the time to fix it
> to specify the necessary alignment as well.
[...]

My intent was to separate refactoring changes with no immediate effect
(#6-9) from functional changes (#10-11), making them easier to review.
The alignment gets fixed by #11.

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.

  reply	other threads:[~2013-08-23 10:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 19:22 Pull request: sfc-next 2013-08-22 v2 Ben Hutchings
2013-08-22 19:25 ` [PATCH RESEND net-next 01/16] sfc: Fix lookup of default RX MAC filters when steered using ethtool Ben Hutchings
2013-08-22 19:25 ` [PATCH RESEND net-next 02/16] sfc: const-qualify source pointers for MMIO write functions Ben Hutchings
2013-08-22 19:25 ` [PATCH RESEND net-next 03/16] sfc: Use efx_mcdi_mon() to find efx_mcdi_mon structure from efx_nic Ben Hutchings
2013-08-22 19:26 ` [PATCH RESEND net-next 04/16] sfc: Move details of a Falcon bug workaround out of ethtool.c Ben Hutchings
2013-08-22 19:26 ` [PATCH RESEND net-next 05/16] sfc: Move more Falcon-specific code and definitions into falcon.c Ben Hutchings
2013-08-22 19:26 ` [PATCH RESEND net-next 06/16] sfc: Introduce and use MCDI_DECLARE_BUF macro Ben Hutchings
2013-08-23  5:02   ` David Miller
2013-08-23 10:26     ` Ben Hutchings [this message]
2013-08-23 15:52       ` Ben Hutchings
2013-08-23 18:00       ` David Miller
2013-08-22 19:27 ` [PATCH RESEND net-next 07/16] sfc: Rationalise MCDI buffer accessors Ben Hutchings
2013-08-22 19:27 ` [PATCH RESEND net-next 08/16] sfc: Fill out the set of MCDI accessors Ben Hutchings
2013-08-22 19:27 ` [PATCH RESEND net-next 09/16] sfc: Introduce and use MCDI_CTL_SDU_LEN_MAX_V1 macro for Siena-specific code Ben Hutchings
2013-08-22 19:28 ` [PATCH RESEND net-next 10/16] sfc: Use proper macros to declare and access MCDI arrays Ben Hutchings
2013-08-22 19:28 ` [PATCH RESEND net-next 11/16] sfc: Ensure MCDI buffers, but not lengths, are dword aligned Ben Hutchings
2013-08-22 19:28 ` [PATCH RESEND net-next 12/16] sfc: Add and use MCDI_SET_QWORD() and MCDI_SET_ARRAY_QWORD() Ben Hutchings
2013-08-22 19:29 ` [PATCH RESEND net-next 13/16] sfc: Move siena_reset_hw() and siena_map_reset_reason() into MCDI module Ben Hutchings
2013-08-22 19:29 ` [PATCH RESEND net-next 14/16] sfc: Move efx_mcdi_mac_reconfigure() to siena.c and rename Ben Hutchings
2013-08-22 19:29 ` [PATCH RESEND net-next 15/16] sfc: Collect all MCDI port functions into mcdi_port.c Ben Hutchings
2013-08-22 19:30 ` [PATCH RESEND net-next 16/16] sfc: Make efx_mcdi_init() call efx_mcdi_handle_assertion() Ben Hutchings

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=1377253570.2586.15.camel@deadeye.wl.decadent.org.uk \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    /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