<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/ssb/main.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-07-03T13:16:54+00:00</updated>
<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>ssb: use "break" on default case to prevent warning</title>
<updated>2024-03-14T08:56:31+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2024-03-13T00:13:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c700b35a5340020e8fa9925871f7e1ed365ab92'/>
<id>urn:sha1:6c700b35a5340020e8fa9925871f7e1ed365ab92</id>
<content type='text'>
Having an empty default: case in a switch statement causes a warning
(when using Clang; I don't see the warning when using gcc),
so add a "break;" to the default case to prevent the warning:

drivers/ssb/main.c:1149:2: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]

Fixes: e27b02e23a70 ("ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202403130717.TWm17FiD-lkp@intel.com/
Cc: Michael Büsch &lt;m@bues.ch&gt;
Cc: linux-wireless@vger.kernel.org
Cc: Kalle Valo &lt;kvalo@kernel.org&gt;
Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: llvm@lists.linux.dev
Acked-by: Michael Büsch &lt;m@bues.ch&gt;
Reviewed-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20240313001305.18820-1-rdunlap@infradead.org
</content>
</entry>
<entry>
<title>ssb: drop use of non-existing CONFIG_SSB_DEBUG symbol</title>
<updated>2024-03-12T15:33:41+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2024-03-09T22:45:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e27b02e23a701e5761f1d6028643e1203a1c56de'/>
<id>urn:sha1:e27b02e23a701e5761f1d6028643e1203a1c56de</id>
<content type='text'>
CONFIG_SSB_DEBUG is used in one header file and nowhere else, so
remove it and the now-empty inline function that contained it. Also
remove the call to the empty inline function. The empty "default:"
case is kept to prevent 2 compiler warnings:

  drivers/ssb/main.c:1133:9: warning: enumeration value 'SSB_BUSTYPE_PCMCIA' not handled in switch [-Wswitch]
  drivers/ssb/main.c:1133:9: warning: enumeration value 'SSB_BUSTYPE_SDIO' not handled in switch [-Wswitch]

Reported-by: Ying Sun &lt;sunying@isrc.iscas.ac.cn&gt;
Link: https://lore.kernel.org/lkml/4e8525fe.607e2.18a8ddfdce8.Coremail.sunying@isrc.iscas.ac.cn/
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Michael Büsch &lt;m@bues.ch&gt;
Cc: linux-wireless@vger.kernel.org
Cc: Kalle Valo &lt;kvalo@kernel.org&gt;
Acked-by: Michael Büsch &lt;m@bues.ch&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20240309224540.22682-1-rdunlap@infradead.org
</content>
</entry>
<entry>
<title>ssb: Fix potential NULL pointer dereference in ssb_device_uevent()</title>
<updated>2024-03-12T15:31:11+00:00</updated>
<author>
<name>Rand Deeb</name>
<email>rand.sec96@gmail.com</email>
</author>
<published>2024-03-06T12:30:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=789c17185fb0f39560496c2beab9b57ce1d0cbe7'/>
<id>urn:sha1:789c17185fb0f39560496c2beab9b57ce1d0cbe7</id>
<content type='text'>
The ssb_device_uevent() function first attempts to convert the 'dev' pointer
to 'struct ssb_device *'. However, it mistakenly dereferences 'dev' before
performing the NULL check, potentially leading to a NULL pointer
dereference if 'dev' is NULL.

To fix this issue, move the NULL check before dereferencing the 'dev' pointer,
ensuring that the pointer is valid before attempting to use it.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Rand Deeb &lt;rand.sec96@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20240306123028.164155-1-rand.sec96@gmail.com
</content>
</entry>
<entry>
<title>ssb: make ssb_bustype const</title>
<updated>2024-02-06T18:07:12+00:00</updated>
<author>
<name>Ricardo B. Marliere</name>
<email>ricardo@marliere.net</email>
</author>
<published>2024-02-04T20:44:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=78092e68557b9d062b8c4058be609254c804f14b'/>
<id>urn:sha1:78092e68557b9d062b8c4058be609254c804f14b</id>
<content type='text'>
Now that the driver core can properly handle constant struct bus_type,
move the ssb_bustype 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;
Acked-by: Michael Büsch &lt;m@bues.ch&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20240204-bus_cleanup-ssb-v1-1-511026cd5f3c@marliere.net
</content>
</entry>
<entry>
<title>ssb: Fix division by zero issue in ssb_calc_clock_rate</title>
<updated>2023-09-07T06:00:05+00:00</updated>
<author>
<name>Rand Deeb</name>
<email>rand.sec96@gmail.com</email>
</author>
<published>2023-09-04T23:23:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e0b5127fa134fe0284d58877b6b3133939c8b3ce'/>
<id>urn:sha1:e0b5127fa134fe0284d58877b6b3133939c8b3ce</id>
<content type='text'>
In ssb_calc_clock_rate(), there is a potential issue where the value of
m1 could be zero due to initialization using clkfactor_f6_resolv(). This
situation raised concerns about the possibility of a division by zero
error.

We fixed it by following the suggestions provided by Larry Finger
&lt;Larry.Finger@lwfinger.net&gt; and Michael Büsch &lt;m@bues.ch&gt;. The fix
involves returning a value of 1 instead of 0 in clkfactor_f6_resolv().
This modification ensures the proper functioning of the code and
eliminates the risk of division by zero errors.

Signed-off-by: Rand Deeb &lt;rand.sec96@gmail.com&gt;
Acked-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Acked-by: Michael Büsch &lt;m@bues.ch&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230904232346.34991-1-rand.sec96@gmail.com
</content>
</entry>
<entry>
<title>driver core: make struct bus_type.uevent() take a const *</title>
<updated>2023-01-27T12:45:52+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-01-11T11:30:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6'/>
<id>urn:sha1:2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6</id>
<content type='text'>
The uevent() callback in struct bus_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.

Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20230111113018.459199-16-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</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.radix-linux.su/kernel/linux.git/commit/?id=fc7a6209d5710618eb4f72a77cd81b8d694ecf89'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ssb: remove unreachable code</title>
<updated>2021-06-15T10:11:34+00:00</updated>
<author>
<name>Tian Tao</name>
<email>tiantao6@hisilicon.com</email>
</author>
<published>2021-05-18T02:52:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=233bc283728241aa522fd2889649261b742cee5a'/>
<id>urn:sha1:233bc283728241aa522fd2889649261b742cee5a</id>
<content type='text'>
The return value of ssb_bus_unregister can only be 0 or -1, so this
condition if (err == -EBUSY) will not hold, so delete it.

Signed-off-by: Tian Tao &lt;tiantao6@hisilicon.com&gt;
Acked-by: Michael Büsch &lt;m@bues.ch&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1621306352-3632-1-git-send-email-tiantao6@hisilicon.com
</content>
</entry>
<entry>
<title>ssb: Remove redundant assignment to err</title>
<updated>2021-06-15T10:10:16+00:00</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-04-29T10:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7557dfde1bd1251793fade20a52014f1105c1012'/>
<id>urn:sha1:7557dfde1bd1251793fade20a52014f1105c1012</id>
<content type='text'>
Variable 'err' is set to zero but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.

Clean up the following clang-analyzer warning:

drivers/ssb/main.c:1306:3: warning: Value stored to 'err' is never read
[clang-analyzer-deadcode.DeadStores]
drivers/ssb/main.c:1312:3: warning: Value stored to 'err' is never read
[clang-analyzer-deadcode.DeadStores]

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Acked-by: Michael Büsch &lt;m@bues.ch&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1619693230-108804-1-git-send-email-yang.lee@linux.alibaba.com
</content>
</entry>
</feed>
