diff mbox series

libnvdimm, security: Comment fixes

Message ID 153801494828.825550.15533638717371880458.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State New, archived
Headers show
Series libnvdimm, security: Comment fixes | expand

Commit Message

Dan Williams Sept. 27, 2018, 2:22 a.m. UTC
Correct some spelling and stray comments.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/nvdimm/dimm_devs.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Dave Jiang Sept. 27, 2018, 3:47 p.m. UTC | #1
On 09/26/2018 07:22 PM, Dan Williams wrote:
> Correct some spelling and stray comments.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>  drivers/nvdimm/dimm_devs.c |    8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
> index 06d0395c1f43..8740c6c61912 100644
> --- a/drivers/nvdimm/dimm_devs.c
> +++ b/drivers/nvdimm/dimm_devs.c
> @@ -237,8 +237,8 @@ static int nvdimm_security_erase(struct device *dev, unsigned int keyid)
>  	rc = nvdimm->security_ops->erase(nvdimm,
>  			(struct nvdimm_key_data *) payload->data);
>  	up_read(&key->sem);
> -	/* remove key since secure erase kills the passphrase */
>  
> +	/* remove key since secure erase kills the passphrase */
>  	if (!is_userkey) {
>  		key_unlink(nvdimm_keyring, key);
>  		key_invalidate(key);
> @@ -423,14 +423,12 @@ static int nvdimm_security_change_key(struct device *dev,
>  		goto out;
>  	}
>  
> -	/* we need to check description as well */
> -
>  	if (!update)
>  		key = nvdimm_replace_key(key);
>  
>  	/*
> -	 * We don't need to release key->sem here because nvdimm_repalce_key
> -	 * will.
> +	 * We don't need to release key->sem here because
> +	 * nvdimm_replace_key will.
>  	 */
>  	if (!key)
>  		goto out;
>
diff mbox series

Patch

diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
index 06d0395c1f43..8740c6c61912 100644
--- a/drivers/nvdimm/dimm_devs.c
+++ b/drivers/nvdimm/dimm_devs.c
@@ -237,8 +237,8 @@  static int nvdimm_security_erase(struct device *dev, unsigned int keyid)
 	rc = nvdimm->security_ops->erase(nvdimm,
 			(struct nvdimm_key_data *) payload->data);
 	up_read(&key->sem);
-	/* remove key since secure erase kills the passphrase */
 
+	/* remove key since secure erase kills the passphrase */
 	if (!is_userkey) {
 		key_unlink(nvdimm_keyring, key);
 		key_invalidate(key);
@@ -423,14 +423,12 @@  static int nvdimm_security_change_key(struct device *dev,
 		goto out;
 	}
 
-	/* we need to check description as well */
-
 	if (!update)
 		key = nvdimm_replace_key(key);
 
 	/*
-	 * We don't need to release key->sem here because nvdimm_repalce_key
-	 * will.
+	 * We don't need to release key->sem here because
+	 * nvdimm_replace_key will.
 	 */
 	if (!key)
 		goto out;