Re: [PATCH] mtd: rawnand: rockchip: Use struct_size()

2023-10-16 Thread Miquel Raynal
On Sun, 2023-10-01 at 07:44:04 UTC, Christophe JAILLET wrote: > Use struct_size() instead of hand writing it. > This is less verbose and more robust. > > While at it, prepare for the coming implementation by GCC and Clang of the > __counted_by attribute. Flexible array members annotated with __cou

Re: [PATCH] mtd: rawnand: rockchip: Use struct_size()

2023-10-09 Thread Heiko Stuebner
Am Sonntag, 1. Oktober 2023, 09:44:04 CEST schrieb Christophe JAILLET: > Use struct_size() instead of hand writing it. > This is less verbose and more robust. > > While at it, prepare for the coming implementation by GCC and Clang of the > __counted_by attribute. Flexible array members annotated w

Re: [PATCH] mtd: rawnand: rockchip: Use struct_size()

2023-10-09 Thread Kees Cook
On Sun, Oct 01, 2023 at 09:44:04AM +0200, Christophe JAILLET wrote: > Use struct_size() instead of hand writing it. > This is less verbose and more robust. > > While at it, prepare for the coming implementation by GCC and Clang of the > __counted_by attribute. Flexible array members annotated with

Re: [PATCH] mtd: rawnand: rockchip: Use struct_size()

2023-10-01 Thread Gustavo A. R. Silva
On 10/1/23 09:44, Christophe JAILLET wrote: Use struct_size() instead of hand writing it. This is less verbose and more robust. While at it, prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their