Commit graph

56408 commits

Author SHA1 Message Date
Anshuman Khandual 6cb4d9a287 mm/vma: introduce VM_ACCESS_FLAGS
There are many places where all basic VMA access flags (read, write,
exec) are initialized or checked against as a group.  One such example
is during page fault.  Existing vma_is_accessible() wrapper already
creates the notion of VMA accessibility as a group access permissions.

Hence lets just create VM_ACCESS_FLAGS (VM_READ|VM_WRITE|VM_EXEC) which
will not only reduce code duplication but also extend the VMA
accessibility concept in general.

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Nick Hu <nickhu@andestech.com>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Springer <rspringer@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Link: http://lkml.kernel.org/r/1583391014-8170-3-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-04-10 15:36:21 -07:00
Linus Torvalds 0ad5b053d4 Char/Misc driver patches for 5.7-rc1
Here is the big set of char/misc/other driver patches for 5.7-rc1.
 
 Lots of things in here, and it's later than expected due to some reverts
 to resolve some reported issues.  All is now clean with no reported
 problems in linux-next.
 
 Included in here is:
 	- interconnect updates
 	- mei driver updates
 	- uio updates
 	- nvmem driver updates
 	- soundwire updates
 	- binderfs updates
 	- coresight updates
 	- habanalabs updates
 	- mhi new bus type and core
 	- extcon driver updates
 	- some Kconfig cleanups
 	- other small misc driver cleanups and updates
 
 As mentioned, all have been in linux-next for a while, and with the last
 two reverts, all is calm and good.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXodfvA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynzCQCfROhar3E8EhYEqSOP6xq6uhX9uegAnRgGY2rs
 rN4JJpOcTddvZcVlD+vo
 =ocWk
 -----END PGP SIGNATURE-----

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

Pull char/misc driver updates from Greg KH:
 "Here is the big set of char/misc/other driver patches for 5.7-rc1.

  Lots of things in here, and it's later than expected due to some
  reverts to resolve some reported issues. All is now clean with no
  reported problems in linux-next.

  Included in here is:
   - interconnect updates
   - mei driver updates
   - uio updates
   - nvmem driver updates
   - soundwire updates
   - binderfs updates
   - coresight updates
   - habanalabs updates
   - mhi new bus type and core
   - extcon driver updates
   - some Kconfig cleanups
   - other small misc driver cleanups and updates

  As mentioned, all have been in linux-next for a while, and with the
  last two reverts, all is calm and good"

* tag 'char-misc-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (174 commits)
  Revert "driver core: platform: Initialize dma_parms for platform devices"
  Revert "amba: Initialize dma_parms for amba devices"
  amba: Initialize dma_parms for amba devices
  driver core: platform: Initialize dma_parms for platform devices
  bus: mhi: core: Drop the references to mhi_dev in mhi_destroy_device()
  bus: mhi: core: Initialize bhie field in mhi_cntrl for RDDM capture
  bus: mhi: core: Add support for reading MHI info from device
  misc: rtsx: set correct pcr_ops for rts522A
  speakup: misc: Use dynamic minor numbers for speakup devices
  mei: me: add cedar fork device ids
  coresight: do not use the BIT() macro in the UAPI header
  Documentation: provide IBM contacts for embargoed hardware
  nvmem: core: remove nvmem_sysfs_get_groups()
  nvmem: core: use is_bin_visible for permissions
  nvmem: core: use device_register and device_unregister
  nvmem: core: add root_only member to nvmem device struct
  extcon: axp288: Add wakeup support
  extcon: Mark extcon_get_edev_name() function as exported symbol
  extcon: palmas: Hide error messages if gpio returns -EPROBE_DEFER
  dt-bindings: extcon: usbc-cros-ec: convert extcon-usbc-cros-ec.txt to yaml format
  ...
