<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/firewire/core-device.c, branch v6.6.131</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>firewire: core: correct documentation of fw_csr_string() kernel API</title>
<updated>2024-02-23T08:25:02+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2024-02-01T11:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=1a2f08576e3027307aca503da08cb2707429dfe8'/>
<id>1a2f08576e3027307aca503da08cb2707429dfe8</id>
<content type='text'>
commit 5f9ab17394f831cb7986ec50900fa37507a127f1 upstream.

Against its current description, the kernel API can accepts all types of
directory entries.

This commit corrects the documentation.

Cc: stable@vger.kernel.org
Fixes: 3c2c58cb33b3 ("firewire: core: fw_csr_string addendum")
Link: https://lore.kernel.org/r/20240130100409.30128-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 5f9ab17394f831cb7986ec50900fa37507a127f1 upstream.

Against its current description, the kernel API can accepts all types of
directory entries.

This commit corrects the documentation.

Cc: stable@vger.kernel.org
Fixes: 3c2c58cb33b3 ("firewire: core: fw_csr_string addendum")
Link: https://lore.kernel.org/r/20240130100409.30128-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>firewire: core: fix possible memory leak in create_units()</title>
<updated>2023-12-08T07:52:15+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2023-11-29T09:34:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=94725787ba91f8bc86935039feb6c481d4a19294'/>
<id>94725787ba91f8bc86935039feb6c481d4a19294</id>
<content type='text'>
commit 891e0eab32a57fca4d36c5162628eb0bcb1f0edf upstream.

If device_register() fails, the refcount of device is not 0, the name
allocated in dev_set_name() is leaked. To fix this by calling put_device(),
so that it will be freed in callback function kobject_cleanup().

unreferenced object 0xffff9d99035c7a90 (size 8):
  comm "systemd-udevd", pid 168, jiffies 4294672386 (age 152.089s)
  hex dump (first 8 bytes):
    66 77 30 2e 30 00 ff ff                          fw0.0...
  backtrace:
    [&lt;00000000e1d62bac&gt;] __kmem_cache_alloc_node+0x1e9/0x360
    [&lt;00000000bbeaff31&gt;] __kmalloc_node_track_caller+0x44/0x1a0
    [&lt;00000000491f2fb4&gt;] kvasprintf+0x67/0xd0
    [&lt;000000005b960ddc&gt;] kobject_set_name_vargs+0x1e/0x90
    [&lt;00000000427ac591&gt;] dev_set_name+0x4e/0x70
    [&lt;000000003b4e447d&gt;] create_units+0xc5/0x110

fw_unit_release() will be called in the error path, move fw_device_get()
before calling device_register() to keep balanced with fw_device_put() in
fw_unit_release().

Cc: stable@vger.kernel.org
Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array")
Fixes: a1f64819fe9f ("firewire: struct device - replace bus_id with dev_name(), dev_set_name()")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 891e0eab32a57fca4d36c5162628eb0bcb1f0edf upstream.

If device_register() fails, the refcount of device is not 0, the name
allocated in dev_set_name() is leaked. To fix this by calling put_device(),
so that it will be freed in callback function kobject_cleanup().

unreferenced object 0xffff9d99035c7a90 (size 8):
  comm "systemd-udevd", pid 168, jiffies 4294672386 (age 152.089s)
  hex dump (first 8 bytes):
    66 77 30 2e 30 00 ff ff                          fw0.0...
  backtrace:
    [&lt;00000000e1d62bac&gt;] __kmem_cache_alloc_node+0x1e9/0x360
    [&lt;00000000bbeaff31&gt;] __kmalloc_node_track_caller+0x44/0x1a0
    [&lt;00000000491f2fb4&gt;] kvasprintf+0x67/0xd0
    [&lt;000000005b960ddc&gt;] kobject_set_name_vargs+0x1e/0x90
    [&lt;00000000427ac591&gt;] dev_set_name+0x4e/0x70
    [&lt;000000003b4e447d&gt;] create_units+0xc5/0x110

fw_unit_release() will be called in the error path, move fw_device_get()
before calling device_register() to keep balanced with fw_device_put() in
fw_unit_release().

Cc: stable@vger.kernel.org
Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array")
Fixes: a1f64819fe9f ("firewire: struct device - replace bus_id with dev_name(), dev_set_name()")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "firewire: core: obsolete usage of GFP_ATOMIC at building node tree"</title>
<updated>2023-09-15T09:37:52+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-09-15T09:33:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=3c70de9b580998e5d644f4e80a9944c30aa1197b'/>
<id>3c70de9b580998e5d644f4e80a9944c30aa1197b</id>
<content type='text'>
This reverts commit 06f45435d985d60d7d2fe2424fbb9909d177a63d.

