RE: [PATCHv1] RDMA/ocrdma: Fixed CONFIG_VLAN_8021Q.
From: <hidden>
Date: 2012-08-16 12:15:55
-----Original Message----- From: Roland Dreier [mailto:roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org] Sent: Thursday, August 16, 2012 9:41 AM To: Pandit, Parav Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Subject: Re: [PATCHv1] RDMA/ocrdma: Fixed CONFIG_VLAN_8021Q. On Sat, Aug 11, 2012 at 6:28 AM, Parav Pandit [off-list ref] wrote:quoted
+static struct net_device *ocrdma_get_real_netdev(struct net_device +*netdev) { #if IS_ENABLED(CONFIG_VLAN_8021Q) + return vlan_dev_real_dev(netdev); #else + return netdev; +#endif +}As I said before, I don't think this wrapper is needed, and even if it were, it would be much better to write it without using the preprocessor (as I said, you can do "if (IS_ENABLED(...))" in C code now too). I'm going to stick to my simpler version unless there is something wrong with it...
[PP] O.k. I am fine with your solution too.
- R.
-- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html