Message ID | 20191122161854.70939-1-revanth.rajashekar@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: sed-opal: Cleanup trivial patch | expand |
Acked-by: Jon Derrick <jonathan.derrick@intel.com> On Fri, 2019-11-22 at 09:18 -0700, Revanth Rajashekar wrote: > This patch aims at line length and trivial cleanups for > sed-opal code reported by checkpatch script. > > Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com> > --- > block/opal_proto.h | 2 +- > block/sed-opal.c | 23 +++++++++++++---------- > 2 files changed, 14 insertions(+), 11 deletions(-) > > diff --git a/block/opal_proto.h b/block/opal_proto.h > index 325cbba2465f..6b75018dd4b3 100644 > --- a/block/opal_proto.h > +++ b/block/opal_proto.h > @@ -404,7 +404,7 @@ struct d0_single_user_mode { > }; > > /* > - * Additonal Datastores feature > + * Additional Datastores feature > * > * code == 0x0202 > */ > diff --git a/block/sed-opal.c b/block/sed-opal.c > index 880cc57a5f6b..8da8ef866f36 100644 > --- a/block/sed-opal.c > +++ b/block/sed-opal.c > @@ -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"); > }
On Fri, Nov 22, 2019 at 04:28:06PM +0000, Derrick, Jonathan wrote: > Acked-by: Jon Derrick <jonathan.derrick@intel.com> Reviewed-by: Scott Bauer <sbauer@plzdonthack.me>
diff --git a/block/opal_proto.h b/block/opal_proto.h index 325cbba2465f..6b75018dd4b3 100644 --- a/block/opal_proto.h +++ b/block/opal_proto.h @@ -404,7 +404,7 @@ struct d0_single_user_mode { }; /* - * Additonal Datastores feature + * Additional Datastores feature * * code == 0x0202 */ diff --git a/block/sed-opal.c b/block/sed-opal.c index 880cc57a5f6b..8da8ef866f36 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c @@ -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"); }
This patch aims at line length and trivial cleanups for sed-opal code reported by checkpatch script. Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com> --- block/opal_proto.h | 2 +- block/sed-opal.c | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-)