On Tue, Jan 22, 2019 at 11:31:45PM +0100, David Kozub wrote: > 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. > > Signed-off-by: David Kozub <[email protected]> Reviewed-by: Scott Bauer <[email protected]>
- [PATCH v3 00/16] block: sed-opal: support shadow MBR done flag... David Kozub
- [PATCH v3 01/16] block: sed-opal: fix typos and formattin... David Kozub
- [PATCH v3 02/16] block: sed-opal: use correct macro for m... David Kozub
- [PATCH v3 07/16] block: sed-opal: reuse response_get_toke... David Kozub
- [PATCH v3 15/16] block: sed-opal: don't repeat opal_disco... David Kozub
- [PATCH v3 14/16] block: sed-opal: pass steps via argument... David Kozub
- Re: [PATCH v3 14/16] block: sed-opal: pass steps via ... Scott Bauer
- [PATCH v3 06/16] block: sed-opal: unify error handling of... David Kozub
- [PATCH v3 05/16] block: sed-opal: unify cmd start David Kozub
- [PATCH v3 11/16] block: sed-opal: ioctl for writing to sh... David Kozub
- [PATCH v3 10/16] block: sed-opal: add ioctl for done-mark... David Kozub
- [PATCH v3 13/16] block: sed-opal: check size of shadow mb... David Kozub
