<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/sound/ac97, branch v6.19.12</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.12</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.12'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-12-23T09:43:43+00:00</updated>
<entry>
<title>ALSA: ac97: fix a double free in snd_ac97_controller_register()</title>
<updated>2025-12-23T09:43:43+00:00</updated>
<author>
<name>Haoxiang Li</name>
<email>lihaoxiang@isrc.iscas.ac.cn</email>
</author>
<published>2025-12-19T16:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=830988b6cf197e6dcffdfe2008c5738e6c6c3c0f'/>
<id>urn:sha1:830988b6cf197e6dcffdfe2008c5738e6c6c3c0f</id>
<content type='text'>
If ac97_add_adapter() fails, put_device() is the correct way to drop
the device reference. kfree() is not required.
Add kfree() if idr_alloc() fails and in ac97_adapter_release() to do
the cleanup.

Found by code review.

Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li &lt;lihaoxiang@isrc.iscas.ac.cn&gt;
Link: https://patch.msgid.link/20251219162845.657525-1-lihaoxiang@isrc.iscas.ac.cn
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: ac97bus: Use guard() for mutex locks</title>
<updated>2025-09-01T11:54:28+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-08-29T15:13:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c07824a14d99c10edd4ec4c389d219af336ecf20'/>
<id>urn:sha1:c07824a14d99c10edd4ec4c389d219af336ecf20</id>
<content type='text'>
Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250829151335.7342-18-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: ac97: Convert to RUNTIME_PM_OPS() macro</title>
<updated>2025-03-14T10:07:13+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2025-03-13T17:07:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3954382bb5b28e09e20c7ff24a4f5ec003399204'/>
<id>urn:sha1:3954382bb5b28e09e20c7ff24a4f5ec003399204</id>
<content type='text'>
Use a newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS()
together with pm_ptr(), which makes CONFIG_PM ifdefs superfluous.

This optimizes slightly when CONFIG_PM is disabled, too.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20250313170731.26943-2-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: ac97: bus: Fix the mistake in the comment</title>
<updated>2024-11-20T11:42:01+00:00</updated>
<author>
<name>Pei Xiao</name>
<email>xiaopei01@kylinos.cn</email>
</author>
<published>2024-11-20T06:30:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e84b414ca3778fd9308df52241a3617d82c20d2'/>
<id>urn:sha1:0e84b414ca3778fd9308df52241a3617d82c20d2</id>
<content type='text'>
Fix mistake in the comment.
sound/ac97/bus.c:192: warning: Function parameter or member 'drv' not described in 'snd_ac97_codec_driver_register'
sound/ac97/bus.c:192: warning: Excess function parameter 'dev' description in 'snd_ac97_codec_driver_register'
sound/ac97/bus.c:205: warning: Function parameter or member 'drv' not described in 'snd_ac97_codec_driver_unregister'
sound/ac97/bus.c:205: warning: Excess function parameter 'dev' description in 'snd_ac97_codec_driver_unregister'
sound/ac97/bus.c:351: warning: Function parameter or member 'codecs_pdata' not described in 'snd_ac97_controller_register'

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202411180804.FUfdymYO-lkp@intel.com/
Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus")
Signed-off-by: Pei Xiao &lt;xiaopei01@kylinos.cn&gt;
Link: https://patch.msgid.link/3990bfc8cd47637908eaa179802c1d91459d829b.1732083924.git.xiaopei01@kylinos.cn
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&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>ALSA: ac97: bus: Add missing module description</title>
<updated>2024-05-09T08:13:07+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2024-05-08T09:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ddefb24b3effa6dbca148d176cdd5e24e8e3cf3b'/>
<id>urn:sha1:ddefb24b3effa6dbca148d176cdd5e24e8e3cf3b</id>
<content type='text'>
Now that make W=1 starts complaining the lack of MODULE_DESCRIPTION(),
let's add the missing information.

