public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] efivarfs: use QSTR() in efivarfs_alloc_dentry
@ 2026-04-22 12:25 Thorsten Blum
  2026-04-23 15:42 ` Ard Biesheuvel
  2026-04-25  3:08 ` James Bottomley
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2026-04-22 12:25 UTC (permalink / raw)
  To: Jeremy Kerr, Ard Biesheuvel; +Cc: Thorsten Blum, linux-efi, linux-kernel

Use QSTR() and drop strlen() in efivarfs_alloc_dentry().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 fs/efivarfs/super.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
index 1c5224cf183e..95a685f022e6 100644
--- a/fs/efivarfs/super.c
+++ b/fs/efivarfs/super.c
@@ -192,12 +192,9 @@ static const struct dentry_operations efivarfs_d_ops = {
 static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name)
 {
 	struct dentry *d;
-	struct qstr q;
+	struct qstr q = QSTR(name);
 	int err;
 
-	q.name = name;
-	q.len = strlen(name);
-
 	err = efivarfs_d_hash(parent, &q);
 	if (err)
 		return ERR_PTR(err);

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

* Re: [PATCH] efivarfs: use QSTR() in efivarfs_alloc_dentry
  2026-04-22 12:25 [PATCH] efivarfs: use QSTR() in efivarfs_alloc_dentry Thorsten Blum
@ 2026-04-23 15:42 ` Ard Biesheuvel
  2026-04-25  3:08 ` James Bottomley
  1 sibling, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2026-04-23 15:42 UTC (permalink / raw)
  To: Thorsten Blum, Jeremy Kerr; +Cc: linux-efi, linux-kernel

Hi Thorsten,

On Wed, 22 Apr 2026, at 14:25, Thorsten Blum wrote:
> Use QSTR() and drop strlen() in efivarfs_alloc_dentry().
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  fs/efivarfs/super.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>

I'll queue this up once -rc1 comes around. Thanks.

> diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
> index 1c5224cf183e..95a685f022e6 100644
> --- a/fs/efivarfs/super.c
> +++ b/fs/efivarfs/super.c
> @@ -192,12 +192,9 @@ static const struct dentry_operations efivarfs_d_ops = {
>  static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name)
>  {
>  	struct dentry *d;
> -	struct qstr q;
> +	struct qstr q = QSTR(name);
>  	int err;
> 
> -	q.name = name;
> -	q.len = strlen(name);
> -
>  	err = efivarfs_d_hash(parent, &q);
>  	if (err)
>  		return ERR_PTR(err);

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

* Re: [PATCH] efivarfs: use QSTR() in efivarfs_alloc_dentry
  2026-04-22 12:25 [PATCH] efivarfs: use QSTR() in efivarfs_alloc_dentry Thorsten Blum
  2026-04-23 15:42 ` Ard Biesheuvel
@ 2026-04-25  3:08 ` James Bottomley
  1 sibling, 0 replies; 3+ messages in thread
From: James Bottomley @ 2026-04-25  3:08 UTC (permalink / raw)
  To: Thorsten Blum, Jeremy Kerr, Ard Biesheuvel; +Cc: linux-efi, linux-kernel

On Wed, 2026-04-22 at 14:25 +0200, Thorsten Blum wrote:
> Use QSTR() and drop strlen() in efivarfs_alloc_dentry().

QSTR contains strlen(), so it's not really accurate to say it's been
dropped; this is merely changing to use a #define that does exactly the
same as the original code.

Regards,

James


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

end of thread, other threads:[~2026-04-25  3:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 12:25 [PATCH] efivarfs: use QSTR() in efivarfs_alloc_dentry Thorsten Blum
2026-04-23 15:42 ` Ard Biesheuvel
2026-04-25  3:08 ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox