aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/intf.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-04-17 00:01:08 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:01:08 -0400
commit37608eea86a358ac6a18df0af55d4f77d08a1f30 (patch)
treebb0d7c9a93763e6b3fda744a08b2a0c6ed80dfec /drivers/net/mlx4/intf.c
parent26c4fc26d0af9b16a6a234318d15ee0b3896a63d (diff)
mlx4_core: Fix confusion between mlx4_event and mlx4_dev_event enums
The struct mlx4_interface.event() method was supposed to get an enum mlx4_dev_event, but the driver code was actually passing in the hardware enum mlx4_event values. Fix up the callers of mlx4_dispatch_event() so that they pass in the right type of value, and fix up the event method in mlx4_ib so that it can handle the enum mlx4_dev_event values. This eliminates the need for the subtype parameter to the event method, so remove it. This also fixes the sparse warning drivers/net/mlx4/intf.c:127:48: warning: mixing different enum types drivers/net/mlx4/intf.c:127:48: int enum mlx4_event versus drivers/net/mlx4/intf.c:127:48: int enum mlx4_dev_event Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/mlx4/intf.c')
-rw-r--r--drivers/net/mlx4/intf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/mlx4/intf.c b/drivers/net/mlx4/intf.c
index be5d9e90ccf2..4a6c4d526f1b 100644
--- a/drivers/net/mlx4/intf.c
+++ b/drivers/net/mlx4/intf.c
@@ -30,8 +30,6 @@
30 * SOFTWARE. 30 * SOFTWARE.
31 */ 31 */
32 32
33#include <linux/mlx4/driver.h>
34
35#include "mlx4.h" 33#include "mlx4.h"
36 34
37struct mlx4_device_context { 35struct mlx4_device_context {
@@ -113,8 +111,7 @@ void mlx4_unregister_interface(struct mlx4_interface *intf)
113} 111}
114EXPORT_SYMBOL_GPL(mlx4_unregister_interface); 112EXPORT_SYMBOL_GPL(mlx4_unregister_interface);
115 113
116void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_event type, 114void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_dev_event type, int port)
117 int subtype, int port)
118{ 115{
119 struct mlx4_priv *priv = mlx4_priv(dev); 116 struct mlx4_priv *priv = mlx4_priv(dev);
120 struct mlx4_device_context *dev_ctx; 117 struct mlx4_device_context *dev_ctx;
@@ -124,8 +121,7 @@ void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_event type,
124 121
125 list_for_each_entry(dev_ctx, &priv->ctx_list, list) 122 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
126 if (dev_ctx->intf->event) 123 if (dev_ctx->intf->event)
127 dev_ctx->intf->event(dev, dev_ctx->context, type, 124 dev_ctx->intf->event(dev, dev_ctx->context, type, port);
128 subtype, port);
129 125
130 spin_unlock_irqrestore(&priv->ctx_lock, flags); 126 spin_unlock_irqrestore(&priv->ctx_lock, flags);
131} 127}