# \[PATCH v2\] powerpc/eeh: Remove duplicated check in eeh\_dump\_pe\_log()

- Subsystems: LINUX FOR POWERPC (32-BIT AND 64-BIT), PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC, THE REST
- Maintainers: Madhavan Srinivasan, Mahesh J Salgaonkar, Linus Torvalds
- Status: REVIEWED · 1 review, 1 by a maintainer (M Andrew Donnellan)
- Reviewed.
- 1 review trailer.
- List: linuxppc-dev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linuxppc-dev/2016/02/9488471/t

## \[PATCH v2\] powerpc/eeh: Remove duplicated check in eeh\_dump\_pe\_log()

- From: Gavin Shan \<hidden\>
- Date: 2016-02-26 00:15:02 
- Message: https://ratatoskr.run/linuxppc-dev/2016/02/9488471.md

```text
When eeh_dump_pe_log() is only called by eeh_slot_error_detail(),
we already have the check that the PE isn't in PCI config blocked
state in eeh_slot_error_detail(). So we needn't the duplicated
check in eeh_dump_pe_log().

This removes the duplicated check in eeh_dump_pe_log(). No logical
changes introduced.

Signed-off-by: Gavin Shan <redacted>
Reviewed-by: Andrew Donnellan <redacted>
---
v2: Improved commit log
---
 arch/powerpc/kernel/eeh.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 8c6005c..46b41be 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -268,13 +268,6 @@ static void *eeh_dump_pe_log(void *data, void *flag)
 	struct eeh_dev *edev, *tmp;
 	size_t *plen = flag;
 
-	/* If the PE's config space is blocked, 0xFF's will be
-	 * returned. It's pointless to collect the log in this
-	 * case.
-	 */
-	if (pe->state & EEH_PE_CFG_BLOCKED)
-		return NULL;
-
 	eeh_pe_for_each_dev(pe, edev, tmp)
 		*plen += eeh_dump_dev_log(edev, pci_regs_buf + *plen,
 					  EEH_PCI_REGS_LOG_LEN - *plen);
-- 
2.1.0
```

## Re: \[v2\] powerpc/eeh: Remove duplicated check in eeh\_dump\_pe\_log()

- From: Michael Ellerman \<mpe@ellerman.id.au\>
- Date: 2016-03-09 12:51:39 
- Message: https://ratatoskr.run/linuxppc-dev/2016/03/9488812.md

```text
On Fri, 2016-26-02 at 00:14:00 UTC, Gavin Shan wrote:
> When eeh_dump_pe_log() is only called by eeh_slot_error_detail(),
> we already have the check that the PE isn't in PCI config blocked
> state in eeh_slot_error_detail(). So we needn't the duplicated
> check in eeh_dump_pe_log().
> 
> This removes the duplicated check in eeh_dump_pe_log(). No logical
> changes introduced.
> 
> Signed-off-by: Gavin Shan <redacted>
> Reviewed-by: Andrew Donnellan <redacted>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/b6c7347f2f6176fa3225903fbf

cheers
```
