<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pinctrl/berlin/berlin.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-02-22T04:03:00Z</updated>
<entry>
<title>Convert more 'alloc_obj' cases to default GFP_KERNEL arguments</title>
<updated>2026-02-22T04:03:00Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2026-02-22T04:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32a92f8c89326985e05dce8b22d3f0aa07a3e1bd'/>
<id>urn:sha1:32a92f8c89326985e05dce8b22d3f0aa07a3e1bd</id>
<content type='text'>
This converts some of the visually simpler cases that have been split
over multiple lines.  I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.

Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script.  I probably had made it a bit _too_ trivial.

So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.

The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2026-02-21T07:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: berlin: fix memory leak in berlin_pinctrl_build_state()</title>
<updated>2025-06-24T19:17:11Z</updated>
<author>
<name>Yuan Chen</name>
</author>
<published>2025-06-20T01:53:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f6f303551100291bf2c1e1ccc66b758fffb1168'/>
<id>urn:sha1:8f6f303551100291bf2c1e1ccc66b758fffb1168</id>
<content type='text'>
In the original implementation, krealloc() failure handling incorrectly
assigned the original memory pointer to NULL after kfree(), causing a
memory leak when reallocation failed.

Fixes: de845036f997 ("pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()")
Signed-off-by: Yuan Chen &lt;chenyuan@kylinos.cn&gt;
Link: https://lore.kernel.org/20250620015343.21494-1-chenyuan_fl@163.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Constify static 'pinctrl_desc'</title>
<updated>2025-06-18T11:26:37Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2025-06-11T06:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=490bfd1ca55640e5f36e5e30245b4ab0f4a05118'/>
<id>urn:sha1:490bfd1ca55640e5f36e5e30245b4ab0f4a05118</id>
<content type='text'>
The local static 'struct pinctrl_desc' is not modified, so can be made
const for code safety.

Acked-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Acked-by: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Hal Feng &lt;hal.feng@starfivetech.com&gt;
Acked-by: Emil Renner Berthing &lt;emil.renner.berthing@canonical.com&gt;
Acked-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Link: https://lore.kernel.org/20250611-pinctrl-const-desc-v2-16-b11c1d650384@linaro.org
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: berlin: Make use of struct pinfunction</title>
<updated>2024-06-17T07:23:34Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2024-05-30T08:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d421ff557fae63fe2add87ab67b3d7b0ef6559a'/>
<id>urn:sha1:5d421ff557fae63fe2add87ab67b3d7b0ef6559a</id>
<content type='text'>
Since pin control provides a generic data type for the pin function,
use it in the driver.

Signed-off-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20240530085745.1539925-2-andy.shevchenko@gmail.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: berlin: Drop superfluous ampersands</title>
<updated>2023-09-11T13:45:09Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2023-08-24T10:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d168ccdf50e4d7008cf67ca25a1602ac860592fc'/>
<id>urn:sha1:d168ccdf50e4d7008cf67ca25a1602ac860592fc</id>
<content type='text'>
There is no need to use an ampersand to take the address of a function.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Jisheng Zhang &lt;jszhang@kernel.org&gt;
Link: https://lore.kernel.org/r/0ff17be9b31c9fcf03481c0665293b98ced741f7.1692871243.git.geert+renesas@glider.be
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: berlin: fix spelling typo in comment</title>
<updated>2022-09-05T12:10:14Z</updated>
<author>
<name>Jiangshan Yi</name>
</author>
<published>2022-09-05T07:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a13796aeb84c94e1883d4f93904a94284f8e5ea'/>
<id>urn:sha1:4a13796aeb84c94e1883d4f93904a94284f8e5ea</id>
<content type='text'>
Fix spelling typo in comment.

Reported-by: k2ci &lt;kernel-bot@kylinos.cn&gt;
Signed-off-by: Jiangshan Yi &lt;yijiangshan@kylinos.cn&gt;
Link: https://lore.kernel.org/r/20220905071300.1832105-1-13667453960@163.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()</title>
<updated>2022-03-15T01:18:57Z</updated>
<author>
<name>Meng Tang</name>
</author>
<published>2022-03-03T08:02:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de845036f997119bcacbdb7b4ccf3b6cf960745b'/>
<id>urn:sha1:de845036f997119bcacbdb7b4ccf3b6cf960745b</id>
<content type='text'>
When krealloc() fails and pctrl-&gt;functions is NULL, no error
return code of berlin_pinctrl_build_state() is assigned.
To fix this bug, ret is assigned with -ENOMEM when pctrl-&gt;functions
is NULL.

Signed-off-by: Meng Tang &lt;tangmeng@uniontech.com&gt;
Link: https://lore.kernel.org/r/20220303080206.16463-1-tangmeng@uniontech.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: Convert to using %pOFn instead of device_node.name</title>
<updated>2018-08-29T12:05:36Z</updated>
<author>
<name>Rob Herring</name>
</author>
<published>2018-08-28T01:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94f4e54cecaf3ec9181cca9367e1ad0d60188d1f'/>
<id>urn:sha1:94f4e54cecaf3ec9181cca9367e1ad0d60188d1f</id>
<content type='text'>
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Stefan Agner &lt;stefan@agner.ch&gt;
Cc: Pengutronix Kernel Team &lt;kernel@pengutronix.de&gt;
Cc: Sean Wang &lt;sean.wang@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Carlo Caione &lt;carlo@caione.org&gt;
Cc: Kevin Hilman &lt;khilman@baylibre.com&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Gregory Clement &lt;gregory.clement@bootlin.com&gt;
Cc: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Cc: Jean-Christophe Plagniol-Villard &lt;plagnioj@jcrosoft.com&gt;
Cc: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Cc: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Haojian Zhuang &lt;haojian.zhuang@linaro.org&gt;
Cc: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Cc: Barry Song &lt;baohua@kernel.org&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@st.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: Chen-Yu Tsai &lt;wens@csie.org&gt;
Cc: linux-gpio@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Acked-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
Reviewed-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: berlin: fix 'pctrl-&gt;functions' allocation in berlin_pinctrl_build_state</title>
<updated>2018-08-03T17:28:15Z</updated>
<author>
<name>YueHaibing</name>
</author>
<published>2018-08-01T05:10:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5031b7db77dc47f474f0efc2b2552c32b7bb59d'/>
<id>urn:sha1:b5031b7db77dc47f474f0efc2b2552c32b7bb59d</id>
<content type='text'>
fixes following Smatch static check warning:

 drivers/pinctrl/berlin/berlin.c:237 berlin_pinctrl_build_state()
 warn: passing devm_ allocated variable to kfree. 'pctrl-&gt;functions'

As we will be calling krealloc() on pointer 'pctrl-&gt;functions', which means
kfree() will be called in there, devm_kzalloc() shouldn't be used with
the allocation in the first place.  Fix the warning by calling kcalloc()
and managing the free procedure in error path on our own.

Fixes: 3de68d331c24 ("pinctrl: berlin: add the core pinctrl driver for Marvell Berlin SoCs")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Reviewed-by: Jisheng Zhang &lt;Jisheng.Zhang@synaptics.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
