aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vme_user (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-07-24staging: vme_user: fix spelling errorsAkhilesh Patil2-3/+3
Fix spelling errors reported by codespell tool as below. bewteen --> between enty --> entry Copntroller --> Controller Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in> Link: https://lore.kernel.org/r/aHnTdicud7sW/Zis@bhairav-test.ee.iitb.ac.in Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-15staging: vme_user: fixed alignment should match open parenthesisNadzeya Hutsko1-1/+1
Fixed the scripts/checkpatch.pl warning in drivers/staging/vme_user/vme_fake.c:1064 Signed-off-by: Nadzeya Hutsko <nadzya.info@gmail.com> Link: https://lore.kernel.org/r/20250714132409.26875-1-nadzya.info@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-19staging: vme: vme_user: fix up const issue in vme_bus_match()Greg Kroah-Hartman1-1/+1
vme_bus_match takes a const pointer and casts it away with container_of() which is generally not a good idea. Fix this up by properly marking the output as const. Link: https://lore.kernel.org/r/2025052132-giddiness-slain-5ba1@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-29staging: vme_user: vme_tsi148.c: avoid parenthesis line endingAntonio Riccio1-2/+1
Adhere to Linux Kernel coding style. Reported by checkpatch CHECK: Lines should not end with a '(' Signed-off-by: Antonio Riccio <linux@ariccio.me> Link: https://lore.kernel.org/r/Z20yIvcQOGHMfufx@stream-circuit Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-04staging: vme_user: vme_bridge.h: Name function pointer argumentsPedro Perez1-23/+33
This patch names the function pointer arguments in vme_bridge consistently with the implementations. Signed-off-by: Pedro Perez <pedropz1537@gmail.com> Link: https://lore.kernel.org/r/20241023150439.4a0dbc05@hob Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-05staging: vme_user: changed geoid data type from int to u32Riyan Dhiman2-6/+6
Geoid is a module parameter which is set by root user. Its valid values are between 0 and VME_MAX_SLOTS. So, changing data type of geoid from int to u32 since it will always be positive. Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com> Link: https://lore.kernel.org/r/20240903114849.4953-3-riyandhiman14@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-29staging: vme_user: added bound check to geoidRiyan Dhiman2-0/+12
The geoid is a module parameter that allows users to hardcode the slot number. A bound check for geoid was added in the probe function because only values between 0 and less than VME_MAX_SLOT are valid. Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20240827125604.42771-2-riyandhiman14@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22staging: vme: vme_user: Remove NULL check of list_entry()Yuesong Li1-8/+0
list_entry() will never return a NULL pointer, thus remove the check. Signed-off-by: Yuesong Li <liyuesong@vivo.com> Link: https://lore.kernel.org/r/20240822025736.1208339-1-liyuesong@vivo.com 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-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-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-25Merge tag 'driver-core-6.11-rc1' of ↵Linus Torvalds1-1/+1
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-03driver core: have match() callback in struct bus_type take a const *Greg Kroah-Hartman1-1/+1
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 <rafael@kernel.org> Reviewed-by: Alex Elder <elder@kernel.org> Acked-by: Sumit Garg <sumit.garg@linaro.org> Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-04staging: vme_user: Add blank line after struct declAshok Kumar1-0/+1
Added blank line after struct declarions for improving readability indicated by checkpatch.pl Signed-off-by: Ashok Kumar <ashokemailat@yahoo.com> Link: https://lore.kernel.org/r/Zj0Fm+vBdzPHlZKS@c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-05staging: vme_user: Fix misaligned closing comment */Jonathan Bergh1-4/+2
This patch makes the following change: * Ensures the trailing */ for comments is on the same line as the opening /* Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com> Link: https://lore.kernel.org/r/20240303100547.153636-1-bergh.jonathan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-17staging: vme: make vme_bus_type constRicardo B. Marliere2-2/+2
Now that the driver core can properly handle constant struct bus_type, move the vme_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Link: https://lore.kernel.org/r/20240208-bus_cleanup-staging2-v1-2-cfe906133a2c@marliere.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04staging: vme_user: print more detailed infomation when an error occursPiro Yang1-1/+1
when the slave_get function pointer belongs to the struct vme_bridge member is NULL, it prompts that the detailed function name "vme_slave_set" equivalent to __func__ not supported. it is similar to the vme_slave_get function: when vme_bridge->slave_set function pointer is NULL to print detailed function name by using __func__. Signed-off-by: Piro Yang <piroyangg@gmail.com> Link: https://lore.kernel.org/r/20231227154739.6951-1-piroyangg@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-23staging: vme_user: Fix the issue of return the wrong error codePiro Yang1-1/+1
Fix the issue of returning the -ENOSYS error code when an error occurs. The error code of -ENOSYS indicates Invalid system call number, but there is not system call error. So replace -ENOSYS error code by the return -EINVAL error code. Signed-off-by: Piro Yang <piroyangg@gmail.com> Link: https://lore.kernel.org/r/20231219170447.51237-1-piroyangg@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-23drivers: staging: vme_user: Describe VME_BUS and VME_TSI148Bagas Sanjaya1-4/+18
Help description for both options only tells users to enable them without description of what VME bridge and TSI148 device are. Briefly describe them. Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://lore.kernel.org/r/20231113093839.7687-1-bagasdotme@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25staging: vme_user: prefer strscpy over strcpyMichael Straube1-1/+1
Using strcpy has potential for buffer overflows. It should be replaced with strscpy where possible. In this case the return value of strcpy is not used, so we can safely replace it with strscpy. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20231023090001.7273-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-21staging: vme_user: Use dev_err() in vme_check_window()Soumya Negi2-7/+7
vme_check_window() uses printk() for logging error message. This leads to the following checkpatch warning: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Use dev_err() instead. Pass VME bridge device to vme_check_window() so that the error message can be logged with the bridge device context. Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/221344ede933b1d9e6c31310b0f4dbb8be809c86.1697763267.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-21staging: vme_user: Remove NULL-checksSoumya Negi1-34/+2
Don't check for empty bridge device & resource in vme_alloc_consistent() & vme_free_consistent() since they can not be NULL. Both the VME bridge device and the VME resource that are used in these functions are set at probe time. Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/049bbedf458e8ac40f3dfff9c9b25dce89f5b642.1697763267.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-21staging: vme_user: Remove printk() in find_bridge()Soumya Negi1-1/+0
Don't log error message in find_bridge(). The printk() triggers a checkpatch warning: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... It can't be replaced by dev_err() & using pr_err() is not helpful as it doesn't give much context to the user. It is better to remove it. Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/028725ebbc522f73c39f5b1ec4cc2bdbdf588971.1697763267.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-21staging: vme_user: Use __func__ instead of function nameSoumya Negi1-7/+7
Replace function names in message strings with __func__ to fix all checkpatch warnings like: WARNING: Prefer using '"%s...", __func__' to using 'vme_lm_get', this function's name, in a string Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Acked-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://lore.kernel.org/r/db4ad6b878c4bb08fd5d15cf4a9287d7bb8c30df.1697763267.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-21staging: vme_user: Replace printk() with dev_*()Soumya Negi1-76/+99
vme.c uses printk() to log messages. To improve and standardize message formatting, use logging mechanisms dev_err()/dev_warn() instead. Retain the printk log levels of the messages during replacement. Issue found by checkpatch.pl Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Acked-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://lore.kernel.org/r/a36a0b839f9c21efe1f2df6f9272ae882fd04fb8.1697763267.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-21staging: vme_user: replace strcpy with strscpyCalvince Otieno1-1/+1
Checkpatch suggests using strscpy() instead of strcpy(). The advantages of strscpy() are that it always adds a NUL terminator and prevents read/write overflows if the source string is not properly terminated. strcpy() lacks built-in bounds checking for the destination buffer, making it susceptible to buffer overflows. These overflows can lead to various unpredictable behaviors. In this specific context, both strscpy and strcpy performs the same operation without any functional difference. The reason for this equivalence is that the driver_name string "vme_fake" is shorter than the size of the fake_bridge->name array which is defined as 16 characters (struct vme_bridge {char name[VMENAMSIZ];...}). Thus, there is no risk of buffer overflow in either case. VMENAMSIZ variable holds a constant value of 16 (#define VMENAMSIZ 16) The null-terminated "vme_fake" string (static const char driver_name[] = "vme_fake";) can be safely copied into fake_bridge->name using either strscpy or strcpy. While using strscpy() does not address any bugs, it is considered a better practice and aligns with checkpatch recommendations. Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Calvince Otieno <calvncce@gmail.com> Link: https://lore.kernel.org/r/ZTDS2H48JBUTiwZi@lab-ubuntu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-15staging: vme_user: Add spaces around '<<' operatorSoumya Negi1-274/+274
Add spaces around all instances of << in the header vme_tsi148.h to conform with Linux coding style. Issue found by checkpatch.pl Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Link: https://lore.kernel.org/r/f84f353dedc28f99e42d2419b379ace41d0cb218.1697240381.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-15staging: vme_user: Add spaces around '*'Soumya Negi1-1/+1
Add space around * operator to adhere to Linux coding style. Issue found by checkpatch.pl Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Link: https://lore.kernel.org/r/81181dcc1ffa648f32cbe3c4ec8731e66349e450.1697240381.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-15staging: vme_user: Fix unbalanced {} in if-else blocksSoumya Negi2-4/+6
Add missing braces so that {} are balanced in all arms of if-else statements as per Linux coding style. Issue found by checkpatch.pl Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Link: https://lore.kernel.org/r/b0fad6de7405a105235b3b595e0bb2c51be7dcf0.1697240381.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-15staging: vme_user: Correct spelling mistakes in commentsSoumya Negi1-2/+2
Fix misspelled words in vme.c. Issue found by checkpatch.pl Signed-off-by: Soumya Negi <soumya.negi97@gmail.com> Link: https://lore.kernel.org/r/f41caa8e7c987fdc010942838117fece8151affe.1697240381.git.soumya.negi97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-06staging: vme_user: make vme_user_sysfs_class constantGreg Kroah-Hartman1-13/+13
Now that the driver core allows for struct class to be in read-only memory, making all 'class' structures to be declared at build time placing them into read-only memory, instead of having to be dynamically allocated at load time. Link: https://lore.kernel.org/r/2023100523-throwback-oak-a164@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-17staging: vme_user: Fix various comment formatting issues including comment ↵Jonathan Bergh1-79/+77
content Fixed various issues relating to comments including: * Lines with '*' in block comments which should be aligned and were not * Corrected comments where closing multiline comment identifier ran over into second newline spuriously * Corrected comment content to correctly reflect hexadecimal for the offsets rather than integers Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com> Link: https://lore.kernel.org/r/20230914200732.47659-1-bergh.jonathan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-17staging: vme_user: Remove spurious newlines between define statementsJonathan Bergh1-4/+0
Removed spurious newlines in define statements so that defines which should be grouped together for readability are grouped as such. Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com> Link: https://lore.kernel.org/r/20230914200536.47619-1-bergh.jonathan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-17staging: vme_user: Remove unused (commented) code causing unnecessary ↵Jonathan Bergh1-3/+0
checkpatch warning Removed unused/commented code from vme_fake.c which was causing spurious checkpatch warnings. Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com> Link: https://lore.kernel.org/r/20230903150623.571984-1-bergh.jonathan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-17staging: vme_user: fix check unnecessary space after a cast in vme_fake.cAlexon Oliveira1-2/+2
Fixed all CHECK: No space is necessary after a cast as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Link: https://lore.kernel.org/r/603976b29ad4d9a0e4cbd8452ff674ec70a227a8.1693164540.git.alexondunkan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-17staging: vme_user: fix check unnecessary blank lines in vme_fake.cAlexon Oliveira1-2/+0
Fixed all CHECK: Blank lines aren't necessary before a close brace '}' as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Link: https://lore.kernel.org/r/dde6f13f92a7cb17e01aceaeabe790656078326e.1693164540.git.alexondunkan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-17staging: vme_user: fix check lines not ending with '(' in vme_fake.cAlexon Oliveira1-2/+1
Fixed all CHECK: Lines should not end with a '(' as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Link: https://lore.kernel.org/r/9f3e2facdc4d5e612dc00830c2da0fb19c20f2c5.1693164540.git.alexondunkan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-17staging: vme_user: fix check alignment of open parenthesis in vme_fake.cAlexon Oliveira1-32/+33
Fixed all CHECK: Alignment should match open parenthesis as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Link: https://lore.kernel.org/r/639fc19f5c5bce6557a813728b28c299c5134ecf.1693164540.git.alexondunkan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13staging: vme_user: Use list_for_each_entry() helperJinjie Ruan1-22/+5
Convert list_for_each() to list_for_each_entry() so that the slave/master/dma/handler/lm_pos list_head pointer and list_entry() call are no longer needed, which can reduce a few lines of code. No functional changed. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230823071437.450460-1-ruanjinjie@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-22staging: vme_user: fix check lines should not end with a '('Alexon Oliveira1-3/+2
Fixed all CHECK: Lines should not end with a '(' as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Link: https://lore.kernel.org/r/ZNqbDtRjGWq67lDJ@alolivei-thinkpadt480s.gru.csb Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-22staging: vme_user: fix check blank lines not necessaryAlexon Oliveira1-4/+0
Fixed all CHECK: Blank lines aren't necessary after an open brace '{' and CHECK: Blank lines aren't necessary before a close brace '}' as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Link: https://lore.kernel.org/r/ZNqYXAe/wIRl8qEe@alolivei-thinkpadt480s.gru.csb Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11staging: vme_user: fix alignment of open parenthesisAlexon Oliveira1-41/+42
Fixed all CHECK: Alignment should match open parenthesis as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Link: https://lore.kernel.org/r/ZNO6HohffQlbh7jn@alolivei-thinkpadt480s.gru.csb Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-09staging: vme_user: fix check alignment should match open parenthesisAlexon Oliveira1-28/+18
Fixed warnings and checks as reported by checkpatch to adhere to the Linux kernel coding-style guidelines. Signed-off-by: Alexon Oliveira <alexondunkan@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/ZM0QPaWv4lp93rGF@alolivei-thinkpadt480s.gru.csb Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-27Merge tag 'driver-core-6.4-rc1' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the large set of driver core changes for 6.4-rc1. Once again, a busy development cycle, with lots of changes happening in the driver core in the quest to be able to move "struct bus" and "struct class" into read-only memory, a task now complete with these changes. This will make the future rust interactions with the driver core more "provably correct" as well as providing more obvious lifetime rules for all busses and classes in the kernel. The changes required for this did touch many individual classes and busses as many callbacks were changed to take const * parameters instead. All of these changes have been submitted to the various subsystem maintainers, giving them plenty of time to review, and most of them actually did so. Other than those changes, included in here are a small set of other things: - kobject logging improvements - cacheinfo improvements and updates - obligatory fw_devlink updates and fixes - documentation updates - device property cleanups and const * changes - firwmare loader dependency fixes. All of these have been in linux-next for a while with no reported problems" * tag 'driver-core-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (120 commits) device property: make device_property functions take const device * driver core: update comments in device_rename() driver core: Don't require dynamic_debug for initcall_debug probe timing firmware_loader: rework crypto dependencies firmware_loader: Strip off \n from customized path zram: fix up permission for the hot_add sysfs file cacheinfo: Add use_arch[|_cache]_info field/function arch_topology: Remove early cacheinfo error message if -ENOENT cacheinfo: Check cache properties are present in DT cacheinfo: Check sib_leaf in cache_leaves_are_shared() cacheinfo: Allow early level detection when DT/ACPI info is missing/broken cacheinfo: Add arm64 early level initializer implementation cacheinfo: Add arch specific early level initializer tty: make tty_class a static const structure driver core: class: remove struct class_interface * from callbacks driver core: class: mark the struct class in struct class_interface constant driver core: class: make class_register() take a const * driver core: class: mark class_release() as taking a const * driver core: remove incorrect comment for device_create* MIPS: vpe-cmp: remove module owner pointer from struct class usage. ...
2023-04-05staging: vme: clean up duplicate definitions of dependenciesLukas Bulwahn1-2/+1
The file staging/vme_user/Kconfig is only included by the top-level staging/Kconfig if STAGING is enabled. So, there is no need to mention the dependency on STAGING within the vme_user Kconfig file. Further, the config VME_USER is already within the "if VME_BUS" block, so there is no need to mention the dependency on VME_BUS. Clean up these duplications of dependencies. No semantic change. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Link: https://lore.kernel.org/r/20230329074342.27595-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-25staging: vme_user: Replace "<<" with BIT macroAbhirup Deb1-267/+267
Replace the "<<" operator with BIT macro, in accordance to the checkpatch.pl script and Linux kernel coding-style guidelines. Signed-off-by: Abhirup Deb <abhirupdeb@linux.vnet.ibm.com> Link: https://lore.kernel.org/r/ZBipKh/e2lK3YcQr@li-27defe4c-32e1-11b2-a85c-e202e9981075.ibm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-17driver core: class: remove module * from class_create()Greg Kroah-Hartman1-1/+1
The module pointer in class_create() never actually did anything, and it shouldn't have been requred to be set as a parameter even if it did something. So just remove it and fix up all callers of the function in the kernel tree at the same time. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16staging: vme_user: remove unnecessary blank linesMenna Mahmoud1-5/+0
Remove unnecessary blank lines before a close brace as reported by checkpatch script "CHECK: Blank lines aren't necessary before a close brace '}'" Signed-off-by: Menna Mahmoud <eng.mennamahmoud.mm@gmail.com> Link: https://lore.kernel.org/r/c8fedfeca9a56dba26846a5bed56642cc694bcbe.1678899549.git.eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>