2020-04-03 13:22:40 -07:00
Linus Torvalds ff2ae607c6 SPDX patches for 5.7-rc1.
Here are 3 SPDX patches for 5.7-rc1.
 
 One fixes up the SPDX tag for a single driver, while the other two go
 through the tree and add SPDX tags for all of the .gitignore files as
 needed.
 
 Nothing too complex, but you will get a merge conflict with your current
 tree, that should be trivial to handle (one file modified by two things,
 one file deleted.)
 
 All 3 of these have been in linux-next for a while, with no reported
 issues other than the merge conflict.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXodg5A8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykySQCgy9YDrkz7nWq6v3Gohl6+lW/L+rMAnRM4uTZm
 m5AuCzO3Azt9KBi7NL+L
 =2Lm5
 -----END PGP SIGNATURE-----

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

Pull SPDX updates from Greg KH:
 "Here are three SPDX patches for 5.7-rc1.

  One fixes up the SPDX tag for a single driver, while the other two go
  through the tree and add SPDX tags for all of the .gitignore files as
  needed.

  Nothing too complex, but you will get a merge conflict with your
  current tree, that should be trivial to handle (one file modified by
  two things, one file deleted.)

  All three of these have been in linux-next for a while, with no
  reported issues other than the merge conflict"

* tag 'spdx-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
  ASoC: MT6660: make spdxcheck.py happy
  .gitignore: add SPDX License Identifier
  .gitignore: remove too obvious comments
2020-04-03 13:12:26 -07:00
Linus Torvalds 29d9f30d4c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from David Miller:
 "Highlights:

   1) Fix the iwlwifi regression, from Johannes Berg.

   2) Support BSS coloring and 802.11 encapsulation offloading in
      hardware, from John Crispin.

   3) Fix some potential Spectre issues in qtnfmac, from Sergey
      Matyukevich.

   4) Add TTL decrement action to openvswitch, from Matteo Croce.

   5) Allow paralleization through flow_action setup by not taking the
      RTNL mutex, from Vlad Buslov.

   6) A lot of zero-length array to flexible-array conversions, from
      Gustavo A. R. Silva.

   7) Align XDP statistics names across several drivers for consistency,
      from Lorenzo Bianconi.

   8) Add various pieces of infrastructure for offloading conntrack, and
      make use of it in mlx5 driver, from Paul Blakey.

   9) Allow using listening sockets in BPF sockmap, from Jakub Sitnicki.

  10) Lots of parallelization improvements during configuration changes
      in mlxsw driver, from Ido Schimmel.

  11) Add support to devlink for generic packet traps, which report
      packets dropped during ACL processing. And use them in mlxsw
      driver. From Jiri Pirko.

  12) Support bcmgenet on ACPI, from Jeremy Linton.

  13) Make BPF compatible with RT, from Thomas Gleixnet, Alexei
      Starovoitov, and your's truly.

  14) Support XDP meta-data in virtio_net, from Yuya Kusakabe.

  15) Fix sysfs permissions when network devices change namespaces, from
      Christian Brauner.

  16) Add a flags element to ethtool_ops so that drivers can more simply
      indicate which coalescing parameters they actually support, and
      therefore the generic layer can validate the user's ethtool
      request. Use this in all drivers, from Jakub Kicinski.

  17) Offload FIFO qdisc in mlxsw, from Petr Machata.

  18) Support UDP sockets in sockmap, from Lorenz Bauer.

  19) Fix stretch ACK bugs in several TCP congestion control modules,
      from Pengcheng Yang.

  20) Support virtual functiosn in octeontx2 driver, from Tomasz
      Duszynski.

  21) Add region operations for devlink and use it in ice driver to dump
      NVM contents, from Jacob Keller.

  22) Add support for hw offload of MACSEC, from Antoine Tenart.

  23) Add support for BPF programs that can be attached to LSM hooks,
      from KP Singh.

  24) Support for multiple paths, path managers, and counters in MPTCP.
      From Peter Krystad, Paolo Abeni, Florian Westphal, Davide Caratti,
      and others.

  25) More progress on adding the netlink interface to ethtool, from
      Michal Kubecek"

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2121 commits)
  net: ipv6: rpl_iptunnel: Fix potential memory leak in rpl_do_srh_inline
  cxgb4/chcr: nic-tls stats in ethtool
  net: dsa: fix oops while probing Marvell DSA switches
  net/bpfilter: remove superfluous testing message
  net: macb: Fix handling of fixed-link node
  net: dsa: ksz: Select KSZ protocol tag
  netdevsim: dev: Fix memory leak in nsim_dev_take_snapshot_write
  net: stmmac: add EHL 2.5Gbps PCI info and PCI ID
  net: stmmac: add EHL PSE0 & PSE1 1Gbps PCI info and PCI ID
  net: stmmac: create dwmac-intel.c to contain all Intel platform
  net: dsa: bcm_sf2: Support specifying VLAN tag egress rule
  net: dsa: bcm_sf2: Add support for matching VLAN TCI
  net: dsa: bcm_sf2: Move writing of CFP_DATA(5) into slicing functions
  net: dsa: bcm_sf2: Check earlier for FLOW_EXT and FLOW_MAC_EXT
  net: dsa: bcm_sf2: Disable learning for ASP port
  net: dsa: b53: Deny enslaving port 7 for 7278 into a bridge
  net: dsa: b53: Prevent tagged VLAN on port 7 for 7278
  net: dsa: b53: Restore VLAN entries upon (re)configuration
  net: dsa: bcm_sf2: Fix overflow checks
  hv_netvsc: Remove unnecessary round_up for recv_completion_cnt
  ...
2020-03-31 17:29:33 -07:00
Randy Dunlap 673b41e04a staging/octeon: fix up merge error
There's a semantic conflict in the Octeon staging network driver, which
used the skb_reset_tc() function to reset skb state when re-using an
skb.  But that inline helper function was removed in mainline by commit
2c64605b59 ("net: Fix CONFIG_NET_CLS_ACT=n and
CONFIG_NFT_FWD_NETDEV={y, m} build").

Fix it by using skb_reset_redirect() instead.  Also move it out of the

This code path only ends up triggering if REUSE_SKBUFFS_WITHOUT_FREE is
enabled, which in turn only happens if you don't have CONFIG_NETFILTER
configured.  Which was how this wasn't caught by the usual allmodconfig
builds.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-03-30 17:22:01 -07: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
Linus Torvalds 063d194224 media updates for v5.7-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAl6Bvm0ACgkQCF8+vY7k
 4RViMQ//baNJyAA8/Hpxz1w5+nL5hsTOhf2PcPgnCLkRVQnIiKMZoq7AS5KWtbqu
 im0SM6nWduGc2T/44Ew13YmBnuWMdXL9Gs8XtAkNakgSV1UM+A3pRuOWRYCyU3Ts
 1QDsc3N7oY9cvyJGWOlqdcA4gp4AaKxjS6M6Z18wYBk/jYSCcj4ZVecT89DYeeM7
 wFORkv/xSdgC3eoKWEwTyglzUmrXKrbfHdcNWrQBg+1SN3WrMYQWCL6nSYMqn0Vu
 f9L5E6jUSx9s6+apxS0OUQmDj78RM1JCEY1P8lgc3tAtVJ+X3yZbxwtpcvujhFPv
 c48NUQeyxAJc7evarvkd73Gwl4buujqHSgiRUovHwqUXHJuGZ3PBTryV9HzbmYYy
 EeHS/23t09F3j9zYtuoDNFIED03Mi+TNeS04cq8OIfwNl7xpUSEV0S/wd11V2308
 cfm6lsogGE9HRbaIxCHgx4AiGFVhbpK1OQt66iYze8r/wyxnN8MVOHGWw+eI4LRK
 9gwh7Wx37k6uCrjfOnLSgx7kcJ+mxSZEYyHJZqqtPm9H1SC68GOxhL/S3Zu7arvK
 eiwFfxJBiunCEfauOx28kaAdvBZVyEvYeDFYl/k+q4DCIGjvK0FXud6QRjNXv24S
 qUXYZKPUALTFOpbkQ3IQiBOQNM4NhF15RzCqRUptVnlF05MSywg=
 =Ve8R
 -----END PGP SIGNATURE-----

Merge tag 'media/v5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - New sensor driver: imx219

 - Support for some new pixelformats

 - Support for Sun8i SoC

 - Added more codecs to meson vdec driver

 - Prepare for removing the legacy usbvision driver by moving it to
   staging. This driver has issues and use legacy core APIs. If nobody
   steps up to address those, it is time for its retirement.

 - Several cleanups and improvements on drivers, with the addition of
   new supported boards

* tag 'media/v5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (236 commits)
  media: venus: firmware: Ignore secure call error on first resume
  media: mtk-vpu: load vpu firmware from the new location
  media: i2c: video-i2c: fix build errors due to 'imply hwmon'
  media: MAINTAINERS: add myself to co-maintain Hantro G1/G2 for i.MX8MQ
  media: hantro: add initial i.MX8MQ support
  media: dt-bindings: Document i.MX8MQ VPU bindings
  media: vivid: fix incorrect PA assignment to HDMI outputs
  media: hantro: Add linux-rockchip mailing list to MAINTAINERS
  media: cedrus: h264: Fix 4K decoding on H6
  media: siano: Use scnprintf() for avoiding potential buffer overflow
  media: rc: Use scnprintf() for avoiding potential buffer overflow
  media: allegro: create new struct for channel parameters
  media: allegro: move mail definitions to separate file
  media: allegro: pass buffers through firmware
  media: allegro: verify source and destination buffer in VCU response
  media: allegro: handle dependency of bitrate and bitrate_peak
  media: allegro: read bitrate mode directly from control
  media: allegro: make QP configurable
  media: allegro: make frame rate configurable
  media: allegro: skip filler data if possible
  ...
2020-03-30 13:42:05 -07:00
Oscar Carter e681bb287f staging: vt6656: Use DIV_ROUND_UP macro instead of specific code
Use DIV_ROUND_UP macro instead of specific code with the same purpose.
Also, remove the unused variables.

Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Link: https://lore.kernel.org/r/20200326175902.14467-1-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-27 10:05:52 +01:00
Greg Kroah-Hartman a10079c662 staging: remove hp100 driver
It's old, obsolete, and no one wants to take care of it anymore.

It's been in staging for 5 months with no one paying attention to it, so
let's just delete it for now.

If someone has this hardware, and wants the driver back, the deletion
can be easily reverted.

Cc: Joe Perches <joe@perches.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20200326080233.978323-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-27 10:01:11 +01:00
George Spelvin ba22fd4ed1 staging: wilc1000: Use crc7 in lib/ rather than a private copy
The code in lib/ is the desired polynomial, and even includes
the 1-bit left shift in the table rather than needing to code
it explicitly.

While I'm in Kconfig, add a description of what a WILC1000 is.
Kconfig questions that require me to look up a data sheet to
find out that I probably don't have one are a pet peeve.

Cc: Adham Abozaeid <adham.abozaeid@microchip.com>
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: George Spelvin <lkml@sdf.org>
Link: https://lore.kernel.org/r/20200326152251.19094-1-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 16:58:24 +01:00
Sam Muhammed fd939d5b77 Staging: rtl8192u: ieee80211: Use netdev_alert().
Replace printk(KERN_ALERT ...) with netdev_alert()
when a network device is available.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/70e8781cd2a9512cb6b3c42400a10323f3024f3c.1585233434.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 16:58:23 +01:00
Sam Muhammed 33677b4890 Staging: rtl8192u: ieee80211: Use netdev_info() with network devices.
netdev_info() should be used instead of printk(KERN_INFO ...)
since it's specific to and preferable for printing messages
for network devices.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/ce20980cc1947255b8a2de3c1f1364c11c163b9e.1585233434.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 16:58:23 +01:00
Sam Muhammed 6a5693361a Staging: rtl8192u: ieee80211: Use netdev_warn() for network devices.
Use netdev_warn() over printk().
netdev_warn() is specific for printing warning
messages for network devices, and preferable
over printk(KERN_WARNING ...).

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/02fe0666cb737a3b0581081c9e7c179bfb820cac.1585233434.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 16:58:23 +01:00
Sam Muhammed ea7a10ea01 Staging: rtl8192u: ieee80211: Use netdev_dbg() for debug messages.
Replace printk(KERN_DEBUG ...) with netdev_dbg() across the driver.
since netdev_dbg() is preferable and specific for
printing debug messages for network devices.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/84dc7e33954509457efce2a35fb293e631845a96.1585233434.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 16:58:23 +01:00
Qiujun Huang 1165dd73e8 staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
We can't handle the case length > WLAN_DATA_MAXLEN.
Because the size of rxfrm->data is WLAN_DATA_MAXLEN(2312), and we can't
read more than that.

Thanks-to: Hillf Danton <hdanton@sina.com>
Reported-and-tested-by: syzbot+7d42d68643a35f71ac8a@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200326131850.17711-1-hqjagain@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:47:26 +01:00
Simran Singhal b67b7b0465 staging: rtl8723bs: hal: Remove NULL check before kfree
NULL check before kfree is unnecessary so remove it.

The following Coccinelle script was used to detect this:
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200326132823.GA18625@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:47:26 +01:00
R Veera Kumar 1879d30ede staging: rtl8723bs: hal: Correct typos in comments
Correct typos in comments.
Misspellings found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200326143023.13681-1-vkor@vkten.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:45:09 +01:00
R Veera Kumar 8fd1e0276e staging: rtl8723bs: os_dep: Correct typos in comments
Correct typos in comments.
Misspellings found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200326125500.12861-1-vkor@vkten.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:45:08 +01:00
R Veera Kumar 858ea450ae staging: rtl8723bs: core: Correct typos in comments
Correct typos in comments.
Misspellings found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200326123540.12401-1-vkor@vkten.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:45:08 +01:00
Simran Singhal 78989d9ab8 staging: rtl8723bs: hal: Remove unnecessary cast on void pointer
Assignment to a typed pointer is sufficient in C.
No cast is needed.

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|

- (T*)
  e
)

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200326113210.GA29951@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:45:08 +01:00
Michael Straube 57e0ff116c staging: rtl8188eu: cleanup long line in odm.c
Cleanup line over 80 characters by removing unnecessary test
'pDM_Odm->RSSI_Min <= 25'. The above test 'pDM_Odm->RSSI_Min > 25'
already guarantees that it is <= 25.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200326084348.15072-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:45:08 +01:00
Zhenzhong Duan d43bea206e speakup: misc: Use dynamic minor numbers for speakup devices
Arnd notes in the link:
   | To clarify: the only numbers that I think should be changed to dynamic
   | allocation are for drivers/staging/speakup. While this is a fairly old
   | subsystem, I would expect that it being staging means we can be a
   | little more progressive with the changes.

This releases misc device minor numbers 25-27 for dynamic usage.

Link: https://lore.kernel.org/lkml/20200120221323.GJ15860@mit.edu/t/
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@reisers.ca>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200325033008.9633-1-zhenzhong.duan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 15:30:44 +01:00
Simran Singhal ecc11b42c7 staging: rtl8723bs: hal: Compress return logic
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325214312.GA1936@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 08:37:38 +01:00
Simran Singhal 1b590af9fa staging: rtl8723bs: rtw_cmd: Compress lines for immediate return
Compress two lines into a single line if immediate return statement is found.
It also removes variable cmd_obj as it is no longer needed.

It is done using script Coccinelle.
And coccinelle uses following semantic patch for this compression function:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325212253.GA8175@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 08:37:38 +01:00
Simran Singhal f465b0a4e5 staging: rtl8723bs: rtw_efuse: Compress lines for immediate return
Compress two lines into a single line if immediate return statement is found.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325205418.GA29149@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 08:37:38 +01:00
Ajay Singh bd864252cf staging: wilc1000: remove label from examples in DT binding documentation
Remove labels and not relevant property from DT binding documentation
examples as suggested in [1].

1. https://patchwork.ozlabs.org/patch/1252837

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20200325164234.14146-1-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-26 08:37:38 +01:00
David S. Miller 9fb16955fb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Overlapping header include additions in macsec.c

A bug fix in 'net' overlapping with the removal of 'version'
string in ena_netdev.c

Overlapping test additions in selftests Makefile

Overlapping PCI ID table adjustments in iwlwifi driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-25 18:58:11 -07:00
Simran Singhal f1a49bb9c8 staging: rtl8723bs: Remove blank line before '}' brace
Remove unneeded blank line before a close brace '}'.
Issue found by checkpatch.pl:
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325182617.GA9411@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:40:27 +01:00
Shreeya Patel 69686debe6 Staging: rtl8188eu: hal: Add space around operators
Add space around operators for improving the code
readability.
Reported by checkpatch.pl

git diff -w shows no difference.
diff of the .o files before and after the changes shows no difference.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Link: https://lore.kernel.org/r/20200325160142.3698-1-shreeya.patel23498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:39:24 +01:00
Sam Muhammed 5b2765858a Staging: kpc2000: kpc_dma: Use spaces around operators.
Cleanup Checkpatch.pl CHECKs about missing
spaces around multiple operators.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/22025abc8f8f3452c2d886e8faf1fe0532e8bb1d.1585143581.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:38:40 +01:00
Sam Muhammed edf279abba Staging: kpc2000: kpc_dma: Use kcalloc over kzalloc.
Replace kzalloc(sizeof(...) * n, ...) with
kcalloc(n, sizeof(...), ...) since kcalloc is the
preferred API in case of allocating with multiply.

Checkpatch.pl: WARNING:
Prefer kcalloc over kzalloc with multiply.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/4b8339d1e81e497c3c2f0dad57a9587338ec82b1.1585143581.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:38:40 +01:00
Sam Muhammed dbec450e2d Staging: kpc2000: kpc_dma: Use the SPDK comment style.
SPDK-License-Identifier comment should have this form
// SPDX-License-Identifier: <GPL-...>

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/7531e3e3fa7c046e93d2caaa6fa2e76c5c53f04d.1585143581.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:38:40 +01:00
Sam Muhammed ba86697622 Staging: kpc2000: kpc_dma: Include the preferred header.
<linux/io.h> is the preferred header to include
instead of <asm/io.h>.

Checkpatch.pl WARNING:
Use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/c7a824c3a2ddc5f44bd89504b8c03a328d69f81d.1585143581.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:38:39 +01:00
Sam Muhammed b1436fe3e2 Staging: kpc2000: kpc_dma: Remove unnecessary braces.
Remove braces of single statement blocks,
they are not really needed.

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/0a3ec63321dce008fc8dd790f42ef8490135b307.1585143581.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:38:39 +01:00
Sam Muhammed 5122be4f4f Staging: kpc2000: kpc_dma: Use sizeof(*var) in kzalloc().
kzalloc(sizeof(*var), ...) was the format been used
across the driver, which is the preferred format,
but missed two instances, correct them to match the
coding standards.

Checkpatch.pl CHECK: Prefer kzalloc(sizeof(*var)...)
over kzalloc(sizeof(struct var)...)

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/bbb3adbd20ae89db6a0d3360bc09d22eed778e86.1585143581.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:38:39 +01:00
Sam Muhammed 0af192c755 Staging: kpc2000: kpc_dma: Remove comparison to NULL.
Comparison to NULL been used across the driver,
remove them and use (!var) instead.

