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: <20150318073218.GF3318@x1>
Date:	Wed, 18 Mar 2015 07:32:18 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND] mfd: stw481x: Remove unused fields from struct
 stw481x

On Wed, 18 Mar 2015, Axel Lin wrote:

> The mutex lock is not used at all, remove it.
> The *vmmc_regulator is not necessary, use a local variable in
> stw481x_vmmc_regulator_probe() instead.
> 
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> Acked-by: Lee Jones <lee.jones@...aro.org>
> ---
> Hi Mark,
> Lee prefers this patch to be applied via regulator tree,
> so I resend this to you.

I think the subject is misleading, which is causing Mark to miss your
patch.  In my mind this is a Regulator patch, not an MFD one.

>  drivers/regulator/stw481x-vmmc.c | 8 ++++----
>  include/linux/mfd/stw481x.h      | 4 ----
>  2 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/regulator/stw481x-vmmc.c b/drivers/regulator/stw481x-vmmc.c
> index 89025f5..7d2ae3e 100644
> --- a/drivers/regulator/stw481x-vmmc.c
> +++ b/drivers/regulator/stw481x-vmmc.c
> @@ -56,6 +56,7 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev)
>  {
>  	struct stw481x *stw481x = dev_get_platdata(&pdev->dev);
>  	struct regulator_config config = { };
> +	struct regulator_dev *rdev;
>  	int ret;
>  
>  	/* First disable the external VMMC if it's active */
> @@ -75,12 +76,11 @@ static int stw481x_vmmc_regulator_probe(struct platform_device *pdev)
>  						      pdev->dev.of_node,
>  						      &vmmc_regulator);
>  
> -	stw481x->vmmc_regulator = devm_regulator_register(&pdev->dev,
> -						&vmmc_regulator, &config);
> -	if (IS_ERR(stw481x->vmmc_regulator)) {
> +	rdev = devm_regulator_register(&pdev->dev, &vmmc_regulator, &config);
> +	if (IS_ERR(rdev)) {
>  		dev_err(&pdev->dev,
>  			"error initializing STw481x VMMC regulator\n");
> -		return PTR_ERR(stw481x->vmmc_regulator);
> +		return PTR_ERR(rdev);
>  	}
>  
>  	dev_info(&pdev->dev, "initialized STw481x VMMC regulator\n");
> diff --git a/include/linux/mfd/stw481x.h b/include/linux/mfd/stw481x.h
> index eda1215..833074b 100644
> --- a/include/linux/mfd/stw481x.h
> +++ b/include/linux/mfd/stw481x.h
> @@ -41,15 +41,11 @@
>  
>  /**
>   * struct stw481x - state holder for the Stw481x drivers
> - * @mutex: mutex to serialize I2C accesses
>   * @i2c_client: corresponding I2C client
> - * @regulator: regulator device for regulator children
>   * @map: regmap handle to access device registers
>   */
>  struct stw481x {
> -	struct mutex		lock;
>  	struct i2c_client	*client;
> -	struct regulator_dev	*vmmc_regulator;
>  	struct regmap		*map;
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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