public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: Stephen Hemminger <shemminger@vyatta•com>
Cc: paulmck@linux•vnet.ibm.com, netdev@vger•kernel.org
Subject: Re: Fun with if_bridge.h and br_private.h
Date: Mon, 3 May 2010 23:02:21 +0200	[thread overview]
Message-ID: <201005032302.21860.arnd@arndb.de> (raw)
In-Reply-To: <20100503133613.0f2a61f7@nehalam>

On Monday 03 May 2010 22:36:13 Stephen Hemminger wrote:
> > In file included from net/core/dev.c:104:
> > include/linux/if_bridge.h:106: warning: "struct net_bridge_port" declared inside parameter list
> > include/linux/if_bridge.h:106: warning: its scope is only this definition or declaration, which is probably not what you want
> > net/core/dev.c:2331: error: conflicting types for "br_handle_frame_hook"
> > include/linux/if_bridge.h:105: error: previous declaration of "br_handle_frame_hook" was here
> > net/core/dev.c:2333: error: conflicting types for "br_handle_frame_hook"
> > include/linux/if_bridge.h:105: error: previous declaration of "br_handle_frame_hook" was here
> > 
> > This happens because net/bridge/br_private.h includes if_bridge.h before
> > it defines net_bridge_port.
> > 
> > Any thoughts on how best to allow handle_bridge() see the definition
> > of struct net_bridge_port?
> > 
> 
> Why not make it a void *, there is no reason to make core code depend
> on br_private.h.

Ah, right. That's actually how I changed the definition of br_port to
start with. Sorry Paul, I had totally forgotten about this.
Not sure if we also need to change the br_handle_frame_hook prototype,
I think the forward declaration for struct net_bridge_port that I had
in my long patch was actually sufficient.

	Arnd

  reply	other threads:[~2010-05-03 21:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 19:12 Fun with if_bridge.h and br_private.h Paul E. McKenney
2010-05-03 20:36 ` Stephen Hemminger
2010-05-03 21:02   ` Arnd Bergmann [this message]
2010-05-03 23:34     ` Paul E. McKenney

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=201005032302.21860.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=paulmck@linux$(echo .)vnet.ibm.com \
    --cc=shemminger@vyatta$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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