[openib-general] [PATCH] optional functions, ib_mad update

Grant Grundler iod00d at hp.com
Wed Sep 1 15:13:37 PDT 2004


On Wed, Sep 01, 2004 at 08:45:49AM -0700, Sean Hefty wrote:
> Here's a patch that checks for optional functions provided by the device.
> It also includes a patch from Hal for IB management classes.

Nit: in general, combining patches is a nono.
(And yes, I'm guilty of that too)

> -static inline int ib_modify_device(struct ib_device *device,
> -				   int device_modify_mask,
> -				   struct ib_device_modify *device_modify)
> -{
> -	return device->modify_device(device, device_modify_mask,
> -				     device_modify);
> -}

Why not leave this as an inline function?

static inline int ib_modify_device(struct ib_device *device,
		int modify_mask, struct ib_device_modify *modify)
{
	return (device->modify_device ? 
			device->modify_device(device, modify_mask, modify) :
				-ENOSYS);
}

Or does anyone expect this to get more complicated?

thanks,
grant



More information about the general mailing list