Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654583 > unrolled thread
| Started by | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| First post | 2017-05-31 21:50 +0200 |
| Last post | 2017-06-06 12:00 +0200 |
| Articles | 8 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-31 21:50 +0200
Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-01 01:00 +0200
Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API kbuild test robot <lkp@intel.com> - 2017-06-01 02:00 +0200
Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API kbuild test robot <lkp@intel.com> - 2017-06-01 02:10 +0200
Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API Christoph Hellwig <hch@lst.de> - 2017-06-05 18:10 +0200
Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-06-05 19:30 +0200
Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-05 22:40 +0200
Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API Christoph Hellwig <hch@lst.de> - 2017-06-06 12:00 +0200
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-05-31 21:50 +0200 |
| Subject | [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API |
| Message-ID | <tNhN0-CQ-23@gated-at.bofh.it> |
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.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/acpi/bus.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 784bda663d16..042cd16265b3 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -225,13 +225,13 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
struct acpi_object_list input;
union acpi_object in_params[4];
union acpi_object *out_obj;
- u8 uuid[16];
+ guid_t guid;
u32 errors;
struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
if (!context)
return AE_ERROR;
- if (ACPI_FAILURE(acpi_str_to_uuid(context->uuid_str, uuid)))
+ if (guid_parse(context->uuid_str, &guid))
return AE_ERROR;
context->ret.length = ACPI_ALLOCATE_BUFFER;
context->ret.pointer = NULL;
@@ -241,7 +241,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
input.pointer = in_params;
in_params[0].type = ACPI_TYPE_BUFFER;
in_params[0].buffer.length = 16;
- in_params[0].buffer.pointer = uuid;
+ in_params[0].buffer.pointer = (u8 *)&guid;
in_params[1].type = ACPI_TYPE_INTEGER;
in_params[1].integer.value = context->rev;
in_params[2].type = ACPI_TYPE_INTEGER;
--
2.11.0
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2017-06-01 01:00 +0200 |
| Message-ID | <tNkKS-2Is-11@gated-at.bofh.it> |
| In reply to | #1654583 |
On Wednesday, May 31, 2017 10:41:50 PM Andy Shevchenko wrote: > 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. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Thanks, Rafael
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-06-01 02:00 +0200 |
| Message-ID | <tNlGW-3j8-17@gated-at.bofh.it> |
| In reply to | #1654583 |
[Multipart message — attachments visible in raw view] — view raw
Hi Andy,
[auto build test WARNING on pm/linux-next]
[also build test WARNING 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-x010-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 warnings (new ones prefixed by >>):
drivers/acpi/bus.c: In function 'acpi_run_osc':
drivers/acpi/bus.c:228:2: error: unknown type name 'guid_t'
guid_t guid;
^~~~~~
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from drivers/acpi/bus.c:21:
drivers/acpi/bus.c:234:6: error: implicit declaration of function 'guid_parse' [-Werror=implicit-function-declaration]
if (guid_parse(context->uuid_str, &guid))
^
include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/acpi/bus.c:234:2: note: in expansion of macro 'if'
if (guid_parse(context->uuid_str, &guid))
^~
cc1: some warnings being treated as errors
vim +/if +234 drivers/acpi/bus.c
218 return AE_OK;
219 }
220 EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
221
222 acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
223 {
224 acpi_status status;
225 struct acpi_object_list input;
226 union acpi_object in_params[4];
227 union acpi_object *out_obj;
228 guid_t guid;
229 u32 errors;
230 struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
231
232 if (!context)
233 return AE_ERROR;
> 234 if (guid_parse(context->uuid_str, &guid))
235 return AE_ERROR;
236 context->ret.length = ACPI_ALLOCATE_BUFFER;
237 context->ret.pointer = NULL;
238
239 /* Setting up input parameters */
240 input.count = 4;
241 input.pointer = in_params;
242 in_params[0].type = ACPI_TYPE_BUFFER;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-06-01 02:10 +0200 |
| Message-ID | <tNlQB-3Cc-5@gated-at.bofh.it> |
| In reply to | #1654583 |
[Multipart message — attachments visible in raw view] — view raw
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-x019-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/bus.c: In function 'acpi_run_osc':
>> drivers/acpi/bus.c:228:2: error: unknown type name 'guid_t'
guid_t guid;
^~~~~~
>> drivers/acpi/bus.c:234:6: error: implicit declaration of function 'guid_parse' [-Werror=implicit-function-declaration]
if (guid_parse(context->uuid_str, &guid))
^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/guid_t +228 drivers/acpi/bus.c
222 acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
223 {
224 acpi_status status;
225 struct acpi_object_list input;
226 union acpi_object in_params[4];
227 union acpi_object *out_obj;
> 228 guid_t guid;
229 u32 errors;
230 struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
231
232 if (!context)
233 return AE_ERROR;
> 234 if (guid_parse(context->uuid_str, &guid))
235 return AE_ERROR;
236 context->ret.length = ACPI_ALLOCATE_BUFFER;
237 context->ret.pointer = NULL;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2017-06-05 18:10 +0200 |
| Message-ID | <tP2JP-54T-13@gated-at.bofh.it> |
| In reply to | #1654583 |
> + in_params[0].buffer.pointer = (u8 *)&guid; Any idea why the pointer is defined as a u8 * in union acpi_object instead of a void?
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-06-05 19:30 +0200 |
| Message-ID | <tP3Zj-5PM-73@gated-at.bofh.it> |
| In reply to | #1657695 |
On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote: > > + in_params[0].buffer.pointer = (u8 *)&guid; > > Any idea why the pointer is defined as a u8 * in union acpi_object > instead of a void? I guess this question to Rafael. -- Andy Shevchenko <andriy.shevchenko@linux.intel.com> Intel Finland Oy
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2017-06-05 22:40 +0200 |
| Message-ID | <tP6X7-7D9-1@gated-at.bofh.it> |
| In reply to | #1658029 |
On Mon, Jun 5, 2017 at 6:20 PM, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote: >> > + in_params[0].buffer.pointer = (u8 *)&guid; >> >> Any idea why the pointer is defined as a u8 * in union acpi_object >> instead of a void? > > I guess this question to Rafael. That data type is defined in upstream ACPICA and the reason why it is defined the way it is has something to do with history I suppose. Thanks, Rafael
[toc] | [prev] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2017-06-06 12:00 +0200 |
| Message-ID | <tPjrk-6ZD-21@gated-at.bofh.it> |
| In reply to | #1658133 |
On Mon, Jun 05, 2017 at 10:37:41PM +0200, Rafael J. Wysocki wrote: > On Mon, Jun 5, 2017 at 6:20 PM, Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote: > >> > + in_params[0].buffer.pointer = (u8 *)&guid; > >> > >> Any idea why the pointer is defined as a u8 * in union acpi_object > >> instead of a void? > > > > I guess this question to Rafael. > > That data type is defined in upstream ACPICA and the reason why it is > defined the way it is has something to do with history I suppose. Ok, I'll send a patch to fix it - just about every user of the field currently requires a cast, which is not a good thing.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web