diff mbox

[v2,2/5] ACPI / APEI: Switch to use new generic UUID API

Message ID 20170531194152.65927-3-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Shevchenko May 31, 2017, 7:41 p.m. UTC
There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/apei/ghes.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

kernel test robot May 31, 2017, 11:56 p.m. UTC | #1
Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x013-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/acpi/apei/ghes.c: In function 'ghes_do_proc':
>> drivers/acpi/apei/ghes.c:434:2: error: unknown type name 'guid_t'
     guid_t *sec_type;
     ^~~~~~
>> drivers/acpi/apei/ghes.c:438:15: error: 'guid_t' undeclared (first use in this function)
      sec_type = (guid_t *)gdata->section_type;
                  ^~~~~~
   drivers/acpi/apei/ghes.c:438:15: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/acpi/apei/ghes.c:438:23: error: expected expression before ')' token
      sec_type = (guid_t *)gdata->section_type;
                          ^
>> drivers/acpi/apei/ghes.c:440:8: error: implicit declaration of function 'guid_equal' [-Werror=implicit-function-declaration]
      if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
           ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/guid_t +434 drivers/acpi/apei/ghes.c

   428	
   429	static void ghes_do_proc(struct ghes *ghes,
   430				 const struct acpi_hest_generic_status *estatus)
   431	{
   432		int sev, sec_sev;
   433		struct acpi_hest_generic_data *gdata;
 > 434		guid_t *sec_type;
   435	
   436		sev = ghes_severity(estatus->error_severity);
   437		apei_estatus_for_each_section(estatus, gdata) {
 > 438			sec_type = (guid_t *)gdata->section_type;
   439			sec_sev = ghes_severity(gdata->error_severity);
 > 440			if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
   441				struct cper_sec_mem_err *mem_err;
   442				mem_err = (struct cper_sec_mem_err *)(gdata+1);
   443				ghes_edac_report_mem_error(ghes, sev, mem_err);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Andy Shevchenko June 1, 2017, 9:50 a.m. UTC | #2
On Thu, Jun 1, 2017 at 2:56 AM, kbuild test robot <lkp@intel.com> wrote:
> Hi Andy,
>
> [auto build test ERROR on pm/linux-next]
> [also build test ERROR on v4.12-rc3 next-20170531]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

Dropped ahead. As cover letter says it is based on top of uuid tree.
Christoph Hellwig June 5, 2017, 4:01 p.m. UTC | #3
> -		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
> -				 CPER_SEC_PLATFORM_MEM)) {
> +		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {

The "!" here seems incorrect.

>  #ifdef CONFIG_ACPI_APEI_PCIEAER
> -		else if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
> -				      CPER_SEC_PCIE)) {
> +		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {

Same here.
Andy Shevchenko June 5, 2017, 4:19 p.m. UTC | #4
On Mon, 2017-06-05 at 18:01 +0200, Christoph Hellwig wrote:
> > -		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
> > -				 CPER_SEC_PLATFORM_MEM)) {
> > +		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM))
> > {
> 
> The "!" here seems incorrect.
> 
> >  #ifdef CONFIG_ACPI_APEI_PCIEAER
> > -		else if (!uuid_le_cmp(*(uuid_le *)gdata-
> > >section_type,
> > -				      CPER_SEC_PCIE)) {
> > +		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {
> 
> Same here.

Thanks!
Are you going to fixup when applying or better me to send an updated
version?
Christoph Hellwig June 5, 2017, 4:22 p.m. UTC | #5
On Mon, Jun 05, 2017 at 07:19:43PM +0300, Andy Shevchenko wrote:
> Thanks!
> Are you going to fixup when applying or better me to send an updated
> version?

I'd prefer a resend so that all the maintainers can carefully re-review
the patches.
Andy Shevchenko June 5, 2017, 4:28 p.m. UTC | #6
On Mon, 2017-06-05 at 18:22 +0200, Christoph Hellwig wrote:
> On Mon, Jun 05, 2017 at 07:19:43PM +0300, Andy Shevchenko wrote:
> > Thanks!
> > Are you going to fixup when applying or better me to send an updated
> > version?
> 
> I'd prefer a resend so that all the maintainers can carefully re-
> review
> the patches.

I'm on it.
Thanks for review.
diff mbox

Patch

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index d0855c09f32f..084414a4c5b8 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -431,12 +431,13 @@  static void ghes_do_proc(struct ghes *ghes,
 {
 	int sev, sec_sev;
 	struct acpi_hest_generic_data *gdata;
+	guid_t *sec_type;
 
 	sev = ghes_severity(estatus->error_severity);
 	apei_estatus_for_each_section(estatus, gdata) {
+		sec_type = (guid_t *)gdata->section_type;
 		sec_sev = ghes_severity(gdata->error_severity);
-		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
-				 CPER_SEC_PLATFORM_MEM)) {
+		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
 			struct cper_sec_mem_err *mem_err;
 			mem_err = (struct cper_sec_mem_err *)(gdata+1);
 			ghes_edac_report_mem_error(ghes, sev, mem_err);
@@ -445,8 +446,7 @@  static void ghes_do_proc(struct ghes *ghes,
 			ghes_handle_memory_failure(gdata, sev);
 		}
 #ifdef CONFIG_ACPI_APEI_PCIEAER
-		else if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
-				      CPER_SEC_PCIE)) {
+		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {
 			struct cper_sec_pcie *pcie_err;
 			pcie_err = (struct cper_sec_pcie *)(gdata+1);
 			if (sev == GHES_SEV_RECOVERABLE &&