diff mbox series

[2/5] libnvdimm: fix incorrect output when nvdimm disable failed

Message ID 153936863837.55836.13460607811316925558.stgit@djiang5-desk3.ch.intel.com (mailing list archive)
State New, archived
Headers show
Series [1/5] libnvdimm: fix updating of kernel key during nvdimm key update | expand

Commit Message

Dave Jiang Oct. 12, 2018, 6:23 p.m. UTC
Fix inocrrect dev_warn() in nvdimm_security_disable().

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 drivers/nvdimm/security.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dan Williams Oct. 12, 2018, 7:22 p.m. UTC | #1
On Fri, Oct 12, 2018 at 11:23 AM Dave Jiang <dave.jiang@intel.com> wrote:
>
> Fix inocrrect dev_warn() in nvdimm_security_disable().
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  drivers/nvdimm/security.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvdimm/security.c b/drivers/nvdimm/security.c
> index ef83bdf47c31..cf934c6025d9 100644
> --- a/drivers/nvdimm/security.c
> +++ b/drivers/nvdimm/security.c
> @@ -256,7 +256,7 @@ int nvdimm_security_disable(struct nvdimm *nvdimm, unsigned int keyid)
>                         (const struct nvdimm_key_data *)payload->data);
>         up_read(&key->sem);
>         if (rc < 0) {
> -               dev_warn(dev, "unlock failed\n");
> +               dev_warn(dev, "nvdimm disable failed\n");

Let's make this "security disable failed\n", the 'nvdimm' is redundant
with the "nvdimm: nmemX:" that will be added by the dev_warn().
diff mbox series

Patch

diff --git a/drivers/nvdimm/security.c b/drivers/nvdimm/security.c
index ef83bdf47c31..cf934c6025d9 100644
--- a/drivers/nvdimm/security.c
+++ b/drivers/nvdimm/security.c
@@ -256,7 +256,7 @@  int nvdimm_security_disable(struct nvdimm *nvdimm, unsigned int keyid)
 			(const struct nvdimm_key_data *)payload->data);
 	up_read(&key->sem);
 	if (rc < 0) {
-		dev_warn(dev, "unlock failed\n");
+		dev_warn(dev, "nvdimm disable failed\n");
 		goto out;
 	}