From: Matt Domsch <Matt_Domsch@dell.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] efivars update
Date: Fri, 29 Aug 2003 22:17:17 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106219548517935@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106219352715985@msgid-missing>
> The patch is against 2.6.0-test4. Please apply.
Thanks for your work on this! One bug, 3 nits...
> +static ssize_t
> +efivar_edit(struct efivar_entry *entry, const char *buf, size_t count)
...
> + spin_lock(&efivars_lock);
> + status = efi.set_variable(new_var->VariableName,
> + &new_var->VendorGuid,
> + new_var->Attributes,
> + new_var->DataSize,
> + new_var->Data);
> +
> + if (status != EFI_SUCCESS) {
> + printk(KERN_WARNING "set_variable() failed: status=%lx\n",
> + status);
> + return -EIO;
> + }
> + spin_unlock(&efivars_lock);
Move the unlock up above the status test, else you return while
holding the lock on failure.
> +static ssize_t
> +efivar_create(struct subsystem *sub, const char *buf, size_t count)
...
> + if (found) {
> + printk("EFI variable already exists!\n");
level on printk please.
> +efivar_delete(struct subsystem *sub, const char *buf, size_t count)
...
> + status = efi.set_variable(del_var->VariableName,
> + &del_var->VendorGuid,
> + del_var->Attributes,
> + del_var->DataSize,
> + del_var->Data);
Might as well just force the deletion by setting Attributes=0 or
DataSize=0 or both. Less chance for userspace error.
> + * Overrides for Emacs so that we follow Linus's tabbing style.
Please kill this chunk. I shouldn't have had it there in the first
place. :-)
Looks great to me! Thanks again.
--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
next prev parent reply other threads:[~2003-08-29 22:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-29 21:24 [PATCH] efivars update Matt Tolentino
2003-08-29 21:59 ` Patrick Mochel
2003-08-29 22:17 ` Matt Domsch [this message]
2003-08-30 0:16 ` Tolentino, Matthew E
2003-08-30 2:08 ` Matthew Wilcox
2003-09-02 16:17 ` Patrick Mochel
-- strict thread matches above, loose matches on Subject: below --
2003-08-29 21:24 Matt Tolentino
2003-08-29 21:59 ` Patrick Mochel
2003-08-30 2:08 ` Matthew Wilcox
2003-09-02 16:17 ` Patrick Mochel
2003-08-29 22:17 ` Matt Domsch
2003-08-30 0:16 Tolentino, Matthew E
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-106219548517935@msgid-missing \
--to=matt_domsch@dell.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.