Commit Graph

533 Commits

Author SHA1 Message Date
Christian Gromm
61fd971edd staging: most: cdev: remove noisy log messages
This patch removes unnecessary log messages to avoid
noise in the kernel log.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1592815695-19305-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-25 15:40:28 +02:00
Masahiro Yamada
a7f7f6248d treewide: replace '---help---' in Kconfig files with 'help'
Since commit 84af7a6194 ("checkpatch: kconfig: prefer 'help' over
'---help---'"), the number of '---help---' has been gradually
decreasing, but there are still more than 2400 instances.

This commit finishes the conversion. While I touched the lines,
I also fixed the indentation.

There are a variety of indentation styles found.

  a) 4 spaces + '---help---'
  b) 7 spaces + '---help---'
  c) 8 spaces + '---help---'
  d) 1 space + 1 tab + '---help---'
  e) 1 tab + '---help---'    (correct indentation)
  f) 1 tab + 1 space + '---help---'
  g) 1 tab + 2 spaces + '---help---'

In order to convert all of them to 1 tab + 'help', I ran the
following commend:

  $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-06-14 01:57:21 +09:00
Christian Gromm
11974ace2d staging: most: usb: init return value in default path of switch/case expression
This patch avoids returning an uninitialized value in the default
path of the switch expression.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590669703-20004-1-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-29 12:35:59 +02:00
Christian Gromm
549d2db702 staging: most: usb: use function sysfs_streq
This patch replaces function strcmp() with sysfs_streq() to compare
strings provided via sysfs.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-11-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:26:13 +02:00
Christian Gromm
f1f48239cd staging: most: usb: add missing put_device calls
This patch adds the missing put_device() function calls to
properly free allocated resources and maintain reference counts.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-10-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:26:13 +02:00
Christian Gromm
f470a5b01b staging: most: usb: use correct error codes
This patch uses the -EINVAL return code where -EFAULT is wrongly being
used.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-9-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:26:13 +02:00
Christian Gromm
1fd4fb8c62 staging: most: usb: replace code to calculate array index
This patch removes the expression that makes use of a priori knowledge
about channel numbers to calculate an array index.
The expression 'peer = 1 - channel' utilizes the fact that an USB interface
that operates on the asynchronous data of the Network only has two
endpoints. Hence, channel being 0 or 1. The replacement is more simple and
less confusing when reading the code.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-8-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:26:12 +02:00
Christian Gromm
6405fe2142 staging: most: usb: don't use error path to exit function on success
This patch makes it transparent whether the function is exiting
with an error or successful.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:26:12 +02:00
Christian Gromm
8bf56cfafa staging: most: usb: move allocation of URB out of critical section
This patch puts the call to usb_alloc_urb() before the critical
section starts that is protected with the io_mutex lock. This is
to make the section as short as possible and to use the regular
GFP_KERNEL flag.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-6-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:24:46 +02:00
Christian Gromm
2c069b61a8 staging: most: usb: return 0 instead of variable
This patch returns 0 instead of variable in case of invalid parameter
has been passed to function to increase readability.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-5-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:24:46 +02:00
Christian Gromm
ffd069ec04 staging: most: usb: change return value of function drci_rd_reg
This patch makes function drci_rd_reg return 0 in case of success
and a negative number else. As no caller is evaluating the number
of bytes transferred by function usb_control_msg this information is
being omitted.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:24:46 +02:00
Christian Gromm
a0dbe1b24c staging: most: usb: don't use expressions that might fail in a declaration
This patch moves function calls that can fail out of the declararion block
of a function body. This is done to enhance readability.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:24:45 +02:00
Christian Gromm
1c538a4179 staging: most: usb: change order of function parameters
This patch swaps the arguments of function get_stream_frame_size to
have the struct device as first parameter.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-27 12:24:45 +02:00
Christian Gromm
dfeb9380eb staging: most: usb: use macro ATTRIBUTE_GROUPS
This patch makes use of the macro ATTRIBUTE_GROUPS to create the groups
instead of defining them manually.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1589534465-7423-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 15:35:13 +02:00
Christian Gromm
629e123df3 staging: most: fix typo in Kconfig
This patch corrects the typo in the Kconfig file where it says
tranceiver instead of transceiver.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/1589534465-7423-6-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 15:35:13 +02:00
Christian Gromm
3dcf93fe54 staging: most: usb: use dev_dbg function
This patch replaces the functions dev_notice with dev_dbg to silence
the driver during normal operation.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1589534465-7423-5-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 15:35:12 +02:00
Christian Gromm
c1a57be08e staging: most: usb: check number of reported endpoints
This patch checks the number of endpoints reported by the USB
interface descriptor and throws an error if the number exceeds
MAX_NUM_ENDPOINTS.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1589534465-7423-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 15:35:12 +02:00
Christian Gromm
bffea154b2 staging: most: usb: remove reference to USB error codes
This patch removes the reference to the driver API file for USB error
codes.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1589534465-7423-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 15:35:12 +02:00
Christian Gromm
6257322124 staging: most: usb: use dev_*() functions to print messages
This patch removes the pr_*() functions and uses dev_*() instead.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1589534465-7423-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 15:35:12 +02:00
Colin Ian King
d92e699161 staging: most: usb: sanity check channel before using it as an index into arrays
Currently channel is being sanity checked after it has been used as
an index into some arrays. Fix this by moving the sanity check of
channel before the arrays are indexed with it.

Addresses-Coverity: ("Negative array index read")
Fixes: 59ed0480b9 ("Staging: most: replace pr_*() functions by dev_*()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200507150652.52238-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 13:51:12 +02:00
Christian Gromm
08e1b4274c staging: most: usb: add PM functions
This patch adds the implementation of the PM functions resume and suspend.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1588680892-9413-1-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-13 13:51:12 +02:00
Christian Gromm
e3881eb534 staging: most: usb: consolidate code
This patch applies the same look and feel when assigning local variables.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1588672829-28883-5-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05 12:17:59 +02:00
Christian Gromm
188d5b41f8 staging: most: usb: drop unlikely macros
This patch removes the unlikely macros in the error patch of argument
checking, as it has no measurable performance adavantage.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1588672829-28883-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05 12:17:59 +02:00
Christian Gromm
441be56f89 staging: most: usb: use EINVAL error code
This patch replaces the error code EIO with EINVAL, when there is no IO
happening.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1588672829-28883-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05 12:17:59 +02:00
Christian Gromm
3e8621aba7 staging: most: usb: remove overcautious parameter checking
The interface pointer passed to a core API function cannot be NULL. This
patch removes unnessecary the sanity check of the pointer.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1588672829-28883-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05 12:17:58 +02:00
Linus Torvalds
4c6ef3b156 Staging/IIO driver patches for 5.7-rc1
Here is the big staging and IIO driver pull request for 5.7-rc1.
 
 We again end up deleting more code than we added here, thanks to finally
 getting rid of the old and obsolete wireless USB stuff, and the exfat
 code (which is coming in again through the vfs tree in a much cleaner
 version).  But some code does come back, with the octeon drivers being
 found to actually be used in the wild, so those deletions are now
 reverted.
 
 Other than those major things, just loads and loads of tiny checkpatch
 cleanups all over the place, along with new IIO drivers and fixes.
 
 All have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXoHJ8Q8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymG9QCfV5RuRdWIPp6QrcuNMnq1iSxoBogAn000kll0
 WOqyNH5P886tyBGAdtkS
 =lfyo
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO driver updates from Greg KH:
 "Here is the big staging and IIO driver pull request for 5.7-rc1.

  We again end up deleting more code than we added here, thanks to
  finally getting rid of the old and obsolete wireless USB stuff, and
  the exfat code (which is coming in again through the vfs tree in a
  much cleaner version).

  But some code does come back, with the octeon drivers being found to
  actually be used in the wild, so those deletions are now reverted.

  Other than those major things, just loads and loads of tiny checkpatch
  cleanups all over the place, along with new IIO drivers and fixes.

  All have been in linux-next with no reported issues"

[ Stephen Rothwell points out some reported issues due to merge conflicts ]

* tag 'staging-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (415 commits)
  staging: vt6656: Use DIV_ROUND_UP macro instead of specific code
  staging: remove hp100 driver
  staging: wilc1000: Use crc7 in lib/ rather than a private copy
  Staging: rtl8192u: ieee80211: Use netdev_alert().
  Staging: rtl8192u: ieee80211: Use netdev_info() with network devices.
  Staging: rtl8192u: ieee80211: Use netdev_warn() for network devices.
  Staging: rtl8192u: ieee80211: Use netdev_dbg() for debug messages.
  staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
  staging: rtl8723bs: hal: Remove NULL check before kfree
  staging: rtl8723bs: hal: Correct typos in comments
  staging: rtl8723bs: os_dep: Correct typos in comments
  staging: rtl8723bs: core: Correct typos in comments
  staging: rtl8723bs: hal: Remove unnecessary cast on void pointer
  staging: rtl8188eu: cleanup long line in odm.c
  staging: rtl8723bs: hal: Compress return logic
  staging: rtl8723bs: rtw_cmd: Compress lines for immediate return
  staging: rtl8723bs: rtw_efuse: Compress lines for immediate return
  staging: wilc1000: remove label from examples in DT binding documentation
  staging: rtl8723bs: Remove blank line before '}' brace
  Staging: rtl8188eu: hal: Add space around operators
  ...
2020-03-30 14:20:41 -07:00
Christian Gromm
4a1a3e9bf5 staging: most: Documentation: move ABI description files out of staging area
This patch moves the ABI description fils sysfs-bus-most and
configfs-most to the kernel's documentation folder.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1583845362-26707-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-24 13:42:44 +01:00
Christian Gromm
24eb831a0e staging: most: Documentation: update ABI description
This patch updates the ABI description files to be in sync
with current implementation.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1583845362-26707-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-24 13:42:44 +01:00
Christian Gromm
b276527539 staging: most: move core files out of the staging area
This patch moves the core module to the /drivers/most directory
and makes all necessary changes in order to not break the build.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1583845362-26707-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-24 13:42:44 +01:00
Takashi Iwai
234ff54287 staging: most: core: Use scnprintf() for avoiding potential buffer overflow
Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200311091944.23185-1-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 09:23:59 +01:00
Hans Verkuil
e653614ee1 media: staging/most: rename VFL_TYPE_GRABBER to _VIDEO
'GRABBER' is a weird name, all other types map to the /dev
device names. Rename to 'VIDEO' to be consistent with the
other types.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-02-24 16:52:59 +01:00
Christian Gromm
fc157998b8 staging: most: usb: check for NULL device
Check if the dci structer has been allocated before trying to release it.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-8-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-24 10:08:41 +01:00
Christian Gromm
f9e6b51a99 staging: next: configfs: fix release link
The functions link_destroy and link_release are both deleting list items.
link_release, however, does not check whether a certain link has already
been deleted from the list by function link_destroy. By fixing this
this patch prevents a kernel crash when removing the configuration
directory of a link that already has been destroyed.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-24 10:08:41 +01:00
Christian Gromm
b7935e52dd staging: most: core: fix logging messages
This patch fixes the module's logging messages.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-6-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-24 10:08:41 +01:00
Christian Gromm
d693e90d89 staging: most: core: remove container struct
This patch declares and initializes the bus, bus driver and the
component list without a container struct, as it introduces an
unnecessary level of abstraction.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-5-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-24 10:08:40 +01:00
Christian Gromm
6a82c77581 staging: most: remove struct device core driver
This patch removes the device from the MOST core driver and uses the
device from the adapter driver.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-24 10:08:40 +01:00
Christian Gromm
2485055394 staging: most: core: drop device reference
This patch drops the device reference added by function
bus_find_device_by_name.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-24 10:08:40 +01:00
Christian Gromm
723de0f917 staging: most: remove device from interface structure
This patch makes the adapter drivers use their own device structures
when registering a most interface with the core module.
With this the module that actually operates the physical device is the
owner of the device.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579793906-5054-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-24 10:08:39 +01:00
Andrey Shvetsov
4d1356ac12 staging: most: net: fix buffer overflow
If the length of the socket buffer is 0xFFFFFFFF (max size for an
unsigned int), then payload_len becomes 0xFFFFFFF1 after subtracting 14
(ETH_HLEN).  Then, mdp_len is set to payload_len + 16 (MDP_HDR_LEN)
which overflows and results in a value of 2.  These values for
payload_len and mdp_len will pass current buffer size checks.

This patch checks if derived from skb->len sum may overflow.

The check is based on the following idea:

For any `unsigned V1, V2` and derived `unsigned SUM = V1 + V2`,
`V1 + V2` overflows iif `SUM < V1`.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200116172238.6046-1-andrey.shvetsov@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-22 09:51:15 +01:00
Masahiro Yamada
532c291907 staging: most: remove header include path to drivers/staging
There is no need to add "ccflags-y += -I $(srctree)/drivers/staging"
just for including <most/most.h>.

Use the #include "..." directive with the correct relative path.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20200115164451.13203-1-masahiroy@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-16 20:56:31 +01:00
Christian Gromm
793769120b staging: most: core: remove noisy log messages
In order to not generate unnecessary noise in the kernel log,this patch
removes debug log messages.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579017478-3339-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-15 13:14:02 +01:00
Christian Gromm
78ce8b26e3 staging: most: core: use dev_* function for logging
This patch replaces all calls to pr_* functions and uses
the dev_* functions instead.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579017478-3339-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-15 13:14:02 +01:00
Christian Gromm
ca78e042f2 staging: most: core: fix date in file comment
This patch updates the date range in the comment section.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1579017478-3339-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-15 13:14:02 +01:00
Christian Gromm
6f4d22d76b staging: most: use angle brackets in include path
This patch replaces the double quotes in all include paths
with angle brackets.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 13:58:31 +01:00
Christian Gromm
c3bb9d883f staging: most: configfs: reduce array size
This patch reduces the size of the arrays inside the mdev_link struct to
a reasonable value.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-6-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 13:54:37 +01:00
Christian Gromm
d72f82635e staging: most: configfs: use strlcpy
This patch uses strlcpy to copy data provided by userspace in order
to not overflow the allocated space.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-5-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 13:54:36 +01:00
Christian Gromm
b4e37a5e2c staging: most: rename enum mbo_status_flags
The data structures of the most.h header file will be exposed
to the kernel once the file is moved out of the staging area.
This is why the name is prefixed with the string 'most'.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-4-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 13:50:04 +01:00
Christian Gromm
45917e7920 staging: most: rename struct core_component
The stuctures defined in the most.h header file will be exposed to the
kernel once the file is moved out of the staging area. That's why the name
is changed into something more descriptive.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 13:50:04 +01:00
Christian Gromm
c1d3fb8abe staging: most: rename core.h to most.h
This patch renames the core header file core.h to most.h. The intention
behind this is to have a meaningful name once this file is moved to the
/include/linux directory.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-2-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 13:50:03 +01:00
Takashi Iwai
0a2eb63de2 staging: most: Drop superfluous ioctl PCM ops
PCM core deals the empty ioctl field now as default.
Let's kill the redundant lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191210141356.18074-4-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10 15:42:41 +01:00