[V3,2/6] PCI: rcar: Replace unsigned long with u32 in register accessors
diff mbox series

Message ID 20190323015359.7231-2-marek.vasut@gmail.com
State Superseded
Headers show
Series
  • [V3,1/6] PCI: rcar: Clean up remaining macros defining bits
Related show

Commit Message

Marek Vasut March 23, 2019, 1:53 a.m. UTC
From: Marek Vasut <marek.vasut+renesas@gmail.com>

Replace unsigned long with u32 in register accessor functions,
since they access 32bit registers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-renesas-soc@vger.kernel.org
To: linux-pci@vger.kernel.org
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
V2: Bundle this patch with other cleanups before resending
V3: Add Wolfram's R-B
---
 drivers/pci/controller/pcie-rcar.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Geert Uytterhoeven March 25, 2019, 8:07 a.m. UTC | #1
Hi Marek,

On Sat, Mar 23, 2019 at 2:54 AM <marek.vasut@gmail.com> wrote:
> From: Marek Vasut <marek.vasut+renesas@gmail.com>
>
> Replace unsigned long with u32 in register accessor functions,
> since they access 32bit registers.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Phil Edworthy <phil.edworthy@renesas.com>
> Cc: Simon Horman <horms+renesas@verge.net.au>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: linux-renesas-soc@vger.kernel.org
> To: linux-pci@vger.kernel.org
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> V2: Bundle this patch with other cleanups before resending
> V3: Add Wolfram's R-B

Forgot mine?
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/drivers/pci/controller/pcie-rcar.c
> +++ b/drivers/pci/controller/pcie-rcar.c
> @@ -152,14 +152,12 @@ struct rcar_pcie {
>         struct                  rcar_msi msi;
>  };
>
> -static void rcar_pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
> -                              unsigned long reg)
> +static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val, u32 reg)

reg is is not a register value, but a simple integer offset.

>  {
>         writel(val, pcie->base + reg);
>  }
>
> -static unsigned long rcar_pci_read_reg(struct rcar_pcie *pcie,
> -                                      unsigned long reg)
> +static u32 rcar_pci_read_reg(struct rcar_pcie *pcie, u32 reg)

Likewise.

>  {
>         return readl(pcie->base + reg);
>  }

Gr{oetje,eeting}s,

                        Geert
Marek Vasut March 25, 2019, 11:24 a.m. UTC | #2
On 3/25/19 9:07 AM, Geert Uytterhoeven wrote:
> Hi Marek,
> 
> On Sat, Mar 23, 2019 at 2:54 AM <marek.vasut@gmail.com> wrote:
>> From: Marek Vasut <marek.vasut+renesas@gmail.com>
>>
>> Replace unsigned long with u32 in register accessor functions,
>> since they access 32bit registers.
>>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
>> Cc: Phil Edworthy <phil.edworthy@renesas.com>
>> Cc: Simon Horman <horms+renesas@verge.net.au>
>> Cc: Wolfram Sang <wsa@the-dreams.de>
>> Cc: linux-renesas-soc@vger.kernel.org
>> To: linux-pci@vger.kernel.org
>> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>> ---
>> V2: Bundle this patch with other cleanups before resending
>> V3: Add Wolfram's R-B
> 
> Forgot mine?
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
>> --- a/drivers/pci/controller/pcie-rcar.c
>> +++ b/drivers/pci/controller/pcie-rcar.c
>> @@ -152,14 +152,12 @@ struct rcar_pcie {
>>         struct                  rcar_msi msi;
>>  };
>>
>> -static void rcar_pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
>> -                              unsigned long reg)
>> +static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val, u32 reg)
> 
> reg is is not a register value, but a simple integer offset.
> 
>>  {
>>         writel(val, pcie->base + reg);
>>  }
>>
>> -static unsigned long rcar_pci_read_reg(struct rcar_pcie *pcie,
>> -                                      unsigned long reg)
>> +static u32 rcar_pci_read_reg(struct rcar_pcie *pcie, u32 reg)
> 
> Likewise.

Sure

Patch
diff mbox series

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 5b8736f0cd6b..1408c8aa758b 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -152,14 +152,12 @@  struct rcar_pcie {
 	struct			rcar_msi msi;
 };
 
-static void rcar_pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
-			       unsigned long reg)
+static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val, u32 reg)
 {
 	writel(val, pcie->base + reg);
 }
 
-static unsigned long rcar_pci_read_reg(struct rcar_pcie *pcie,
-				       unsigned long reg)
+static u32 rcar_pci_read_reg(struct rcar_pcie *pcie, u32 reg)
 {
 	return readl(pcie->base + reg);
 }