John Ogness reports the case that the allocation is in atomic context under
acquired spin-lock.

[   12.555784] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306
[   12.555808] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 70, name: kworker/1:2
[   12.555814] preempt_count: 1, expected: 0
[   12.555820] INFO: lockdep is turned off.
[   12.555824] irq event stamp: 208
[   12.555828] hardirqs last  enabled at (207): [&lt;c00000000111e414&gt;] ._raw_spin_unlock_irq+0x44/0x80
[   12.555850] hardirqs last disabled at (208): [&lt;c00000000110ff94&gt;] .__schedule+0x854/0xfe0
[   12.555859] softirqs last  enabled at (188): [&lt;c000000000f73504&gt;] .addrconf_verify_rtnl+0x2c4/0xb70
[   12.555872] softirqs last disabled at (182): [&lt;c000000000f732b0&gt;] .addrconf_verify_rtnl+0x70/0xb70
[   12.555884] CPU: 1 PID: 70 Comm: kworker/1:2 Tainted: G S                 6.6.0-rc1 #1
[   12.555893] Hardware name: PowerMac7,2 PPC970 0x390202 PowerMac
[   12.555898] Workqueue: firewire_ohci .bus_reset_work [firewire_ohci]
[   12.555939] Call Trace:
[   12.555944] [c000000009677830] [c0000000010d83c0] .dump_stack_lvl+0x8c/0xd0 (unreliable)
[   12.555963] [c0000000096778b0] [c000000000140270] .__might_resched+0x320/0x340
[   12.555978] [c000000009677940] [c000000000497600] .__kmem_cache_alloc_node+0x390/0x460
[   12.555993] [c000000009677a10] [c0000000003fe620] .__kmalloc+0x70/0x310
[   12.556007] [c000000009677ac0] [c0003d00004e2268] .fw_core_handle_bus_reset+0x2c8/0xba0 [firewire_core]
[   12.556060] [c000000009677c20] [c0003d0000491190] .bus_reset_work+0x330/0x9b0 [firewire_ohci]
[   12.556079] [c000000009677d10] [c00000000011d0d0] .process_one_work+0x280/0x6f0
[   12.556094] [c000000009677e10] [c00000000011d8a0] .worker_thread+0x360/0x500
[   12.556107] [c000000009677ef0] [c00000000012e3b4] .kthread+0x154/0x160
[   12.556120] [c000000009677f90] [c00000000000bfa8] .start_kernel_thread+0x10/0x14

Cc: stable@kernel.org
Reported-by: John Ogness &lt;john.ogness@linutronix.de&gt;
Link: https://lore.kernel.org/lkml/87jzsuv1xk.fsf@jogness.linutronix.de/raw
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 06f45435d985d60d7d2fe2424fbb9909d177a63d.

John Ogness reports the case that the allocation is in atomic context under
acquired spin-lock.

[   12.555784] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306
[   12.555808] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 70, name: kworker/1:2
[   12.555814] preempt_count: 1, expected: 0
[   12.555820] INFO: lockdep is turned off.
[   12.555824] irq event stamp: 208
[   12.555828] hardirqs last  enabled at (207): [&lt;c00000000111e414&gt;] ._raw_spin_unlock_irq+0x44/0x80
[   12.555850] hardirqs last disabled at (208): [&lt;c00000000110ff94&gt;] .__schedule+0x854/0xfe0
[   12.555859] softirqs last  enabled at (188): [&lt;c000000000f73504&gt;] .addrconf_verify_rtnl+0x2c4/0xb70
[   12.555872] softirqs last disabled at (182): [&lt;c000000000f732b0&gt;] .addrconf_verify_rtnl+0x70/0xb70
[   12.555884] CPU: 1 PID: 70 Comm: kworker/1:2 Tainted: G S                 6.6.0-rc1 #1
[   12.555893] Hardware name: PowerMac7,2 PPC970 0x390202 PowerMac
[   12.555898] Workqueue: firewire_ohci .bus_reset_work [firewire_ohci]
[   12.555939] Call Trace:
[   12.555944] [c000000009677830] [c0000000010d83c0] .dump_stack_lvl+0x8c/0xd0 (unreliable)
[   12.555963] [c0000000096778b0] [c000000000140270] .__might_resched+0x320/0x340
[   12.555978] [c000000009677940] [c000000000497600] .__kmem_cache_alloc_node+0x390/0x460
[   12.555993] [c000000009677a10] [c0000000003fe620] .__kmalloc+0x70/0x310
[   12.556007] [c000000009677ac0] [c0003d00004e2268] .fw_core_handle_bus_reset+0x2c8/0xba0 [firewire_core]
[   12.556060] [c000000009677c20] [c0003d0000491190] .bus_reset_work+0x330/0x9b0 [firewire_ohci]
[   12.556079] [c000000009677d10] [c00000000011d0d0] .process_one_work+0x280/0x6f0
[   12.556094] [c000000009677e10] [c00000000011d8a0] .worker_thread+0x360/0x500
[   12.556107] [c000000009677ef0] [c00000000012e3b4] .kthread+0x154/0x160
[   12.556120] [c000000009677f90] [c00000000000bfa8] .start_kernel_thread+0x10/0x14

