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: <1302608488.3639.15.camel@jlt3.sipsolutions.net>
Date:	Tue, 12 Apr 2011 13:41:28 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Antonio Ospite <ospite@...denti.unina.it>
Cc:	linux-wireless@...r.kernel.org, openezx-devel@...ts.openezx.org,
	"John W . Linville" <linville@...driver.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org, Marek Vasut <marek.vasut@...il.com>,
	Guiming Zhuo <gmzhuo@...il.com>
Subject: Re: [PATCH v2] rfkill: Regulator consumer driver for rfkill

On Fri, 2011-04-08 at 12:59 +0200, Antonio Ospite wrote:
> Add a regulator consumer driver for rfkill to enable controlling radio
> transmitters connected to voltage regulators using the regulator
> framework.
> 
> A new "vrfkill" virtual supply is provided to use in platform code.
> 
> Signed-off-by: Guiming Zhuo <gmzhuo@...il.com>
> Signed-off-by: Antonio Ospite <ospite@...denti.unina.it>
> ---
> 
> Changes since v1:
> 
>   - changed "voltage regulator" to "voltage regulators" in the commit
>     message
> 
>   - drop rfkill_init_sw_state() as requested by Johannes Berg
> 
>   - moved assignment fields of rfkill_data _before_ rfkill_register(),
>     as the latter will call .set_block (via schedule_work()) which would
>     find NULL pointers for the .vcc and .rf_kill fields otherwise.
> 
>     This issue was masked when I was using rfkill_init_sw_state() which
>     was setting the persistent flag: rfkill_register() does not call
>     schedule_work() immediately when the persistent flag is set.
> 
>     So please take another look at this part of rfkill_regulator_probe().
> 
> Mark, I left in the RFKILL || !RFKILL part.
> 
> If there are no more comments, who is going to merge the driver, Johannes?

I don't have a tree, John can merge it, but I found a few more bugs:

> + * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = {
> + * 	{ .dev_name = "rfkill-regulator.0", supply = "vrfkill" },
> + * };

It's a comment, but it should be .supply = (missing the .)

> +	if (pdata->name == NULL || pdata->type == 0) {
> +		dev_err(&pdev->dev, "invalid name or type in platform data\n");
> +		return -EINVAL;
> +	}
> +
> +	vcc = regulator_get_exclusive(&pdev->dev, "vrfkill");

Wasn't that supposed to use pdata->supply? Actually, there's no member
"supply" in the struct?

> +	dev_info(&pdev->dev, "initialized\n");

Is that message really useful?

Other than that, looks good to me.

johannes

--
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