<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mcb/mcb-core.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-26T23:01:26+00:00</updated>
<entry>
<title>mcb: fix incorrect sanity check</title>
<updated>2026-02-26T23:01:26+00:00</updated>
<author>
<name>Jose Javier Rodriguez Barbarin</name>
<email>dev-josejavier.rodriguez@duagon.com</email>
</author>
<published>2026-01-16T11:21:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6fcc7e8cf38904f4b2d21c3577911ffbf7bf1a96'/>
<id>urn:sha1:6fcc7e8cf38904f4b2d21c3577911ffbf7bf1a96</id>
<content type='text'>
[ Upstream commit bc2e4bc952e26dd93b978588219044bd8b24237b ]

__mcb_register_driver() makes some sanity checks over mcb_driver
to check if .probe and .remove callbacks are set.  However, since commit
3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
removed the .remove callback from menz127-gpio.c, not all mcb device
drivers implement .remove callback.

Remove .remove check to ensure all mcb device drivers can be loaded.

Signed-off-by: Jose Javier Rodriguez Barbarin &lt;dev-josejavier.rodriguez@duagon.com&gt;
Fixes: 3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
[ jth: added statement about menz127-gpio.c ]
Signed-off-by: Johannes Thumshirn &lt;morbidrsa@gmail.com&gt;
Link: https://patch.msgid.link/16fb55bd59d9c1d2ce2443f41d4dec2048f9a8ec.1768562302.git.jth@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mcb: use sysfs_emit_at() instead of scnprintf() in show functions</title>
<updated>2025-07-16T12:17:07+00:00</updated>
<author>
<name>Abhinav Ananthu</name>
<email>abhinav.ogl@gmail.com</email>
</author>
<published>2025-07-07T07:47:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77e49c3588689cf3c9a344c7cc80fb4e61c1375e'/>
<id>urn:sha1:77e49c3588689cf3c9a344c7cc80fb4e61c1375e</id>
<content type='text'>
This change improves clarity and ensures proper bounds checking in
line with the preferred sysfs_emit() API usage for sysfs 'show'
functions. The PAGE_SIZE check is now handled internally by the helper.

No functional change intended.

Signed-off-by: Abhinav Ananthu &lt;abhinav.ogl@gmail.com&gt;
Signed-off-by: Johannes Thumshirn &lt;jth@kernel.org&gt;
Reviewed-by: Johannes Thumshirn &lt;jth@kernel.org&gt;
Link: https://lore.kernel.org/r/20250707074720.40051-2-jth@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>module: Convert symbol namespace to string literal</title>
<updated>2024-12-02T19:34:44+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2024-12-02T14:59:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdd30ebb1b9f36159d66f088b61aee264e649d7a'/>
<id>urn:sha1:cdd30ebb1b9f36159d66f088b61aee264e649d7a</id>
<content type='text'>
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &amp;&amp;
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &amp;&amp;
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: have match() callback in struct bus_type take a const *</title>
<updated>2024-07-03T13:16:54+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-07-01T12:07:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d69d804845985c29ab5be5a4b3b1f4787893daf8'/>
<id>urn:sha1:d69d804845985c29ab5be5a4b3b1f4787893daf8</id>
<content type='text'>
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *.  This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.

Because the match() callback is in all busses, all busses are modified
to handle this properly.  This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.

For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.

Cc: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Reviewed-by: Alex Elder &lt;elder@kernel.org&gt;
Acked-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: constify the struct device_type usage</title>
<updated>2024-03-07T20:38:15+00:00</updated>
<author>
<name>Ricardo B. Marliere</name>
<email>ricardo@marliere.net</email>
</author>
<published>2024-02-19T19:52:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b1a9b58402ee48c527e834d48d33fc502199335'/>
<id>urn:sha1:3b1a9b58402ee48c527e834d48d33fc502199335</id>
<content type='text'>
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
mcb_carrier_device_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: "Ricardo B. Marliere" &lt;ricardo@marliere.net&gt;
Link: https://lore.kernel.org/r/20240219-device_cleanup-mcb-v1-1-dc930e7dc11c@marliere.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: make mcb_bus_type const</title>
<updated>2024-03-07T20:37:58+00:00</updated>
<author>
<name>Ricardo B. Marliere</name>
<email>ricardo@marliere.net</email>
</author>
<published>2024-02-27T11:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01771a598d1e19bc114ae4f08495700e2e721a41'/>
<id>urn:sha1:01771a598d1e19bc114ae4f08495700e2e721a41</id>
<content type='text'>
Now that the driver core can properly handle constant struct bus_type,
move the mcb_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: "Ricardo B. Marliere" &lt;ricardo@marliere.net&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Johannes Thumshirn &lt;jth@kernel.org&gt;
Signed-off-by: Johannes Thumshirn &lt;jth@kernel.org&gt;
Link: https://lore.kernel.org/r/20240227114029.22319-2-jth@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: core: fix kernel-doc warnings</title>
<updated>2023-12-15T16:07:05+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-12-06T05:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce8df3f4d0d99ee2f76d1260fe69793ad05a13bf'/>
<id>urn:sha1:ce8df3f4d0d99ee2f76d1260fe69793ad05a13bf</id>
<content type='text'>
Correct function comments to prevent warnings from
scripts/kernel-doc.

