Re: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-31 Thread Andy Shevchenko
On Wed, Jan 31, 2018 at 7:06 PM, Pali Rohár wrote: > On Wednesday 31 January 2018 18:53:19 Andy Shevchenko wrote: >> On Wed, Jan 31, 2018 at 6:46 PM, wrote: >> >> Ok. Then we need to stick with 5 arguments... What about name >> >> dell_fill_request()? E.g. >> > + struct calling_interface

Re: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-31 Thread Pali Rohár
On Wednesday 31 January 2018 18:53:19 Andy Shevchenko wrote: > On Wed, Jan 31, 2018 at 6:46 PM, wrote: > > >> > for allocation: ..._alloc_request() > >> > for filling: _fill_request() / _prepare_request() > >> > > >> > or alike. > >> > > >> > _set_arguments() not good enough to me. > >> > >> Ok.

Re: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-31 Thread Andy Shevchenko
On Wed, Jan 31, 2018 at 6:46 PM, wrote: >> > for allocation: ..._alloc_request() >> > for filling: _fill_request() / _prepare_request() >> > >> > or alike. >> > >> > _set_arguments() not good enough to me. >> >> Ok. Then we need to stick with 5 arguments... What about name >> dell_fill_request()

RE: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-31 Thread Mario.Limonciello
> -Original Message- > From: Pali Rohár [mailto:pali.ro...@gmail.com] > Sent: Wednesday, January 31, 2018 3:08 AM > To: Andy Shevchenko > Cc: Limonciello, Mario ; Darren Hart > ; LKML ; Platform Driver > > Subject: Re: [PATCH] platform/x86: dell-laptop: Allocate

Re: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-31 Thread Pali Rohár
On Tuesday 30 January 2018 20:14:26 Andy Shevchenko wrote: > >> -static void dell_set_arguments(u32 arg0, u32 arg1, u32 arg2, u32 arg3) > >> +static void dell_set_arguments(struct calling_interface_buffer *buffer, > >> +u32 arg0, u32 arg1, u32 arg2, u32 arg3) > > > > Hm.

Re: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-30 Thread Andy Shevchenko
On Tue, Jan 30, 2018 at 7:17 PM, Pali Rohár wrote: > On Tuesday 30 January 2018 10:59:00 Mario Limonciello wrote: >> There may be race conditions with multiple different functions working >> on a module wide buffer causing one function to get the wrong results. > > Yes, this is better. We really d

Re: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-30 Thread Pali Rohár
On Tuesday 30 January 2018 10:59:00 Mario Limonciello wrote: > There may be race conditions with multiple different functions working > on a module wide buffer causing one function to get the wrong results. > > Suggested-by: Pali Rohar > Signed-off-by: Mario Limonciello And Fixes: 549b4930f0576

Re: [PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-30 Thread Pali Rohár
On Tuesday 30 January 2018 10:59:00 Mario Limonciello wrote: > There may be race conditions with multiple different functions working > on a module wide buffer causing one function to get the wrong results. Yes, this is better. We really do not need to allocate shared buffer in dell-laptop anymore

[PATCH] platform/x86: dell-laptop: Allocate buffer on heap rather than globally

2018-01-30 Thread Mario Limonciello
There may be race conditions with multiple different functions working on a module wide buffer causing one function to get the wrong results. Suggested-by: Pali Rohar Signed-off-by: Mario Limonciello --- drivers/platform/x86/dell-laptop.c | 188 - 1 file chan