From: Daniel Axtens <dja@axtens•net>
To: Sam Bobroff <sam.bobroff@au1•ibm.com>, linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH 4/9] powerpc/eeh: Remove misleading test in eeh_handle_normal_event()
Date: Tue, 06 Mar 2018 13:14:43 +1100 [thread overview]
Message-ID: <87o9k2c5m4.fsf@linkitivity.dja.id.au> (raw)
In-Reply-To: <52c15c0414d248981e251386384ed2a716315003.1520294174.git.sam.bobroff@au1.ibm.com>
Sam Bobroff <sam.bobroff@au1•ibm.com> writes:
> Remove a test that checks if "frozen_bus" is NULL, because it cannot
> have changed since it was tested at the start of the function and so
> must be true here.
As far as I can tell this was added back in 2012 in 9b3c76f08122f. As
far as I can tell it couldn't be NULL back then either. Weird.
LGTM, but I'm not super comfortable chnging something I don't understand
so I will leave the formal review for now.
Regards,
Daniel
>
> Signed-off-by: Sam Bobroff <sam.bobroff@au1•ibm.com>
> ---
> arch/powerpc/kernel/eeh_driver.c | 24 +++++++++++-------------
> 1 file changed, 11 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
> index 5b7a5ed4db4d..04a5d9db5499 100644
> --- a/arch/powerpc/kernel/eeh_driver.c
> +++ b/arch/powerpc/kernel/eeh_driver.c
> @@ -930,20 +930,18 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
> * all removed devices correctly to avoid access
> * the their PCI config any more.
> */
> - if (frozen_bus) {
> - if (pe->type & EEH_PE_VF) {
> - eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL);
> - eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
> - } else {
> - eeh_pe_state_clear(pe, EEH_PE_PRI_BUS);
> - eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
> + if (pe->type & EEH_PE_VF) {
> + eeh_pe_dev_traverse(pe, eeh_rmv_device, NULL);
> + eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
> + } else {
> + eeh_pe_state_clear(pe, EEH_PE_PRI_BUS);
> + eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
>
> - pci_lock_rescan_remove();
> - pci_hp_remove_devices(frozen_bus);
> - pci_unlock_rescan_remove();
> - /* The passed PE should no longer be used */
> - return;
> - }
> + pci_lock_rescan_remove();
> + pci_hp_remove_devices(frozen_bus);
> + pci_unlock_rescan_remove();
> + /* The passed PE should no longer be used */
> + return;
> }
> final:
> eeh_pe_state_clear(pe, EEH_PE_RECOVERING);
> --
> 2.16.1.74.g9b0b1f47b
next prev parent reply other threads:[~2018-03-06 2:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-05 23:58 [PATCH 0/9] EEH refactoring 1 Sam Bobroff
2018-03-05 23:58 ` [PATCH 1/9] powerpc/eeh: Remove eeh_handle_event() Sam Bobroff
2018-03-06 0:44 ` Russell Currey
2018-03-06 1:08 ` Daniel Axtens
2018-03-05 23:58 ` [PATCH 2/9] powerpc/eeh: Manage EEH_PE_RECOVERING inside eeh_handle_normal_event() Sam Bobroff
2018-03-06 0:48 ` Russell Currey
2018-03-06 1:47 ` Daniel Axtens
2018-03-05 23:59 ` [PATCH 3/9] powerpc/eeh: Fix misleading comment in __eeh_addr_cache_get_device() Sam Bobroff
2018-03-06 0:49 ` Russell Currey
2018-03-05 23:59 ` [PATCH 4/9] powerpc/eeh: Remove misleading test in eeh_handle_normal_event() Sam Bobroff
2018-03-06 0:56 ` Russell Currey
2018-03-06 2:14 ` Daniel Axtens [this message]
2018-03-05 23:59 ` [PATCH 5/9] powerpc/eeh: Rename frozen_bus to bus " Sam Bobroff
2018-03-06 0:57 ` Russell Currey
2018-03-05 23:59 ` [PATCH 6/9] powerpc/eeh: Clarify arguments to eeh_reset_device() Sam Bobroff
2018-03-06 4:37 ` Russell Currey
2018-03-05 23:59 ` [PATCH 7/9] powerpc/eeh: Remove always-true tests in eeh_reset_device() Sam Bobroff
2018-03-06 4:38 ` Russell Currey
2018-03-05 23:59 ` [PATCH 8/9] powerpc/eeh: Factor out common code eeh_reset_device() Sam Bobroff
2018-03-06 5:48 ` Russell Currey
2018-03-06 0:00 ` [PATCH 9/9] powerpc/eeh: Add eeh_state_active() helper Sam Bobroff
2018-03-06 5:49 ` Russell Currey
2018-03-07 3:33 ` Sam Bobroff
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=87o9k2c5m4.fsf@linkitivity.dja.id.au \
--to=dja@axtens$(echo .)net \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=sam.bobroff@au1$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox