*pkey = be16_to_cpu(((u16 *) out_mad->data)[index % 32]); 
*pkey = be16_to_cpu(((__be16 *) out_mad->data)[index % 32]); 
static int mthca_query_pkey(struct ib_device *ibdev,			    u8 port, u16 index, u16 *pkey){	struct ib_smp *in_mad  = NULL;	struct ib_smp *out_mad = NULL;	int err = -ENOMEM;	u8 status;	in_mad  = kmalloc(sizeof *in_mad, GFP_KERNEL);	out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);	if (!in_mad || !out_mad)		goto out;	memset(in_mad, 0, sizeof *in_mad);	in_mad->base_version       = 1;	in_mad->mgmt_class     	   = IB_MGMT_CLASS_SUBN_LID_ROUTED;	in_mad->class_version  	   = 1;	in_mad->method         	   = IB_MGMT_METHOD_GET;	in_mad->attr_id   	   = IB_SMP_ATTR_PKEY_TABLE;	in_mad->attr_mod           = cpu_to_be32(index / 32);	err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1,			    port, NULL, NULL, in_mad, out_mad,			    &status);	if (err)		goto out;	if (status) {		err = -EINVAL;		goto out;	}	*pkey = be16_to_cpu(((u16 *) out_mad->data)[index % 32]); out:	kfree(in_mad);	kfree(out_mad);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/97f52eb438be7caebe026421545619d8a0c1398a/mthca_provider.c/buggy/drivers/infiniband/hw/mthca/mthca_provider.c