diff mbox

[v2,06/11] pwm: sti: Add new driver for ST's PWM IP

Message ID 20140808073802.GC21618@lee--X1
State New
Headers show

Commit Message

Lee Jones Aug. 8, 2014, 7:38 a.m. UTC
On Thu, 07 Aug 2014, Thierry Reding wrote:
> On Mon, Jul 14, 2014 at 03:33:27PM +0100, Lee Jones wrote:
> [...]
> > +static int sti_pwm_probe(struct platform_device *pdev)
> > +{
> [...]
> > +	pc->clk = of_clk_get_by_name(np, "pwm");
> 
> This didn't compile because the np variable isn't declared. It was easy
> to fix up, so I did, but please be more careful next time that the
> patches you submit at least compile (preferably without sparse warnings
> of which I also fixed up a couple).

That's annoying, I thought I did build test the final changes.
However, there's a mistake in the Makefile meaning that it wasn't
building with no warning/error messages - it actually wasn't building
at all!  Sorry about that Thierry.

I guess if you can build the driver, you've already fixed that?


After that change, I can see that you're absolutely correct:

  CC      drivers/pwm/pwm-sti.o
../drivers/pwm/pwm-sti.c: In function ‘sti_pwm_config’:
../drivers/pwm/pwm-sti.c:202:3: warning:
  format ‘%lu’ expects argument of type ‘long unsigned int’, but
  argument 5 has type ‘int’ [-Wformat=]
     dev_dbg(dev, "prescale:%u, period:%lu, duty:%i, pwmvalx:%u\n",
     ^
../drivers/pwm/pwm-sti.c: In function ‘sti_pwm_probe’:
../drivers/pwm/pwm-sti.c:352:31: error: ‘np’ undeclared 
  pc->clk = of_clk_get_by_name(np, "pwm");
                               ^
Sorry for the fuss.

Comments

Thierry Reding Aug. 8, 2014, 9:46 a.m. UTC | #1
On Fri, Aug 08, 2014 at 08:38:02AM +0100, Lee Jones wrote:
> On Thu, 07 Aug 2014, Thierry Reding wrote:
> > On Mon, Jul 14, 2014 at 03:33:27PM +0100, Lee Jones wrote:
> > [...]
> > > +static int sti_pwm_probe(struct platform_device *pdev)
> > > +{
> > [...]
> > > +	pc->clk = of_clk_get_by_name(np, "pwm");
> > 
> > This didn't compile because the np variable isn't declared. It was easy
> > to fix up, so I did, but please be more careful next time that the
> > patches you submit at least compile (preferably without sparse warnings
> > of which I also fixed up a couple).
> 
> That's annoying, I thought I did build test the final changes.
> However, there's a mistake in the Makefile meaning that it wasn't
> building with no warning/error messages - it actually wasn't building
> at all!  Sorry about that Thierry.
> 
> I guess if you can build the driver, you've already fixed that?

Yes, it should be all taken care of in the PWM for-next branch.

Thierry
diff mbox

Patch

diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
index 878333a..79665e3 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
@@ -20,7 +20,7 @@  obj-$(CONFIG_PWM_PXA)         += pwm-pxa.o
 obj-$(CONFIG_PWM_RENESAS_TPU)  += pwm-renesas-tpu.o
 obj-$(CONFIG_PWM_SAMSUNG)      += pwm-samsung.o
 obj-$(CONFIG_PWM_SPEAR)                += pwm-spear.o
-obj-$(CONFIG_PWM_STI)          += pwm-st.o
+obj-$(CONFIG_PWM_STI)          += pwm-sti.o
 obj-$(CONFIG_PWM_TEGRA)                += pwm-tegra.o
 obj-$(CONFIG_PWM_TIECAP)       += pwm-tiecap.o
 obj-$(CONFIG_PWM_TIEHRPWM)     += pwm-tiehrpwm.o