Cc: stable@kernel.org
Reported-by: John Ogness &lt;john.ogness@linutronix.de&gt;
Link: https://lore.kernel.org/lkml/87jzsuv1xk.fsf@jogness.linutronix.de/raw
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>firewire: core: obsolete usage of GFP_ATOMIC at building node tree</title>
<updated>2023-06-05T22:54:52+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2023-06-04T07:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=06f45435d985d60d7d2fe2424fbb9909d177a63d'/>
<id>06f45435d985d60d7d2fe2424fbb9909d177a63d</id>
<content type='text'>
The flag of GFP_ATOMIC is given to the call of kmalloc when building node
tree, but the call is not atomic context. The call of
fw_core_handle_bus_reset() and fw_core_remove_card() builds the tree,
while they are done in specific workqueue or pci remove callback.

This commit obsolete the usage of GFP_ATOMIC.

Link: https://lore.kernel.org/r/20230604070255.172700-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The flag of GFP_ATOMIC is given to the call of kmalloc when building node
tree, but the call is not atomic context. The call of
fw_core_handle_bus_reset() and fw_core_remove_card() builds the tree,
while they are done in specific workqueue or pci remove callback.

This commit obsolete the usage of GFP_ATOMIC.

Link: https://lore.kernel.org/r/20230604070255.172700-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>driver core: make struct device_type.uevent() take a const *</title>
<updated>2023-01-27T12:45:36+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-01-11T11:30:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=162736b0d71a9630f7c99dda7cefd5600fa03d69'/>
<id>162736b0d71a9630f7c99dda7cefd5600fa03d69</id>
<content type='text'>
The uevent() callback in struct device_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.

Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Andreas Noever &lt;andreas.noever@gmail.com&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Cc: Chaitanya Kulkarni &lt;kch@nvidia.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Jilin Yuan &lt;yuanjilin@cdjrlc.com&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Mark Gross &lt;markgross@kernel.org&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: "Matthew Wilcox (Oracle)" &lt;willy@infradead.org&gt;
Cc: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;
Cc: Michael Jamet &lt;michael.jamet@intel.com&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Cc: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Cc: Sanyog Kale &lt;sanyog.r.kale@intel.com&gt;
Cc: Sean Young &lt;sean@mess.org&gt;
Cc: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Won Chung &lt;wonchung@google.com&gt;
Cc: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt; # for Thunderbolt
Acked-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20230111113018.459199-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The uevent() callback in struct device_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.

Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Andreas Noever &lt;andreas.noever@gmail.com&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Cc: Chaitanya Kulkarni &lt;kch@nvidia.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Jilin Yuan &lt;yuanjilin@cdjrlc.com&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Mark Gross &lt;markgross@kernel.org&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: "Matthew Wilcox (Oracle)" &lt;willy@infradead.org&gt;
Cc: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;
Cc: Michael Jamet &lt;michael.jamet@intel.com&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Cc: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Cc: Sanyog Kale &lt;sanyog.r.kale@intel.com&gt;
Cc: Sean Young &lt;sean@mess.org&gt;
Cc: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Won Chung &lt;wonchung@google.com&gt;
Cc: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt; # for Thunderbolt
Acked-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Wolfram Sang &lt;wsa@kernel.org&gt;
Acked-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20230111113018.459199-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>firewire: convert sysfs sprintf/snprintf family to sysfs_emit</title>
<updated>2022-06-17T08:43:20+00:00</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2022-06-15T12:15:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=2328fe7a98db3b9d46c41def169e7915dda4b9a9'/>
<id>2328fe7a98db3b9d46c41def169e7915dda4b9a9</id>
<content type='text'>
Fix the following coccicheck warning:

./drivers/firewire/core-device.c:375:8-16: WARNING: use scnprintf or
sprintf.

Reported-by: Abaci Robot&lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20220615121505.61412-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following coccicheck warning:

./drivers/firewire/core-device.c:375:8-16: WARNING: use scnprintf or
sprintf.

Reported-by: Abaci Robot&lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20220615121505.61412-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bus: Make remove callback return void</title>
<updated>2021-07-21T09:53:42+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-07-13T19:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=fc7a6209d5710618eb4f72a77cd81b8d694ecf89'/>
<id>fc7a6209d5710618eb4f72a77cd81b8d694ecf89</id>
<content type='text'>
The driver core ignores the return value of this callback because there
is only little it can do when a device disappears.

This is the final bit of a long lasting cleanup quest where several
buses were converted to also return void from their remove callback.
Additionally some resource leaks were fixed that were caused by drivers
returning an error code in the expectation that the driver won't go
away.

With struct bus_type::remove returning void it's prevented that newly
implemented buses return an ignored error code and so don't anticipate
wrong expectations for driver authors.

Reviewed-by: Tom Rix &lt;trix@redhat.com&gt; (For fpga)
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt; (For drivers/s390 and drivers/vfio)
Acked-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt; (For ARM, Amba and related parts)
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt; (for sunxi-rsb)
Acked-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt; (for media)
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt; (For drivers/platform)
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-By: Vinod Koul &lt;vkoul@kernel.org&gt;
Acked-by: Juergen Gross &lt;jgross@suse.com&gt; (For xen)
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt; (For mfd)
Acked-by: Johannes Thumshirn &lt;jth@kernel.org&gt; (For mcb)
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt; (For slimbus)
Acked-by: Kirti Wankhede &lt;kwankhede@nvidia.com&gt; (For vfio)
Acked-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt; (For ulpi and typec)
Acked-by: Samuel Iglesias Gonsálvez &lt;siglesias@igalia.com&gt; (For ipack)
Acked-by: Geoff Levand &lt;geoff@infradead.org&gt; (For ps3)
Acked-by: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt; (For thunderbolt)
Acked-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt; (For intel_th)
Acked-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt; (For pcmcia)
Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt; (For ACPI)
Acked-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt; (rpmsg and apr)
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt; (For intel-ish-hid)
Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt; (For CXL, DAX, and NVDIMM)
Acked-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt; (For isa)
Acked-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt; (For firewire)
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt; (For hid)
Acked-by: Thorsten Scherer &lt;t.scherer@eckelmann.de&gt; (For siox)
Acked-by: Sven Van Asbroeck &lt;TheSven73@gmail.com&gt; (For anybuss)
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt; (For MMC)
Acked-by: Wolfram Sang &lt;wsa@kernel.org&gt; # for I2C
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver core ignores the return value of this callback because there
is only little it can do when a device disappears.

This is the final bit of a long lasting cleanup quest where several
buses were converted to also return void from their remove callback.
Additionally some resource leaks were fixed that were caused by drivers
returning an error code in the expectation that the driver won't go
away.

With struct bus_type::remove returning void it's prevented that newly
implemented buses return an ignored error code and so don't anticipate
wrong expectations for driver authors.