Reported-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Closes: https://lore.kernel.org/r/ZjpQm-hxLQtpgkUx@smile.fi.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Dragan Simic &lt;dsimic@manjaro.org&gt;
Link: https://lore.kernel.org/r/20240508091128.25274-3-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: ac97: fix build regression</title>
<updated>2024-01-03T10:47:04+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-01-03T10:25:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f90dffdce70ff724f9ee8b0bcc711e86e6663896'/>
<id>urn:sha1:f90dffdce70ff724f9ee8b0bcc711e86e6663896</id>
<content type='text'>
The ac97_bus_type structure is no longer declared in this file:

sound/ac97/bus.c: In function 'ac97_codec_add':
sound/ac97/bus.c:112:27: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
  112 |         codec-&gt;dev.bus = &amp;ac97_bus_type;
      |                           ^~~~~~~~~~~~~
      |                           bus_type
sound/ac97/bus.c:112:27: note: each undeclared identifier is reported only once for each function it appears in
sound/ac97/bus.c: In function 'snd_ac97_codec_driver_register':
sound/ac97/bus.c:191:28: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'ac97_bus_reset'?
  191 |         drv-&gt;driver.bus = &amp;ac97_bus_type;

Include the header that contains the declaration and make sure the definition
is const but not static.

Fixes: 66e82d219924 ("ALSA: mark all struct bus_type as const")
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20240103102544.3715055-1-arnd@kernel.org
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: mark all struct bus_type as const</title>
<updated>2023-12-30T09:10:41+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-12-19T13:34:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66e82d219924f6112509f7e8f8e687fcc81a16e3'/>
<id>urn:sha1:66e82d219924f6112509f7e8f8e687fcc81a16e3</id>
<content type='text'>
Now that the driver core can properly handle constant struct bus_type,
move all of the sound subsystem struct bus_type structures as const,
placing them into read-only memory which can not be modified at runtime.

Note, this fixes a duplicate definition of ac97_bus_type, which somehow
was declared extern in a .h file, and then static as a prototype in a .c
file, and then properly later on in the same .c file.  Amazing that no
compiler warning ever showed up for this.

Cc: Jaroslav Kysela &lt;perex@perex.cz&gt;
Cc: Takashi Iwai &lt;tiwai@suse.com&gt;
Cc: Dawei Li &lt;set_pte_at@outlook.com&gt;
Cc: Yu Liao &lt;liaoyu15@huawei.com&gt;
Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: linux-sound@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/2023121945-immersion-budget-d0aa@gregkh
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: ac97: set variables dev_attr_vendor_id to static</title>
<updated>2023-08-02T07:27:39+00:00</updated>
<author>
<name>Yu Liao</name>
<email>liaoyu15@huawei.com</email>
</author>
<published>2023-08-02T02:26:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d28dc3d87fe298d0bd83c33738c0c09a0e4f7bdb'/>
<id>urn:sha1:d28dc3d87fe298d0bd83c33738c0c09a0e4f7bdb</id>
<content type='text'>
sparse reports
sound/ac97/bus.c:465:1: sparse: sparse: symbol 'dev_attr_vendor_id' was not declared. Should it be static?

This variable is only used in its defining file, so it should be static.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202307242300.Oy0Dp2QI-lkp@intel.com/
Signed-off-by: Yu Liao &lt;liaoyu15@huawei.com&gt;
Link: https://lore.kernel.org/r/20230802022649.2514787-1-liaoyu15@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: ac97: make remove callback of ac97 driver void returned</title>
<updated>2023-01-25T08:34:20+00:00</updated>
<author>
<name>Dawei Li</name>
<email>set_pte_at@outlook.com</email>
</author>
<published>2023-01-06T15:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7351324c6f486ae35865b430c8e30f07da9f378e'/>
<id>urn:sha1:7351324c6f486ae35865b430c8e30f07da9f378e</id>
<content type='text'>
Since commit fc7a6209d571 ("bus: Make remove callback return void")
forces bus_type::remove be void-returned, it doesn't make much sense
for any bus based driver implementing remove callbalk to return
non-void to its caller.

As such, change the remove function for ac97 based drivers to return
void.

Signed-off-by: Dawei Li &lt;set_pte_at@outlook.com&gt;
Link: https://lore.kernel.org/r/TYCP286MB2323A5AB1B2578EF4FA15DA7CAFB9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
