Conversation
Replace all sndk_get_pci_ids() calls with nvme_get_pci_ids(), passing vendor and device IDs in the order expected by the common helper. Remove the duplicate sysfs lookup implementation and its declaration. Keep the existing Identify fallback for NVMe-oF devices. Link: linux-nvme#3663 Signed-off-by: Allen47 <149938169+allen4791@users.noreply.github.com>
Collaborator
|
Looks good. The only thing I would like to change is to drop the 'Link: #3663' reference in the commit message. The commit message should be self contained and only point to external reference on exceptions. This is because we never know when github decides to go evil or so. :) |
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.
Link: #3663
This PR replaces the sandisk plugin's own PCI ID lookup function with the shared nvme_get_pci_ids() helper that other plugins (e.g. wdc) already use, so sandisk doesn't need to keep a separate copy of the same logic.
Validation
Compared the old and new PCI ID lookup implementations to confirm they resolve to the same sysfs paths and parse values the same way.
I built and ran the full existing test suite on Ubuntu 22.04 to confirm nothing else broke, though none of those tests actually
cover the sandisk plugin.
This is my first PR to nvme-cli, so please let me know if there's anything I'm missing.