diff options
author | David Kozub <zub@linux.fjfi.cvut.cz> | 2019-02-13 19:15:54 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-06 13:09:12 -0400 |
commit | 1e815b33c5ccd3936b71292b5ffb84e97e1df9e0 (patch) | |
tree | b682e4149b15ee9476adf5c2c9d388fed8683f9f /block | |
parent | 78bf47353b0041865564deeed257a54f047c2fdc (diff) |
block: sed-opal: fix typos and formatting
This should make no change in functionality.
The formatting changes were triggered by checkpatch.pl.
Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/sed-opal.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/block/sed-opal.c b/block/sed-opal.c index 119640897293..d12a910e06cb 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c | |||
@@ -157,7 +157,7 @@ static const u8 opaluid[][OPAL_UID_LENGTH] = { | |||
157 | 157 | ||
158 | /* C_PIN_TABLE object ID's */ | 158 | /* C_PIN_TABLE object ID's */ |
159 | 159 | ||
160 | [OPAL_C_PIN_MSID] = | 160 | [OPAL_C_PIN_MSID] = |
161 | { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02}, | 161 | { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02}, |
162 | [OPAL_C_PIN_SID] = | 162 | [OPAL_C_PIN_SID] = |
163 | { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01}, | 163 | { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01}, |
@@ -551,7 +551,6 @@ static void add_medium_atom_header(struct opal_dev *cmd, bool bytestring, | |||
551 | 551 | ||
552 | static void add_token_u64(int *err, struct opal_dev *cmd, u64 number) | 552 | static void add_token_u64(int *err, struct opal_dev *cmd, u64 number) |
553 | { | 553 | { |
554 | |||
555 | size_t len; | 554 | size_t len; |
556 | int msb; | 555 | int msb; |
557 | 556 | ||
@@ -623,7 +622,7 @@ static int build_locking_range(u8 *buffer, size_t length, u8 lr) | |||
623 | static int build_locking_user(u8 *buffer, size_t length, u8 lr) | 622 | static int build_locking_user(u8 *buffer, size_t length, u8 lr) |
624 | { | 623 | { |
625 | if (length > OPAL_UID_LENGTH) { | 624 | if (length > OPAL_UID_LENGTH) { |
626 | pr_debug("Can't build locking range user, Length OOB\n"); | 625 | pr_debug("Can't build locking range user. Length OOB\n"); |
627 | return -ERANGE; | 626 | return -ERANGE; |
628 | } | 627 | } |
629 | 628 | ||
@@ -1324,6 +1323,7 @@ static int start_SIDASP_opal_session(struct opal_dev *dev, void *data) | |||
1324 | 1323 | ||
1325 | if (!key) { | 1324 | if (!key) { |
1326 | const struct opal_key *okey = data; | 1325 | const struct opal_key *okey = data; |
1326 | |||
1327 | ret = start_generic_opal_session(dev, OPAL_SID_UID, | 1327 | ret = start_generic_opal_session(dev, OPAL_SID_UID, |
1328 | OPAL_ADMINSP_UID, | 1328 | OPAL_ADMINSP_UID, |
1329 | okey->key, | 1329 | okey->key, |
@@ -1341,6 +1341,7 @@ static int start_SIDASP_opal_session(struct opal_dev *dev, void *data) | |||
1341 | static int start_admin1LSP_opal_session(struct opal_dev *dev, void *data) | 1341 | static int start_admin1LSP_opal_session(struct opal_dev *dev, void *data) |
1342 | { | 1342 | { |
1343 | struct opal_key *key = data; | 1343 | struct opal_key *key = data; |
1344 | |||
1344 | return start_generic_opal_session(dev, OPAL_ADMIN1_UID, | 1345 | return start_generic_opal_session(dev, OPAL_ADMIN1_UID, |
1345 | OPAL_LOCKINGSP_UID, | 1346 | OPAL_LOCKINGSP_UID, |
1346 | key->key, key->key_len); | 1347 | key->key, key->key_len); |
@@ -1714,7 +1715,7 @@ static int lock_unlock_locking_range(struct opal_dev *dev, void *data) | |||
1714 | write_locked = 0; | 1715 | write_locked = 0; |
1715 | break; | 1716 | break; |
1716 | case OPAL_LK: | 1717 | case OPAL_LK: |
1717 | /* vars are initalized to locked */ | 1718 | /* vars are initialized to locked */ |
1718 | break; | 1719 | break; |
1719 | default: | 1720 | default: |
1720 | pr_debug("Tried to set an invalid locking state... returning to uland\n"); | 1721 | pr_debug("Tried to set an invalid locking state... returning to uland\n"); |
@@ -1775,7 +1776,7 @@ static int lock_unlock_locking_range_sum(struct opal_dev *dev, void *data) | |||
1775 | write_locked = 0; | 1776 | write_locked = 0; |
1776 | break; | 1777 | break; |
1777 | case OPAL_LK: | 1778 | case OPAL_LK: |
1778 | /* vars are initalized to locked */ | 1779 | /* vars are initialized to locked */ |
1779 | break; | 1780 | break; |
1780 | default: | 1781 | default: |
1781 | pr_debug("Tried to set an invalid locking state.\n"); | 1782 | pr_debug("Tried to set an invalid locking state.\n"); |
@@ -1854,7 +1855,7 @@ static int get_lsp_lifecycle_cont(struct opal_dev *dev) | |||
1854 | return error; | 1855 | return error; |
1855 | 1856 | ||
1856 | lc_status = response_get_u64(&dev->parsed, 4); | 1857 | lc_status = response_get_u64(&dev->parsed, 4); |
1857 | /* 0x08 is Manufacured Inactive */ | 1858 | /* 0x08 is Manufactured Inactive */ |
1858 | /* 0x09 is Manufactured */ | 1859 | /* 0x09 is Manufactured */ |
1859 | if (lc_status != OPAL_MANUFACTURED_INACTIVE) { | 1860 | if (lc_status != OPAL_MANUFACTURED_INACTIVE) { |
1860 | pr_debug("Couldn't determine the status of the Lifecycle state\n"); | 1861 | pr_debug("Couldn't determine the status of the Lifecycle state\n"); |
@@ -2225,7 +2226,7 @@ static int __opal_lock_unlock(struct opal_dev *dev, | |||
2225 | static int __opal_set_mbr_done(struct opal_dev *dev, struct opal_key *key) | 2226 | static int __opal_set_mbr_done(struct opal_dev *dev, struct opal_key *key) |
2226 | { | 2227 | { |
2227 | u8 mbr_done_tf = OPAL_TRUE; | 2228 | u8 mbr_done_tf = OPAL_TRUE; |
2228 | const struct opal_step mbrdone_step [] = { | 2229 | const struct opal_step mbrdone_step[] = { |
2229 | { opal_discovery0, }, | 2230 | { opal_discovery0, }, |
2230 | { start_admin1LSP_opal_session, key }, | 2231 | { start_admin1LSP_opal_session, key }, |
2231 | { set_mbr_done, &mbr_done_tf }, | 2232 | { set_mbr_done, &mbr_done_tf }, |
@@ -2276,7 +2277,8 @@ static int opal_take_ownership(struct opal_dev *dev, struct opal_key *opal) | |||
2276 | return ret; | 2277 | return ret; |
2277 | } | 2278 | } |
2278 | 2279 | ||
2279 | static int opal_activate_lsp(struct opal_dev *dev, struct opal_lr_act *opal_lr_act) | 2280 | static int opal_activate_lsp(struct opal_dev *dev, |
2281 | struct opal_lr_act *opal_lr_act) | ||
2280 | { | 2282 | { |
2281 | const struct opal_step active_steps[] = { | 2283 | const struct opal_step active_steps[] = { |
2282 | { opal_discovery0, }, | 2284 | { opal_discovery0, }, |