diff options
| author | David Kozub <zub@linux.fjfi.cvut.cz> | 2019-02-14 03:16:06 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2019-04-06 20:09:13 +0300 |
| commit | 3db87236cfb29f143028b91293a8aee01cf932e7 (patch) | |
| tree | 8d19f1148c17376e1448ffc8724af05591efdc3c /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 372be408447506c43cc1bede4261324ef66d8fb4 (diff) | |
| download | linux-3db87236cfb29f143028b91293a8aee01cf932e7.tar.xz | |
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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
