[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0710121859510.23443@kivilampi-30.cs.helsinki.fi>
Date: Fri, 12 Oct 2007 19:05:16 +0300 (EEST)
From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To: Ralf Baechle <ralf@...ux-mips.org>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Jeff Garzik <jeff@...zik.org>, Netdev <netdev@...r.kernel.org>
Subject: Re: [NET] MIPSsim: General cleanup
On Fri, 12 Oct 2007, Ralf Baechle wrote:
> General cleanups mostly as suggested by checkpatch plus getting rid of
> homebrew version of offsetof().
>
> Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>
> ---
>
> drivers/net/mipsnet.c | 63 ++++++++++++++++++-------------------
> drivers/net/mipsnet.h | 83 ++++++++++++++++++++++++++------------------------
> 2 files changed, 75 insertions(+), 71 deletions(-)
>
> diff --git a/drivers/net/mipsnet.h b/drivers/net/mipsnet.h
> index 026c732..0132c67 100644
> --- a/drivers/net/mipsnet.h
> +++ b/drivers/net/mipsnet.h
>
> #define MIPSNET_IO_EXTENT 0x40 /* being generous */
>
> -#define field_offset(field) ((int)&((MIPS_T_NetControl*)(0))->field)
> +#define field_offset(field) (offsetof(struct net_control_block, field))
Is there any value in keeping this macro... why don't you just remote it?
There's seems to be just one user of it anyway:
drivers/net/mipsnet.c:#define mipsnet_reg_address(dev, field) (dev->base_addr + field_offset(field))
--
i.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists