All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel@stlinux.com,
	linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
	ajitpal.singh@st.com
Subject: Re: [PATCH v2 06/11] pwm: sti: Add new driver for ST's PWM IP
Date: Fri, 8 Aug 2014 08:38:02 +0100	[thread overview]
Message-ID: <20140808073802.GC21618@lee--X1> (raw)
In-Reply-To: <20140807142344.GA11095@ulmo.nvidia.com>

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?

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

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.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ@public.gmane.org,
	linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ajitpal.singh-qxv4g6HH51o@public.gmane.org
Subject: Re: [PATCH v2 06/11] pwm: sti: Add new driver for ST's PWM IP
Date: Fri, 8 Aug 2014 08:38:02 +0100	[thread overview]
Message-ID: <20140808073802.GC21618@lee--X1> (raw)
In-Reply-To: <20140807142344.GA11095-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>

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?

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

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.

-- 
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 devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 06/11] pwm: sti: Add new driver for ST's PWM IP
Date: Fri, 8 Aug 2014 08:38:02 +0100	[thread overview]
Message-ID: <20140808073802.GC21618@lee--X1> (raw)
In-Reply-To: <20140807142344.GA11095@ulmo.nvidia.com>

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?

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

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.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-08-08  7:38 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 14:33 [PATCH v2 00/11] pwm: Introduce ST's PWM driver Lee Jones
2014-07-14 14:33 ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 01/11] ARM: stih407: Add DT nodes for for PWM Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 02/11] ARM: stih416: Add Pinctrl settings " Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 03/11] ARM: stih416: Add DT nodes " Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 04/11] ARM: stih416-b2020e: Enable PWM on the B2020 Rev-E Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 05/11] ARM: multi_v7_defconfig: Enable ST's PWM driver Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 06/11] pwm: sti: Add new driver for ST's PWM IP Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-08-07 14:23   ` Thierry Reding
2014-08-07 14:23     ` Thierry Reding
2014-08-07 14:23     ` Thierry Reding
2014-08-08  7:38     ` Lee Jones [this message]
2014-08-08  7:38       ` Lee Jones
2014-08-08  7:38       ` Lee Jones
2014-08-08  9:46       ` Thierry Reding
2014-08-08  9:46         ` Thierry Reding
2014-07-14 14:33 ` [PATCH v2 07/11] pwm: sti: Supply Device Tree binding documentation " Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 08/11] pwm: st: Fix PWM prescaler handling Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 09/11] pwm: sti: Ensure same period values for all channels Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-08-07 14:24   ` Thierry Reding
2014-08-07 14:24     ` Thierry Reding
2014-07-14 14:33 ` [PATCH v2 10/11] pwm: sti: Sync between enable/disable calls Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-14 14:33 ` [PATCH v2 11/11] pwm: sti: Remove PWM period table Lee Jones
2014-07-14 14:33   ` Lee Jones
2014-07-21 12:39 ` [PATCH v2 00/11] pwm: Introduce ST's PWM driver Lee Jones
2014-07-21 12:39   ` Lee Jones
2014-08-07 13:20   ` Thierry Reding
2014-08-07 13:20     ` Thierry Reding
2014-08-07 13:54     ` Lee Jones
2014-08-07 13:54       ` Lee Jones
2014-08-07 13:55       ` Thierry Reding
2014-08-07 13:55         ` Thierry Reding
2014-08-07 13:55         ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140808073802.GC21618@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=ajitpal.singh@st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@stlinux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.