[PATCH v3 1/4] of: reserved_mem: Fix placement of __free() annotation

Rob Herring (Arm) robh at kernel.org
Tue Jan 20 18:30:58 PST 2026


On Wed, 07 Jan 2026 14:04:52 +0100, Gregory CLEMENT wrote:
> The __free() annotation was incorrectly placed before the variable
> name instead of after it, which resulted in the following checkpatch
> errors:
> 
> ERROR: need consistent spacing around '*' (ctx:WxV)
> +       struct device_node __free(device_node) *target = of_parse_phandle(np, "memory-region", idx);
>                                                ^
> WARNING: function definition argument 'idx' should also have an identifier name
> +       struct device_node __free(device_node) *target = of_parse_phandle(np, "memory-region", idx);
> 
> As part of this cleanup, also remove the useless return statement
> flagged by checkpatch.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
> ---
>  drivers/of/of_reserved_mem.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Applied, thanks!




More information about the linux-mtd mailing list