[v2,7/7] pinctrl: mcp23s08: remove unused variables from pinconf_set

Message ID 1507266491-73971-8-git-send-email-preid@electromag.com.au
State New
Headers show
Series
  • pinctrl: mcp32s08: add support for mcp23018
Related show

Commit Message

Phil Reid Oct. 6, 2017, 5:08 a.m.
Variable mask and val are not used in the mcp_pinconf_set().

Signed-off-by: Phil Reid <preid@electromag.com.au>
---
 drivers/pinctrl/pinctrl-mcp23s08.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Sebastian Reichel Oct. 8, 2017, 9:12 p.m. | #1
Hi,

On Fri, Oct 06, 2017 at 01:08:11PM +0800, Phil Reid wrote:
> Variable mask and val are not used in the mcp_pinconf_set().
> 
> Signed-off-by: Phil Reid <preid@electromag.com.au>

Thanks, those are leftovers from before I added mcp_set_bit.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> ---
>  drivers/pinctrl/pinctrl-mcp23s08.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
> index 8dceaa1..8e461cc 100644
> --- a/drivers/pinctrl/pinctrl-mcp23s08.c
> +++ b/drivers/pinctrl/pinctrl-mcp23s08.c
> @@ -279,8 +279,7 @@ static int mcp_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
>  {
>  	struct mcp23s08 *mcp = pinctrl_dev_get_drvdata(pctldev);
>  	enum pin_config_param param;
> -	u32 arg, mask;
> -	u16 val;
> +	u32 arg;
>  	int ret = 0;
>  	int i;
>  
> @@ -290,8 +289,6 @@ static int mcp_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
>  
>  		switch (param) {
>  		case PIN_CONFIG_BIAS_PULL_UP:
> -			val = arg ? 0xFFFF : 0x0000;
> -			mask = BIT(pin);
>  			ret = mcp_set_bit(mcp, MCP_GPPU, pin, arg);
>  			break;
>  		default:
> -- 
> 1.8.3.1
>
Linus Walleij Oct. 11, 2017, 8:19 a.m. | #2
On Fri, Oct 6, 2017 at 7:08 AM, Phil Reid <preid@electromag.com.au> wrote:

> Variable mask and val are not used in the mcp_pinconf_set().
>
> Signed-off-by: Phil Reid <preid@electromag.com.au>

Patch applied with Sebastian's ACK.

Please rebase the remaining patches on my devel branch
and focus on getting open drain and active high/low things
right.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
index 8dceaa1..8e461cc 100644
--- a/drivers/pinctrl/pinctrl-mcp23s08.c
+++ b/drivers/pinctrl/pinctrl-mcp23s08.c
@@ -279,8 +279,7 @@  static int mcp_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 {
 	struct mcp23s08 *mcp = pinctrl_dev_get_drvdata(pctldev);
 	enum pin_config_param param;
-	u32 arg, mask;
-	u16 val;
+	u32 arg;
 	int ret = 0;
 	int i;
 
@@ -290,8 +289,6 @@  static int mcp_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 
 		switch (param) {
 		case PIN_CONFIG_BIAS_PULL_UP:
-			val = arg ? 0xFFFF : 0x0000;
-			mask = BIT(pin);
 			ret = mcp_set_bit(mcp, MCP_GPPU, pin, arg);
 			break;
 		default: