block: sed-opal: unify space check in add_token_*
authorJonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Thu, 14 Feb 2019 00:15:56 +0000 (01:15 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Apr 2019 17:09:12 +0000 (11:09 -0600)
commite2821a50b17c1b760e7d597777de61241f22fd55
treea92e4a333d81bed796ef279801619da4aaf4b75b
parent1b6b75b0137fd2b5af533eceba5f5db62b1c45b0
block: sed-opal: unify space check in add_token_*

All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as well as code duplication.

Acked-by: Jon Derrick <jonathan.derrick@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
Co-authored-by: David Kozub <zub@linux.fjfi.cvut.cz>
Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/sed-opal.c