* [PATCH] PCI: altera: Adjust indentation in altera_pcie_valid_device
@ 2019-12-18 1:27 Nathan Chancellor
2019-12-18 2:30 ` Tan, Ley Foon
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2019-12-18 1:27 UTC (permalink / raw)
To: Ley Foon Tan, Lorenzo Pieralisi, Bjorn Helgaas
Cc: Andrew Murray, rfi, linux-pci, linux-kernel, clang-built-linux,
Nathan Chancellor
Clang warns:
../drivers/pci/controller/pcie-altera.c:196:3: warning: misleading
indentation; statement is not part of the previous 'if'
[-Wmisleading-indentation]
return true;
^
../drivers/pci/controller/pcie-altera.c:193:2: note: previous statement
is here
if (bus->number == pcie->root_bus_nr && dev > 0)
^
1 warning generated.
This warning occurs because there is a space after the tab on this line.
Remove it so that the indentation is consistent with the Linux kernel
coding style and clang no longer warns.
Fixes: eaa6111b70a7 ("PCI: altera: Add Altera PCIe host controller driver")
Link: https://github.com/ClangBuiltLinux/linux/issues/815
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/pci/controller/pcie-altera.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c
index b447c3e4abad..24cb1c331058 100644
--- a/drivers/pci/controller/pcie-altera.c
+++ b/drivers/pci/controller/pcie-altera.c
@@ -193,7 +193,7 @@ static bool altera_pcie_valid_device(struct altera_pcie *pcie,
if (bus->number == pcie->root_bus_nr && dev > 0)
return false;
- return true;
+ return true;
}
static int tlp_read_packet(struct altera_pcie *pcie, u32 *value)
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] PCI: altera: Adjust indentation in altera_pcie_valid_device
2019-12-18 1:27 [PATCH] PCI: altera: Adjust indentation in altera_pcie_valid_device Nathan Chancellor
@ 2019-12-18 2:30 ` Tan, Ley Foon
0 siblings, 0 replies; 2+ messages in thread
From: Tan, Ley Foon @ 2019-12-18 2:30 UTC (permalink / raw)
To: Nathan Chancellor, Lorenzo Pieralisi, Bjorn Helgaas
Cc: Andrew Murray, rfi, linux-pci, linux-kernel, clang-built-linux
> -----Original Message-----
> From: Nathan Chancellor <natechancellor@gmail.com>
> Sent: Wednesday, December 18, 2019 9:28 AM
> To: Ley Foon Tan <lftan@altera.com>; Lorenzo Pieralisi
> <lorenzo.pieralisi@arm.com>; Bjorn Helgaas <bhelgaas@google.com>
> Cc: Andrew Murray <andrew.murray@arm.com>; rfi@lists.rocketboards.org;
> linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org; clang-built-
> linux@googlegroups.com; Nathan Chancellor <natechancellor@gmail.com>
> Subject: [PATCH] PCI: altera: Adjust indentation in altera_pcie_valid_device
>
> Clang warns:
>
> ../drivers/pci/controller/pcie-altera.c:196:3: warning: misleading indentation;
> statement is not part of the previous 'if'
> [-Wmisleading-indentation]
> return true;
> ^
> ../drivers/pci/controller/pcie-altera.c:193:2: note: previous statement is here
> if (bus->number == pcie->root_bus_nr && dev > 0)
> ^
> 1 warning generated.
>
> This warning occurs because there is a space after the tab on this line.
> Remove it so that the indentation is consistent with the Linux kernel coding
> style and clang no longer warns.
>
> Fixes: eaa6111b70a7 ("PCI: altera: Add Altera PCIe host controller driver")
> Link: https://github.com/ClangBuiltLinux/linux/issues/815
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Thanks.
Regards
Ley Foon
> ---
> drivers/pci/controller/pcie-altera.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-
> altera.c
> index b447c3e4abad..24cb1c331058 100644
> --- a/drivers/pci/controller/pcie-altera.c
> +++ b/drivers/pci/controller/pcie-altera.c
> @@ -193,7 +193,7 @@ static bool altera_pcie_valid_device(struct
> altera_pcie *pcie,
> if (bus->number == pcie->root_bus_nr && dev > 0)
> return false;
>
> - return true;
> + return true;
> }
>
> static int tlp_read_packet(struct altera_pcie *pcie, u32 *value)
> --
> 2.24.1
>
>
> ________________________________
>
> Confidentiality Notice.
> This message may contain information that is confidential or otherwise
> protected from disclosure. If you are not the intended recipient, you are
> hereby notified that any use, disclosure, dissemination, distribution, or
> copying of this message, or any attachments, is strictly prohibited. If you
> have received this message in error, please advise the sender by reply e-mail,
> and delete the message and any attachments. Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-18 2:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 1:27 [PATCH] PCI: altera: Adjust indentation in altera_pcie_valid_device Nathan Chancellor
2019-12-18 2:30 ` Tan, Ley Foon
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).