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
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
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),
> +
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
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
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
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:
...
> > > >
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
...
> > >
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
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
>
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
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
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
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
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
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
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_
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
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
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
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
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
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
&
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
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
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.
>
>
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
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
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
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
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
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_
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
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
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
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
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
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
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
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
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
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
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
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
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"
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
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
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.
>
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
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>
&
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
> &
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..
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
69 matches
Mail list logo