#
aabdedf4 |
| 13-Feb-2024 |
Arnd Bergmann <arnd@arndb.de> |
ALSA: ctxfi: avoid casting function pointers
This driver creates an abstraction for different components by casting function pointers to slightly incompatible types for each one to get the correct a
ALSA: ctxfi: avoid casting function pointers
This driver creates an abstraction for different components by casting function pointers to slightly incompatible types for each one to get the correct argument even when the caller does not know those types. This is a bit unreliable and not allowed in combination with control flow integrity (KCFI):
sound/pci/ctxfi/ctatc.c:115:25: error: cast from 'int (*)(struct hw *, struct src_mgr **)' to 'create_t' (aka 'int (*)(struct hw *, void **)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 115 | [SRC] = { .create = (create_t)src_mgr_create, | ^~~~~~~~~~~~~~~~~~~~~~~~ sound/pci/ctxfi/ctatc.c:116:20: error: cast from 'int (*)(struct src_mgr *)' to 'destroy_t' (aka 'int (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 116 | .destroy = (destroy_t)src_mgr_destroy }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/pci/ctxfi/ctatc.c:117:27: error: cast from 'int (*)(struct hw *, struct srcimp_mgr **)' to 'create_t' (aka 'int (*)(struct hw *, void **)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 117 | [SRCIMP] = { .create = (create_t)srcimp_mgr_create, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/pci/ctxfi/ctatc.c:118:20: error: cast from 'int (*)(struct srcimp_mgr *)' to 'destroy_t' (aka 'int (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 118 | .destroy = (destroy_t)srcimp_mgr_destroy }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change these to always pass void pointers and move the abstraction one level down.
Fixes: 8cc72361481f ("ALSA: SB X-Fi driver merge") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20240213101303.460008-1-arnd@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
a08b9f2f |
| 17-Mar-2021 |
Aditya Srivastava <yashsri421@gmail.com> |
ALSA: ctxfi: fix comment syntax in file headers
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are files in sound/pci/ctxfi which follow this syn
ALSA: ctxfi: fix comment syntax in file headers
The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are files in sound/pci/ctxfi which follow this syntax in their file headers, i.e. start with '/**' like comments, which causes unexpected warnings from kernel-doc.
E.g., running scripts/kernel-doc -none on sound/pci/ctxfi/ctresource.c causes this warning: "warning: wrong kernel-doc identifier on line: * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved."
Similarly for other files too.
Provide a simple fix by replacing the kernel-doc like comment syntax with general format, i.e. "/*", to prevent kernel-doc from parsing it.
Signed-off-by: Aditya Srivastava <yashsri421@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20210317203932.23993-1-yashsri421@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
5765e78e |
| 31-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 364
Based on 1 normalized pattern(s):
this source file is released under gpl v2 license no other versions see the copying file inc
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 364
Based on 1 normalized pattern(s):
this source file is released under gpl v2 license no other versions see the copying file included in the main directory of this source distribution for the license terms and conditions
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 28 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Armijn Hemel <armijn@tjaldur.nl> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531081035.780831265@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
43f2cdeb |
| 08-Nov-2015 |
Julia Lawall <Julia.Lawall@lip6.fr> |
ALSA: ctxfi: constify rsc ops structures
The various rsc ops structures are never modified, so declare them as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@li
ALSA: ctxfi: constify rsc ops structures
The various rsc ops structures are never modified, so declare them as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
3d0fdc86 |
| 29-Sep-2014 |
Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
ALSA: ctxfi: added reference of snd_card
added a pointer of snd_card in some of the structures to get a reference of the card from other functions. these references of snd_card will be initialised i
ALSA: ctxfi: added reference of snd_card
added a pointer of snd_card in some of the structures to get a reference of the card from other functions. these references of snd_card will be initialised in the next patch of this series and as of now these snd_card will be used to print the the device information when we convert the pr_* macros to dev_* in a later patch of this series.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
66640898 |
| 29-Sep-2014 |
Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
ALSA: ctxfi: changed void * to struct hw *
in the code we have void *hw and while using we are always typecasting it to (struct hw *). it is better to use void type of pointer when we store differen
ALSA: ctxfi: changed void * to struct hw *
in the code we have void *hw and while using we are always typecasting it to (struct hw *). it is better to use void type of pointer when we store different types of pointer , but in this code we are only having struct hw. So changed all the relevant reference of void *hw to struct hw *hw, without any modification of the existing code logic. the next patch of the series will remove the typecasting which is not required now.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
8cc72361 |
| 14-May-2009 |
Wai Yew CHAY <wychay@ctl.creative.com> |
ALSA: SB X-Fi driver merge
The Sound Blaster X-Fi driver supports Creative solutions based on 20K1 and 20K2 chipsets.
Supported hardware :
Creative Sound Blaster X-Fi Titanium Fatal1ty® Champion S
ALSA: SB X-Fi driver merge
The Sound Blaster X-Fi driver supports Creative solutions based on 20K1 and 20K2 chipsets.
Supported hardware :
Creative Sound Blaster X-Fi Titanium Fatal1ty® Champion Series Creative Sound Blaster X-Fi Titanium Fatal1ty Professional Series Creative Sound Blaster X-Fi Titanium Professional Audio Creative Sound Blaster X-Fi Titanium Creative Sound Blaster X-Fi Elite Pro Creative Sound Blaster X-Fi Platinum Creative Sound Blaster X-Fi Fatal1ty Creative Sound Blaster X-Fi XtremeGamer Creative Sound Blaster X-Fi XtremeMusic
Current release features:
* ALSA PCM Playback * ALSA Record * ALSA Mixer
Note:
* External I/O modules detection not included.
Signed-off-by: Wai Yew CHAY <wychay@ctl.creative.com> Singed-off-by: Ryan RICHARDS <ryan_richards@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|