staging: mt7621-pinctrl: Align to fix warnings of line over 80 characters
Subsystems (2)
PATCH 1/1 staging: mt7621-pinctrl: Align to fix warnings of line over 80 characters
Issue found by checkpatch.
Signed-off-by Sandesh Kenjana Ashok <[email protected]>
--- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +6 -5
@@ -159,7 +159,8 @@ static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev, }static int rt2880_pmx_group_gpio_request_enable (struct pinctrl_dev *pctrldev, -struct pinctrl_gpio_range *range, +struct pinctrl_gpio_range + *range,unsigned int pin) {struct rt2880_priv *p =pinctrl_dev_get_drvdata (pctrldev);
@@ -218,10 +219,10 @@ static int rt2880_pinmux_index(struct rt2880_priv *p) p->func_count++;/* allocate our function and group mapping index buffers */ - f = p->func =devm_kcalloc (p->dev, - p->func_count, -sizeof (struct rt2880_pmx_func ), -GFP_KERNEL ); + f = p->func; + p->func =devm_kcalloc (p->dev, p->func_count, +sizeof (struct rt2880_pmx_func ),GFP_KERNEL ); + gpio_func.groups =devm_kcalloc (p->dev, p->group_count,sizeof (int ),GFP_KERNEL );if (!f || !gpio_func.groups)
Signature · 1 line
2.17.1
Greg Kroah-Hartman
maintainerQuoted 12 lines · Sandesh Kenjana Ashok
Issue found by checkpatch.
Signed-off-by Sandesh Kenjana Ashok <[email protected]>--- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +0
-0
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev, · line 163
Quoted 6 lines
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +2
-1@@ -159,7 +159,8 @@ static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev, } static int rt2880_pmx_group_gpio_request_enable(struct pinctrl_dev *pctrldev, - struct pinctrl_gpio_range *range, + struct pinctrl_gpio_range + *range,
Ick, that looks worse now, right? checkpatch is a guideline, not a hard-and-fast rule here.
Quoted 5 lines
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +0
-0unsigned int pin) {struct rt2880_priv *p =pinctrl_dev_get_drvdata (pctrldev);@@ -218,10 +219,10 @@ static int rt2880_pinmux_index(struct rt2880_priv *p) p->func_count++;
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c static int rt2880_pinmux_index(struct rt2880_priv *p) · line 225
Quoted 10 lines
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +4
-4/* allocate our function and group mapping index buffers */ - f = p->func =devm_kcalloc (p->dev, - p->func_count, -sizeof (struct rt2880_pmx_func ), -GFP_KERNEL ); + f = p->func; + p->func =devm_kcalloc (p->dev, p->func_count, +sizeof (struct rt2880_pmx_func ),GFP_KERNEL ); +
You broke the code here :(
Please learn a bit more about how C works before attempting to work on kernel code.
thanks,
greg k-h