From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Chen Yu <yu.c.chen@intel.com>
Cc: linux-acpi@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>, Len Brown <lenb@kernel.org>,
Ashok Raj <ashok.raj@intel.com>, Mike Rapoport <rppt@kernel.org>,
Aubrey Li <aubrey.li@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 4/4] tools: Introduce power/acpi/pfru/pfru
Date: Fri, 22 Oct 2021 23:12:20 +0300 [thread overview]
Message-ID: <YXMbJMifGM2izSZO@smile.fi.intel.com> (raw)
In-Reply-To: <0159379f2f15c79959fd597874f162ebc3cf711b.1634899519.git.yu.c.chen@intel.com>
On Sat, Oct 23, 2021 at 01:10:32AM +0800, Chen Yu wrote:
> Introduce a user space tool to make use of the interface exposed by
> Platform Firmware Runtime Update and Telemetry drivers. The users
> can use this tool to do firmware code injection, driver update and
> to retrieve the telemetry data.
...
> #include <linux/ioctl.h>
> +#ifdef __KERNEL__
> #include <linux/uuid.h>
> +#else
> +#include <uuid/uuid.h>
> +#include <linux/types.h>
> +#endif
This is exactly my point why you mustn't use uuid.h in uAPI headers.
...
> + while (1) {
Why not while ((c = getopt_long(...)) != -1) ?
> + int option_index = 0;
> +
> + c = getopt_long(argc, argv, option_string,
> + long_options, &option_index);
> + if (c == -1)
> + break;
> + }
> + }
> +}
...
> + char *uuid = malloc(37);
libuuid doesn't have helpers for this?
Split assignment so if will be closer to its user.
> + if (!uuid) {
> + perror("Can not allocate uuid buffer\n");
> + exit(1);
> + }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-10-22 20:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 17:09 [PATCH v5 0/4] Introduce Platform Firmware Runtime Update and Telemetry drivers Chen Yu
2021-10-22 17:09 ` [PATCH v5 1/4] efi: Introduce EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER and corresponding structures Chen Yu
2021-10-22 17:09 ` [PATCH v5 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver Chen Yu
2021-10-22 20:05 ` Andy Shevchenko
2021-10-23 13:15 ` Chen Yu
2021-10-22 17:10 ` [PATCH v5 3/4] drivers/acpi: Introduce Platform Firmware Runtime Update Telemetry Chen Yu
2021-10-22 20:08 ` Andy Shevchenko
2021-10-22 17:10 ` [PATCH v5 4/4] tools: Introduce power/acpi/pfru/pfru Chen Yu
2021-10-22 20:12 ` Andy Shevchenko [this message]
2021-10-23 13:19 ` Chen Yu
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=YXMbJMifGM2izSZO@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=ardb@kernel.org \
--cc=ashok.raj@intel.com \
--cc=aubrey.li@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rppt@kernel.org \
--cc=yu.c.chen@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox