diff mbox

[v4,8/9] pwm: sunxi: Code cleanup.

Message ID 1487914876-8594-9-git-send-email-lis8215@gmail.com
State Deferred
Headers show

Commit Message

Siarhei Volkau Feb. 24, 2017, 5:41 a.m. UTC
From: Siarhei Volkau <lis8215@gmail.com>

This patch removes macros, which are not use anymore and
fixes two extra -Wsign-compare warnings.

Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
---
 drivers/pwm/pwm-sun4i.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Comments

Maxime Ripard Feb. 27, 2017, 9:32 a.m. UTC | #1
On Fri, Feb 24, 2017 at 08:41:15AM +0300, lis8215@gmail.com wrote:
> From: Siarhei Volkau <lis8215@gmail.com>
> 
> This patch removes macros, which are not use anymore and
> fixes two extra -Wsign-compare warnings.
> 
> Signed-off-by: Siarhei Volkau <lis8215@gmail.com>

You've been adding this code in your previous patches, why is that
even added there?

Maxime
Siarhei Volkau Feb. 27, 2017, 1:21 p.m. UTC | #2
Hi,

2017-02-27 12:32 GMT+03:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> On Fri, Feb 24, 2017 at 08:41:15AM +0300, lis8215@gmail.com wrote:
>> From: Siarhei Volkau <lis8215@gmail.com>
>>
>> This patch removes macros, which are not use anymore and
>> fixes two extra -Wsign-compare warnings.
>>
>> Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
>
> You've been adding this code in your previous patches, why is that
> even added there?
>
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

Are you mean there are no needs in separate patch for that?

Siarhei
--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard Feb. 28, 2017, 3:49 p.m. UTC | #3
On Mon, Feb 27, 2017 at 04:21:49PM +0300, Siarhei Volkau wrote:
> Hi,
> 
> 2017-02-27 12:32 GMT+03:00 Maxime Ripard <maxime.ripard@free-electrons.com>:
> > On Fri, Feb 24, 2017 at 08:41:15AM +0300, lis8215@gmail.com wrote:
> >> From: Siarhei Volkau <lis8215@gmail.com>
> >>
> >> This patch removes macros, which are not use anymore and
> >> fixes two extra -Wsign-compare warnings.
> >>
> >> Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
> >
> > You've been adding this code in your previous patches, why is that
> > even added there?
> >
> > Maxime
> >
> > --
> > Maxime Ripard, Free Electrons
> > Embedded Linux and Kernel engineering
> > http://free-electrons.com
> 
> Are you mean there are no needs in separate patch for that?

Yes

Maxime
diff mbox

Patch

diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
index e474303..37fc746 100644
--- a/drivers/pwm/pwm-sun4i.c
+++ b/drivers/pwm/pwm-sun4i.c
@@ -28,17 +28,8 @@ 
 
 #define PWMCH_OFFSET		15
 #define PWM_PRESCAL_MASK	GENMASK(3, 0)
-#define PWM_PRESCAL_OFF		0
 #define PWM_EN			BIT(4)
-#define PWM_ACT_STATE		BIT(5)
 #define PWM_CLK_GATING		BIT(6)
-#define PWM_MODE		BIT(7)
-#define PWM_PULSE		BIT(8)
-#define PWM_BYPASS		BIT(9)
-
-#define PWM_RDY_BASE		28
-#define PWM_RDY_OFFSET		1
-#define PWM_RDY(ch)		BIT(PWM_RDY_BASE + PWM_RDY_OFFSET * (ch))
 
 #define PWM_PRD(prd)		(((prd) - 1) << 16)
 #define PWM_PRD_MASK		GENMASK(15, 0)
@@ -539,7 +530,8 @@  static int sun4i_pwm_probe(struct platform_device *pdev)
 	struct resource *res;
 	void __iomem *base;
 	u32 val;
-	int i, ret;
+	int ret;
+	unsigned int i;
 	const struct of_device_id *match;
 
 	match = of_match_device(sun4i_pwm_dt_ids, &pdev->dev);