Skip to content

Commit 3750f60

Browse files
sfrothwellRoland Dreier
authored andcommitted
IB/ehca: Fix printk format warnings from u64 type change
Commit fe33332 ("powerpc: Change u64/s64 to a long long integer type") changed u64 from unsigned long to unsigned long long, which means that printk formats for printing u64 values should use "ll" instead of "l" to avoid warnings. Fix all the places affected by this in ehca. Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent e0b325d commit 3750f60

File tree

12 files changed

+130
-130
lines changed

12 files changed

+130
-130
lines changed

drivers/infiniband/hw/ehca/ehca_cq.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
196196

197197
if (h_ret != H_SUCCESS) {
198198
ehca_err(device, "hipz_h_alloc_resource_cq() failed "
199-
"h_ret=%li device=%p", h_ret, device);
199+
"h_ret=%lli device=%p", h_ret, device);
200200
cq = ERR_PTR(ehca2ib_return_code(h_ret));
201201
goto create_cq_exit2;
202202
}
@@ -232,7 +232,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
232232

233233
if (h_ret < H_SUCCESS) {
234234
ehca_err(device, "hipz_h_register_rpage_cq() failed "
235-
"ehca_cq=%p cq_num=%x h_ret=%li counter=%i "
235+
"ehca_cq=%p cq_num=%x h_ret=%lli counter=%i "
236236
"act_pages=%i", my_cq, my_cq->cq_number,
237237
h_ret, counter, param.act_pages);
238238
cq = ERR_PTR(-EINVAL);
@@ -244,15 +244,15 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
244244
if ((h_ret != H_SUCCESS) || vpage) {
245245
ehca_err(device, "Registration of pages not "
246246
"complete ehca_cq=%p cq_num=%x "
247-
"h_ret=%li", my_cq, my_cq->cq_number,
247+
"h_ret=%lli", my_cq, my_cq->cq_number,
248248
h_ret);
249249
cq = ERR_PTR(-EAGAIN);
250250
goto create_cq_exit4;
251251
}
252252
} else {
253253
if (h_ret != H_PAGE_REGISTERED) {
254254
ehca_err(device, "Registration of page failed "
255-
"ehca_cq=%p cq_num=%x h_ret=%li "
255+
"ehca_cq=%p cq_num=%x h_ret=%lli "
256256
"counter=%i act_pages=%i",
257257
my_cq, my_cq->cq_number,
258258
h_ret, counter, param.act_pages);
@@ -266,7 +266,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
266266

267267
gal = my_cq->galpas.kernel;
268268
cqx_fec = hipz_galpa_load(gal, CQTEMM_OFFSET(cqx_fec));
269-
ehca_dbg(device, "ehca_cq=%p cq_num=%x CQX_FEC=%lx",
269+
ehca_dbg(device, "ehca_cq=%p cq_num=%x CQX_FEC=%llx",
270270
my_cq, my_cq->cq_number, cqx_fec);
271271

272272
my_cq->ib_cq.cqe = my_cq->nr_of_entries =
@@ -307,7 +307,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
307307
h_ret = hipz_h_destroy_cq(adapter_handle, my_cq, 1);
308308
if (h_ret != H_SUCCESS)
309309
ehca_err(device, "hipz_h_destroy_cq() failed ehca_cq=%p "
310-
"cq_num=%x h_ret=%li", my_cq, my_cq->cq_number, h_ret);
310+
"cq_num=%x h_ret=%lli", my_cq, my_cq->cq_number, h_ret);
311311

312312
create_cq_exit2:
313313
write_lock_irqsave(&ehca_cq_idr_lock, flags);
@@ -355,7 +355,7 @@ int ehca_destroy_cq(struct ib_cq *cq)
355355
h_ret = hipz_h_destroy_cq(adapter_handle, my_cq, 0);
356356
if (h_ret == H_R_STATE) {
357357
/* cq in err: read err data and destroy it forcibly */
358-
ehca_dbg(device, "ehca_cq=%p cq_num=%x ressource=%lx in err "
358+
ehca_dbg(device, "ehca_cq=%p cq_num=%x resource=%llx in err "
359359
"state. Try to delete it forcibly.",
360360
my_cq, cq_num, my_cq->ipz_cq_handle.handle);
361361
ehca_error_data(shca, my_cq, my_cq->ipz_cq_handle.handle);
@@ -365,7 +365,7 @@ int ehca_destroy_cq(struct ib_cq *cq)
365365
cq_num);
366366
}
367367
if (h_ret != H_SUCCESS) {
368-
ehca_err(device, "hipz_h_destroy_cq() failed h_ret=%li "
368+
ehca_err(device, "hipz_h_destroy_cq() failed h_ret=%lli "
369369
"ehca_cq=%p cq_num=%x", h_ret, my_cq, cq_num);
370370
return ehca2ib_return_code(h_ret);
371371
}

drivers/infiniband/hw/ehca/ehca_hca.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ int ehca_modify_port(struct ib_device *ibdev,
393393
hret = hipz_h_modify_port(shca->ipz_hca_handle, port,
394394
cap, props->init_type, port_modify_mask);
395395
if (hret != H_SUCCESS) {
396-
ehca_err(&shca->ib_device, "Modify port failed h_ret=%li",
396+
ehca_err(&shca->ib_device, "Modify port failed h_ret=%lli",
397397
hret);
398398
ret = -EINVAL;
399399
}

drivers/infiniband/hw/ehca/ehca_irq.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static void print_error_data(struct ehca_shca *shca, void *data,
9999
return;
100100

101101
ehca_err(&shca->ib_device,
102-
"QP 0x%x (resource=%lx) has errors.",
102+
"QP 0x%x (resource=%llx) has errors.",
103103
qp->ib_qp.qp_num, resource);
104104
break;
105105
}
@@ -108,21 +108,21 @@ static void print_error_data(struct ehca_shca *shca, void *data,
108108
struct ehca_cq *cq = (struct ehca_cq *)data;
109109

110110
ehca_err(&shca->ib_device,
111-
"CQ 0x%x (resource=%lx) has errors.",
111+
"CQ 0x%x (resource=%llx) has errors.",
112112
cq->cq_number, resource);
113113
break;
114114
}
115115
default:
116116
ehca_err(&shca->ib_device,
117-
"Unknown error type: %lx on %s.",
117+
"Unknown error type: %llx on %s.",
118118
type, shca->ib_device.name);
119119
break;
120120
}
121121

122-
ehca_err(&shca->ib_device, "Error data is available: %lx.", resource);
122+
ehca_err(&shca->ib_device, "Error data is available: %llx.", resource);
123123
ehca_err(&shca->ib_device, "EHCA ----- error data begin "
124124
"---------------------------------------------------");
125-
ehca_dmp(rblock, length, "resource=%lx", resource);
125+
ehca_dmp(rblock, length, "resource=%llx", resource);
126126
ehca_err(&shca->ib_device, "EHCA ----- error data end "
127127
"----------------------------------------------------");
128128

@@ -152,7 +152,7 @@ int ehca_error_data(struct ehca_shca *shca, void *data,
152152

153153
if (ret == H_R_STATE)
154154
ehca_err(&shca->ib_device,
155-
"No error data is available: %lx.", resource);
155+
"No error data is available: %llx.", resource);
156156
else if (ret == H_SUCCESS) {
157157
int length;
158158

@@ -164,7 +164,7 @@ int ehca_error_data(struct ehca_shca *shca, void *data,
164164
print_error_data(shca, data, rblock, length);
165165
} else
166166
ehca_err(&shca->ib_device,
167-
"Error data could not be fetched: %lx", resource);
167+
"Error data could not be fetched: %llx", resource);
168168

169169
ehca_free_fw_ctrlblock(rblock);
170170

@@ -514,7 +514,7 @@ static inline void process_eqe(struct ehca_shca *shca, struct ehca_eqe *eqe)
514514
struct ehca_cq *cq;
515515

516516
eqe_value = eqe->entry;
517-
ehca_dbg(&shca->ib_device, "eqe_value=%lx", eqe_value);
517+
ehca_dbg(&shca->ib_device, "eqe_value=%llx", eqe_value);
518518
if (EHCA_BMASK_GET(EQE_COMPLETION_EVENT, eqe_value)) {
519519
ehca_dbg(&shca->ib_device, "Got completion event");
520520
token = EHCA_BMASK_GET(EQE_CQ_TOKEN, eqe_value);
@@ -603,7 +603,7 @@ void ehca_process_eq(struct ehca_shca *shca, int is_irq)
603603
ret = hipz_h_eoi(eq->ist);
604604
if (ret != H_SUCCESS)
605605
ehca_err(&shca->ib_device,
606-
"bad return code EOI -rc = %ld\n", ret);
606+
"bad return code EOI -rc = %lld\n", ret);
607607
ehca_dbg(&shca->ib_device, "deadman found %x eqe", eqe_cnt);
608608
}
609609
if (unlikely(eqe_cnt == EHCA_EQE_CACHE_SIZE))

drivers/infiniband/hw/ehca/ehca_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static int ehca_sense_attributes(struct ehca_shca *shca)
304304

305305
h_ret = hipz_h_query_hca(shca->ipz_hca_handle, rblock);
306306
if (h_ret != H_SUCCESS) {
307-
ehca_gen_err("Cannot query device properties. h_ret=%li",
307+
ehca_gen_err("Cannot query device properties. h_ret=%lli",
308308
h_ret);
309309
ret = -EPERM;
310310
goto sense_attributes1;
@@ -391,7 +391,7 @@ static int ehca_sense_attributes(struct ehca_shca *shca)
391391
port = (struct hipz_query_port *)rblock;
392392
h_ret = hipz_h_query_port(shca->ipz_hca_handle, 1, port);
393393
if (h_ret != H_SUCCESS) {
394-
ehca_gen_err("Cannot query port properties. h_ret=%li",
394+
ehca_gen_err("Cannot query port properties. h_ret=%lli",
395395
h_ret);
396396
ret = -EPERM;
397397
goto sense_attributes1;
@@ -682,7 +682,7 @@ static ssize_t ehca_show_adapter_handle(struct device *dev,
682682
{
683683
struct ehca_shca *shca = dev->driver_data;
684684

685-
return sprintf(buf, "%lx\n", shca->ipz_hca_handle.handle);
685+
return sprintf(buf, "%llx\n", shca->ipz_hca_handle.handle);
686686

687687
}
688688
static DEVICE_ATTR(adapter_handle, S_IRUGO, ehca_show_adapter_handle, NULL);

drivers/infiniband/hw/ehca/ehca_mcast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int ehca_attach_mcast(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
8888
if (h_ret != H_SUCCESS)
8989
ehca_err(ibqp->device,
9090
"ehca_qp=%p qp_num=%x hipz_h_attach_mcqp() failed "
91-
"h_ret=%li", my_qp, ibqp->qp_num, h_ret);
91+
"h_ret=%lli", my_qp, ibqp->qp_num, h_ret);
9292

9393
return ehca2ib_return_code(h_ret);
9494
}
@@ -125,7 +125,7 @@ int ehca_detach_mcast(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
125125
if (h_ret != H_SUCCESS)
126126
ehca_err(ibqp->device,
127127
"ehca_qp=%p qp_num=%x hipz_h_detach_mcqp() failed "
128-
"h_ret=%li", my_qp, ibqp->qp_num, h_ret);
128+
"h_ret=%lli", my_qp, ibqp->qp_num, h_ret);
129129

130130
return ehca2ib_return_code(h_ret);
131131
}

0 commit comments

Comments
 (0)