Re: [PATCH] xfs: use struct_size() helper

2019-04-12 Thread Darrick J. Wong
On Thu, Apr 11, 2019 at 08:57:14PM -0500, Gustavo A. R. Silva wrote: > > > On 4/11/19 7:19 PM, Darrick J. Wong wrote: > > [fixing linux-xfs cc] > > > > Thanks for this. > > > On Thu, Apr 11, 2019 at 06:37:58PM -0500, Gustavo A. R. Silva wrote: > >> Make use of the struct_size() helper instead

Re: [PATCH] xfs: use struct_size() helper

2019-04-11 Thread Gustavo A. R. Silva
On 4/11/19 7:19 PM, Darrick J. Wong wrote: > [fixing linux-xfs cc] > Thanks for this. > On Thu, Apr 11, 2019 at 06:37:58PM -0500, Gustavo A. R. Silva wrote: >> Make use of the struct_size() helper instead of an open-coded version >> in order to avoid any potential type mistakes, in

Re: [PATCH] xfs: use struct_size() helper

2019-04-11 Thread Darrick J. Wong
[fixing linux-xfs cc] On Thu, Apr 11, 2019 at 06:37:58PM -0500, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, replace