summaryrefslogtreecommitdiff
path: root/block/mq-deadline.c
diff options
context:
space:
mode:
authorDavid Kozub <zub@linux.fjfi.cvut.cz>2019-02-14 01:16:06 +0100
committerJens Axboe <axboe@kernel.dk>2019-04-06 11:09:13 -0600
commit3db87236cfb29f143028b91293a8aee01cf932e7 (patch)
tree8d19f1148c17376e1448ffc8724af05591efdc3c /block/mq-deadline.c
parent372be408447506c43cc1bede4261324ef66d8fb4 (diff)
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 <jonathan.derrick@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Scott Bauer <sbauer@plzdonthack.me> Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/mq-deadline.c')
0 files changed, 0 insertions, 0 deletions