[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20151008.045732.1781136095864323644.davem@davemloft.net>
Date: Thu, 08 Oct 2015 04:57:32 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: vivien.didelot@...oirfairelinux.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...oirfairelinux.com, sfeldma@...il.com, jiri@...nulli.us,
f.fainelli@...il.com, andrew@...n.ch, narmstrong@...libre.com,
sergei.shtylyov@...entembedded.com
Subject: Re: [PATCH net-next 0/3] net: remove dsa.h from netdevice.h
From: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Date: Tue, 6 Oct 2015 17:54:24 -0400
> In order to push switchdev objects down to DSA drivers, I need to include
> switchdev.h in dsa.h. But compilation fails because of a circular dependency
> issue, since dsa.h is also included in linux/netdevice.h.
>
> dsa.h is included for two purposes: to have the definition of struct
> dsa_switch_tree; and to have access to dsa_uses_tagged_protocol(), used by
> netdev_uses_dsa().
>
> This patchset forward declares struct dsa_switch_tree; adds a new uses_hw_tag
> boolean to struct net_device, which is more explicit than the DSA helper, and
> finally get rid of the dsa.h include.
>
> With this patchset, switchdev.h can safely be included in dsa.h.
The netdevice structure is already too big, and bloating it up even more
to satisfy some include ordering issue is rather unacceptable as far as I
am concerned.
Just forward declare the pointer type, you're not dereferencing it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists