Bug #9794
remove bogus casts from PCI_CAP_PUTx and PCI_XCAP_PUTx definitions
Start date:
2018-09-04
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
The macros PCI_CAP_PUTx() and PCI_XCAP_PUTx() as defined in pci_cap.h cast the value returned by pci_cap_put() to an uint of the same size as the value passed. This completely bogus as pci_cap_put() only returns DDI_FAILURE or DDI_SUCCESS through an int.
Updated by Hans Rosenfeld about 1 year ago
Testing: This has been in illumos-joyent since early 2018. The testing I've done back then consisted of just a build and boot with this change. As no callers of the changed macros in gate use the returned values I didn't bother doing a wsdiff or any other checks.
Updated by Electric Monk about 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit d4990cfc1b590b32a5100dd746688eb2e1b9901f
commit d4990cfc1b590b32a5100dd746688eb2e1b9901f Author: Hans Rosenfeld <hans.rosenfeld@joyent.com> Date: 2020-02-19T13:30:19.000Z 9794 remove bogus casts from PCI_CAP_PUTx and PCI_XCAP_PUTx definitions Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Mike Gerdts <mike.gerdts@joyent.com> Reviewed by: Matthias Scheler <mscheler@tintri.com> Approved by: Robert Mustacchi <rm@fingolfin.org>