mcb-core.c:270: warning: Function parameter or member 'carrier' not described in 'mcb_alloc_bus'
mcb-core.c:336: warning: expecting prototype for mcb_bus_put(). Prototype was for mcb_bus_get() instead
mcb-core.c:463: warning: Function parameter or member 'mem' not described in 'mcb_release_mem'
mcb-core.c:463: warning: Excess function parameter 'dev' description in 'mcb_release_mem'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Johannes Thumshirn &lt;morbidrsa@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20231206055821.17284-1-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: fix error handling for different scenarios when parsing</title>
<updated>2023-10-21T21:04:02+00:00</updated>
<author>
<name>Sanjuán García, Jorge</name>
<email>Jorge.SanjuanGarcia@duagon.com</email>
</author>
<published>2023-10-19T14:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=63ba2d07b4be72b94216d20561f43e1150b25d98'/>
<id>urn:sha1:63ba2d07b4be72b94216d20561f43e1150b25d98</id>
<content type='text'>
chameleon_parse_gdd() may fail for different reasons and end up
in the err tag. Make sure we at least always free the mcb_device
allocated with mcb_alloc_dev().

If mcb_device_register() fails, make sure to give up the reference
in the same place the device was added.

Fixes: 728ac3389296 ("mcb: mcb-parse: fix error handing in chameleon_parse_gdd()")
Cc: stable &lt;stable@kernel.org&gt;
Reviewed-by: Jose Javier Rodriguez Barbarin &lt;JoseJavier.Rodriguez@duagon.com&gt;
Signed-off-by: Jorge Sanjuan Garcia &lt;jorge.sanjuangarcia@duagon.com&gt;
Link: https://lore.kernel.org/r/20231019141434.57971-2-jorge.sanjuangarcia@duagon.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Use the actual bus passed to init and release functions</title>
<updated>2023-10-21T21:03:47+00:00</updated>
<author>
<name>Rodríguez Barbarin, José Javier</name>
<email>josejavier.rodriguez@duagon.com</email>
</author>
<published>2023-10-20T12:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28cbfe09ff20964d293cd7af10d2ec0782cf86cb'/>
<id>urn:sha1:28cbfe09ff20964d293cd7af10d2ec0782cf86cb</id>
<content type='text'>
The functions mcb_bus_add_devices() and mcb_devices_unregister()
take a mcb_bus as argument that is never being used. This implies
that there is only one bus.

Do not ignore mcb_bus parameter and get the actual bus_type from
the device related to this mcb_bus.

Co-developed-by: Jorge Sanjuan Garcia &lt;jorge.sanjuangarcia@duagon.com&gt;
Signed-off-by: Jorge Sanjuan Garcia &lt;jorge.sanjuangarcia@duagon.com&gt;
Signed-off-by: Jose Javier Rodriguez Barbarin &lt;JoseJavier.Rodriguez@duagon.com&gt;
Link: https://lore.kernel.org/r/20231020124324.54692-2-JoseJavier.Rodriguez@duagon.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 6.6-rc6 into char-misc-next</title>
<updated>2023-10-16T18:46:20+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-10-16T18:46:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f19ca4e014f2bd4088b78f31426f0ba3b8e6a3c'/>
<id>urn:sha1:5f19ca4e014f2bd4088b78f31426f0ba3b8e6a3c</id>
<content type='text'>
We need the char/misc fixes in here as well, to build on for other
changes.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
