forked from altera-opensource/linux-socfpga
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: sed-opal: pass steps via argument rather than via opal_dev
The steps argument is only read by the next function, so it can be passed directly as an argument rather than via opal_dev. Normally, the steps is an array on the stack, so the pointer stops being valid then the function that set opal_dev.steps returns. If opal_dev.steps was not set to NULL before return it would become a dangling pointer. When the steps are passed as argument this becomes easier to see and more difficult to misuse. Acked-by: Jon Derrick <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Scott Bauer <[email protected]> Signed-off-by: David Kozub <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information
Showing
1 changed file
with
69 additions
and
89 deletions.
There are no files selected for viewing
This file contains 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