All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <p.yadav@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH 02/11] pinctrl: single: fix the loop counter variable type
Date: Mon, 25 Jan 2021 22:23:47 +0530	[thread overview]
Message-ID: <20210125165345.dfmjijfmiukdn4i4@ti.com> (raw)
In-Reply-To: <20210123182711.7177-3-dariobin@libero.it>

Hi Dario,

On 23/01/21 07:27PM, Dario Binacchi wrote:
> The patch changes the variable 'n' type from phys_addr_t to int.

This information can very easily be obtained by reading the diff. The 
commit message should also explain _why_ the change is made. For example 
here it would be a good idea to add something like:

  n is used as a loop counter, not as a physical address, and is used in 
  a comparison with an int. So it makes sense to set its type to int.
 
Other than that,

Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> ---
> 
>  drivers/pinctrl/pinctrl-single.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index c9a6c272bf..49ed15211d 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -75,8 +75,8 @@ static int single_configure_pins(struct udevice *dev,
>  				 int size)
>  {
>  	struct single_pdata *pdata = dev_get_plat(dev);
> -	int count = size / sizeof(struct single_fdt_pin_cfg);
> -	phys_addr_t n, reg;
> +	int n, count = size / sizeof(struct single_fdt_pin_cfg);
> +	phys_addr_t reg;
>  	u32 val;
>  
>  	for (n = 0; n < count; n++, pins++) {
> @@ -109,8 +109,8 @@ static int single_configure_bits(struct udevice *dev,
>  				 int size)
>  {
>  	struct single_pdata *pdata = dev_get_plat(dev);
> -	int count = size / sizeof(struct single_fdt_bits_cfg);
> -	phys_addr_t n, reg;
> +	int n, count = size / sizeof(struct single_fdt_bits_cfg);
> +	phys_addr_t reg;
>  	u32 val, mask;
>  
>  	for (n = 0; n < count; n++, pins++) {
> -- 
> 2.17.1
> 

-- 
Regards,
Pratyush Yadav
Texas Instruments India

  parent reply	other threads:[~2021-01-25 16:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 18:27 [PATCH 00/11] Add support for pinmux status command on beaglebone Dario Binacchi
2021-01-23 18:27 ` [PATCH 01/11] pinctrl: single: fix format of structure documentation Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-23 18:27 ` [PATCH 02/11] pinctrl: single: fix the loop counter variable type Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-25 16:53   ` Pratyush Yadav [this message]
2021-01-23 18:27 ` [PATCH 03/11] pinctrl: single: fix debug messages formatting Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-25 17:09   ` Pratyush Yadav
2021-01-26 11:20     ` Dario Binacchi
2021-01-27  9:29       ` Pratyush Yadav
2021-01-23 18:27 ` [PATCH 04/11] pinctrl: single: get register area size by device API Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-23 18:27 ` [PATCH 05/11] pinctrl: single: check "register-width" DT property Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-23 18:27 ` [PATCH 06/11] pinctrl: single: change function mask default value Dario Binacchi
2021-01-23 18:27 ` [PATCH 07/11] pinctrl: single: use function pointer for register access Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-24 16:50     ` Dario Binacchi
2021-01-24 18:00       ` Simon Glass
2021-01-23 18:27 ` [PATCH 08/11] pinctrl: single: add get_pins_count operation Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-23 18:27 ` [PATCH 09/11] pinctrl: single: add get_pin_name operation Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-23 18:27 ` [PATCH 10/11] pinctrl: single: add get_pin_muxing operation Dario Binacchi
2021-01-24  2:03   ` Simon Glass
2021-01-26 11:28     ` Dario Binacchi
2021-02-01 20:38       ` Simon Glass
2021-01-23 18:27 ` [PATCH 11/11] test: pinmux: add test for 'pinctrl-single' driver Dario Binacchi
2021-01-24  2:03   ` Simon Glass

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=20210125165345.dfmjijfmiukdn4i4@ti.com \
    --to=p.yadav@ti.com \
    --cc=u-boot@lists.denx.de \
    /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.