aboutsummaryrefslogtreecommitdiffstats
path: root/arch/Kconfig (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-20Staging: rtlwifi: Replace return typeMadhumitha Prabakaran1-3/+1
Replace return type and remove the respective assignment. Issue found by Coccinelle. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-20Staging: rtl8723bs: core: Replace return typesMadhumitha Prabakaran1-5/+2
Remove unwanted assignments and replace return types. Issue suggested by Coccinelle. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: speakup: refactor to use existing code in vtOkash Khawaja3-126/+88
This patch replaces speakup's implementations with calls to functions in tty/vt/selection.c. Those functions are: cancel_selection() set_selection_kernel() paste_selection() Currently setting selection is done in interrupt context. However, set_selection_kernel() can sleep - for instance, it requires console_lock which can sleep. Therefore we offload that work to a work_struct thread, following the same pattern which was already set for paste_selection(). When setting selection, we also get a reference to tty and make sure to release the reference before returning. struct speakup_paste_work has been renamed to the more generic speakup_selection_work because it is now used for both pasting as well as setting selection. When paste work is cancelled, the code wasn't setting tty to NULL. This patch also fixes that by setting tty to NULL so that in case of failure we don't get EBUSY forever. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Tested-by: Gregory Nowak <greg@gregn.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19vt: selection: allow functions to be called from inside kernelOkash Khawaja3-22/+38
This patch breaks set_selection() into two functions so that when called from kernel, copy_from_user() can be avoided. The two functions are called set_selection_user() and set_selection_kernel() in order to be explicit about their purposes. This also means updating any references to set_selection() and fixing for name change. It also exports set_selection_kernel() and paste_selection(). These changes are used the following patch where speakup's selection functionality calls into the above functions, thereby doing away with parallel implementation. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Tested-by: Gregory Nowak <greg@gregn.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: greybus: power_supply: use struct_size() helperGustavo A. R. Silva1-2/+2
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*resp) + props_count * sizeof(struct gb_power_supply_props_desc) with: struct_size(resp, props, props_count) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: use help instead of ---help--- in KconfigMoses Christopher1-127/+127
- Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher <moseschristopherb@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19Staging: rtl8723bs: Avoid typedefs for structureBhanusree Pola2-7/+7
Avoid typedefs for structure types to maintain kernel coding style. Remove typedefs for _ODM_Phy_Dbg_Info and _ODM_Mac_Status_Info_. This part is done by the following semantic patch: <smpl> @r1@ identifier i; type t; @@ typedef struct i { ... }t; @r2@ type r1.t; identifier v; @@ t v; @script:python match@ i << r1.i; x; @@ coccinelle.x = i; @r4@ identifier match.x; type r1.t; @@ - typedef struct x + struct x { ... } - t ; @r5@ type r1.t; identifier r2.v, match.x; @@ - t v; + struct x v; </smpl> Change Structure name _ODM_Phy_Dbg_Info and _ODM_Mac_Status_Info_ to maintain Linux kernel Coding Style. Replace occurences of ODM_PHY_DBG_INFO_T to odm_phy_dbg_info and ODM_MAC_INFO to odm_mac_status_info. Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: convert driver to use kernel regmap API'sSergio Paracuellos1-34/+54
Instead of using writel and readl use regmap API which makes the driver maintainability easier. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: add quirks for 'E2' revision using 'soc_device_attribute'Sergio Paracuellos1-3/+14
Depending on revision of the chip, 'mt7621_bypass_pipe_rst' function must be executed. Add better support for this using 'soc_device_match' in driver probe function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: remove some unnecessary local variablesSergio Paracuellos1-12/+4
Device tree is not using child nodes anymore so the 'child_np' variable can safely removed. This also simplifies the error path to be able to directly return errors removing also the 'ret' variable. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: use 'platform_get_resource'Sergio Paracuellos1-6/+5
Driver is using 'of_address_to_resource' to get memory resources. Make use of 'platform_get_resource' instead which is more accurate for a platform driver. This also makes possible to delete a local variable which is not needed anymore. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: rtl8723bs: fix spelling mistake: "nonprintabl" -> "non-printable"Colin Ian King1-1/+1
There is a spelling mistake in an RT_TRACE message, fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: rtlwifi: fix spelling mistake "notity" -> "notify"Colin Ian King1-2/+2
There are two spelling mistake in RT_TRACE messages. Fix them. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: dt9812: Call mutex_destroy() on private mutexIan Abbott1-4/+1
`dt9812_detach()` is the Comedi "detach" handler for the dt9812 driver. When it is called, the private data for the device is about to be freed. The private data contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as invalid. Also remove the calls to `mutex_lock()` and `mutex_unlock()` from `dt9812_detach()` as the mutex is only being used around a call to `usb_set_intfdata()` to clear the USB interface's driver data pointer. The mutex lock seems redundant here, especially as it is about to be destroyed. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: ni_usb6501: Call mutex_destroy() on private mutexIan Abbott1-3/+1
`ni6501_detach()` is the Comedi "detach" handler for the ni_usb6501 driver. It is called when the private data for the device is about to be freed. The private data contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as invalid. Also remove the calls to `mutex_lock()` and `mutex_unlock()` from `ni6501_detach()`. The only other locks of the mutex are by some of the Comedi instruction handlers that cannot contend with the "detach" handler for this mutex. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: usbdux: Call mutex_destroy() on private mutexIan Abbott1-0/+2
`usbdux_detach()` is the Comedi "detach" handler for the usbdux driver. When it is called, the private data for the device is about to be freed. The private date contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as invalid. The calls to `mutex_lock()` and `mutex_unlock()` are probably not required, especially as the mutex is about to be destroyed, but leave them alone for now. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: usbduxfast: Call mutex_destroy() on private mutexIan Abbott1-0/+2
`usbduxfast_detach()` is the Comedi "detach" handler for the usbduxfast driver. When it is called, the private data for the device is about to be freed. The private date contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as invalid. The calls to `mutex_lock()` and `mutex_unlock()` in `usbduxfast_detach()` are probably not required, especially as the mutex is about to be destroyed, but leave them alone for now. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: usbduxsigma: Call mutex_destroy() on private mutexIan Abbott1-0/+2
`usbduxsigma_detach()` is the Comedi "detach" handler for the usbduxsigma driver. When it is called, the private data for the device is about to be freed. The private date contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as invalid. The calls to `mutex_lock()` and `mutex_unlock()` in `usbduxsigma_detach()` are probably not required, especially as the mutex is about to be destroyed, but leave them alone for now. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: most: configfs: Make mdev_link_list staticYueHaibing1-1/+1
Fix sparse warning: drivers/staging/most/configfs.c:34:18: warning: symbol 'mdev_link_list' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: rtl8723bs: hal: fix spelling mistake "singal" -> "signal"Colin Ian King2-11/+11
There are multiple spelling mistakes in variable names, fix these. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: vc04_services: handle kzalloc failureNicholas Mc Guire2-0/+5
The kzalloc here was being used without checking the return - if the kzalloc fails return VCHIQ_ERROR. The call-site of vchiq_platform_init_state() vchiq_init_state() was not responding to an allocation failure so checks for != VCHIQ_SUCCESS and pass VCHIQ_ERROR up to vchiq_platform_init() which then will fail with -EINVAL. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Reported-by: kbuild test robot <lkp@intel.com> Acked-By: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: Add lockdep_assert_held() calls for dev->attach_lockIan Abbott1-0/+1
There are not a lot of functions in the core comedi module that require the R/W semaphore `attach_lock` in `struct comedi_device` to be locked (although there are a few functions that require at least one of `attach_lock` and `mutex` to be locked). One function that requires the caller to lock `attach_lock` is `comedi_device_detach_cleanup()` so add a call to `lockdep_assert_held()` to check and document that. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: Add lockdep_assert_held() calls for dev->mutexIan Abbott3-0/+41
Lots of functions in the core comedi module expect the mutex in `struct comedi_device` to be held, so add calls to `lockdep_assert_held()` to check and document that. An unusual case is the calls to `lockdep_assert_held()` after successful return from `comedi_alloc_board_minor()` which allocates a `struct comedi_device` and returns with its mutex locked. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: comedi: don't release mutex too early in comedi_auto_config()Ian Abbott1-1/+2
`comedi_auto_config()` uses `dev->class_dev` for logging a kernel message after releasing `dev->mutex`. There is an unlikely possibility that the Comedi device `dev` will have been removed by the `COMEDI_DEVCONFIG` ioctl() command. Keep hold of the mutex until the kernel message has been sent to prevent that. The function can call `comedi_release_hardware_device()` on error. In that case, the mutex must be unlocked before that. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-17staging: wilc1000: Avoid GFP_KERNEL allocation from atomic contextAdham Abozaeid1-1/+1
txq_add_mgmt_pkt allocates memory while being called from atomic context so needs to use GFP_ATOMIC Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-17staging: comedi: dyna_pci10xx: Set number of AO channels to 1Ian Abbott1-1/+1
The "dyna_pci10xx" driver supports the Dynalog India PCI-1050. There seems to be very little online information available about this card, but as far as I can tell[*], it only has 1 AO (analog output) channel, not 16 AO channels as reported in the Comedi subdevice information. Besides, the Comedi "insn_write" handler for the AO subdevice takes no account of channel numbers. Change the `n_chans` member of the AO subdevice structure to 1 to reflect this. [*] The card is no longer mentioned on the manufacturer's web-site and I couldn't find any archived page for the site on archive.org. I found part of a scientific paper which describes the card as having a single channel D/A converter: <http://shodhganga.inflibnet.ac.in/bitstream/10603/150646/15/15_chapter%205.pdf>. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-17staging: comedi: dyna_pci10xx: Don't bother configuring len_chanlistIan Abbott1-4/+0
In the Comedi "attach" and "auto_attach" handlers that set up the Comedi subdevices, there is no need to initialize the `len_chanlist` member of Comedi subdevices that do not support Comedi asynchronous streaming commands. They can be left set to the initial zeroed out value and the Comedi core will change the `len_chanlist` member to 1 afterwards in that case. The "dyna_pci10xx" driver currently sets the `len_chanlist` members to the same value as the `n_chan` ("number of channels") member, but this is unnecessary as none of them support asynchronous streaming. Remove the initialization of `len_chanlist` from all the subdevices. This will affect the information reported by the COMEDI_SUBDINFO ioctl slightly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>