All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pwm: atmel-tcb: use 'unsigned int' instead of 'unsigned'
@ 2022-06-08  1:06 Jilin Yuan
  2022-06-08  6:45   ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Jilin Yuan @ 2022-06-08  1:06 UTC (permalink / raw)
  To: thierry.reding, lee.jones
  Cc: u.kleine-koenig, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-pwm, linux-arm-kernel, linux-kernel,
	Jilin Yuan

Replace the 'unsigned' with 'unsigned int' which is more accurate.

Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
---
 drivers/pwm/pwm-atmel-tcb.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
index 3977a0f9d132..d6977e4e71f3 100644
--- a/drivers/pwm/pwm-atmel-tcb.c
+++ b/drivers/pwm/pwm-atmel-tcb.c
@@ -35,9 +35,9 @@
 
 struct atmel_tcb_pwm_device {
 	enum pwm_polarity polarity;	/* PWM polarity */
-	unsigned div;			/* PWM clock divider */
-	unsigned duty;			/* PWM duty expressed in clk cycles */
-	unsigned period;		/* PWM period expressed in clk cycles */
+	unsigned int div;			/* PWM clock divider */
+	unsigned int duty;			/* PWM duty expressed in clk cycles */
+	unsigned int period;		/* PWM period expressed in clk cycles */
 };
 
 struct atmel_tcb_channel {
@@ -85,7 +85,7 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip,
 {
 	struct atmel_tcb_pwm_chip *tcbpwmc = to_tcb_chip(chip);
 	struct atmel_tcb_pwm_device *tcbpwm;
-	unsigned cmr;
+	unsigned int cmr;
 	int ret;
 
 	tcbpwm = devm_kzalloc(chip->dev, sizeof(*tcbpwm), GFP_KERNEL);
@@ -150,7 +150,7 @@ static void atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 {
 	struct atmel_tcb_pwm_chip *tcbpwmc = to_tcb_chip(chip);
 	struct atmel_tcb_pwm_device *tcbpwm = tcbpwmc->pwms[pwm->hwpwm];
-	unsigned cmr;
+	unsigned int cmr;
 	enum pwm_polarity polarity = tcbpwm->polarity;
 
 	/*
@@ -295,9 +295,9 @@ static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	struct atmel_tcb_pwm_device *atcbpwm = NULL;
 	int i = 0;
 	int slowclk = 0;
-	unsigned period;
-	unsigned duty;
-	unsigned rate = clk_get_rate(tcbpwmc->clk);
+	unsigned int period;
+	unsigned int duty;
+	unsigned int rate = clk_get_rate(tcbpwmc->clk);
 	unsigned long long min;
 	unsigned long long max;
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pwm: atmel-tcb: use 'unsigned int' instead of 'unsigned'
  2022-06-08  1:06 [PATCH] pwm: atmel-tcb: use 'unsigned int' instead of 'unsigned' Jilin Yuan
@ 2022-06-08  6:45   ` Uwe Kleine-König
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2022-06-08  6:45 UTC (permalink / raw)
  To: Jilin Yuan
  Cc: linux-pwm, alexandre.belloni, linux-kernel, thierry.reding,
	lee.jones, claudiu.beznea, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1335 bytes --]

On Wed, Jun 08, 2022 at 09:06:07AM +0800, Jilin Yuan wrote:
> Replace the 'unsigned' with 'unsigned int' which is more accurate.

What was your motivation? To please checkpatch? Please mention this in
the commit log.

> Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
> ---
>  drivers/pwm/pwm-atmel-tcb.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
> index 3977a0f9d132..d6977e4e71f3 100644
> --- a/drivers/pwm/pwm-atmel-tcb.c
> +++ b/drivers/pwm/pwm-atmel-tcb.c
> @@ -35,9 +35,9 @@
>  
>  struct atmel_tcb_pwm_device {
>  	enum pwm_polarity polarity;	/* PWM polarity */
> -	unsigned div;			/* PWM clock divider */
> -	unsigned duty;			/* PWM duty expressed in clk cycles */
> -	unsigned period;		/* PWM period expressed in clk cycles */
> +	unsigned int div;			/* PWM clock divider */
> +	unsigned int duty;			/* PWM duty expressed in clk cycles */
> +	unsigned int period;		/* PWM period expressed in clk cycles */

Please reindent the comments such they keep to be aligned.

>  };
>  
>  struct atmel_tcb_channel {

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pwm: atmel-tcb: use 'unsigned int' instead of 'unsigned'
@ 2022-06-08  6:45   ` Uwe Kleine-König
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2022-06-08  6:45 UTC (permalink / raw)
  To: Jilin Yuan
  Cc: thierry.reding, lee.jones, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-pwm, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]

On Wed, Jun 08, 2022 at 09:06:07AM +0800, Jilin Yuan wrote:
> Replace the 'unsigned' with 'unsigned int' which is more accurate.

What was your motivation? To please checkpatch? Please mention this in
the commit log.

> Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com>
> ---
>  drivers/pwm/pwm-atmel-tcb.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
> index 3977a0f9d132..d6977e4e71f3 100644
> --- a/drivers/pwm/pwm-atmel-tcb.c
> +++ b/drivers/pwm/pwm-atmel-tcb.c
> @@ -35,9 +35,9 @@
>  
>  struct atmel_tcb_pwm_device {
>  	enum pwm_polarity polarity;	/* PWM polarity */
> -	unsigned div;			/* PWM clock divider */
> -	unsigned duty;			/* PWM duty expressed in clk cycles */
> -	unsigned period;		/* PWM period expressed in clk cycles */
> +	unsigned int div;			/* PWM clock divider */
> +	unsigned int duty;			/* PWM duty expressed in clk cycles */
> +	unsigned int period;		/* PWM period expressed in clk cycles */

Please reindent the comments such they keep to be aligned.

>  };
>  
>  struct atmel_tcb_channel {

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-08  7:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08  1:06 [PATCH] pwm: atmel-tcb: use 'unsigned int' instead of 'unsigned' Jilin Yuan
2022-06-08  6:45 ` Uwe Kleine-König
2022-06-08  6:45   ` Uwe Kleine-König

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.