Checkpatch.pl: CHECK:
Comparison to NULL could be written "!desc"... etc

Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/f344afba0a8bb0413941a63678688435f04a96b4.1585143581.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:38:39 +01:00
Soumyajit Deb 904da296a5 staging: hp100: Properly indent the multiline comments.
Shift the end of multiline comments "*/" to the next line and align the
lines of the comments properly to improve code readability and to adhere
to the Linux Kernel coding style.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325180003.46749-1-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:35:27 +01:00
Simran Singhal c926f022c2 staging: rtl8723bs: Add line after variable declarations
Add whiteline after variable declarations to remove the checkpatch.pl
warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325164451.GA17569@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:35:27 +01:00
Soumyajit Deb 6d7e48d016 staging: hp100: Add space around operator
Add space around "-" operator to improve code readability and adhere to
the Linux kernel coding style.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325144353.42655-1-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:35:27 +01:00
Simran Singhal c42a4ac49a staging: rtl8723bs: Remove multiple assignments
Remove multiple assignments by factorizing them.
Problem found using checkpatch.pl:-
CHECK: multiple assignments should be avoided

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325142226.GA14711@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:35:27 +01:00
Simran Singhal 45d9d3c990 staging: rtl8723bs: Remove unnecessary braces for single statements
Clean up unnecessary braces around single statement blocks.
Issues reported by checkpatch.pl as:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Link: https://lore.kernel.org/r/20200325140245.GA11949@simran-Inspiron-5558
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 19:35:27 +01:00
Soumyajit Deb 285d15c257 staging: hp100: Add spaces in if statement.
Add space between if and open parenthesis to improve
code readability and to adhere to the standard linux kernel
coding style. Also, shift the next line to the right by a single space
as it is the continuation of the above if statement.

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325122752.38600-1-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:43:13 +01:00
Soumyajit Deb 096821d654 staging: hp100: Add space between while keyword and open parenthesis
Add space between while keyword and open parenthesis "(" in the do while
statement to improve code readability and to adhere to the Linux Kernel
coding style.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325115956.37126-1-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:42:24 +01:00
Soumyajit Deb f649dc7169 staging: hp100: Remove space after opening parenthesis "("
Remove space after opening parenthesis in if statement to improve code
readability and to adhere to the standard coding style.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325072905.29066-7-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:42:06 +01:00
Soumyajit Deb d7338269bb Staging: hp100: Add space after "," in function arguments.
Add space after "," in function arguments to improve code readability.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325072905.29066-6-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:42:06 +01:00
Soumyajit Deb c40bca6a9d staging: hp100: Correct typo in the comment
Correct typo in the comment by changing "overriden" to "overridden".
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325072905.29066-4-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:42:03 +01:00
Soumyajit Deb 0644a104bb staging: hp100: Remove extra blank lines
Remove extra blank lines from the code blocks.
Reported by checkpatch.pl

Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
Link: https://lore.kernel.org/r/20200325035410.23802-1-debsoumyajit100@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:40:47 +01:00
Qiujun Huang a1f165a6b7 staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb
We should cancel hw->usb_work before kfree(hw).

Reported-by: syzbot+6d2e7f6fa90e27be9d62@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1585120006-30042-1-git-send-email-hqjagain@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:40:14 +01:00
Briana Oursler 73d854226a staging: vt6655: Break up function call with long line.
Update matches style found elsewhere in file.
Issue found by checkpatch: line over 80 characters.

Signed-off-by: Briana Oursler <briana.oursler@gmail.com>
Link: https://lore.kernel.org/r/20200324183812.79411-1-briana.oursler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 13:40:14 +01:00
Masahiro Yamada d198b34f38 .gitignore: add SPDX License Identifier
Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 11:50:48 +01:00