提交 68ed3ef9 编写于 作者: A Alexey Kardashevskiy 提交者: Xie XiuQi

powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status

[ Upstream commit c20577014f85f36d4e137d3d52a1f61225b4a3d2 ]

The current implementation of the OPAL_PCI_EEH_FREEZE_STATUS call in
skiboot's NPU driver does not touch the pci_error_type parameter so
it might have garbage but the powernv code analyzes it nevertheless.

This initializes pcierr and fstate to zero in all call sites.
Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: NSam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ab80e8d8
...@@ -578,8 +578,8 @@ static void pnv_eeh_get_phb_diag(struct eeh_pe *pe) ...@@ -578,8 +578,8 @@ static void pnv_eeh_get_phb_diag(struct eeh_pe *pe)
static int pnv_eeh_get_phb_state(struct eeh_pe *pe) static int pnv_eeh_get_phb_state(struct eeh_pe *pe)
{ {
struct pnv_phb *phb = pe->phb->private_data; struct pnv_phb *phb = pe->phb->private_data;
u8 fstate; u8 fstate = 0;
__be16 pcierr; __be16 pcierr = 0;
s64 rc; s64 rc;
int result = 0; int result = 0;
...@@ -617,8 +617,8 @@ static int pnv_eeh_get_phb_state(struct eeh_pe *pe) ...@@ -617,8 +617,8 @@ static int pnv_eeh_get_phb_state(struct eeh_pe *pe)
static int pnv_eeh_get_pe_state(struct eeh_pe *pe) static int pnv_eeh_get_pe_state(struct eeh_pe *pe)
{ {
struct pnv_phb *phb = pe->phb->private_data; struct pnv_phb *phb = pe->phb->private_data;
u8 fstate; u8 fstate = 0;
__be16 pcierr; __be16 pcierr = 0;
s64 rc; s64 rc;
int result; int result;
......
...@@ -605,8 +605,8 @@ static int pnv_ioda_unfreeze_pe(struct pnv_phb *phb, int pe_no, int opt) ...@@ -605,8 +605,8 @@ static int pnv_ioda_unfreeze_pe(struct pnv_phb *phb, int pe_no, int opt)
static int pnv_ioda_get_pe_state(struct pnv_phb *phb, int pe_no) static int pnv_ioda_get_pe_state(struct pnv_phb *phb, int pe_no)
{ {
struct pnv_ioda_pe *slave, *pe; struct pnv_ioda_pe *slave, *pe;
u8 fstate, state; u8 fstate = 0, state;
__be16 pcierr; __be16 pcierr = 0;
s64 rc; s64 rc;
/* Sanity check on PE number */ /* Sanity check on PE number */
......
...@@ -602,8 +602,8 @@ static void pnv_pci_handle_eeh_config(struct pnv_phb *phb, u32 pe_no) ...@@ -602,8 +602,8 @@ static void pnv_pci_handle_eeh_config(struct pnv_phb *phb, u32 pe_no)
static void pnv_pci_config_check_eeh(struct pci_dn *pdn) static void pnv_pci_config_check_eeh(struct pci_dn *pdn)
{ {
struct pnv_phb *phb = pdn->phb->private_data; struct pnv_phb *phb = pdn->phb->private_data;
u8 fstate; u8 fstate = 0;
__be16 pcierr; __be16 pcierr = 0;
unsigned int pe_no; unsigned int pe_no;
s64 rc; s64 rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册