On Sat, Jun 29, 2019 at 05:44:10PM +0800, yuan linyu wrote: > there is no need to clean buf at beginning of function, > when below condition occur, the buf will be dirty again. > if (result > 1 && ((u8 *)buf)[1] != type) { > result = -ENODATA; > continue; > } > > return negative result means buf is not valid. Yes, but why is removing the memset a required thing? What bug is this solving? What speed improvement can be seen by this change? Are you _sure_ that no code is relying on the fact that the buffer is cleaned out before sending the message and needs it to be zero terminated? We added that memset for a reason all those years ago, to just remove it now without a really good reason is worrying. thanks, greg k-h