Message ID | 20190130200521.9245-1-vishal.l.verma@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4d93fd178f39645529c360ad134bbb82a6eb19c2 |
Headers | show |
Series | [ndctl] libndctl: Fix the failure interpretation for status translations | expand |
On Wed, Jan 30, 2019 at 12:05 PM Vishal Verma <vishal.l.verma@intel.com> wrote: > > commit 62bbfce3cb62 ("libndctl, intel: Add infrastructure for > firmware_status translation") has the unfortunate side effect of making > all NDCTL commands fail with -ENOMSG unless an xlat_firmware_status > function is defined for the DIMM family. A failure to translate just > means proceed with the information that we do have, not report a > command failure. > > Fixes: 62bbfce3cb62 ("libndctl, intel: Add infrastructure for firmware_status translation") > Reported-by: Oliver O'Halloran <oohall@gmail.com> > Based-on-patch-by: Dan Williams <dan.j.williams@intel.com> You can just replace that with: Reviewed-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 830b791..2fa8916 100644 --- a/ndctl/lib/libndctl.c +++ b/ndctl/lib/libndctl.c @@ -2710,7 +2710,7 @@ NDCTL_EXPORT int ndctl_cmd_xlat_firmware_status(struct ndctl_cmd *cmd) struct ndctl_dimm_ops *ops = dimm ? dimm->ops : NULL; if (!dimm || !ops || !ops->xlat_firmware_status) - return -ENOMSG; + return 0; return ops->xlat_firmware_status(cmd); }
commit 62bbfce3cb62 ("libndctl, intel: Add infrastructure for firmware_status translation") has the unfortunate side effect of making all NDCTL commands fail with -ENOMSG unless an xlat_firmware_status function is defined for the DIMM family. A failure to translate just means proceed with the information that we do have, not report a command failure. Fixes: 62bbfce3cb62 ("libndctl, intel: Add infrastructure for firmware_status translation") Reported-by: Oliver O'Halloran <oohall@gmail.com> Based-on-patch-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- ndctl/lib/libndctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)