tangled
alpha
login
or
join now
tjh.dev
/
kernel
1
fork
atom
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge branch 'for-4.2-misc' into k.o/for-4.2
Doug Ledford
11 years ago
0699ee7a
9247a8eb
+5
-11
3 changed files
expand all
collapse all
unified
split
drivers
infiniband
hw
mthca
mthca_profile.c
ocrdma
ocrdma_verbs.c
usnic
usnic_uiom.c
+2
-6
drivers/infiniband/hw/mthca/mthca_profile.c
reviewed
···
77
77
u64 mem_base, mem_avail;
78
78
s64 total_size = 0;
79
79
struct mthca_resource *profile;
80
80
-
struct mthca_resource tmp;
81
80
int i, j;
82
81
83
82
profile = kzalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL);
···
135
136
*/
136
137
for (i = MTHCA_RES_NUM; i > 0; --i)
137
138
for (j = 1; j < i; ++j) {
138
138
-
if (profile[j].size > profile[j - 1].size) {
139
139
-
tmp = profile[j];
140
140
-
profile[j] = profile[j - 1];
141
141
-
profile[j - 1] = tmp;
142
142
-
}
139
139
+
if (profile[j].size > profile[j - 1].size)
140
140
+
swap(profile[j], profile[j - 1]);
143
141
}
144
142
145
143
for (i = 0; i < MTHCA_RES_NUM; ++i) {
-1
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
reviewed
···
684
684
ocrdma_release_ucontext_pd(uctx);
685
685
} else {
686
686
status = _ocrdma_dealloc_pd(dev, pd);
687
687
-
kfree(pd);
688
687
}
689
688
exit:
690
689
return ERR_PTR(status);
+3
-4
drivers/infiniband/hw/usnic/usnic_uiom.c
reviewed
···
472
472
return ERR_PTR(-ENOMEM);
473
473
474
474
pd->domain = domain = iommu_domain_alloc(&pci_bus_type);
475
475
-
if (IS_ERR_OR_NULL(domain)) {
476
476
-
usnic_err("Failed to allocate IOMMU domain with err %ld\n",
477
477
-
PTR_ERR(pd->domain));
475
475
+
if (!domain) {
476
476
+
usnic_err("Failed to allocate IOMMU domain");
478
477
kfree(pd);
479
479
-
return ERR_PTR(domain ? PTR_ERR(domain) : -ENOMEM);
478
478
+
return ERR_PTR(-ENOMEM);
480
479
}
481
480
482
481
iommu_set_fault_handler(pd->domain, usnic_uiom_dma_fault, NULL);