lkml.org 
[lkml]   [2023]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mtd: rawnand: rockchip: Use struct_size()
Date
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 with __counted_by
> can have their accesses bounds-checked at run-time checking via
> CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for
> strcpy/memcpy-family functions).
>
> Also remove a useless comment about the position of a flex-array in a
> structure.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Heiko Stuebner <heiko@sntech.de>


\
 
 \ /
  Last update: 2023-10-09 22:19    [W:0.921 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site