* [ndctl PATCH v2] ndctl: Fix missing key_type parameter in ndctl_dimm_remove_key stub
@ 2026-03-19 1:51 cp0613
2026-03-20 2:21 ` Alison Schofield
0 siblings, 1 reply; 2+ messages in thread
From: cp0613 @ 2026-03-19 1:51 UTC (permalink / raw)
To: alison.schofield, nvdimm; +Cc: linux-cxl, Chen Pei
From: Chen Pei <cp0613@linux.alibaba.com>
When keyutils is disabled, the following compilation error occurs:
../ndctl/dimm.c: In function ‘action_remove_passphrase’:
../ndctl/dimm.c:1030:16: error: too many arguments to function ‘ndctl_dimm_remove_key’
1030 | return ndctl_dimm_remove_key(dimm, param.master_pass ? ND_MASTER_KEY :
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ../ndctl/dimm.c:25:
../ndctl/keys.h:51:19: note: declared here
51 | static inline int ndctl_dimm_remove_key(struct ndctl_dimm *dimm)
| ^~~~~~~~~~~~~~~~~~~~~
This patch fixes the issue by adding the missing key_type parameter to
the stub declaration of ndctl_dimm_remove_key in keys.h, ensuring the
function signature matches its usage.
Fixes: a79375a9b0cd ("ndctl: Add master-passphrase removal support")
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
---
ndctl/keys.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ndctl/keys.h b/ndctl/keys.h
index ce71ff2..b60c209 100644
--- a/ndctl/keys.h
+++ b/ndctl/keys.h
@@ -48,7 +48,8 @@ static inline int ndctl_dimm_update_key(struct ndctl_dimm *dimm,
return -EOPNOTSUPP;
}
-static inline int ndctl_dimm_remove_key(struct ndctl_dimm *dimm)
+static inline int ndctl_dimm_remove_key(struct ndctl_dimm *dimm,
+ enum ndctl_key_type key_type)
{
return -EOPNOTSUPP;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [ndctl PATCH v2] ndctl: Fix missing key_type parameter in ndctl_dimm_remove_key stub
2026-03-19 1:51 [ndctl PATCH v2] ndctl: Fix missing key_type parameter in ndctl_dimm_remove_key stub cp0613
@ 2026-03-20 2:21 ` Alison Schofield
0 siblings, 0 replies; 2+ messages in thread
From: Alison Schofield @ 2026-03-20 2:21 UTC (permalink / raw)
To: cp0613; +Cc: nvdimm, linux-cxl
On Thu, Mar 19, 2026 at 09:51:49AM +0800, cp0613@linux.alibaba.com wrote:
> From: Chen Pei <cp0613@linux.alibaba.com>
>
> When keyutils is disabled, the following compilation error occurs:
>
> ../ndctl/dimm.c: In function ‘action_remove_passphrase’:
> ../ndctl/dimm.c:1030:16: error: too many arguments to function ‘ndctl_dimm_remove_key’
> 1030 | return ndctl_dimm_remove_key(dimm, param.master_pass ? ND_MASTER_KEY :
> | ^~~~~~~~~~~~~~~~~~~~~
> In file included from ../ndctl/dimm.c:25:
> ../ndctl/keys.h:51:19: note: declared here
> 51 | static inline int ndctl_dimm_remove_key(struct ndctl_dimm *dimm)
> | ^~~~~~~~~~~~~~~~~~~~~
>
> This patch fixes the issue by adding the missing key_type parameter to
> the stub declaration of ndctl_dimm_remove_key in keys.h, ensuring the
> function signature matches its usage.
>
> Fixes: a79375a9b0cd ("ndctl: Add master-passphrase removal support")
>
> Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
Applied https://github.com/pmem/ndctl/commits/pending/
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-20 2:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 1:51 [ndctl PATCH v2] ndctl: Fix missing key_type parameter in ndctl_dimm_remove_key stub cp0613
2026-03-20 2:21 ` Alison Schofield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox