All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: sed-opal: Cleanup trivial patch
@ 2019-11-22 16:18 Revanth Rajashekar
  2019-11-22 16:28 ` Derrick, Jonathan
  0 siblings, 1 reply; 3+ messages in thread
From: Revanth Rajashekar @ 2019-11-22 16:18 UTC (permalink / raw)
  To: linux-block; +Cc: Jonathan Derrick, Scott Bauer, Revanth Rajashekar

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");
 		}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: sed-opal: Cleanup trivial patch
  2019-11-22 16:18 [PATCH] block: sed-opal: Cleanup trivial patch Revanth Rajashekar
@ 2019-11-22 16:28 ` Derrick, Jonathan
  2019-11-22 17:05   ` Scott Bauer
  0 siblings, 1 reply; 3+ messages in thread
From: Derrick, Jonathan @ 2019-11-22 16:28 UTC (permalink / raw)
  To: Rajashekar, Revanth, linux-block; +Cc: sbauer

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");
>  		}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: sed-opal: Cleanup trivial patch
  2019-11-22 16:28 ` Derrick, Jonathan
@ 2019-11-22 17:05   ` Scott Bauer
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Bauer @ 2019-11-22 17:05 UTC (permalink / raw)
  To: Derrick, Jonathan; +Cc: Rajashekar, Revanth, linux-block

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-22 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 16:18 [PATCH] block: sed-opal: Cleanup trivial patch Revanth Rajashekar
2019-11-22 16:28 ` Derrick, Jonathan
2019-11-22 17:05   ` Scott Bauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.