* [PATCH] pcie-rcar: fix some checkpatch warnings
@ 2016-09-08 22:26 Sergei Shtylyov
2016-09-13 15:17 ` Simon Horman
2016-09-14 21:18 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2016-09-08 22:26 UTC (permalink / raw)
To: horms, bhelgaas, linux-pci, linux-renesas-soc
The R-Car PCIe driver causes 13 warnings from scripts/checkpatch.pl --
let's fix at least 10 easier ones:
- line over 80 characters;
- blank line missing after declarations;
- statements not starting on a tabstop.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo plus
two patches posted earlier...
drivers/pci/host/pcie-rcar.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
Index: pci/drivers/pci/host/pcie-rcar.c
===================================================================
--- pci.orig/drivers/pci/host/pcie-rcar.c
+++ pci/drivers/pci/host/pcie-rcar.c
@@ -1034,12 +1034,16 @@ static int rcar_pcie_inbound_ranges(stru
* Set up 64-bit inbound regions as the range parser doesn't
* distinguish between 32 and 64-bit types.
*/
- rcar_pci_write_reg(pcie, lower_32_bits(pci_addr), PCIEPRAR(idx));
+ rcar_pci_write_reg(pcie, lower_32_bits(pci_addr),
+ PCIEPRAR(idx));
rcar_pci_write_reg(pcie, lower_32_bits(cpu_addr), PCIELAR(idx));
- rcar_pci_write_reg(pcie, lower_32_bits(mask) | flags, PCIELAMR(idx));
+ rcar_pci_write_reg(pcie, lower_32_bits(mask) | flags,
+ PCIELAMR(idx));
- rcar_pci_write_reg(pcie, upper_32_bits(pci_addr), PCIEPRAR(idx+1));
- rcar_pci_write_reg(pcie, upper_32_bits(cpu_addr), PCIELAR(idx+1));
+ rcar_pci_write_reg(pcie, upper_32_bits(pci_addr),
+ PCIEPRAR(idx + 1));
+ rcar_pci_write_reg(pcie, upper_32_bits(cpu_addr),
+ PCIELAR(idx + 1));
rcar_pci_write_reg(pcie, 0, PCIELAMR(idx + 1));
pci_addr += size;
@@ -1088,6 +1092,7 @@ static int rcar_pcie_parse_map_dma_range
/* Get the dma-ranges from DT */
for_each_of_pci_range(&parser, &range) {
u64 end = range.cpu_addr + range.size - 1;
+
dev_dbg(pcie->dev, "0x%08x 0x%016llx..0x%016llx -> 0x%016llx\n",
range.flags, range.cpu_addr, end, range.pci_addr);
@@ -1101,9 +1106,12 @@ static int rcar_pcie_parse_map_dma_range
static const struct of_device_id rcar_pcie_of_match[] = {
{ .compatible = "renesas,pcie-r8a7779", .data = rcar_pcie_hw_init_h1 },
- { .compatible = "renesas,pcie-rcar-gen2", .data = rcar_pcie_hw_init_gen2 },
- { .compatible = "renesas,pcie-r8a7790", .data = rcar_pcie_hw_init_gen2 },
- { .compatible = "renesas,pcie-r8a7791", .data = rcar_pcie_hw_init_gen2 },
+ { .compatible = "renesas,pcie-rcar-gen2",
+ .data = rcar_pcie_hw_init_gen2 },
+ { .compatible = "renesas,pcie-r8a7790",
+ .data = rcar_pcie_hw_init_gen2 },
+ { .compatible = "renesas,pcie-r8a7791",
+ .data = rcar_pcie_hw_init_gen2 },
{ .compatible = "renesas,pcie-r8a7795", .data = rcar_pcie_hw_init },
{},
};
@@ -1116,7 +1124,8 @@ static int rcar_pcie_parse_request_of_pc
resource_size_t iobase;
struct resource_entry *win;
- err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources, &iobase);
+ err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources,
+ &iobase);
if (err)
return err;
@@ -1167,8 +1176,8 @@ static int rcar_pcie_probe(struct platfo
return err;
}
- err = rcar_pcie_parse_map_dma_ranges(pcie, pdev->dev.of_node);
- if (err)
+ err = rcar_pcie_parse_map_dma_ranges(pcie, pdev->dev.of_node);
+ if (err)
return err;
of_id = of_match_device(rcar_pcie_of_match, pcie->dev);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pcie-rcar: fix some checkpatch warnings
2016-09-08 22:26 [PATCH] pcie-rcar: fix some checkpatch warnings Sergei Shtylyov
@ 2016-09-13 15:17 ` Simon Horman
2016-09-14 21:18 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2016-09-13 15:17 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: bhelgaas, linux-pci, linux-renesas-soc
On Fri, Sep 09, 2016 at 01:26:18AM +0300, Sergei Shtylyov wrote:
> The R-Car PCIe driver causes 13 warnings from scripts/checkpatch.pl --
> let's fix at least 10 easier ones:
>
> - line over 80 characters;
>
> - blank line missing after declarations;
>
> - statements not starting on a tabstop.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo plus
> two patches posted earlier...
This looks good to me.
Acked-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pcie-rcar: fix some checkpatch warnings
2016-09-08 22:26 [PATCH] pcie-rcar: fix some checkpatch warnings Sergei Shtylyov
2016-09-13 15:17 ` Simon Horman
@ 2016-09-14 21:18 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2016-09-14 21:18 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: horms, bhelgaas, linux-pci, linux-renesas-soc
On Fri, Sep 09, 2016 at 01:26:18AM +0300, Sergei Shtylyov wrote:
> The R-Car PCIe driver causes 13 warnings from scripts/checkpatch.pl --
> let's fix at least 10 easier ones:
>
> - line over 80 characters;
>
> - blank line missing after declarations;
>
> - statements not starting on a tabstop.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Applied with Simon's ack to pci/host-rcar, thanks!
> ---
> The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo plus
> two patches posted earlier...
>
> drivers/pci/host/pcie-rcar.c | 29 +++++++++++++++++++----------
> 1 file changed, 19 insertions(+), 10 deletions(-)
>
> Index: pci/drivers/pci/host/pcie-rcar.c
> ===================================================================
> --- pci.orig/drivers/pci/host/pcie-rcar.c
> +++ pci/drivers/pci/host/pcie-rcar.c
> @@ -1034,12 +1034,16 @@ static int rcar_pcie_inbound_ranges(stru
> * Set up 64-bit inbound regions as the range parser doesn't
> * distinguish between 32 and 64-bit types.
> */
> - rcar_pci_write_reg(pcie, lower_32_bits(pci_addr), PCIEPRAR(idx));
> + rcar_pci_write_reg(pcie, lower_32_bits(pci_addr),
> + PCIEPRAR(idx));
> rcar_pci_write_reg(pcie, lower_32_bits(cpu_addr), PCIELAR(idx));
> - rcar_pci_write_reg(pcie, lower_32_bits(mask) | flags, PCIELAMR(idx));
> + rcar_pci_write_reg(pcie, lower_32_bits(mask) | flags,
> + PCIELAMR(idx));
>
> - rcar_pci_write_reg(pcie, upper_32_bits(pci_addr), PCIEPRAR(idx+1));
> - rcar_pci_write_reg(pcie, upper_32_bits(cpu_addr), PCIELAR(idx+1));
> + rcar_pci_write_reg(pcie, upper_32_bits(pci_addr),
> + PCIEPRAR(idx + 1));
> + rcar_pci_write_reg(pcie, upper_32_bits(cpu_addr),
> + PCIELAR(idx + 1));
> rcar_pci_write_reg(pcie, 0, PCIELAMR(idx + 1));
>
> pci_addr += size;
> @@ -1088,6 +1092,7 @@ static int rcar_pcie_parse_map_dma_range
> /* Get the dma-ranges from DT */
> for_each_of_pci_range(&parser, &range) {
> u64 end = range.cpu_addr + range.size - 1;
> +
> dev_dbg(pcie->dev, "0x%08x 0x%016llx..0x%016llx -> 0x%016llx\n",
> range.flags, range.cpu_addr, end, range.pci_addr);
>
> @@ -1101,9 +1106,12 @@ static int rcar_pcie_parse_map_dma_range
>
> static const struct of_device_id rcar_pcie_of_match[] = {
> { .compatible = "renesas,pcie-r8a7779", .data = rcar_pcie_hw_init_h1 },
> - { .compatible = "renesas,pcie-rcar-gen2", .data = rcar_pcie_hw_init_gen2 },
> - { .compatible = "renesas,pcie-r8a7790", .data = rcar_pcie_hw_init_gen2 },
> - { .compatible = "renesas,pcie-r8a7791", .data = rcar_pcie_hw_init_gen2 },
> + { .compatible = "renesas,pcie-rcar-gen2",
> + .data = rcar_pcie_hw_init_gen2 },
> + { .compatible = "renesas,pcie-r8a7790",
> + .data = rcar_pcie_hw_init_gen2 },
> + { .compatible = "renesas,pcie-r8a7791",
> + .data = rcar_pcie_hw_init_gen2 },
> { .compatible = "renesas,pcie-r8a7795", .data = rcar_pcie_hw_init },
> {},
> };
> @@ -1116,7 +1124,8 @@ static int rcar_pcie_parse_request_of_pc
> resource_size_t iobase;
> struct resource_entry *win;
>
> - err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources, &iobase);
> + err = of_pci_get_host_bridge_resources(np, 0, 0xff, &pci->resources,
> + &iobase);
> if (err)
> return err;
>
> @@ -1167,8 +1176,8 @@ static int rcar_pcie_probe(struct platfo
> return err;
> }
>
> - err = rcar_pcie_parse_map_dma_ranges(pcie, pdev->dev.of_node);
> - if (err)
> + err = rcar_pcie_parse_map_dma_ranges(pcie, pdev->dev.of_node);
> + if (err)
> return err;
>
> of_id = of_match_device(rcar_pcie_of_match, pcie->dev);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-14 21:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-08 22:26 [PATCH] pcie-rcar: fix some checkpatch warnings Sergei Shtylyov
2016-09-13 15:17 ` Simon Horman
2016-09-14 21:18 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).