[ofw] Call to_mdev(ibdev) only once in mlx4_ib_query_device()

Smith, Stan stan.smith at intel.com
Wed Mar 18 11:16:20 PDT 2009


Hello,
  In file hw/mlx4/kernel/bus/ib/main.c @ line 57
 struct mlx4_ib_dev *dev = to_mdev(ibdev)

Later @ line 73
err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, 1, NULL, NULL, in_mad, out_mad);

Call to_mdev(ibdev) only once.

Stan.

diff U3 C:/Documents and Settings/scsmith/Local Settings/Temp/main.c-revBASE.svn000.tmp.c C:/Documents and Settings/scsmith/My Documents/openIB-windows/SVN/gen1/trunk/hw/mlx4/kernel/bus/ib/main.c
--- C:/Documents and Settings/scsmith/Local Settings/Temp/main.c-revBASE.svn000.tmp.c   Wed Mar 18 11:08:40 2009
+++ C:/Documents and Settings/scsmith/My Documents/openIB-windows/SVN/gen1/trunk/hw/mlx4/kernel/bus/ib/main.c   Wed Mar 18 10:50:23 2009
@@ -70,7 +70,7 @@
        init_query_mad(in_mad);
        in_mad->attr_id = IB_SMP_ATTR_NODE_INFO;

-       err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, 1, NULL, NULL, in_mad, out_mad);
+       err = mlx4_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad);
        if (err)
                goto out;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c.patch
Type: application/octet-stream
Size: 710 bytes
Desc: main.c.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090318/314e4eb6/attachment.obj>


More information about the ofw mailing list