ACPI / APEI: remove the unused dead-code for SEA/NMI notification type
authorDongjiu Geng <gengdongjiu@huawei.com>
Tue, 17 Oct 2017 08:02:20 +0000 (16:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:15 +0000 (14:26 +0100)
commit09807080a97cedc160bc42efd3e8c3a3b72a29c7
tree7cad67c3928c8ebf564caae105a203f3edd96657
parentaf02cd973d86cf3f6bd6eea928ccc9e70a4132d0
ACPI / APEI: remove the unused dead-code for SEA/NMI notification type

commit c49870e89f4d2c21c76ebe90568246bb0f3572b7 upstream.

For the SEA notification, the two functions ghes_sea_add() and
ghes_sea_remove() are only called when CONFIG_ACPI_APEI_SEA
is defined. If not, it will return errors in the ghes_probe()
and not continue. If the probe is failed, the ghes_sea_remove()
also has no chance to be called. Hence, remove the unnecessary
handling when CONFIG_ACPI_APEI_SEA is not defined.

For the NMI notification, it has the same issue as SEA notification,
so also remove the unused dead-code for it.

Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/apei/ghes.c