Re: [RFC PATCH rdma-core] Check that public headers support -Wpedantic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/09/18 10:14, Jason Gunthorpe wrote:
+static inline struct verbs_context *_verbs_get_ctx_op(struct ibv_context *ctx,
+						      size_t op_off)
+{
+	struct verbs_context *vctx = verbs_get_ctx(ctx);
+	void *op;
+	if (!vctx)
+		return NULL;
+
+	if (vctx->sz < sizeof(*vctx) - op_off)
+		return NULL;
+
+	op = *((void **)((uint8_t *)vctx) + op_off);

Something really minor: I think there are more parentheses in the above expression than strictly needed. Otherwise this patch looks fine to me.

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux