summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2024-08-22staging: rtl8192e: insert blank line after function declarationVinicius Peixoto1-0/+1
This adds a blank line after the declaration of rtl92e_config_bb, in order to fix the following checkpatch warning: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Vinicius Peixoto <vpeixoto@lkcamp.dev> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240821204714.5839-1-vpeixoto@lkcamp.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22staging: rtl8723bs: add spaces arround operatorsGuillaume Lefèvre-Crimé1-27/+27
Adhere to Linux kernel coding style. Reported by checkpath : CHECK: spaces preferred around that '&' (ctx:VxV) Signed-off-by: Guillaume Lefèvre-Crimé <guillaume.lefevre.crime@netc.fr> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240816183756.59250-1-guillaume.lefevre.crime@netc.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22staging: rtl8192e: remove set but otherwise unused local variable iv32Simon Horman1-3/+0
Remove iv32 from rtllib_tkip_get_key() as it is set but otherwise unused. Flagged by allmodconfig W=1 builds with gcc-13 and clang-18. Compile tested only. Signed-off-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240821-rtl8192e-unused-var-v1-1-08b9e869260e@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22Staging: rtl8192e: Rename variable CmdID_WritePortUcharTree Davies2-2/+2
Rename variable CmdID_WritePortUchar to cmd_id_write_port_uchar to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240821030856.57423-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22Staging: rtl8192e: Rename variable CmdID_WritePortUshortTree Davies2-2/+2
Rename variable CmdID_WritePortUshort to cmd_id_write_port_ushort to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240821030856.57423-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22Staging: rtl8192e: Rename variable CmdID_WritePortUlongTree Davies2-2/+2
Rename variable CmdID_WritePortUlong to cmd_id_write_port_ulong to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240821030856.57423-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22Staging: rtl8192e: Rename variable CmdID_BBRegWrite10Tree Davies1-1/+1
Rename variable CmdID_BBRegWrite10 to cmd_id_bbreg_write10 to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240821030856.57423-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22Staging: rtl8192e: Rename variable CmdID_SetTxPowerLevelTree Davies2-3/+3
Rename variable CmdID_SetTxPowerLevel to cmd_id_set_tx_power_level to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240821030856.57423-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22Staging: rtl8192e: Rename variable CmdID_EndTree Davies2-5/+5
Rename variable CmdID_End to cmd_id_end to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240821030856.57423-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22staging: vt6655: Fix alignment to open parenthesesDominik Karol Piątkowski3-12/+12
This patch fixes the "Alignment should match open parenthesis" checks detected by checkpatch.pl. Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com> Link: https://lore.kernel.org/r/20240817100559.33174-1-dominik.karol.piatkowski@protonmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22staging: rtl8723bs: drop unnessary dep on CFG80211_WEXTPeter Robinson1-1/+0
In commit 174ac41a7aaf ("staging: rtl8723bs: remove obsolete wext support") a dep on CFG80211_WEXT was added to allow wext userspace calls to be managed via the compatibility support. This is an optional dependency which the driver has no dependency on and stops users/distros etc from dropping CFG80211_WEXT if they want to enable this driver. Drop this dependency as if users want this legacy feature they will be explicitly enabling it themselves. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240814145250.943457-1-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-15Merge tag 'media/v6.11-3' of ↵Linus Torvalds2-5/+22
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Two regression fixes: - fix atomisp support for ISP2400 - fix dvb-usb regression for TeVii s480 dual DVB-S2 S660 board" * tag 'media/v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: atomisp: Fix streaming no longer working on BYT / ISP2400 devices media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()"
2024-08-14media: staging: media: starfive: camss: Drop obsolete return value documentationUwe Kleine-König1-2/+0
Recently the function stfcamss_remove() was changed to not return a value. Drop the documentation of the return value in the kernel doc. Fixes: b1f3677aebe5 ("media: staging: media: starfive: camss: Convert to platform remove callback returning void") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-08-14media: atomisp: Fix streaming no longer working on BYT / ISP2400 devicesHans de Goede2-5/+22
Commit a0821ca14bb8 ("media: atomisp: Remove test pattern generator (TPG) support") broke BYT support because it removed a seemingly unused field from struct sh_css_sp_config and a seemingly unused value from enum ia_css_input_mode. But these are part of the ABI between the kernel and firmware on ISP2400 and this part of the TPG support removal changes broke ISP2400 support. ISP2401 support was not affected because on ISP2401 only a part of struct sh_css_sp_config is used. Restore the removed field and enum value to fix this. Fixes: a0821ca14bb8 ("media: atomisp: Remove test pattern generator (TPG) support") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-08-13Staging: rtl8192e: Rename variable nSubframe_LengthTree Davies1-12/+12
Rename variable nSubframe_Length to subframe_len to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies <tdavies@darkphysics.net> Link: https://lore.kernel.org/r/20240812013650.199675-1-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-13staging: rtl8723bs: Delete unnecessary braces for single statement blocks in ↵Jiwon Kim1-2/+1
xmit_linux.c Delete braces {} for single statement blocks to shorten code. Signed-off-by: Jiwon Kim <jiwonaid0@gmail.com> Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240805135623.2069-1-jiwonaid0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-13greybus: camera-gb: Fix a alignment bug on gb_camera_ops()Thais-ra1-2/+2
Fix checkpatch message "CHECK: Alignment should match open parenthesis". Signed-off-by: Thais-ra <thais_ra@riseup.net> Link: https://lore.kernel.org/r/20240803072236.368-1-thais_ra@riseup.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-13staging: rtl8723bs: Improve clarity of MAR usageManjae Cho1-2/+2
This patch improves the readability of the code related to the Multicast Address Register (REG_MAR) in the rtl8723bs driver. It adds comments to clarify the purpose and offset of the register, making the code more self-documenting without introducing new macros. Signed-off-by: Manjae Cho <manjae.cho@samsung.com> Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240731225134.917542-1-manjae.cho@samsung.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-13staging: olpc_dcon: Use backlight power constantsThomas Zimmermann1-1/+1
Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Jens Frederich <jfrederich@gmail.com> Cc: Jon Nettleton <jon.nettleton@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240731130130.1148153-3-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-13staging: fbtft: Use backlight power constantsThomas Zimmermann2-4/+4
Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240731130130.1148153-2-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-13staging: vme_user: vme.h: alignment of closing parenthesis should match open ↵Riyan Dhiman1-9/+8
parenthesis in function declaration Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com> Link: https://lore.kernel.org/r/20240731070507.6290-1-riyandhiman14@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-12treewide: remove unnecessary <linux/version.h> inclusionMasahiro Yamada1-1/+0
These files do not use any macros defined in <linux/version.h>. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-08-09staging: media: atmel: use for_each_endpoint_of_node()Kuninori Morimoto2-14/+6
We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-08-09media: meson: vdec: add GXLX SoC platformChristian Hewitt3-0/+48
Add the GXLX SoC platform which is based on GXL but omits the VP9 codec. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Acked-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-08-03staging: iio: impedance-analyzer: ad5933: make use of iio_get_masklength()Nuno Sa1-2/+3
Use iio_get_masklength() to access '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-22-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-07-31staging: rtl8192e: remove duplicate macros from rtllib.hMichael Straube1-11/+0
These macros just duplicate macros from include/linux/ieee80211.h. We can safely remove them from rtllib.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240730082928.62284-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-31staging: nvec: Capitalize outputs to match the rest of the driverSteven Davis1-7/+7
Noticing that some messages were capitalized and some weren't, I capitalized them to match the rest. This makes the messages relatively easier to understand for an end user, and reduces confusion about capitalization. A comment was also capitalized. Signed-off-by: Steven Davis <goldside000@outlook.com> Link: https://lore.kernel.org/r/SJ2P223MB102626B10E837EF5A93ED1F1F7B02@SJ2P223MB1026.NAMP223.PROD.OUTLOOK.COM Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-31staging: rtl8723bs: rtw_mlme_ext: replace spaces by tabsSantiago Ruano Rincón1-2/+2
Fix checkpatch error "ERROR: code indent should use tabs where possible" in include/rtw_mlme_ext.h:388. Signed-off-by: Santiago Ruano Rincón <santiagorr@riseup.net> Link: https://lore.kernel.org/r/20240730080531.991195-1-santiagorr@riseup.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-31staging: rtl8723bs: remove space after pointerKartik Kulkarni1-1/+1
Fix checkpatch error "foo * bar" should be "foo *bar" in osdep_service.h:105 Signed-off-by: Kartik Kulkarni <kartik.koolks@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240730134155.37784-1-kartik.koolks@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: rtl8712: Fix move '{' to previous lineTchadel Icard1-2/+1
Fix checkpatch error "ERROR: that open brace { should be on the previous line" Signed-off-by: Tchadel Icard <hello@tchadelicard.fr> Link: https://lore.kernel.org/r/20240730070910.34996-1-hello@tchadelicard.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: rtl8723bs: Fix spacing issuesBenjamin Somers1-37/+35
This patch removes superfluous tabs at the beginning of the file and commented includes Signed-off-by: Benjamin Somers <benjamin.somers@resel.fr> Link: https://lore.kernel.org/r/20240730070518.2850-1-benjamin.somers@resel.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: rtl8723bs: replace indent space for tabsEmmanuel Arias1-1/+1
Fix checkpatch error code indent should use tabs in file hal_pwr_seq.h:104 Signed-off-by: Emmanuel Arias <eamanu@riseup.net> Link: https://lore.kernel.org/r/20240730070059.33210-1-eamanu@riseup.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: rtl8723bs: style fix open brace on new lineSai Sree Kartheek Adivi1-2/+0
It fixes the following checkpatch.pl error "ERROR: that open brace { should be on the previous line" and avoids the warning "WARNING: braces {} are not necessary for single statement blocks". Signed-off-by: Sai Sree Kartheek Adivi <sskartheekadivi@gmail.com> Link: https://lore.kernel.org/r/20240730065901.35254-1-sskartheekadivi@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: rtl8723bs: place opening brace on previous lineGuilherme Puida Moreira1-2/+1
Fix checkpatch diagnostic "ERROR: that open brace { should be on the previous line" in rtw_security.h:173 Signed-off-by: Guilherme Puida Moreira <guilherme@puida.xyz> Link: https://lore.kernel.org/r/20240730064812.1979-1-guilherme@puida.xyz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: rtl8192e: style fix - alignment to match parenthesisDavid Prévot1-1/+1
Fixed checkpath Alignment should match open parenthesis Signed-off-by: David Prévot <david@tilapin.org> Link: https://lore.kernel.org/r/20240730064707.914-1-david@tilapin.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: rtl8712: remove trailing whitespaceFelix Yan1-1/+1
Fix the following checkpatch.pl error: ERROR: trailing whitespace Signed-off-by: Felix Yan <felixonmars@archlinux.org> Link: https://lore.kernel.org/r/20240730063746.176245-1-felixonmars@archlinux.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: vme_user: vme_irq_handler: name func ptr argsAgathe Porte1-1/+1
This commit fixes the following checkpatch.pl warnings: WARNING: function definition argument 'int' should also have an identifier name + void (*call)(int, int, void *); WARNING: function definition argument 'int' should also have an identifier name + void (*call)(int, int, void *); WARNING: function definition argument 'void *' should also have an identifier name + void (*call)(int, int, void *); Signed-off-by: Agathe Porte <gagath@debian.org> Link: https://lore.kernel.org/r/20240730062843.64977-1-gagath@debian.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: vme_user: vme_tsi148.c: Change FormattingGriffin Kroah-Hartman1-66/+67
Adhere to Linux Kernal coding style. Reported by checkpatch CHECK: Alignment should match open parenthesis Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com> Link: https://lore.kernel.org/r/20240729130213.48941-2-griffin@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: vme_user: vme_tsi148.C: remove redundant newlinesGriffin Kroah-Hartman1-4/+2
Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com> Link: https://lore.kernel.org/r/20240729130213.48941-1-griffin@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: ks7010: Remove unused driverPhilipp Hortmann12-7503/+0
Wolfram contributed this driver in 2016. He is not using it anymore and confirmed it to be removed. It is hard to find hardware around the globe. When it is offered it is expensive and performance is low. Remove unused driver. Link: https://lore.kernel.org/linux-staging/igi27iwrzg3ovgj3sym4gsi45timpkt4vkl5ss5dbftdzat6p4@ctxcjocvunpt/ Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20240728052552.GA8748@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: fbtft: Fix mutex and spinlock without comment warningRiyan Dhiman1-0/+2
Adhere to Linux kernel coding style Reported by checkpatch: CHECK: spinlock_t definition without comment CHECK: mutex definition without comment Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com> Link: https://lore.kernel.org/r/20240727093106.11214-1-riyandhiman14@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: fbtft: Remove ftrace-like loggingRiyan Dhiman12-55/+0
Adhere to Linux kernel coding style Reported by checkpatch: WARNING: Unnecessary ftrace-like logging - prefer using ftrace Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com> Link: https://lore.kernel.org/r/20240725130351.14877-1-riyandhiman14@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-30staging: most: video: Fixed minor capitalization and grammatical issuesSteven Davis1-3/+3
This patch makes three error messages in the driver easier to read by capitalizing the first letters properly. For example, "channel already linked" becomes "Channel already linked", and "expect" becomes "expected", as you would typically find in an error message. This patch improves user experience by making the errors clearer. Signed-off-by: Steven Davis <goldside000@outlook.com> Link: https://lore.kernel.org/r/SJ2P223MB1026E786B28986901BC1C126F7A92@SJ2P223MB1026.NAMP223.PROD.OUTLOOK.COM Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-29staging: iio: frequency: ad9834: Validate frequency parameter valueAleksandr Mishin1-1/+1
In ad9834_write_frequency() clk_get_rate() can return 0. In such case ad9834_calc_freqreg() call will lead to division by zero. Checking 'if (fout > (clk_freq / 2))' doesn't protect in case of 'fout' is 0. ad9834_write_frequency() is called from ad9834_write(), where fout is taken from text buffer, which can contain any value. Modify parameters checking. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 12b9d5bf76bf ("Staging: IIO: DDS: AD9833 / AD9834 driver") Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20240703154506.25584-1-amishin@t-argos.ru Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-07-29staging: rtl8712: style fix multiple line dereferenceMoon Yeounsu1-2/+3
It fix the following checkpatch.pl warning: Avoid multiple line dereference - prefer %s Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Moon Yeounsu <yyyynoom@gmail.com> Link: https://lore.kernel.org/r/20240721040504.1483-1-yyyynoom@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-29staging: vme_user: vme_tsi148.c: remove redundant newlinesGriffin Kroah-Hartman1-4/+2
Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com> Link: https://lore.kernel.org/r/20240715141102.142186-1-griffin@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-28minmax: make generic MIN() and MAX() macros available everywhereLinus Torvalds1-5/+0
This just standardizes the use of MIN() and MAX() macros, with the very traditional semantics. The goal is to use these for C constant expressions and for top-level / static initializers, and so be able to simplify the min()/max() macros. These macro names were used by various kernel code - they are very traditional, after all - and all such users have been fixed up, with a few different approaches: - trivial duplicated macro definitions have been removed Note that 'trivial' here means that it's obviously kernel code that already included all the major kernel headers, and thus gets the new generic MIN/MAX macros automatically. - non-trivial duplicated macro definitions are guarded with #ifndef This is the "yes, they define their own versions, but no, the include situation is not entirely obvious, and maybe they don't get the generic version automatically" case. - strange use case #1 A couple of drivers decided that the way they want to describe their versioning is with #define MAJ 1 #define MIN 2 #define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) which adds zero value and I just did my Alexander the Great impersonation, and rewrote that pointless Gordian knot as #define DRV_VERSION "1.2" instead. - strange use case #2 A couple of drivers thought that it's a good idea to have a random 'MIN' or 'MAX' define for a value or index into a table, rather than the traditional macro that takes arguments. These values were re-written as C enum's instead. The new function-line macros only expand when followed by an open parenthesis, and thus don't clash with enum use. Happily, there weren't really all that many of these cases, and a lot of users already had the pattern of using '#ifndef' guarding (or in one case just using '#undef MIN') before defining their own private version that does the same thing. I left such cases alone. Cc: David Laight <David.Laight@aculab.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-07-25Merge tag 'driver-core-6.11-rc1' of ↵Linus Torvalds5-10/+6
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the big set of driver core changes for 6.11-rc1. Lots of stuff in here, with not a huge diffstat, but apis are evolving which required lots of files to be touched. Highlights of the changes in here are: - platform remove callback api final fixups (Uwe took many releases to get here, finally!) - Rust bindings for basic firmware apis and initial driver-core interactions. It's not all that useful for a "write a whole driver in rust" type of thing, but the firmware bindings do help out the phy rust drivers, and the driver core bindings give a solid base on which others can start their work. There is still a long way to go here before we have a multitude of rust drivers being added, but it's a great first step. - driver core const api changes. This reached across all bus types, and there are some fix-ups for some not-common bus types that linux-next and 0-day testing shook out. This work is being done to help make the rust bindings more safe, as well as the C code, moving toward the end-goal of allowing us to put driver structures into read-only memory. We aren't there yet, but are getting closer. - minor devres cleanups and fixes found by code inspection - arch_topology minor changes - other minor driver core cleanups All of these have been in linux-next for a very long time with no reported problems" * tag 'driver-core-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (55 commits) ARM: sa1100: make match function take a const pointer sysfs/cpu: Make crash_hotplug attribute world-readable dio: Have dio_bus_match() callback take a const * zorro: make match function take a const pointer driver core: module: make module_[add|remove]_driver take a const * driver core: make driver_find_device() take a const * driver core: make driver_[create|remove]_file take a const * firmware_loader: fix soundness issue in `request_internal` firmware_loader: annotate doctests as `no_run` devres: Correct code style for functions that return a pointer type devres: Initialize an uninitialized struct member devres: Fix memory leakage caused by driver API devm_free_percpu() devres: Fix devm_krealloc() wasting memory driver core: platform: Switch to use kmemdup_array() driver core: have match() callback in struct bus_type take a const * MAINTAINERS: add Rust device abstractions to DRIVER CORE device: rust: improve safety comments MAINTAINERS: add Danilo as FIRMWARE LOADER maintainer MAINTAINERS: add Rust FW abstractions to FIRMWARE LOADER firmware: rust: improve safety comments ...
2024-07-21Merge tag 'mm-nonmm-stable-2024-07-21-15-07' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: - In the series "treewide: Refactor heap related implementation", Kuan-Wei Chiu has significantly reworked the min_heap library code and has taught bcachefs to use the new more generic implementation. - Yury Norov's series "Cleanup cpumask.h inclusion in core headers" reworks the cpumask and nodemask headers to make things generally more rational. - Kuan-Wei Chiu has sent along some maintenance work against our sorting library code in the series "lib/sort: Optimizations and cleanups". - More library maintainance work from Christophe Jaillet in the series "Remove usage of the deprecated ida_simple_xx() API". - Ryusuke Konishi continues with the nilfs2 fixes and clanups in the series "nilfs2: eliminate the call to inode_attach_wb()". - Kuan-Ying Lee has some fixes to the gdb scripts in the series "Fix GDB command error". - Plus the usual shower of singleton patches all over the place. Please see the relevant changelogs for details. * tag 'mm-nonmm-stable-2024-07-21-15-07' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (98 commits) ia64: scrub ia64 from poison.h watchdog/perf: properly initialize the turbo mode timestamp and rearm counter tsacct: replace strncpy() with strscpy() lib/bch.c: use swap() to improve code test_bpf: convert comma to semicolon init/modpost: conditionally check section mismatch to __meminit* init: remove unused __MEMINIT* macros nilfs2: Constify struct kobj_type nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro math: rational: add missing MODULE_DESCRIPTION() macro lib/zlib: add missing MODULE_DESCRIPTION() macro fs: ufs: add MODULE_DESCRIPTION() lib/rbtree.c: fix the example typo ocfs2: add bounds checking to ocfs2_check_dir_entry() fs: add kernel-doc comments to ocfs2_prepare_orphan_dir() coredump: simplify zap_process() selftests/fpu: add missing MODULE_DESCRIPTION() macro compiler.h: simplify data_race() macro build-id: require program headers to be right after ELF header resource: add missing MODULE_DESCRIPTION() ...
2024-07-19Merge tag 'char-misc-6.11-rc1' of ↵Linus Torvalds3-17/+8
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc and other driver updates from Greg KH: "Here is the "big" set of char/misc and other driver subsystem changes for 6.11-rc1. Nothing major in here, just loads of new drivers and updates. Included in here are: - IIO api updates and new drivers added - wait_interruptable_timeout() api cleanups for some drivers - MODULE_DESCRIPTION() additions for loads of drivers - parport out-of-bounds fix - interconnect driver updates and additions - mhi driver updates and additions - w1 driver fixes - binder speedups and fixes - eeprom driver updates - coresight driver updates - counter driver update - new misc driver additions - other minor api updates All of these, EXCEPT for the final Kconfig build fix for 32bit systems, have been in linux-next for a while with no reported issues. The Kconfig fixup went in 29 hours ago, so might have missed the latest linux-next, but was acked by everyone involved" * tag 'char-misc-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (330 commits) misc: Kconfig: exclude mrvl-cn10k-dpi compilation for 32-bit systems misc: delete Makefile.rej binder: fix hang of unregistered readers misc: Kconfig: add a new dependency for MARVELL_CN10K_DPI virtio: add missing MODULE_DESCRIPTION() macro agp: uninorth: add missing MODULE_DESCRIPTION() macro spmi: add missing MODULE_DESCRIPTION() macros dev/parport: fix the array out-of-bounds risk samples: configfs: add missing MODULE_DESCRIPTION() macro misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver misc: keba: Fix missing AUXILIARY_BUS dependency slimbus: Fix struct and documentation alignment in stream.c MAINTAINERS: CC dri-devel list on Qualcomm FastRPC patches misc: fastrpc: use coherent pool for untranslated Compute Banks misc: fastrpc: support complete DMA pool access to the DSP misc: fastrpc: add missing MODULE_DESCRIPTION() macro misc: fastrpc: Add missing dev_err newlines misc: fastrpc: Use memdup_user() nvmem: core: Implement force_ro sysfs attribute nvmem: Use sysfs_emit() for type attribute ...