@@ -48,7 +51,7 @@ struct glink_msg { struct glink_defer_cmd { struct list_head node;- struct glink_msg msg;+ struct glink_msg_hdr msg; u8 data[]; };Instead of this change (and the container_of() uses below), I think you can just simply drop "data" here. I don't see anything using it except the struct_size()s which can all change their "data" argument to msg.data. e.g.:
Whaa.. I'm sorry, I totally missed this response. I think I was traveling a lot back then.
- dcmd = kzalloc(struct_size(dcmd, data, extra), GFP_ATOMIC); + dcmd = kzalloc(struct_size(dcmd, msg.data, extra), GFP_ATOMIC); With those changed, I think this patch becomes more readable.
Yes; I think I can change the code like this. :) Thanks! -- Gustavo
