Re: [PATCH/RFC flow-net-next 02/10] net: flow: Add features to tables
From: Simon Horman <hidden>
Date: 2015-01-05 02:19:08
From: Simon Horman <hidden>
Date: 2015-01-05 02:19:08
On Mon, Dec 29, 2014 at 03:03:39PM -0800, Cong Wang wrote:
On Sun, Dec 28, 2014 at 6:15 PM, Simon Horman [off-list ref] wrote:quoted
+static struct net_flow_table *net_flow_table_get_table(struct net_device *dev, + int table_uid) +{ + struct net_flow_table **tables; + int i; + + tables = net_flow_get_tables(dev); + if (IS_ERR(tables)) + return ERR_PTR(PTR_ERR(tables));Seriously? :)
I was looking for a way to handle the type of tables being different to the return type of net_flow_table_get_table(). Would you recommend a cast? return (struct net_flow_table *)tables;