Reviewed-by: Tom Rix &lt;trix@redhat.com&gt; (For fpga)
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt; (For drivers/s390 and drivers/vfio)
Acked-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt; (For ARM, Amba and related parts)
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt; (for sunxi-rsb)
Acked-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt; (for media)
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt; (For drivers/platform)
Acked-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Acked-By: Vinod Koul &lt;vkoul@kernel.org&gt;
Acked-by: Juergen Gross &lt;jgross@suse.com&gt; (For xen)
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt; (For mfd)
Acked-by: Johannes Thumshirn &lt;jth@kernel.org&gt; (For mcb)
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt; (For slimbus)
Acked-by: Kirti Wankhede &lt;kwankhede@nvidia.com&gt; (For vfio)
Acked-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt; (For ulpi and typec)
Acked-by: Samuel Iglesias Gonsálvez &lt;siglesias@igalia.com&gt; (For ipack)
Acked-by: Geoff Levand &lt;geoff@infradead.org&gt; (For ps3)
Acked-by: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt; (For thunderbolt)
Acked-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt; (For intel_th)
Acked-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt; (For pcmcia)
Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt; (For ACPI)
Acked-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt; (rpmsg and apr)
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt; (For intel-ish-hid)
Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt; (For CXL, DAX, and NVDIMM)
Acked-by: William Breathitt Gray &lt;vilhelm.gray@gmail.com&gt; (For isa)
Acked-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt; (For firewire)
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt; (For hid)
Acked-by: Thorsten Scherer &lt;t.scherer@eckelmann.de&gt; (For siox)
Acked-by: Sven Van Asbroeck &lt;TheSven73@gmail.com&gt; (For anybuss)
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt; (For MMC)
Acked-by: Wolfram Sang &lt;wsa@kernel.org&gt; # for I2C
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Finn Thain &lt;fthain@linux-m68k.org&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>firewire: replace tricky statement by two simple ones</title>
<updated>2021-02-09T11:16:20+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2021-01-26T22:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=b2c852f490e086e0683d929d8eb75ccae068bd7b'/>
<id>b2c852f490e086e0683d929d8eb75ccae068bd7b</id>
<content type='text'>
struct fw_driver::remove returns void, still the comma expression's value
is zero. This is harder to parse than necessary, so replace the single
expression by two easier ones.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Link: https://lore.kernel.org/r/20210126221444.713837-1-uwe@kleine-koenig.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
struct fw_driver::remove returns void, still the comma expression's value
is zero. This is harder to parse than necessary, so replace the single
expression by two easier ones.

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Link: https://lore.kernel.org/r/20210126221444.713837-1-uwe@kleine-koenig.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Use fallthrough pseudo-keyword</title>
<updated>2020-08-23T22:36:59+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-08-23T22:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=df561f6688fef775baa341a0f5d960becd248b11'/>
<id>df561f6688fef775baa341a0f5d960becd248b11</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>firewire: mark expected switch fall-throughs</title>
<updated>2019-07-26T01:09:37+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-02-11T17:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=eba6120de93b8d5f2987fac1f533c35b53eaa771'/>
<id>eba6120de93b8d5f2987fac1f533c35b53eaa771</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/firewire/core-device.c: In function ‘set_broadcast_channel’:
drivers/firewire/core-device.c:969:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (data &amp; cpu_to_be32(1 &lt;&lt; 31)) {
       ^
drivers/firewire/core-device.c:974:3: note: here
   case RCODE_ADDRESS_ERROR:
   ^~~~
drivers/firewire/core-iso.c: In function ‘manage_channel’:
drivers/firewire/core-iso.c:308:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if ((data[0] &amp; bit) == (data[1] &amp; bit))
       ^
drivers/firewire/core-iso.c:312:3: note: here
   default:
   ^~~~~~~
drivers/firewire/core-topology.c: In function ‘count_ports’:
drivers/firewire/core-topology.c:69:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
    (*child_port_count)++;
    ~~~~~~~~~~~~~~~~~~~^~
drivers/firewire/core-topology.c:70:3: note: here
   case SELFID_PORT_PARENT:
   ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

Notice that in some cases, the code comment is modified in
accordance with what GCC is expecting to find.

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Mathieu Malaterre &lt;malat@debian.org&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt; (reworded a comment)
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

drivers/firewire/core-device.c: In function ‘set_broadcast_channel’:
drivers/firewire/core-device.c:969:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (data &amp; cpu_to_be32(1 &lt;&lt; 31)) {
       ^
drivers/firewire/core-device.c:974:3: note: here
   case RCODE_ADDRESS_ERROR:
   ^~~~
drivers/firewire/core-iso.c: In function ‘manage_channel’:
drivers/firewire/core-iso.c:308:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if ((data[0] &amp; bit) == (data[1] &amp; bit))
       ^
drivers/firewire/core-iso.c:312:3: note: here
   default:
   ^~~~~~~
drivers/firewire/core-topology.c: In function ‘count_ports’:
drivers/firewire/core-topology.c:69:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
    (*child_port_count)++;
    ~~~~~~~~~~~~~~~~~~~^~
drivers/firewire/core-topology.c:70:3: note: here
   case SELFID_PORT_PARENT:
   ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

Notice that in some cases, the code comment is modified in
accordance with what GCC is expecting to find.

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Mathieu Malaterre &lt;malat@debian.org&gt;
Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt; (reworded a comment)
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
