From: Dan Carpenter <dan.carpenter@oracle.com>
To: weiyang@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org
Subject: [bug report] powerpc/powernv: Support EEH reset for VF PE
Date: Tue, 14 Feb 2017 16:39:44 +0300 [thread overview]
Message-ID: <20170214133944.GA24595@mwanda> (raw)
Hello Wei Yang,
The patch 9312bc5bab59: "powerpc/powernv: Support EEH reset for VF
PE" from Mar 4, 2016, leads to the following static checker warning:
arch/powerpc/platforms/powernv/eeh-powernv.c:1033 pnv_eeh_reset_vf_pe()
info: return a literal instead of 'ret'
arch/powerpc/platforms/powernv/eeh-powernv.c
1019 static int pnv_eeh_reset_vf_pe(struct eeh_pe *pe, int option)
1020 {
1021 struct eeh_dev *edev;
1022 struct pci_dn *pdn;
1023 int ret;
1024
1025 /* The VF PE should have only one child device */
1026 edev = list_first_entry_or_null(&pe->edevs, struct eeh_dev, list);
1027 pdn = eeh_dev_to_pdn(edev);
1028 if (!pdn)
1029 return -ENXIO;
1030
1031 ret = pnv_eeh_do_flr(pdn, option);
1032 if (!ret)
1033 return ret;
Presumably if pnv_eeh_do_flr() succeeds then we don't need to continue?
pnv_eeh_do_af_flr() is a fall back option? Doing a:
return 0;
Makes this more deliberate looking. Sometimes people get their if
statements reversed is the other option.
1034
1035 return pnv_eeh_do_af_flr(pdn, option);
1036 }
regards,
dan carpenter
next reply other threads:[~2017-02-14 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 13:39 Dan Carpenter [this message]
2017-02-14 23:25 ` [bug report] powerpc/powernv: Support EEH reset for VF PE Russell Currey
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=20170214133944.GA24595@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=weiyang@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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