diff mbox series

cxl/pci: Use correct flag for sanitize polling

Message ID 7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx
State Accepted
Commit 71baec7b8500c92f9723f39d06a7ae465483da1f
Headers show
Series cxl/pci: Use correct flag for sanitize polling | expand

Commit Message

Davidlohr Bueso June 27, 2023, 8:02 a.m. UTC
This is a bogus value, left behind from a previous version.

Fixes: 0c36b6ad436a ("cxl/mbox: Add sanitization handling machinery")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
  drivers/cxl/pci.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

--
2.41.0

Comments

Dan Williams June 27, 2023, 11:01 p.m. UTC | #1
Davidlohr Bueso wrote:
> This is a bogus value, left behind from a previous version.
> 
> Fixes: 0c36b6ad436a ("cxl/mbox: Add sanitization handling machinery")
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
>   drivers/cxl/pci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> index 48f88d96029d..1cb1494c28fe 100644
> --- a/drivers/cxl/pci.c
> +++ b/drivers/cxl/pci.c
> @@ -295,7 +295,7 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_memdev_state *mds,
> 		 * and allow userspace to poll(2) for completion.
> 		 */
> 		if (mbox_cmd->opcode == CXL_MBOX_OP_SANITIZE) {
> -			if (mds->security.poll_tmo_secs != -1) {
> +			if (mds->security.poll) {
> 				/* hold the device throughout */
> 				get_device(cxlds->dev);
> 
> --
> 2.41.0

I had to pick this up manually because 'git am' complains:

    error: corrupt patch at line 10

Just letting you know in case you can spot the issue because I am still
scratching my head. Here are the steps I took to apply it manually:

---

$ b4 shazam -sl -P _ 7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx
Grabbing thread from lore.kernel.org/all/7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
  Added from v6: 1 patches
Analyzing 18 messages in the thread
Checking attestation on all messages, may take a moment...
---
  ✓ [PATCH] cxl/pci: Use correct flag for sanitize polling
    + Link: https://lore.kernel.org/r/7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx
    + Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  ---
  ✓ Signed: DKIM/stgolabs.net
---
Total patches: 1 (cherrypicked: <7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx>)
---
Applying: cxl/pci: Use correct flag for sanitize polling
Patch failed at 0001 cxl/pci: Use correct flag for sanitize polling
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: corrupt patch at line 10
hint: Use 'git am --show-current-patch=diff' to see the failed patch
$ b4 am -sl -P _ 7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx
Analyzing 1 messages in the thread
Checking attestation on all messages, may take a moment...
---
  ✓ [PATCH] cxl/pci: Use correct flag for sanitize polling
    + Link: https://lore.kernel.org/r/7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx
    + Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  ---
  ✓ Signed: DKIM/stgolabs.net
---
Total patches: 1 (cherrypicked: <7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx>)
---
 Link: https://lore.kernel.org/r/7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx
 Base: not specified
       git am ./20230627_dave_cxl_pci_use_correct_flag_for_sanitize_polling.mbx
$ cat ./20230627_dave_cxl_pci_use_correct_flag_for_sanitize_polling.mbx | patch -p1
patching file drivers/cxl/pci.c
$ git add drivers/cxl/pci.c
$ git am --continue
Applying: cxl/pci: Use correct flag for sanitize polling
$ git show
commit 71baec7b8500c92f9723f39d06a7ae465483da1f (HEAD -> for-6.5/cxl)
Author: Davidlohr Bueso <dave@stgolabs.net>
Date:   Tue Jun 27 01:02:02 2023 -0700

    cxl/pci: Use correct flag for sanitize polling
    
    This is a bogus value, left behind from a previous version.
    
    Fixes: 0c36b6ad436a ("cxl/mbox: Add sanitization handling machinery")
    Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
    Link: https://lore.kernel.org/r/7q3vcjqidtmxmys4n34g6b3mygvhaen7yikzxanpz56lw43fz7@7subbtbfkmyx
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
index 48f88d96029d..1cb1494c28fe 100644
--- a/drivers/cxl/pci.c
+++ b/drivers/cxl/pci.c
@@ -295,7 +295,7 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_memdev_state *mds,
                 * and allow userspace to poll(2) for completion.
                 */
                if (mbox_cmd->opcode == CXL_MBOX_OP_SANITIZE) {
-                       if (mds->security.poll_tmo_secs != -1) {
+                       if (mds->security.poll) {
                                /* hold the device throughout */
                                get_device(cxlds->dev);
diff mbox series

Patch

diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
index 48f88d96029d..1cb1494c28fe 100644
--- a/drivers/cxl/pci.c
+++ b/drivers/cxl/pci.c
@@ -295,7 +295,7 @@  static int __cxl_pci_mbox_send_cmd(struct cxl_memdev_state *mds,
		 * and allow userspace to poll(2) for completion.
		 */
		if (mbox_cmd->opcode == CXL_MBOX_OP_SANITIZE) {
-			if (mds->security.poll_tmo_secs != -1) {
+			if (mds->security.poll) {
				/* hold the device throughout */
				get_device(cxlds->dev);