block: sed-opal: Cleanup trivial patch
Subsystems (2)
PATCH 1/1 block: sed-opal: Cleanup trivial patch
This patch aims at line length and trivial cleanups for sed-opal code reported by checkpatch script.
Signed-off-by Revanth Rajashekar <[email protected]>
--- block/opal_proto.h | 2 +- block/sed-opal.c | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-)
block/opal_proto.h +1 -1
@@ -404,7 +404,7 @@ struct d0_single_user_mode { };/* -* Additonal Datastores feature +* Additional Datastores feature * * code == 0x0202 */
block/sed-opal.c +13 -10
@@ -142,9 +142,9 @@ static const u8 opaluid[][OPAL_UID_LENGTH] = { [OPAL_MBR] = { 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00 }, [OPAL_AUTHORITY_TABLE ] = - { 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00}, + { 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00 }, [OPAL_C_PIN_TABLE ] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00 }, [OPAL_LOCKING_INFO_TABLE ] = { 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01 }, [OPAL_ENTERPRISE_LOCKING_INFO_TABLE] =
@@ -154,11 +154,11 @@ static const u8 opaluid[][OPAL_UID_LENGTH] = { /* C_PIN_TABLE object ID's */ [OPAL_C_PIN_MSID] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02 }, [OPAL_C_PIN_SID ] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01 }, [OPAL_C_PIN_ADMIN1 ] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01 }, /* half UID's (only first 4 bytes used) */ [OPAL_HALF_UID_AUTHORITY_OBJ_REF] =
@@ -168,7 +168,7 @@ static const u8 opaluid[][OPAL_UID_LENGTH] = {/* special value for omitted optional parameter */ [OPAL_UID_HEXFF ] = - { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, };/*
@@ -1904,7 +1904,8 @@ static int activate_lsp(struct opal_dev *dev, void *data)add_token_bytestring (&err, dev, user_lr,OPAL_UID_LENGTH );for (i =1 ; i < opal_act->num_lrs; i++) { user_lr[7 ] = opal_act->lr[i]; -add_token_bytestring (&err, dev, user_lr,OPAL_UID_LENGTH ); +add_token_bytestring (&err, dev, user_lr, +OPAL_UID_LENGTH ); }add_token_u8 (&err, dev,OPAL_ENDLIST );add_token_u8 (&err, dev,OPAL_ENDNAME );
@@ -2161,7 +2162,7 @@ struct opal_dev *init_opal_dev(void *data, sec_send_recv *send_recv)EXPORT_SYMBOL (init_opal_dev);static int opal_secure_erase_locking_range (struct opal_dev *dev, -struct opal_session_info *opal_session) +struct opal_session_info *opal_session) {const struct opal_step erase_steps[] = { { start_auth_opal_session, opal_session },
@@ -2327,7 +2328,8 @@ static int opal_add_user_to_lr(struct opal_dev *dev,return ret; } -static int opal_reverttper (struct opal_dev *dev,struct opal_key *opal,bool psid) +static int opal_reverttper (struct opal_dev *dev,struct opal_key *opal, +bool psid) {/* controller will terminate session */ const struct opal_step revert_steps[] = {
@@ -2547,7 +2549,8 @@ bool opal_unlock_from_suspend(struct opal_dev *dev) }if (dev->mbr_enabled) { - ret =__opal_set_mbr_done (dev, &suspend->unlk.session.opal_key); + ret =__opal_set_mbr_done (dev, + &suspend->unlk.session.opal_key);if (ret)pr_debug ("Failed to set MBR Done in S3 resume\n" ); }
Signature · 1 line
2.17.1
Acked-by Jon Derrick <[email protected]>
Quoted 101 lines · Revanth Rajashekar
This patch aims at line length and trivial cleanups for sed-opal code reported by checkpatch script.
Signed-off-by Revanth Rajashekar <[email protected]>--- block/opal_proto.h | 2 +- block/sed-opal.c | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-)block/opal_proto.h +1
-1@@ -404,7 +404,7 @@ struct d0_single_user_mode { };/* -* Additonal Datastores feature +* Additional Datastores feature * * code == 0x0202 */ block/sed-opal.c +13
-10@@ -142,9 +142,9 @@ static const u8 opaluid[][OPAL_UID_LENGTH] = { [OPAL_MBR] = { 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00 }, [OPAL_AUTHORITY_TABLE ] = - { 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00}, + { 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00 }, [OPAL_C_PIN_TABLE ] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00 }, [OPAL_LOCKING_INFO_TABLE ] = { 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01 }, [OPAL_ENTERPRISE_LOCKING_INFO_TABLE] =@@ -154,11 +154,11 @@ static const u8 opaluid[][OPAL_UID_LENGTH] = { /* C_PIN_TABLE object ID's */ [OPAL_C_PIN_MSID] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02 }, [OPAL_C_PIN_SID ] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01 }, [OPAL_C_PIN_ADMIN1 ] = - { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01}, + { 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01 }, /* half UID's (only first 4 bytes used) */ [OPAL_HALF_UID_AUTHORITY_OBJ_REF] =@@ -168,7 +168,7 @@ static const u8 opaluid[][OPAL_UID_LENGTH] = {/* special value for omitted optional parameter */ [OPAL_UID_HEXFF ] = - { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, };/* @@ -1904,7 +1904,8 @@ static int activate_lsp(struct opal_dev *dev, void *data)add_token_bytestring (&err, dev, user_lr,OPAL_UID_LENGTH );for (i =1 ; i < opal_act->num_lrs; i++) { user_lr[7 ] = opal_act->lr[i]; -add_token_bytestring (&err, dev, user_lr,OPAL_UID_LENGTH ); +add_token_bytestring (&err, dev, user_lr, +OPAL_UID_LENGTH ); }add_token_u8 (&err, dev,OPAL_ENDLIST );add_token_u8 (&err, dev,OPAL_ENDNAME );@@ -2161,7 +2162,7 @@ struct opal_dev *init_opal_dev(void *data, sec_send_recv *send_recv)EXPORT_SYMBOL (init_opal_dev);static int opal_secure_erase_locking_range (struct opal_dev *dev, -struct opal_session_info *opal_session) +struct opal_session_info *opal_session) {const struct opal_step erase_steps[] = { { start_auth_opal_session, opal_session },@@ -2327,7 +2328,8 @@ static int opal_add_user_to_lr(struct opal_dev *dev,return ret; } -static int opal_reverttper (struct opal_dev *dev,struct opal_key *opal,bool psid) +static int opal_reverttper (struct opal_dev *dev,struct opal_key *opal, +bool psid) {/* controller will terminate session */ const struct opal_step revert_steps[] = {@@ -2547,7 +2549,8 @@ bool opal_unlock_from_suspend(struct opal_dev *dev) }if (dev->mbr_enabled) { - ret =__opal_set_mbr_done (dev, &suspend->unlk.session.opal_key); + ret =__opal_set_mbr_done (dev, + &suspend->unlk.session.opal_key);if (ret)pr_debug ("Failed to set MBR Done in S3 resume\n" ); }
Scott Bauer
Reviewed-byQuoted 1 line · Jonathan
Acked-by Jon Derrick <[email protected]>
Reviewed-by Scott Bauer <[email protected]>