aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2023-07-30staging: rtl8192e: Remove unused variable p_intbPhilipp Hortmann3-3/+3
Remove unused variable p_intb of rtl92e_ack_irq. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/196f555d3762bf4fa8302f19b46f1510ea68cb31.1690615475.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-30Staging: rtl8192e: Rename function ResetBaEntryTree Davies3-5/+5
Rename function ResetBaEntry to rtllib_reset_ba_entry in order to Fix checkpatch warning: Avoid CamelCase Signed-off-by: Tree Davies <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27Staging: rtl8192e: Rename function RxTsDeleteBATree Davies1-4/+4
Rename function RxTsDeleteBA to rx_ts_delete_ba in order to Fix checkpatch warning: Avoid CamelCase Signed-off-by: Tree Davies <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27Staging: rtl8192e: Rename function TxTsDeleteBATree Davies1-4/+4
Rename function TxTsDeleteBA to tx_ts_delete_ba in order to Fix checkpatch warning: Avoid CamelCase Signed-off-by: Tree Davies <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27Staging: rtl8192e: Rename function DeActivateBAEntryTree Davies1-9/+9
Rename function DeActivateBAEntry to deactivate_ba_entry in order to Fix checkpatch warning: Avoid CamelCase Signed-off-by: Tree Davies <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27Staging: rtl8192e: Rename function ActivateBAEntryTree Davies1-4/+4
Rename function ActivateBAEntry to activate_ba_entry in order to Fix checkpatch warning: Avoid CamelCase Signed-off-by: Tree Davies <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix comparison to falseFranziska Naepelt1-1/+1
Fix the following checkpatch issue: - CHECK: Using comparison to false is error prone Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Add preferred spacesFranziska Naepelt1-19/+19
Fix the following checkpatch issues: - CHECK: spaces preferred around that '+' (ctx:VxV) - CHECK: spaces preferred around that '&' (ctx:VxV) - CHECK: spaces preferred around that '|' (ctx:VxV) - CHECK: spaces required around that ':' (ctx:VxV) Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix alignment on open parenthesisFranziska Naepelt1-4/+4
Fix the following checkpatch issue: - CHECK: Alignment should match open parenthesis Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Remove unnecessary parenthesesFranziska Naepelt1-29/+29
Fix the following checkpatch issue: - CHECK: Unnecessary parentheses around ... Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Remove unnecessary blank linesFranziska Naepelt1-26/+0
Fix the following checkpatch issues: - CHECK: Blank lines aren't necessary before a close brace '}' - CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Remove multiple blank linesFranziska Naepelt1-18/+0
Fix the following checkpatch issue: - CHECK: Please don't use multiple blank lines Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix block comment alignmentFranziska Naepelt1-3/+3
Fix the following checkpatch issue: - WARNING: Block comments should align the * on each line Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix code indentFranziska Naepelt1-1/+1
Fix the following checkpatch issue: - WARNING: suspect code indent for conditional statements Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: ioctl_linux: Fix else on next lineFranziska Naepelt1-2/+1
Fix the following checkpatch issue: - ERROR: else should follow close brace '}' Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: Fix remaining blank line issueFranziska Naepelt1-1/+0
Fix the following checkpatch blank line issue: - CHECK: Please don't use multiple blank lines Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: Fix alignment open parenthesisFranziska Naepelt1-42/+49
Fix the following checkpatch issues: - CHECK: Alignment should match open parenthesis Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8723bs: Fix space issuesFranziska Naepelt1-38/+38
Fix the following checkpatch space issues: - CHECK: spaces preferred around that '*' (ctx:VxV) - CHECK: spaces preferred around that '+' (ctx:VxV) - CHECK: spaces preferred around that '-' (ctx:VxV) - CHECK: spaces preferred around that '|' (ctx:VxV) - CHECK: No space is necessary after a cast - WARNING: please, no spaces at the start of a line Signed-off-by: Franziska Naepelt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: Explicitly include correct DT includesRob Herring14-17/+7
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Hans Verkuil <[email protected]> Reviewed-by: Luca Ceresoli <[email protected]> # tegra-video Acked-by: Parthiban Veerasooran <[email protected]> Acked-by: Alex Elder <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rts5208: Correct line ending with '('Cyrus Ramavarapu1-2/+1
Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Lines should not end with a '(' Signed-off-by: Cyrus Ramavarapu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192u: Fix keyidx assignment within if conditionWang Jinchao1-4/+6
Refactor the if condition into nested conditionals to improve clarity. The condition is currently in the form of (E1 && E2 && E3), where the variable keyidx is assigned a value in E3. Signed-off-by: Wang Jinchao <[email protected]> Link: https://lore.kernel.org/r/ZKQ7tYa9I+PHgef/@fedora Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: axis-fifo: Use devm_platform_get_and_ioremap_resource()Yangtao Li1-10/+2
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Rename variable HighRSSIThreshForRAYogesh Hegde1-5/+5
Rename variable HighRSSIThreshForRA to high_rssi_thresh_for_ra to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Yogesh Hegde <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/e4a09d927eaa9c185afce3a58cd434326de735dc.1688299890.git.yogi.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Rename variable LowRSSIThreshForRAYogesh Hegde1-5/+5
Rename variable LowRSSIThreshForRA to low_rssi_thresh_for_ra to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Yogesh Hegde <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/ebea3e75dc84a6d77750c0598ab12d04ad55c676.1688299890.git.yogi.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Rename variable targetRATRYogesh Hegde1-9/+9
Rename variable targetRATR to target_ratr to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Yogesh Hegde <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/ef60d870d643a3774363efdac798e059ea5b8f85.1688299890.git.yogi.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Rename variable currentRATRYogesh Hegde1-3/+3
Rename variable currentRATR to current_ratr to avoid CamelCase which is not accepted by checkpatch. Signed-off-by: Yogesh Hegde <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/091a5abb231fb5c88d47f329ec3b5133b08d6b23.1688299890.git.yogi.kernel@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove variable ieee->short_slotPhilipp Hortmann3-9/+3
ieee->short_slot also named priv->rtllib->short_slot is initialized to 1 and then unchanged. All evaluations will result accordingly. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/74fe53ccfafe2e0e18319b5502ed83544cc3ffd8.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove variable priv->reg_chnl_planPhilipp Hortmann3-6/+1
Remove variable priv->reg_chnl_plan as it is only once initialized and only once evaluated. So the result is always the same. Remove dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/0dd4f8eded4b172d75f0cb5d5a34ba3dc66e2e8f.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove variable bdisable_nicPhilipp Hortmann2-13/+0
Remove variable bdisable_nic as always set to false. Remove dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/6b083ce8c4aaf42f366c365cbc47178afa2636d4.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove variable card_typePhilipp Hortmann2-8/+0
Remove variable card_type as it is initialized but never unused. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/f0f40f574ac4837bd2be3b6384ae42d9aabf1832.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove variable host_decrypt as it is constantPhilipp Hortmann4-29/+21
ieee->host_decrypt also named priv->rtllib->host_decrypt is initialized to 1 and then unchanged. All evaluations will result accordingly. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/637350e9bc3edded665009a30d12350157e8a9a9.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove variable host_encrypt as it is constantPhilipp Hortmann5-13/+5
ieee->host_encrypt also named priv->rtllib->host_encrypt is initialized to 1 and then unchanged. All evaluations will result accordingly. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/bc4ea0492306f708f0e5cac6bf0239deb3cd9a80.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove variable modulation as it is constantPhilipp Hortmann4-78/+50
ieee->modulation is initialized to 3 and then unchanged. All evaluations will result accordingly. Remove resulting dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/ebd543d097a65f105078c71faceaed2a4d5e7b55.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove empty function AdmitTSPhilipp Hortmann1-6/+0
Remove call of function and empty function AdmitTS. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/572feb55932b59c7fc652183877698f8b1123d8d.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove unused timer InactTimerPhilipp Hortmann2-14/+0
Remove unused timer InactTimer and all the resulting unused code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/1a7acdd76037327602858a8634d502b46cdc8786.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove equation of local variable InactTime of AdmitTSPhilipp Hortmann1-4/+0
Remove equation of local variable InactTime of AdmitTS as AdmitTS is only once called with InactTime as 0. The equation is always false and therefore dead code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/ff2d60f157059e5440a4b583f2604d99db4d8d2b.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: rtl8192e: Remove unused timer SetupTimerPhilipp Hortmann2-13/+0
Remove unused timer SetupTimer and all the resulting unused code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/4bbbd60d84e15fdb7bffde98a687ed168a4dfbbd.1687583718.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-27staging: greybus: pwm: Drop unused member from driver structUwe Kleine-König1-1/+0
The driver doesn't make use of struct gb_pwm_chip::pwm. So that struct member can just be dropped. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Alex Elder <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-07-22Merge tag 's390-6.5-3' of ↵Linus Torvalds1-11/+24
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: - Fix per vma lock fault handling: add missing !(fault & VM_FAULT_ERROR) check to fault handler to prevent error handling for return values that don't indicate an error - Use kfree_sensitive() instead of kfree() in paes crypto code to clear memory that may contain keys before freeing it - Fix reply buffer size calculation for CCA replies in zcrypt device driver * tag 's390-6.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: fix reply buffer calculations for CCA replies s390/crypto: use kfree_sensitive() instead of kfree() s390/mm: fix per vma lock fault handling
2023-07-22Merge tag 'block-6.5-2023-07-21' of git://git.kernel.dk/linuxLinus Torvalds1-2/+38
Pull block fixes from Jens Axboe: - Fix for loop regressions (Mauricio) - Fix a potential stall with batched wakeups in sbitmap (David) - Fix for stall with recursive plug flushes (Ross) - Skip accounting of empty requests for blk-iocost (Chengming) - Remove a dead field in struct blk_mq_hw_ctx (Chengming) * tag 'block-6.5-2023-07-21' of git://git.kernel.dk/linux: loop: do not enforce max_loop hard limit by (new) default loop: deprecate autoloading callback loop_probe() sbitmap: fix batching wakeup blk-iocost: skip empty flush bio in iocost blk-mq: delete dead struct blk_mq_hw_ctx->queued field blk-mq: Fix stall due to recursive flush plug
2023-07-22Merge tag 'devicetree-fixes-for-6.5-1' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix moortec,mr75203 schema usage of 'multipleOf' keyword - Fix regression in systems depending on "of-display" device name - Build fix for s390 with CONFIG_PCI=n and OF_EARLY_FLATTREE=y - Drop two obsolete serial .txt bindings * tag 'devicetree-fixes-for-6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: serial: Remove obsolete nxp,lpc1850-uart.txt dt-bindings: serial: Remove obsolete cavium-uart.txt dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients of: Preserve "of-display" device name for compatibility of: make OF_EARLY_FLATTREE depend on HAS_IOMEM
2023-07-22Merge tag 'regmap-fix-v6.5-rc2' of ↵Linus Torvalds6-12/+16
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "Three fixes here: - The issues with accounting for register and padding length on raw buses turn out to be quite widespread in custom buses. In order to avoid disturbing anything drop the initial fixes and fall back to a point fix in the SMBus code where the issue was originally noticed, a more substantial refactoring of the API which ensures that all buses make the same assumptions will follow. - The generic regcache code had been forcing on async I/O which did not work with the new maple tree sync code when used with SPI. Since that was mainly for the rbtree cache and the assumptions about hardware that drove the choice are probably not true any more fix this by pushing the enablement of async down into the rbtree code. This probably also makes cache syncs for systems faster though it's not the point. - The test code was triggering use of the rbtree and maple tree caches with dynamic allocation of nodes since all the testing is with RAM backed caches with no I/O performance issues. Just disable the locking in the tests to avoid triggering warnings when allocation debugging is turned on, it's not really what's being tested" * tag 'regmap-fix-v6.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Disable locking for RBTREE and MAPLE unit tests regcache: Push async I/O request down into the rbtree cache regmap: Account for register length in SMBus I/O limits regmap: Drop initial version of maximum transfer length fixes
2023-07-22Merge tag 'gpio-fixes-for-v6.5-rc3' of ↵Linus Torvalds2-14/+18
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix initial value handling for output-only pins in gpio-tps68470 - fix two resource leaks in gpio-mvebu * tag 'gpio-fixes-for-v6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: mvebu: fix irq domain leak gpio: mvebu: Make use of devm_pwmchip_add gpio: tps68470: Make tps68470_gpio_output() always set the initial value
2023-07-21loop: do not enforce max_loop hard limit by (new) defaultMauricio Faria de Oliveira1-2/+34
Problem: The max_loop parameter is used for 2 different purposes: 1) initial number of loop devices to pre-create on init 2) maximum number of loop devices to add on access/open() Historically, its default value (zero) caused 1) to create non-zero number of devices (CONFIG_BLK_DEV_LOOP_MIN_COUNT), and no hard limit on 2) to add devices with autoloading. However, the default value changed in commit 85c50197716c ("loop: Fix the max_loop commandline argument treatment when it is set to 0") to CONFIG_BLK_DEV_LOOP_MIN_COUNT, for max_loop=0 not to pre-create devices. That does improve 1), but unfortunately it breaks 2), as the default behavior changed from no-limit to hard-limit. Example: For example, this userspace code broke for N >= CONFIG, if the user relied on the default value 0 for max_loop: mknod("/dev/loopN"); open("/dev/loopN"); // now fails with ENXIO Though affected users may "fix" it with (loop.)max_loop=0, this means to require a kernel parameter change on stable kernel update (that commit Fixes: an old commit in stable). Solution: The original semantics for the default value in 2) can be applied if the parameter is not set (ie, default behavior). This still keeps the intended function in 1) and 2) if set, and that commit's intended improvement in 1) if max_loop=0. Before 85c50197716c: - default: 1) CONFIG devices 2) no limit - max_loop=0: 1) CONFIG devices 2) no limit - max_loop=X: 1) X devices 2) X limit After 85c50197716c: - default: 1) CONFIG devices 2) CONFIG limit (*) - max_loop=0: 1) 0 devices (*) 2) no limit - max_loop=X: 1) X devices 2) X limit This commit: - default: 1) CONFIG devices 2) no limit (*) - max_loop=0: 1) 0 devices 2) no limit - max_loop=X: 1) X devices 2) X limit Future: The issue/regression from that commit only affects code under the CONFIG_BLOCK_LEGACY_AUTOLOAD deprecation guard, thus the fix too is contained under it. Once that deprecated functionality/code is removed, the purpose 2) of max_loop (hard limit) is no longer in use, so the module parameter description can be changed then. Tests: Linux 6.4-rc7 CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 CONFIG_BLOCK_LEGACY_AUTOLOAD=y - default (original) # ls -1 /dev/loop* /dev/loop-control /dev/loop0 ... /dev/loop7 # ./test-loop open: /dev/loop8: No such device or address - default (patched) # ls -1 /dev/loop* /dev/loop-control /dev/loop0 ... /dev/loop7 # ./test-loop # - max_loop=0 (original & patched): # ls -1 /dev/loop* /dev/loop-control # ./test-loop # - max_loop=8 (original & patched): # ls -1 /dev/loop* /dev/loop-control /dev/loop0 ... /dev/loop7 # ./test-loop open: /dev/loop8: No such device or address - max_loop=0 (patched; CONFIG_BLOCK_LEGACY_AUTOLOAD is not set) # ls -1 /dev/loop* /dev/loop-control # ./test-loop open: /dev/loop8: No such device or address Fixes: 85c50197716c ("loop: Fix the max_loop commandline argument treatment when it is set to 0") Signed-off-by: Mauricio Faria de Oliveira <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
2023-07-21loop: deprecate autoloading callback loop_probe()Mauricio Faria de Oliveira1-0/+4
The 'probe' callback in __register_blkdev() is only used under the CONFIG_BLOCK_LEGACY_AUTOLOAD deprecation guard. The loop_probe() function is only used for that callback, so guard it too, accordingly. See commit fbdee71bb5d8 ("block: deprecate autoloading based on dev_t"). Signed-off-by: Mauricio Faria de Oliveira <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
2023-07-21Merge tag 'pm-6.5-rc3' of ↵Linus Torvalds1-171/+1
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Revert three recent intel_idle commits that introduced a functional issue, included a coding mistake and have been questioned at the design level" * tag 'pm-6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "intel_idle: Add support for using intel_idle in a VM guest using just hlt" Revert "intel_idle: Add a "Long HLT" C1 state for the VM guest mode" Revert "intel_idle: Add __init annotation to matchup_vm_state_with_baremetal()"
2023-07-21Merge tag 'fbdev-for-6.5-rc3' of ↵Linus Torvalds25-118/+97
git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes and cleanups from Helge Deller: "Just the usual bunch of code cleanups in various drivers, this time mostly in vgacon and imxfb: - Code cleanup in vgacon (Jiri Slaby) - Explicitly include correct DT includes (Rob Herring) - imxfb code cleanup (Yangtao Li, Martin Kaiser) - kyrofb: make arrays const and smaller (Colin Ian King) - ep93xx-fb: return value check fix (Yuanjun Gong) - au1200fb: add missing IRQ check (Zhang Shurong)" * tag 'fbdev-for-6.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: Explicitly include correct DT includes fbdev: ep93xx-fb: fix return value check in ep93xxfb_probe fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe fbdev: kyro: make some const read-only arrays static and reduce type size fbcon: remove unused display (p) from fbcon_redraw() sticon: make sticon_set_def_font() void and remove op parameter vgacon: cache vc_cell_height in vgacon_cursor() vgacon: let vgacon_doresize() return void vgacon: remove unused xpos from vgacon_set_cursor_size() vgacon: remove unneeded forward declarations vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen() fbdev: imxfb: remove unneeded labels fbdev: imxfb: Convert to devm_platform_ioremap_resource() fbdev: imxfb: Convert to devm_kmalloc_array() fbdev: imxfb: Removed unneeded release_mem_region fbdev: imxfb: switch to DEFINE_SIMPLE_DEV_PM_OPS fbdev: imxfb: warn about invalid left/right margin
2023-07-21drm/atomic: Fix potential use-after-free in nonblocking commitsDaniel Vetter1-1/+10
This requires a bit of background. Properly done a modeset driver's unload/remove sequence should be drm_dev_unplug(); drm_atomic_helper_shutdown(); drm_dev_put(); The trouble is that the drm_dev_unplugged() checks are by design racy, they do not synchronize against all outstanding ioctl. This is because those ioctl could block forever (both for modeset and for driver specific ioctls), leading to deadlocks in hotunplug. Instead the code sections that touch the hardware need to be annotated with drm_dev_enter/exit, to avoid accessing hardware resources after the unload/remove has finished. To avoid use-after-free issues all the involved userspace visible objects are supposed to hold a reference on the underlying drm_device, like drm_file does. The issue now is that we missed one, the atomic modeset ioctl can be run in a nonblocking fashion, and in that case it cannot rely on the implied drm_device reference provided by the ioctl calling context. This can result in a use-after-free if an nonblocking atomic commit is carefully raced against a driver unload. Fix this by unconditionally grabbing a drm_device reference for any drm_atomic_state structures. Strictly speaking this isn't required for blocking commits and TEST_ONLY calls, but it's the simpler approach. Thanks to shanzhulig for the initial idea of grabbing an unconditional reference, I just added comments, a condensed commit message and fixed a minor potential issue in where exactly we drop the final reference. Reported-by: shanzhulig <[email protected]> Suggested-by: shanzhulig <[email protected]> Reviewed-by: Maxime Ripard <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: David Airlie <[email protected]> Cc: [email protected] Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2023-07-20Merge tag 'drm-fixes-2023-07-21' of git://anongit.freedesktop.org/drm/drmLinus Torvalds42-242/+612
Pull drm fixes from Dave Airlie: "Mostly amdgpu fixes, a couple of i915 fixes, some nouveau and then a few misc accel and other fixes. client: - memory leak fix dma-buf: - memory leak fix qaic: - bound check fixes - map_user_pages leak - int overflow fixes habanalabs: - debugfs stub helper nouveau: - aux event slot fixes - anx9805 cards fixes i915: - Add sentinel to xehp_oa_b_counters - Revert "drm/i915: use localized __diag_ignore_all() instead of per file" amdgpu: - More PCIe DPM fixes for Intel platforms - DCN3.0.1 fixes - Virtual display timer fix - Async flip fix - SMU13 clock reporting fixes - Add missing PSP firmware declaration - DP MST fix - DCN3.1.x fixes - Slab out of bounds fix" * tag 'drm-fixes-2023-07-21' of git://anongit.freedesktop.org/drm/drm: (31 commits) accel/habanalabs: add more debugfs stub helpers drm/nouveau/kms/nv50-: init hpd_irq_lock for PIOR DP drm/nouveau/disp: PIOR DP uses GPIO for HPD, not PMGR AUX interrupts drm/nouveau/i2c: fix number of aux event slots drm/amdgpu: use a macro to define no xcp partition case drm/amdgpu/vm: use the same xcp_id from root PD drm/amdgpu: fix slab-out-of-bounds issue in amdgpu_vm_pt_create drm/amdgpu: Allocate root PD on correct partition drm/amd/display: Keep PHY active for DP displays on DCN31 drm/amd/display: Prevent vtotal from being set to 0 drm/amd/display: Disable MPC split by default on special asic drm/amd/display: check TG is non-null before checking if enabled drm/amd/display: Add polling method to handle MST reply packet drm/amd/display: Clean up errors & warnings in amdgpu_dm.c drm/amdgpu: Allow the initramfs generator to include psp_13_0_6_ta drm/amdgpu/pm: make mclk consistent for smu 13.0.7 drm/amdgpu/pm: make gfxclock consistent for sienna cichlid drm/amd/display: only accept async flips for fast updates drm/amdgpu/vkms: relax timer deactivation by hrtimer_try_to_cancel drm/amd/display: add DCN301 specific logic for OTG programming ...
2023-07-21Merge tag 'amd-drm-fixes-6.5-2023-07-20' of ↵Dave Airlie29-196/+524
https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.5-2023-07-20: amdgpu: - More PCIe DPM fixes for Intel platforms - DCN3.0.1 fixes - Virtual display timer fix - Async flip fix - SMU13 clock reporting fixes - Add missing PSP firmware declaration - DP MST fix - DCN3.1.x fixes - Slab out of bounds fix Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]