Re: [PATCH] ACPI, APEI, Fix use resource_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 16, 2017 at 11:43:27AM +0100, Rafael J. Wysocki wrote:
> The argument of resource_size() is (const struct resource *) and res
> is of type (struct apei_res *).
> 
> I'm dropping this one.

Yeah, us reviewing this one was one big FAIL.

And I tell myself everytime - build those patches first! Srsly! People
really don't even build-test their shit before submitting. Because look
at the compiler output - it is everything but quiet. Crap didn't even
build.

Geez.

In file included from ./include/linux/acpi.h:25:0,
                 from drivers/acpi/apei/apei-base.c:32:
drivers/acpi/apei/apei-base.c: In function ‘apei_resources_request’:
drivers/acpi/apei/apei-base.c:509:52: error: passing argument 1 of ‘resource_size’ from incompatible pointer type [-Werror=incompatible-pointer-type]
   r = request_mem_region(res->start, resource_size(res), desc);
                                                    ^
./include/linux/ioport.h:223:86: note: in definition of macro ‘request_mem_region’
 #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name), 0)
                                                                                      ^
./include/linux/ioport.h:196:31: note: expected ‘const struct resource *’ but argument is of type ‘struct apei_res *’
 static inline resource_size_t resource_size(const struct resource *res)
                               ^~~~~~~~~~~~~
drivers/acpi/apei/apei-base.c:521:48: error: passing argument 1 of ‘resource_size’ from incompatible pointer type [-Werror=incompatible-pointer-type]
   r = request_region(res->start, resource_size(res), desc);
                                                ^
./include/linux/ioport.h:220:84: note: in definition of macro ‘request_region’
 #define request_region(start,n,name)  __request_region(&ioport_resource, (start), (n), (name), 0)
                                                                                    ^
./include/linux/ioport.h:196:31: note: expected ‘const struct resource *’ but argument is of type ‘struct apei_res *’
 static inline resource_size_t resource_size(const struct resource *res)
                               ^~~~~~~~~~~~~
drivers/acpi/apei/apei-base.c:544:44: error: passing argument 1 of ‘resource_size’ from incompatible pointer type [-Werror=incompatible-pointer-type]
   release_region(res->start, resource_size(res));
                                            ^
./include/linux/ioport.h:234:78: note: in definition of macro ‘release_region’
 #define release_region(start,n) __release_region(&ioport_resource, (start), (n))
                                                                              ^
./include/linux/ioport.h:196:31: note: expected ‘const struct resource *’ but argument is of type ‘struct apei_res *’
 static inline resource_size_t resource_size(const struct resource *res)
                               ^~~~~~~~~~~~~
drivers/acpi/apei/apei-base.c:551:48: error: passing argument 1 of ‘resource_size’ from incompatible pointer type [-Werror=incompatible-pointer-type]
   release_mem_region(res->start, resource_size(res));
                                                ^
./include/linux/ioport.h:235:81: note: in definition of macro ‘release_mem_region’
 #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
                                                                                 ^
./include/linux/ioport.h:196:31: note: expected ‘const struct resource *’ but argument is of type ‘struct apei_res *’
 static inline resource_size_t resource_size(const struct resource *res)
                               ^~~~~~~~~~~~~
drivers/acpi/apei/apei-base.c: In function ‘apei_resources_release’:
drivers/acpi/apei/apei-base.c:568:48: error: passing argument 1 of ‘resource_size’ from incompatible pointer type [-Werror=incompatible-pointer-type]
   release_mem_region(res->start, resource_size(res));
                                                ^
./include/linux/ioport.h:235:81: note: in definition of macro ‘release_mem_region’
 #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
                                                                                 ^
./include/linux/ioport.h:196:31: note: expected ‘const struct resource *’ but argument is of type ‘struct apei_res *’
 static inline resource_size_t resource_size(const struct resource *res)
                               ^~~~~~~~~~~~~
drivers/acpi/apei/apei-base.c:570:44: error: passing argument 1 of ‘resource_size’ from incompatible pointer type [-Werror=incompatible-pointer-type]
   release_region(res->start, resource_size(res));
                                            ^
./include/linux/ioport.h:234:78: note: in definition of macro ‘release_region’
 #define release_region(start,n) __release_region(&ioport_resource, (start), (n))
                                                                              ^
./include/linux/ioport.h:196:31: note: expected ‘const struct resource *’ but argument is of type ‘struct apei_res *’
 static inline resource_size_t resource_size(const struct resource *res)
                               ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:310: recipe for target 'drivers/acpi/apei/apei-base.o' failed
make[1]: *** [drivers/acpi/apei/apei-base.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1674: recipe for target 'drivers/acpi/apei/' failed
make: *** [drivers/acpi/apei/] Error 2

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux