<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mfd/sm501.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-06-15T12:02:53Z</updated>
<entry>
<title>mfd: sm501: Use DEVICE_ATTR_RO macro</title>
<updated>2021-06-15T12:02:53Z</updated>
<author>
<name>Zhen Lei</name>
</author>
<published>2021-06-02T11:43:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2cb660b2fefbe5f8b2375bca2da21e67fbf5573'/>
<id>urn:sha1:a2cb660b2fefbe5f8b2375bca2da21e67fbf5573</id>
<content type='text'>
Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes
the code a bit shorter and easier to read.

Signed-off-by: Zhen Lei &lt;thunder.leizhen@huawei.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: sm501: Fix leaks in probe()</title>
<updated>2020-09-30T15:25:19Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2020-09-11T11:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ce24f8967df2836b4557a23e74dc4bb098249f1'/>
<id>urn:sha1:8ce24f8967df2836b4557a23e74dc4bb098249f1</id>
<content type='text'>
This code should clean up if sm501_init_dev() fails.

Fixes: b6d6454fdb66 ("[PATCH] mfd: SM501 core driver")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: sm501: Use GPIO_LOOKUP_IDX() helper macro</title>
<updated>2020-05-18T08:12:41Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2020-05-11T14:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b67b836625d9b8350aaec7ecd8347b0336f3f92'/>
<id>urn:sha1:7b67b836625d9b8350aaec7ecd8347b0336f3f92</id>
<content type='text'>
i801_add_mux() fills in the GPIO lookup table by manually populating an
array of gpiod_lookup structures.  Use the existing GPIO_LOOKUP_IDX()
helper macro instead, to relax a dependency on the gpiod_lookup
structure's member names.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20200511145257.22970-3-geert+renesas@glider.be
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: sm501: Fix mismatches of request_mem_region</title>
<updated>2020-01-24T07:33:56Z</updated>
<author>
<name>Chuhong Yuan</name>
</author>
<published>2019-11-16T15:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b88aa8509828b56919b3cb0901803354fc156320'/>
<id>urn:sha1:b88aa8509828b56919b3cb0901803354fc156320</id>
<content type='text'>
This driver misuses release_resource + kfree to match request_mem_region,
which is incorrect.
The right way is to use release_mem_region.
Replace the mismatched calls with the right ones to fix it.

Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: sm501: Include the GPIO driver header</title>
<updated>2019-09-02T10:09:03Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2019-08-20T10:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f68c0a873ef28637a201ec37e1bafdf040813454'/>
<id>urn:sha1:f68c0a873ef28637a201ec37e1bafdf040813454</id>
<content type='text'>
This driver creates a gpio chip so it needs to include the
appropriate header &lt;linux/gpio/driver.h&gt; explicitly rather
than implicitly.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: Remove dev_err() usage after platform_get_irq()</title>
<updated>2019-08-12T10:29:47Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2019-07-30T18:15:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=802d9bd4fac70be2ea61fa83660a87a57d06bab0'/>
<id>urn:sha1:802d9bd4fac70be2ea61fa83660a87a57d06bab0</id>
<content type='text'>
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// &lt;smpl&gt;
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret &lt; 0 \| ret &lt;= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// &lt;/smpl&gt;

While we're here, remove braces on if statements that only have one
statement (manually).

Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500</title>
<updated>2019-06-19T15:09:55Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-04T08:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2912cb15bdda8ba4a5dd73396ad62641af2f520'/>
<id>urn:sha1:d2912cb15bdda8ba4a5dd73396ad62641af2f520</id>
<content type='text'>
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mfd: sm501: Use struct_size() in devm_kzalloc()</title>
<updated>2019-02-07T10:43:09Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2019-01-22T16:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f208eca4f2faa38def458f663ec142a0b6f451b'/>
<id>urn:sha1:9f208eca4f2faa38def458f663ec142a0b6f451b</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    struct boo entry[];
};

instance = devm_kzalloc(dev, sizeof(struct foo) + count * sizeof(struct boo), GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: sm501: Fix potential NULL pointer dereference</title>
<updated>2019-02-07T10:42:47Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2019-01-22T16:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae7b8eda27b33b1f688dfdebe4d46f690a8f9162'/>
<id>urn:sha1:ae7b8eda27b33b1f688dfdebe4d46f690a8f9162</id>
<content type='text'>
There is a potential NULL pointer dereference in case devm_kzalloc()
fails and returns NULL.

Fix this by adding a NULL check on *lookup*

This bug was detected with the help of Coccinelle.

Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: sm501: Set coherent_dma_mask when creating subdevices</title>
<updated>2018-08-16T09:13:57Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2018-08-04T03:59:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f606da78230f09cf1a71fde6ee91d0c710fa2b2'/>
<id>urn:sha1:2f606da78230f09cf1a71fde6ee91d0c710fa2b2</id>
<content type='text'>
Instantiating the sm501 OHCI subdevice results in a kernel warning.

sm501-usb sm501-usb: SM501 OHCI
sm501-usb sm501-usb: new USB bus registered, assigned bus number 1
WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516
ohci_init+0x194/0x2d8
Modules linked in:

CPU: 0 PID: 1 Comm: swapper Tainted: G        W
4.18.0-rc7-00178-g0b5b1f9a78b5 #1
PC is at ohci_init+0x194/0x2d8
PR is at ohci_init+0x168/0x2d8
PC  : 8c27844c SP  : 8f81dd94 SR  : 40008001
TEA : 29613060
R0  : 00000000 R1  : 00000000 R2  : 00000000 R3  : 00000202
R4  : 8fa98b88 R5  : 8c277e68 R6  : 00000000 R7  : 00000000
R8  : 8f965814 R9  : 8c388100 R10 : 8fa98800 R11 : 8fa98928
R12 : 8c48302c R13 : 8fa98920 R14 : 8c48302c
MACH: 00000096 MACL: 0000017c GBR : 00000000 PR  : 8c278420

Call trace:
 [&lt;(ptrval)&gt;] usb_add_hcd+0x1e8/0x6ec
 [&lt;(ptrval)&gt;] _dev_info+0x0/0x54
 [&lt;(ptrval)&gt;] arch_local_save_flags+0x0/0x8
 [&lt;(ptrval)&gt;] arch_local_irq_restore+0x0/0x24
 [&lt;(ptrval)&gt;] ohci_hcd_sm501_drv_probe+0x114/0x2d8
...

Initialize coherent_dma_mask when creating SM501 subdevices to fix
the problem.

Fixes: b6d6454fdb66f ("mfd: SM501 core driver")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
</feed>
