/* ipath_get_pkey - return the indexed PKEY from the port PKEY table @dd: the infinipath device @index: the PKEY index  */
unsigned ipath_get_pkey(struct ipath_devdata *dd, unsigned index)
/* ipath_get_pkey - return the indexed PKEY from the port PKEY table @dd: the infinipath device @index: the PKEY index  */
unsigned ipath_get_pkey(struct ipath_devdata *dd, unsigned index)
{
	unsigned ret;
	if (index >= ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys))
		ret = 0;
	else
		ret = dd->ipath_pd[0]->port_pkeys[index];
	return ret;
}