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] [day] [month] [year] [list]
Message-ID: <20251122-spicy-chupacabra-of-joy-ec1ee0@kuoka>
Date: Sat, 22 Nov 2025 12:30:51 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Gregory CLEMENT <gregory.clement@...tlin.com>
Cc: 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>, 
	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
Subject: Re: [PATCH v2 1/3] of: reserved_mem: Support multiple 'reg' entries
 for memory-region

On Fri, Nov 21, 2025 at 04:42:35PM +0100, Gregory CLEMENT wrote:
> + * This function allows drivers to lookup a node's 'memory-region' property
> + * entries by index and fill an array of struct resource pointers for the entries.
> + *
> + * Returns the number of resources filled in @res on success.
> + * Returns -ENODEV if 'memory-region' is missing or unavailable,
> + * -EINVAL for any other error.
> + */
> +int of_reserved_mem_region_to_resource_array(struct device *dev, const struct device_node *np,
> +					     unsigned int idx, struct resource **res)
> +{
> +	struct reserved_mem *rmem[MAX_RESERVED_REGIONS];
> +	int count, i;
> +	struct resource *r;
> +
> +	if (!np)
> +		return -EINVAL;
> +
> +	struct device_node __free(device_node) *target = of_parse_phandle(np, "memory-region", idx);

Odd cleanup placement. Please read cleanup.h. Also please run checkpatch
because it told you this - marked it as ERROR.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