Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2069522pxb; Fri, 22 Oct 2021 13:15:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3kfpCpYQE/BLV+pah/nivDwN11TD0w5xGjUicKy12WRuxBN/SqpqHihPoq5VxJUTj9r/Q X-Received: by 2002:a17:906:5f8e:: with SMTP id a14mr2063686eju.155.1634933700154; Fri, 22 Oct 2021 13:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634933700; cv=none; d=google.com; s=arc-20160816; b=cHHRFda1S7rhS0ZTllTgY6OyBWb+8pKWVB1PruRja+RN99zyvGDP/N4vaFwVi5S1r9 29xKKlUt+2YE6qNw5oPd4vyTOIeHXuo4N4JYGxzoJOmEe9P9rFQW7r8p9ChfXvud53uD uorbt272OVN1EQFNZ0M4nIiPJxtF+Hlcw9DIlML3iB206aYwncpKtksbUMnsKf+xYdxG Yg0hv8aNTUzhpUIN9sbxzz/TxXmiDuQyY11wfRBBnDSZiH6QoRiUHYjQvdiWs8K3EyLh vtErLjvz5ZNdmvB3o6wk0dYGc/YL2ULGQWS1t/FPC71PLI+jep6l+JPW/VOyyvGqogSx nf7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tiumYrTH739HZZsBMmB11wHEm20YBA7FsZJJHOmFTsU=; b=RxbTaSnvM0cG9lTRPljpCEkByCSjo6fP55/yE/0y0bRuHfHERWTD0xeT4tkyiAWtwS iJrjq1WN/aul6rO6n2UIj13dW+osZhGcsYGrOZ45jiKOyyGNBOHcZVUaIiGLgGX+gT/9 Dnw6KQYEbrxw7DAzuvooT01MJF9p0athRmR45PGB44ve4kjV/3BY6/26R1U+hIVPGZEH RuNjhUltFFteP3jXQb/VOOCfO4CksoWNNfctZQD/zEba6nrXmrk5Cujodc1+KZoK4mSf n4wahhRiOOzV5+oQIvXiQYdpQqhjHDeB7aSmHceFf9vaoAE7UxCseZmvr0nC4CT3jasT 169w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm8si7454201ejc.614.2021.10.22.13.14.35; Fri, 22 Oct 2021 13:15:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233909AbhJVUPE (ORCPT + 99 others); Fri, 22 Oct 2021 16:15:04 -0400 Received: from mga18.intel.com ([134.134.136.126]:65337 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232750AbhJVUPD (ORCPT ); Fri, 22 Oct 2021 16:15:03 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10145"; a="216294112" X-IronPort-AV: E=Sophos;i="5.87,173,1631602800"; d="scan'208";a="216294112" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 13:12:45 -0700 X-IronPort-AV: E=Sophos;i="5.87,173,1631602800"; d="scan'208";a="445414060" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2021 13:12:43 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1me0tp-000Eem-6w; Fri, 22 Oct 2021 23:12:21 +0300 Date: Fri, 22 Oct 2021 23:12:20 +0300 From: Andy Shevchenko To: Chen Yu Cc: linux-acpi@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Ard Biesheuvel , Len Brown , Ashok Raj , Mike Rapoport , Aubrey Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 4/4] tools: Introduce power/acpi/pfru/pfru Message-ID: References: <0159379f2f15c79959fd597874f162ebc3cf711b.1634899519.git.yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0159379f2f15c79959fd597874f162ebc3cf711b.1634899519.git.yu.c.chen@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > +#ifdef __KERNEL__ > #include > +#else > +#include > +#include > +#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