lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260107-mtd-memregion-v3-1-f9fc9107b992@bootlin.com>
Date: Wed, 07 Jan 2026 14:04:52 +0100
From: Gregory CLEMENT <gregory.clement@...tlin.com>
To: Rob Herring <robh@...nel.org>, Linus Walleij <linus.walleij@...aro.org>, 
 Miquel Raynal <miquel.raynal@...tlin.com>, 
 Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>, 
 Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>, 
 Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>, 
 Benoît Monin <benoit.monin@...tlin.com>, 
 Théo Lebrun <theo.lebrun@...tlin.com>, 
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-arm-kernel@...ts.infradead.org, linux-mtd@...ts.infradead.org, 
 Gregory CLEMENT <gregory.clement@...tlin.com>
Subject: [PATCH v3 1/4] of: reserved_mem: Fix placement of __free()
 annotation

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@...tlin.com>
---
 drivers/of/of_reserved_mem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 5619ec9178587..1ab8f4153600b 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -127,7 +127,6 @@ static void __init fdt_reserved_mem_save_node(unsigned long node, const char *un
 	fdt_init_reserved_mem_node(rmem);
 
 	reserved_mem_count++;
-	return;
 }
 
 static int __init early_init_dt_reserve_memory(phys_addr_t base,
@@ -747,7 +746,7 @@ int of_reserved_mem_region_to_resource(const struct device_node *np,
 	if (!np)
 		return -EINVAL;
 
-	struct device_node __free(device_node) *target = of_parse_phandle(np, "memory-region", idx);
+	struct device_node *target __free(device_node) = of_parse_phandle(np, "memory-region", idx);
 	if (!target || !of_device_is_available(target))
 		return -ENODEV;
 

-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