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: <511A08D2.6010104@gaisler.com>
Date:	Tue, 12 Feb 2013 10:18:10 +0100
From:	Andreas Larsson <andreas@...sler.com>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	devicetree-discuss@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>
Subject: Re: [PATCH] of: Create function for counting number of phandles in
 a property

On 2013-02-11 00:58, Grant Likely wrote:
> This patch creates of_count_phandle_with_args(), a new function for
> counting the number of phandle+argument tuples in a given property. This
> is better than the existing method of parsing each phandle individually
> until parsing fails which is a horribly slow way to do the count.
>
> It also converts of_gpio_named_count() to use the new function instead
> of using the above described horrible method.
>
> This also requires the return value of of_gpio_count() &
> of_gpio_named_count() from 'unsigned int' to 'int' so that it can return
> an error code. All the users of that function are fixed up to correctly
> handle a negative return value.

One more thing: In of_spi_register_master() in drivers/spi.c the error 
code is put in the unsigned variable nb, leading to a huge nb and 
master->num_chipselect with following problems when of_gpio_named_count 
returns an error code.

Cheers,
Andreas Larsson

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