Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 920d10e4 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jason Gunthorpe
Browse files

IB/hfi1: Fix two format strings



Enable format string checking for hfi1_cdbg() and fix the resulting
compiler warnings.

Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 1f687ede
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa,
		if (rcd->egrbufs.size < hfi1_max_mtu) {
			rcd->egrbufs.size = __roundup_pow_of_two(hfi1_max_mtu);
			hfi1_cdbg(PROC,
				  "ctxt%u: eager bufs size too small. Adjusting to %zu\n",
				  "ctxt%u: eager bufs size too small. Adjusting to %u\n",
				    rcd->ctxt, rcd->egrbufs.size);
		}
		rcd->egrbufs.rcvtid_size = HFI1_MAX_EAGER_BUFFER_SIZE;
@@ -2071,7 +2071,7 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)
	rcd->egrbufs.size = alloced_bytes;

	hfi1_cdbg(PROC,
		  "ctxt%u: Alloced %u rcv tid entries @ %uKB, total %zuKB\n",
		  "ctxt%u: Alloced %u rcv tid entries @ %uKB, total %uKB\n",
		  rcd->ctxt, rcd->egrbufs.alloced,
		  rcd->egrbufs.rcvtid_size / 1024, rcd->egrbufs.size / 1024);

+2 −2
Original line number Diff line number Diff line
@@ -86,14 +86,14 @@ DECLARE_EVENT_CLASS(hfi1_trace_template,
 * actual function to work and can not be in a macro.
 */
#define __hfi1_trace_def(lvl) \
void __hfi1_trace_##lvl(const char *funct, char *fmt, ...);		\
void __printf(2, 3) __hfi1_trace_##lvl(const char *funct, char *fmt, ...); \
									\
DEFINE_EVENT(hfi1_trace_template, hfi1_ ##lvl,				\
	TP_PROTO(const char *function, struct va_format *vaf),		\
	TP_ARGS(function, vaf))

#define __hfi1_trace_fn(lvl) \
void __hfi1_trace_##lvl(const char *func, char *fmt, ...)		\
void __printf(2, 3) __hfi1_trace_##lvl(const char *func, char *fmt, ...)\
{									\
	struct va_format vaf = {					\
		.fmt = fmt,						\