[Openipmi-developer] [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()

2024-06-03 Thread Andy Shevchenko
Make two APIs look similar. Hence convert match_string() to be a 2-argument macro. In order to avoid unneeded churn, convert all users as well. There is no functional change intended. Signed-off-by: Andy Shevchenko --- Compile tested with `make allyesconfig` and `make allmodconfig` on x86_64

Re: [Openipmi-developer] [PATCH 33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations

2024-04-03 Thread Andy Shevchenko
On Wed, Apr 03, 2024 at 07:47:49AM -0500, Corey Minyard wrote: > On Wed, Apr 03, 2024 at 12:30:44PM +0300, Andy Shevchenko wrote: > > On Wed, Apr 03, 2024 at 10:06:51AM +0200, Arnd Bergmann wrote: > > > From: Arnd Bergmann ... > > > I considered splitting up the lar

Re: [Openipmi-developer] [PATCH 33/34] drivers: remove incorrect of_match_ptr/ACPI_PTR annotations

2024-04-03 Thread Andy Shevchenko
driver > arm_sbsa_uart_platform_driver = { > .driver = { > .name = "sbsa-uart", > .pm = _dev_pm_ops, > - .of_match_table = of_match_ptr(sbsa_uart_of_match), > - .acpi_match_table = ACPI_PTR(sbsa_uart_acpi_match), > +

Re: [Openipmi-developer] [PATCH 000/606] i2c: Complete conversion to i2c_probe_new

2022-11-27 Thread Andy Shevchenko
ight have dropped one... > > You could have done: > > H=$(git rev-parse @) > b4 am -P 49-190 20221118224540.619276-1-...@kleine-koenig.org > git am ... > git filter-branch -f --msg-filter "grep -v 'Signed-off-by: Jonathan'; > echo 'Reviewed-b

Re: [Openipmi-developer] [PATCH 6/6] i2c: Make remove callback return void

2022-06-29 Thread Andy Shevchenko
rt5645.c | 4 +--- > sound/soc/codecs/rt5663.c | 4 +--- > sound/soc/codecs/rt5670.c | 4 +--- > sound/soc/codecs/rt5677.c | 4 +--- > sound/soc/codecs/rt5682

Re: [Openipmi-developer] [PATCH v2 1/2] platform: make platform_get_irq_optional() optional

2022-02-14 Thread Andy Shevchenko
other _get_optional() functions.) I think you haven't reacted anyhow to my point that you mixing apples and bananas together when comparing this 0 to the others _optional APIs. > Apart from that, I think the subject is badly chosen. With "Make > somefunc() optional" I would exp

Re: [Openipmi-developer] [PATCH] driver core: platform: Rename platform_get_irq_optional() to platform_get_irq_silent()

2022-01-25 Thread Andy Shevchenko
On Tue, Jan 25, 2022 at 01:56:05PM +0100, Matthias Schiffer wrote: > On Tue, 2022-01-25 at 09:25 +0100, Geert Uytterhoeven wrote: > > On Mon, Jan 24, 2022 at 10:02 PM Sergey Shtylyov > > wrote: > > > On 1/24/22 6:01 PM, Andy Shevchenko wrote: ... > > > >

Re: [Openipmi-developer] [PATCH] driver core: platform: Rename platform_get_irq_optional() to platform_get_irq_silent()

2022-01-19 Thread Andy Shevchenko
On Wed, Jan 19, 2022 at 10:47:06PM +0300, Sergey Shtylyov wrote: > On 1/19/22 9:51 PM, Andy Shevchenko wrote: > >>>>> It'd certainly be good to name anything that doesn't correspond to one > >>>>> of the existing semantics for the API (!) something different

Re: [Openipmi-developer] [PATCH 1/2] platform: make platform_get_irq_optional() optional (summary)

2022-01-19 Thread Andy Shevchenko
understand why we put an equal sign in all implications between meaning of the 0 cookie and NULL as an (non-existed) instance of an object? It's like comparing None object in Python to False. -- With Best Regards, Andy Shevchenko ___ Openipmi-deve

Re: [Openipmi-developer] [PATCH] driver core: platform: Rename platform_get_irq_optional() to platform_get_irq_silent()

2022-01-19 Thread Andy Shevchenko
On Sat, Jan 15, 2022 at 04:45:39PM +0100, Uwe Kleine-König wrote: > On Fri, Jan 14, 2022 at 03:04:38PM +0200, Andy Shevchenko wrote: > > On Thu, Jan 13, 2022 at 08:43:58PM +0100, Uwe Kleine-König wrote: > > > > It'd certainly be good to name anything that does

Re: [Openipmi-developer] [PATCH 1/2] platform: make platform_get_irq_optional() optional

2022-01-19 Thread Andy Shevchenko
do not care about special cookies here return irq; if (irq) setup_irq(irq) else setup_polling() See the difference? Your code is convoluted. > Anyhow, I think if you still want to change platform_get_irq_optional > you should add

Re: [Openipmi-developer] [PATCH] driver core: platform: Rename platform_get_irq_optional() to platform_get_irq_silent()

2022-01-19 Thread Andy Shevchenko
The problems I have listed in another reply should be fixed at once by the same series. -- With Best Regards, Andy Shevchenko ___ Openipmi-developer mailing list Openipmi-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Re: [Openipmi-developer] [PATCH] driver core: platform: Rename platform_get_irq_optional() to platform_get_irq_silent()

2022-01-19 Thread Andy Shevchenko
that kmalloc() may return NULL and small cookie value and actually one has to check for that (yes, either before or after against different variables)? kmalloc() is exactly an example that justifies the Sergey's patch. -- With Best Regards, And

Re: [Openipmi-developer] [PATCH] driver core: platform: Rename platform_get_irq_optional() to platform_get_irq_silent()

2022-01-19 Thread Andy Shevchenko
considering it as a successful cookie) and this all is quite confusing. If you are going to fix the underlying issue, welcome! Now I see only the step to somewhere. I.o.w. this change _standalone_ makes no sense to me. -- With Best Regards, Andy Shevchenko

Re: [Openipmi-developer] [PATCH] driver core: platform: Rename platform_get_irq_optional() to platform_get_irq_silent()

2022-01-14 Thread Andy Shevchenko
the existing semantics for the API (!) something different rather > > than adding yet another potentially overloaded meaning. > > It seems we're (at least) three who agree about this. Here is a patch > fixing the name. And similar number of people are on the other side. -- With Best Regards, Andy Shevchenko ___ Openipmi-developer mailing list Openipmi-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Re: [Openipmi-developer] [PATCH 1/2] platform: make platform_get_irq_optional() optional

2022-01-13 Thread Andy Shevchenko
y to be an > > > error. A comparison of <= 0 is also likely to be an error. A check for > > > > 0 before calling any other IRQ functions would be good. I'm > > > surprised such a check does not already existing in the IRQ API, but > > > there are probably historical

Re: [Openipmi-developer] [PATCH 1/2] platform: make platform_get_irq_optional() optional

2022-01-13 Thread Andy Shevchenko
0 is also likely to be an error. A check for > > 0 before calling any other IRQ functions would be good. I'm > surprised such a check does not already existing in the IRQ API, but > there are probably historical reasons for that. > > Andrew -- With Best Regards, Andy Shevchenko

Re: [Openipmi-developer] [PATCH 1/2] platform: make platform_get_irq_optional() optional

2022-01-13 Thread Andy Shevchenko
Is this an ack for renaming platform_get_irq_optional() to > > platform_get_irq_silent()? > > No it isn't ;-) > > If an optional IRQ is not present, drivers either just ignore it (e.g. > for devices that can have multiple interrupts or a single muxed IRQ), > or they

Re: [Openipmi-developer] [PATCH 1/2] platform: make platform_get_irq_optional() optional

2022-01-10 Thread Andy Shevchenko
not found" which is a much nicer > message than "IRQ index 5 not found".) > > My suggestion would be to keep the return value of > platform_get_irq_optional() as is, but rename it to > platform_get_irq_silent() to get rid of the expectation invoked by the > naming

[Openipmi-developer] [PATCH v3 1/1] kernel.h: Split out panic and oops helpers

2021-05-11 Thread Andy Shevchenko
from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko Reviewed-by: Bjorn Andersson Acked

[Openipmi-developer] [PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
from something which has its own domain At the same time convert users tree-wide to use new headers, although for the time being include new header back to kernel.h to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko Reviewed-by: Bjorn Andersson Acked

Re: [Openipmi-developer] [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 11:23:03PM -0700, Andrew Morton wrote: > On Wed, 7 Apr 2021 11:46:37 +0300 Andy Shevchenko > wrote: > > > On Wed, Apr 7, 2021 at 11:17 AM Kees Cook wrote: > > > > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrot

Re: [Openipmi-developer] [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-08 Thread Andy Shevchenko
On Thu, Apr 08, 2021 at 02:45:12PM +0200, Rasmus Villemoes wrote: > On 06/04/2021 15.31, Andy Shevchenko wrote: > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > Here is the attempt to start cleaning it up by splitting out panic and > > o

Re: [Openipmi-developer] [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 5:30 PM Luis Chamberlain wrote: > On Wed, Apr 07, 2021 at 10:33:44AM +0300, Andy Shevchenko wrote: > > On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: ... > > >

Re: [Openipmi-developer] [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 11:17 AM Kees Cook wrote: > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > Here is the attempt to start cleaning it up by splitting out panic an

Re: [Openipmi-developer] [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > > diff --git a/include/linux/panic_notifier.h b/include/linux/panic_notifier.h > > new file mode 100644 > > index ..41e32483d7a7 >

[Openipmi-developer] [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Andy Shevchenko
to avoid twisted indirected includes for existing users. Signed-off-by: Andy Shevchenko --- arch/powerpc/kernel/setup-common.c | 1 + arch/x86/include/asm/desc.h | 1 + arch/x86/kernel/cpu/mshyperv.c | 1 + arch/x86/kernel/setup.c | 1 + drivers/char/ipmi

[Openipmi-developer] [PATCH v2 10/10] ipmi_si: Join string literals back

2021-04-02 Thread Andy Shevchenko
For easy grepping on debug purposes join string literals back in the messages. No functional change. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 3 +- drivers/char/ipmi/ipmi_si_hardcode.c | 50 +--- drivers/char/ipmi/ipmi_si_hotmod.c

[Openipmi-developer] [PATCH v2 05/10] ipmi_si: Introduce ipmi_panic_event_str[] array

2021-04-02 Thread Andy Shevchenko
Instead of repeating twice the constant literals, introduce ipmi_panic_event_str[] array. It allows to simplify the code with help of match_string() API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 51 +++-- 1 file changed, 19 insertions

[Openipmi-developer] [PATCH v2 08/10] ipmi_si: Use strstrip() to remove surrounding spaces

2021-04-02 Thread Andy Shevchenko
Instead of home grown analogue, use strstrip() from the kernel library. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_hotmod.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi

[Openipmi-developer] [PATCH v2 03/10] ipmi_si: Utilize temporary variable to hold device pointer

2021-04-02 Thread Andy Shevchenko
Introduce a temporary variable to hold a device pointer. It can be utilized in the ->probe() and save a bit of LOCs. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/char/i

[Openipmi-developer] [PATCH v2 01/10] ipmi_si: Switch to use platform_get_mem_or_io()

2021-04-02 Thread Andy Shevchenko
Switch to use new platform_get_mem_or_io() instead of home grown analogue. Note, we also introduce ipmi_set_addr_data_and_space() helper here. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 34 1 file changed, 14 insertions(+), 20

[Openipmi-developer] [PATCH v2 07/10] ipmi_si: Get rid of ->addr_source_cleanup()

2021-04-02 Thread Andy Shevchenko
The ->addr_source_cleanup() callback is solely used by PCI driver and only for one purpose, i.e. to disable device. Get rid of ->addr_source_cleanup() by switching to PCI managed API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si.h | 2 -- drivers/char/ipmi/ipmi_si_

[Openipmi-developer] [PATCH v2 04/10] ipmi_si: Use proper ACPI macros to check error code for failures

2021-04-02 Thread Andy Shevchenko
Instead of direct comparison, use proper ACPI macros to check error code for failures. While at it, drop unneeded 'else' keyword. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers

[Openipmi-developer] [PATCH v2 09/10] ipmi_si: Drop redundant check before calling put_device()

2021-04-02 Thread Andy Shevchenko
put_device() is NULL aware, drop redundant check before calling it. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_hotmod.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi/ipmi_si_hotmod.c index

[Openipmi-developer] [PATCH v2 02/10] ipmi_si: Remove bogus err_free label

2021-04-02 Thread Andy Shevchenko
There is no more 'free' in the error path, so drop the label and return errors inline. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers

[Openipmi-developer] [PATCH v2 00/10] ipmi_si: Set of clean ups

2021-04-02 Thread Andy Shevchenko
the array - patch 6: just exported array w/o moving to header (Corey) - wrapped up cover letter Andy Shevchenko (10): ipmi_si: Switch to use platform_get_mem_or_io() ipmi_si: Remove bogus err_free label ipmi_si: Utilize temporary variable to hold device pointer ipmi_si: Use proper A

[Openipmi-developer] [PATCH v2 06/10] ipmi_si: Reuse si_to_str[] array in ipmi_hardcode_init_one()

2021-04-02 Thread Andy Shevchenko
Instead of making the comparison one by one, reuse si_to_str[] array in ipmi_hardcode_init_one() in conjunction with match_string() API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si.h | 6 +- drivers/char/ipmi/ipmi_si_hardcode.c | 23

Re: [Openipmi-developer] [PATCH v1 03/10] ipmi_si: Utilize temporary variable to hold device pointer

2021-04-02 Thread Andy Shevchenko
On Friday, April 2, 2021, Corey Minyard wrote: > On Tue, Mar 30, 2021 at 09:16:42PM +0300, Andy Shevchenko wrote: > > By one of the previous clean up change we got a temporary variable to > hold > > a device pointer. It can be utilized in other calls in the ->probe() and &

Re: [Openipmi-developer] [PATCH v1 06/10] ipmi_si: Reuse si_to_str array in ipmi_hardcode_init_one()

2021-04-02 Thread Andy Shevchenko
On Friday, April 2, 2021, Corey Minyard wrote: > On Tue, Mar 30, 2021 at 09:16:45PM +0300, Andy Shevchenko wrote: > > Instead of making the comparison one by one, reuse si_to_str array > > in ipmi_hardcode_init_one() in conjunction with match_string() API. > > > > Sig

Re: [Openipmi-developer] [PATCH v1 05/10] ipmi_si: Introduce panic_event_str array

2021-04-02 Thread Andy Shevchenko
On Friday, April 2, 2021, Corey Minyard wrote: > On Tue, Mar 30, 2021 at 09:16:44PM +0300, Andy Shevchenko wrote: > > Instead of twice repeat the constant literals, introduce > > panic_event_str array. It allows to simplify the code with > > help of match_string() AP

Re: [Openipmi-developer] [PATCH v1 01/10] ipmi_si: Switch to use platform_get_mem_or_io()

2021-04-02 Thread Andy Shevchenko
On Friday, April 2, 2021, Corey Minyard wrote: > On Tue, Mar 30, 2021 at 09:16:40PM +0300, Andy Shevchenko wrote: > > Switch to use new platform_get_mem_or_io() instead of home grown > analogue. > > Note, we also introduce ipmi_set_addr_data_and_space() helper here. > >

[Openipmi-developer] [PATCH v1 01/10] ipmi_si: Switch to use platform_get_mem_or_io()

2021-03-30 Thread Andy Shevchenko
Switch to use new platform_get_mem_or_io() instead of home grown analogue. Note, we also introduce ipmi_set_addr_data_and_space() helper here. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 40 +++- 1 file changed, 16 insertions(+), 24

[Openipmi-developer] [PATCH v1 08/10] ipmi_si: Use strstrip() to remove surrounding spaces

2021-03-30 Thread Andy Shevchenko
Instead of home grown analogue, use strstrip() from the kernel library. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_hotmod.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi

[Openipmi-developer] [PATCH v1 09/10] ipmi_si: Drop redundant check before calling put_device()

2021-03-30 Thread Andy Shevchenko
put_device() is NULL aware, drop redundant check before calling it. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_hotmod.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi/ipmi_si_hotmod.c index

[Openipmi-developer] [PATCH v1 10/10] ipmi_si: Join string literals back

2021-03-30 Thread Andy Shevchenko
For easy grepping on debug purposes join string literals back in the messages. No functional change. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 3 +- drivers/char/ipmi/ipmi_si_hardcode.c | 50 +--- drivers/char/ipmi/ipmi_si_hotmod.c

[Openipmi-developer] [PATCH v1 04/10] ipmi_si: Use proper ACPI macros to check error code for failures

2021-03-30 Thread Andy Shevchenko
Instead of direct comparison, use proper ACPI macros to check error code for failures. While at it, drop unneeded 'else' keyword. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers

[Openipmi-developer] [PATCH v1 07/10] ipmi_si: Get rid of ->addr_source_cleanup()

2021-03-30 Thread Andy Shevchenko
The ->addr_source_cleanup() callback is solely used by PCI driver and only for one purpose, i.e. to disable device. Get rid of ->addr_source_cleanup() by switching to PCI managed API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si.h | 2 -- drivers/char/ipmi/ipmi_si_

[Openipmi-developer] [PATCH v1 03/10] ipmi_si: Utilize temporary variable to hold device pointer

2021-03-30 Thread Andy Shevchenko
By one of the previous clean up change we got a temporary variable to hold a device pointer. It can be utilized in other calls in the ->probe() and save a bit of LOCs. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 15 +++ 1 file changed, 7 inserti

[Openipmi-developer] [PATCH v1 05/10] ipmi_si: Introduce panic_event_str array

2021-03-30 Thread Andy Shevchenko
Instead of twice repeat the constant literals, introduce panic_event_str array. It allows to simplify the code with help of match_string() API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 49 ++--- 1 file changed, 17 insertions(+), 32

[Openipmi-developer] [PATCH v1 06/10] ipmi_si: Reuse si_to_str array in ipmi_hardcode_init_one()

2021-03-30 Thread Andy Shevchenko
Instead of making the comparison one by one, reuse si_to_str array in ipmi_hardcode_init_one() in conjunction with match_string() API. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si.h | 3 +++ drivers/char/ipmi/ipmi_si_hardcode.c | 23 +-- drivers

[Openipmi-developer] [PATCH v1 02/10] ipmi_si: Remove bogus err_free label

2021-03-30 Thread Andy Shevchenko
There is no more 'free' in the error path, so drop the label and return errors inline. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_si_platform.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers

Re: [Openipmi-developer] [PATCH v1] ipmi: convert tasklets to use new tasklet_setup() API

2020-08-19 Thread Andy Shevchenko
On Wed, Aug 19, 2020 at 06:57:17AM -0500, Corey Minyard wrote: > I already have a patch for this from Allen Pais that is in the next > tree. Apparently not in today's Linux Next... > On Wed, Aug 19, 2020 at 01:14:39PM +0300, Andy Shevchenko wrote: > > In preparation for uncondit

[Openipmi-developer] [PATCH v1] ipmi: convert tasklets to use new tasklet_setup() API

2020-08-19 Thread Andy Shevchenko
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 8 +++- 1 file

[Openipmi-developer] [PATCH v1] ipmi: Replace guid_copy() with import_guid() where it makes sense

2020-04-22 Thread Andy Shevchenko
There is a specific API to treat raw data as GUID, i.e. import_guid(). Use it instead of guid_copy() with explicit casting. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/ipmi

Re: [Openipmi-developer] [PATCH] ipmi: Convert ipmi_debug_msg to pr_debug and use %*ph

2019-10-11 Thread Andy Shevchenko
when > enabled by #DEBUG or newly possible CONFIG_DYNAMIC_DEBUG. I have sent v2 with slightly better approach (no need to have %s). -- With Best Regards, Andy Shevchenko ___ Openipmi-developer mailing list Openipmi-developer@lists.sou

[Openipmi-developer] [PATCH v2] ipmi: use %*ph to print small buffer

2019-10-11 Thread Andy Shevchenko
From: Andy Shevchenko Use %*ph format to print small buffer as hex string. The change is safe since the specifier can handle up to 64 bytes and taking into account the buffer size of 100 bytes on stack the function has never been used to dump more than 32 bytes. Note, this also avoids potential

Re: [Openipmi-developer] [PATCH v1] ipmi: use %*ph to print small buffer

2019-10-11 Thread Andy Shevchenko
On Fri, Oct 11, 2019 at 08:18:41AM -0700, Joe Perches wrote: > On Fri, 2019-10-11 at 18:12 +0300, Andy Shevchenko wrote: > > On Fri, Oct 11, 2019 at 07:58:14AM -0700, Joe Perches wrote: > > > On Fri, 2019-10-11 at 17:52 +0300, Andy Shevchenko wrote: > > > > static

Re: [Openipmi-developer] [PATCH v1] ipmi: use %*ph to print small buffer

2019-10-11 Thread Andy Shevchenko
On Fri, Oct 11, 2019 at 07:58:14AM -0700, Joe Perches wrote: > On Fri, 2019-10-11 at 17:52 +0300, Andy Shevchenko wrote: > > Use %*ph format to print small buffer as hex string. > > > > The change is safe since the specifier can handle up to 64 bytes and taking > > i

[Openipmi-developer] [PATCH v1] ipmi: use %*ph to print small buffer

2019-10-11 Thread Andy Shevchenko
From: Andy Shevchenko Use %*ph format to print small buffer as hex string. The change is safe since the specifier can handle up to 64 bytes and taking into account the buffer size of 100 bytes on stack the function has never been used to dump more than 32 bytes. Note, this also avoids potential

Re: [Openipmi-developer] [PATCH v1 1/2] ipmi: Use defined constant for UUID representation

2019-01-24 Thread Andy Shevchenko
On Thu, Jan 24, 2019 at 10:22:19PM +0200, Andy Shevchenko wrote: > Instead of magic number use pre-defined constant for UUID binary and > string representations. > > While here, drop the implementation details of guid_t type. > - return snprintf(buf, 38, "%pUl\n"

[Openipmi-developer] [PATCH v1 2/2] ipmi: Use dedicated API for copying a UUID

2019-01-24 Thread Andy Shevchenko
Use guid_copy() instead of memcpy() to hide guid_t implementation details and to show we expect guid_t in a raw buffer. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c

[Openipmi-developer] [PATCH v1 1/2] ipmi: Use defined constant for UUID representation

2019-01-24 Thread Andy Shevchenko
Instead of magic number use pre-defined constant for UUID binary and string representations. While here, drop the implementation details of guid_t type. Signed-off-by: Andy Shevchenko --- drivers/char/ipmi/ipmi_msghandler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Openipmi-developer] [PATCH v1] ipmi: Re-use existing macros for built-in properties

2018-02-26 Thread Andy Shevchenko
On Mon, 2018-01-22 at 18:07 +0200, Andy Shevchenko wrote: > On Mon, 2018-01-22 at 09:49 -0600, Corey Minyard wrote: > > On 01/22/2018 06:56 AM, Andy Shevchenko wrote: > > > Replace home grown set_prop_entry() macro by generic > > > PROPERTY_ENTRY_INTEGER()-like ones. >

Re: [Openipmi-developer] [PATCH arm/aspeed/ast2500 v2] ipmi: add an Aspeed KCS IPMI BMC driver

2018-01-24 Thread Andy Shevchenko
mc *kcs_bmc, u32 reg, u8 b); > + > + enum kcs_phases phase; > + enum kcs_errors error; > + > + wait_queue_head_t queue; > + bool data_in_avail; > + int data_in_idx; > + u8 *data_in

Re: [Openipmi-developer] [PATCH v1] ipmi: Re-use existing macros for built-in properties

2018-01-22 Thread Andy Shevchenko
On Mon, 2018-01-22 at 09:49 -0600, Corey Minyard wrote: > On 01/22/2018 06:56 AM, Andy Shevchenko wrote: > > Replace home grown set_prop_entry() macro by generic > > PROPERTY_ENTRY_INTEGER()-like ones. > > > > Cc: Corey Minyard <cminy...@mvista.com> &

Re: [Openipmi-developer] [PATCH v1 04/15] ipmi_ssif: Remove duplicate NULL check

2018-01-18 Thread Andy Shevchenko
On Thu, 2018-01-18 at 09:41 -0600, Corey Minyard wrote: > On 01/18/2018 09:29 AM, Andy Shevchenko wrote: > > On Tue, 2017-10-31 at 16:21 +0200, Andy Shevchenko wrote: > > > Since i2c_unregister_device() became NULL-aware we may remove > > > duplicate > &

Re: [Openipmi-developer] [PATCH v1 04/15] ipmi_ssif: Remove duplicate NULL check

2018-01-18 Thread Andy Shevchenko
On Tue, 2017-10-31 at 16:21 +0200, Andy Shevchenko wrote: > Since i2c_unregister_device() became NULL-aware we may remove > duplicate > NULL check. Anyone? Wolfram, I think if no one picks this soon it's quite safe to push it through i2c tree. > Cc: Corey Minyard <miny..

[Openipmi-developer] [PATCH v1 04/15] ipmi_ssif: Remove duplicate NULL check

2017-10-31 Thread Andy Shevchenko
Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Corey Minyard <miny...@acm.org> Cc: openipmi-developer@lists.sourceforge.net Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/char/ipmi/ipmi_ssif.c | 3 +-- 1 fil