nvme/util: fix sparse error#56
Open
iomartin wants to merge 2 commits into
Open
Conversation
|
We found and fixed a couple more sparse issues in the iopf example that get detected when iommufd is enabled. |
Sparse warns: ../examples/iopf.c:46:24: warning: symbol 'pdev' was not declared. Should it be static? Fix this warning by making pdev static. Signed-off-by: Logan Gunthorpe <logan.gunthorpe@eideticom.com>
Sparse reports several warnings in iopf: ../examples/iopf.c:92:42: warning: incorrect type in argument 2 ../examples/iopf.c:92:42: expected restricted leint64_t [usertype] v ../examples/iopf.c:92:42: got unsigned long [usertype] iova ../examples/iopf.c:93:38: warning: incorrect type in argument 2 ../examples/iopf.c:93:38: expected restricted leint32_t [usertype] v ../examples/iopf.c:93:38: got int ../examples/iopf.c:109:27: warning: restricted leint32_t degrades to integer ../examples/iopf.c:114:38: warning: incorrect type in argument 2 ../examples/iopf.c:114:38: expected restricted leint32_t [usertype] v ../examples/iopf.c:114:38: got int ../examples/iopf.c:116:27: warning: restricted leint32_t degrades to integer Fix these by adding proper cpu_to_lexx() and lexx_to_cpu() conversions. Signed-off-by: Logan Gunthorpe <logan.gunthorpe@eideticom.com>
0cfb976 to
7897a12
Compare
|
We've rebased this onto the current master which drops the first patch that fixed an issue in he code that was reverted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sparse started throwing this error:
Fix by casting to uintptr_t.
Fixes: 6763e31 ("nvme/util: support multi-page prplists in PRP")