Commit graph

1,073,607 commits

Author SHA1 Message Date
Linus Torvalds
e6251ab455 NFS Client Bugfixes for Linux 5.17-rc
- Stable Fixes:
   - Fix initialization of nfs_client cl_flags
 
 - Other Fixes:
   - Fix performance issues with uncached readdir calls
   - Fix potential pointer dereferences in rpcrdma_ep_create
   - Fix nfs4_proc_get_locations() kernel-doc comment
   - Fix locking during sunrpc sysfs reads
   - Update my email address in the MAINTAINERS file to my new kernel.org email
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEnZ5MQTpR7cLU7KEp18tUv7ClQOsFAmICusMACgkQ18tUv7Cl
 QOu0dhAA3o1X0b4vjpZldfRSBzf5dL6smzvqiA1gOFSCdpfST7Tp5VWGjZNxgYBP
 wuwJMFuVpo8UQkbRrxo4zmqzZbiukpt7JsS4a3W0cCZ0iNIXtKkE4YIBWs67rUWZ
 z4LQ33ouJJdwQikJqycMbR/4Mg1j7VFzjmbVEM/FRJSv7IbYDRGvs7TqrzTndoeX
 ll0jAHsuUvFfq29WXTMq2PH0AiY+CxLnkvTuLL7QnG+bGVj2psTQi/kqC3R5+qLN
 M3aYDaKfb9SYZ3pdQkZV88IQsNQjlde3B1KWc7vJdXx8eUvxBF9tWU9TC85Y4mdg
 5ZNK/AX3DnICI1AcTq7/8nxUhOH7rEeroWIsA52oPEzG7f9Qkt1hUKzQRg5N7VMA
 VHxLY5i39zOyYnDP/lkcnGaExMefG0imB+ZnYYbmIH70tzhheGYPaBNjwLCU8Jvh
 NDjjEWBvjCR33EyOA/j/ZB/o1Xgu6FJU+oCgd82oNeVlcqDTPYxYWtSZqcIN1yp7
 DUGJ893WpMgFFSAERaMX0JpjdbnH6/u8BvkKKwd6ERGGBqXuMwrdL9DmOpJroqUP
 3gq2l+fFgDbAryvKs8ipneUUGbOiIdP4spiP44Rg/mZQrEajeUyuuFhxqM//Bfe4
 O60nIrVNwIhjzu/ciIe4Z+KVs9KQm34LEtzRxEfp1SMFGrsGhRQ=
 =JA1A
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-5.17-2' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull NFS client fixes from Anna Schumaker:
 "Stable Fixes:

   - Fix initialization of nfs_client cl_flags

  Other Fixes:

   - Fix performance issues with uncached readdir calls

   - Fix potential pointer dereferences in rpcrdma_ep_create

   - Fix nfs4_proc_get_locations() kernel-doc comment

   - Fix locking during sunrpc sysfs reads

   - Update my email address in the MAINTAINERS file to my new
     kernel.org email"

* tag 'nfs-for-5.17-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
  SUNRPC: lock against ->sock changing during sysfs read
  MAINTAINERS: Update my email address
  NFS: Fix nfs4_proc_get_locations() kernel-doc comment
  xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create
  NFS: Fix initialisation of nfs_client cl_flags field
  NFS: Avoid duplicate uncached readdir calls on eof
  NFS: Don't skip directory entries when doing uncached readdir
  NFS: Don't overfill uncached readdir pages
2022-02-08 12:03:07 -08:00
Shyam Prasad N
a81da65fba cifs: call cifs_reconnect when a connection is marked
In cifsd thread, we should continue to call cifs_reconnect
whenever server->tcpStatus is marked as CifsNeedReconnect.
This was inexplicably removed by one of my recent commits.
Fixing that here.

Fixes: a05885ce13 ("cifs: fix the connection state transitions with multichannel")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-02-08 13:52:39 -06:00
Brian Norris
9da1e9ab82 drm/rockchip: vop: Correct RK3399 VOP register fields
Commit 7707f7227f ("drm/rockchip: Add support for afbc") switched up
the rk3399_vop_big[] register windows, but it did so incorrectly.

The biggest problem is in rk3288_win23_data[] vs.
rk3368_win23_data[] .format field:

  RK3288's format: VOP_REG(RK3288_WIN2_CTRL0, 0x7, 1)
  RK3368's format: VOP_REG(RK3368_WIN2_CTRL0, 0x3, 5)

Bits 5:6 (i.e., shift 5, mask 0x3) are correct for RK3399, according to
the TRM.

There are a few other small differences between the 3288 and 3368
definitions that were swapped in commit 7707f7227f. I reviewed them to
the best of my ability according to the RK3399 TRM and fixed them up.

This fixes IOMMU issues (and display errors) when testing with BG24
color formats.

Fixes: 7707f7227f ("drm/rockchip: Add support for afbc")
Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Tested-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220119161104.1.I1d01436bef35165a8cdfe9308789c0badb5ff46a@changeid
2022-02-08 18:10:36 +01:00
Sascha Hauer
c0cfbb1222 drm/rockchip: dw_hdmi: Do not leave clock enabled in error case
The driver returns an error when devm_phy_optional_get() fails leaving
the previously enabled clock turned on. Change order and enable the
clock only after the phy has been acquired.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220126145549.617165-3-s.hauer@pengutronix.de
2022-02-08 18:10:36 +01:00
Daniel Bristot de Oliveira
4bbf59a9db rtla: Fix segmentation fault when failing to enable -t
rtla osnoise and timerlat are causing a segmentation fault when running
with the --trace option on a kernel that does not support multiple
instances. For example:

    [root@f34 rtla]# rtla osnoise top -t
    failed to enable the tracer osnoise
    Could not enable osnoiser tracer for tracing
    Failed to enable the trace instance
    Segmentation fault (core dumped)

This error happens because the exit code of the tools is trying
to destroy the trace instance that failed to be created.

Make osnoise_destroy_tool() aware of possible NULL osnoise_tool *,
and do not attempt to destroy it. This also simplifies the exit code.

Link: https://lkml.kernel.org/r/5660a2b6bf66c2655842360f2d7f6b48db5dba23.1644327249.git.bristot@kernel.org

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Fixes: 1eceb2fc2c ("rtla/osnoise: Add osnoise top mode")
Fixes: 829a6c0b56 ("rtla/osnoise: Add the hist mode")
Fixes: a828cd18bc ("rtla: Add timerlat tool and timelart top mode")
Fixes: 1eeb6328e8 ("rtla/timerlat: Add timerlat hist mode")
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-08 11:23:09 -05:00
Geert Uytterhoeven
1830947ee4
arm64: Remove ARCH_VULCAN
Commit a314520d82 ("arm64: disable Broadcom Vulcan platform")
did not remove the ARCH_VULCAN configuration symbol, as there were still
references to this symbol.

As of commits 240d3d5b2a ("gpio: xlp: update GPIO_XLP dependency") and
f85a543e53 ("arm64: defconfig: drop ARCH_VULCAN"), the last users
of ARCH_VULCAN have been removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/9e8fef2cf4f2d5648e87076bc96601cff945ce40.1641996361.git.geert+renesas@glider.be'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-08 16:01:59 +01:00
NeilBrown
b49ea673e1 SUNRPC: lock against ->sock changing during sysfs read
->sock can be set to NULL asynchronously unless ->recv_mutex is held.
So it is important to hold that mutex.  Otherwise a sysfs read can
trigger an oops.
Commit 17f09d3f61 ("SUNRPC: Check if the xprt is connected before
handling sysfs reads") appears to attempt to fix this problem, but it
only narrows the race window.

Fixes: 17f09d3f61 ("SUNRPC: Check if the xprt is connected before handling sysfs reads")
Fixes: a8482488a7 ("SUNRPC query transport's source port")
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2022-02-08 09:14:26 -05:00
Anna Schumaker
63db37e99a MAINTAINERS: Update my email address
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2022-02-08 09:14:26 -05:00
Yang Li
3d4a39404b NFS: Fix nfs4_proc_get_locations() kernel-doc comment
Add the description of @server and @fhandle, and remove the excess
@inode in nfs4_proc_get_locations() kernel-doc comment to remove
warnings found by running scripts/kernel-doc, which is caused by
using 'make W=1'.

fs/nfs/nfs4proc.c:8219: warning: Function parameter or member 'server'
not described in 'nfs4_proc_get_locations'
fs/nfs/nfs4proc.c:8219: warning: Function parameter or member 'fhandle'
not described in 'nfs4_proc_get_locations'
fs/nfs/nfs4proc.c:8219: warning: Excess function parameter 'inode'
description in 'nfs4_proc_get_locations'

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2022-02-08 09:14:26 -05:00
Dan Aloni
a9c10b5b3b xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create
If there are failures then we must not leave the non-NULL pointers with
the error value, otherwise `rpcrdma_ep_destroy` gets confused and tries
free them, resulting in an Oops.

Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2022-02-08 09:14:26 -05:00
Trond Myklebust
468d126dab NFS: Fix initialisation of nfs_client cl_flags field
For some long forgotten reason, the nfs_client cl_flags field is
initialised in nfs_get_client() instead of being initialised at
allocation time. This quirk was harmless until we moved the call to
nfs_create_rpc_client().

Fixes: dd99e9f98f ("NFSv4: Initialise connection to the server in nfs4_alloc_client()")
Cc: stable@vger.kernel.org # 4.8.x
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2022-02-08 09:13:49 -05:00
Daniel Vetter
db405774f6 MAINTAINERS: Add entry for fbdev core
Ever since Tomi extracted the core code in 2014 it's been defacto me
maintaining this, with help from others from dri-devel and sometimes
Linus (but those are mostly merge conflicts):

$ git shortlog -ns  drivers/video/fbdev/core/ | head -n5
    35  Daniel Vetter
    23  Linus Torvalds
    10  Hans de Goede
     9  Dave Airlie
     6  Peter Rosin

I think ideally we'd also record that the various firmware fb drivers
(efifb, vesafb, ...) are also maintained in drm-misc because for the
past few years the patches have either been to fix handover issues
with drm drivers, or caused handover issues with drm drivers. So any
other tree just doesn't make sense. But also, there's plenty of
outdated MAINTAINER entries for these with people and git trees that
haven't been active in years, so maybe let's just leave them alone.
And furthermore distros are now adopting simpledrm as the firmware fb
driver, so hopefully the need to care about the fbdev firmware drivers
will go down going forward.

Note that drm-misc is group maintained, I expect that to continue like
we've done before, so no new expectations that patches all go through
my hands. That would be silly. This also means I'm happy to put any
other volunteer's name in the M: line, but otherwise git log says I'm
the one who's stuck with this.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>Cc: Dave Airlie <airlied@gmail.com>
Acked-by: Helge Deller <deller@gmx.de>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Fbdev development list <linux-fbdev@vger.kernel.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Claudio Suarez <cssk@net-c.es>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sven Schnelle <svens@stackframe.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220131210552.482606-2-daniel.vetter@ffwll.ch
2022-02-08 15:10:04 +01:00
Helge Deller
50b10528aa fbcon: Avoid 'cap' set but not used warning
Fix this kernel test robot warning:

  drivers/video/fbdev/core/fbcon.c: In function 'fbcon_init':
  drivers/video/fbdev/core/fbcon.c:1028:6: warning: variable 'cap' set but not used [-Wunused-but-set-variable]

The cap variable is only used when CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION
is enabled. Drop the temporary variable and use info->flags instead.

Fixes: 87ab9f6b74 ("Revert "fbcon: Disable accelerated scrolling")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/YgFB4xqI+As196FR@p100
2022-02-08 14:44:15 +01:00
Udipto Goswami
117b4e96c7 usb: dwc3: gadget: Prevent core from processing stale TRBs
With CPU re-ordering on write instructions, there might
be a chance that the HWO is set before the TRB is updated
with the new mapped buffer address.
And in the case where core is processing a list of TRBs
it is possible that it fetched the TRBs when the HWO is set
but before the buffer address is updated.
Prevent this by adding a memory barrier before the HWO
is updated to ensure that the core always process the
updated TRBs.

Fixes: f6bafc6a1c ("usb: dwc3: convert TRBs into bitshifts")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
Link: https://lore.kernel.org/r/1644207958-18287-1-git-send-email-quic_ugoswami@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 12:33:59 +01:00
Samuel Thibault
bca828ccdd speakup-dectlk: Restore pitch setting
d97a9d7aea ("staging/speakup: Add inflection synth parameter")
introduced the inflection parameter, but happened to drop the pitch
parameter from the dectlk driver. This restores it.

Cc: stable@vger.kernel.org
Fixes: d97a9d7aea ("staging/speakup: Add inflection synth parameter")
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://lore.kernel.org/r/20220206015626.aesbhvvdkmqsrbaw@begin
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 12:15:04 +01:00
Arnd Bergmann
7896020612 Amlogic fixes for v5.17-rc
- meson6/meson8/meson8b UART compatible fixup to notably fix earlycon
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmHb/ZwACgkQd9zb2sjI
 SdFqgg/+IYDjXrHANH0j6q0wjHCOXbmErqsNimVM9HPjBzYd71dNy+VO0kn6Cobv
 HcxnMWjgvEY3AYRBWbSH4Hqq+rse6VJHQqoxzivyQRJhzlDZQVAjBPIzcX6GPQpD
 VCAGR2B3/xVZFmDHuQUPgVPr2yJXFksWJAi5VfPWLj/moQW0EH9VEu8B1+iDrTkN
 DxTYhjGVM0eM54Ms3RbaRAv5zOXCC2rZmFvtN8LXhItneuovzG/kKAP3htFVEG1g
 s8ASmikXbPD5rw8uiorJAyQXAM1pNJgVE/34TVc1ge8fuNiV1pxIpKxfKDdiPj6J
 iDW5jz8ygCpXnn9Nc3qCnb14/+d/MV0SBOqjZg7eFRFpFtXAEudii7dSkCQYzOS5
 qdaw5xIRYomxNQ6I+52BYB2Ma34IVduuRBcti4AxHJhlo3hQRHHDvI5oQvnWcP9b
 duQeCXDWE0W77Hm4yvIVL+gLNEOgLv6imNJqOHYvs8e+lqhFUc1qT+ZOFBGXUnwN
 nQ4l4nmtHTnt2m2A6z2fFbQ4KrMmVrw3I7AT2fZHIvSxR7O5XMvyHz6Uc+AzU5sX
 NumcZsqjqGHhctmbn5hW8gsSse6pcHuRRrJ2k24OTmNJDfFeJSc2FCXvJ+c87Ahp
 XtuTbas/3IENHfn0VAzCFMOFiMzMOX/4Zj22/un4XOuLrTI6sc4=
 =E9tl
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmICPQkACgkQmmx57+YA
 GNmVbQ//cnDurfbE7PijtfiWb5n81bX0q+h5FBXrbLLxK2B13leq44JxoJ4WLg5w
 q4okOn8ni0aKT8y64GV2LD3+m7HYMGyAGhyOp3hoXKNCQcx+Yfm8Tsku0tEQqKTu
 EOzhO03fba9exJMt3LKRgcwTYmsxF+EP0DbyGnEkKV2ly66aB4X7ocVYvCBh1VZL
 SspWWUtem0PJkPsr+2X62poyhzCE0rRorzIw7n3Szo9T4WDTrRyB4L09SVs57h40
 yAPVV7kUz+NjHeCJpAnSLozIGjJyudeBtBtTD0/ezP4yY1Spmlo4n0Q1Enh29dZN
 /XWDYrkJQqamAyRRrkSmWm1wDluqNBckvZ9mwhZ9BAVam/WQnn2Y7Rh5jg5mQbcj
 fIGHXFKXq4cIprLW/1LpLwcZbYXac3oShGbsIMKsI0igClPqoOdSjrn5MZ8ekksQ
 lnJlbnZkietqL4gYT9sHb1/Y/sqjX5Eq1neYZsWCOl6mJJEntOQu0rVFZf0eNkOe
 IdJvQi44uoKnGSOomzbQWIFjbCLulqYxyrSPhrBva+Z6Q0M+T6NdFqG1rhPp7Ieq
 U9apzuxbGVsa7SHDdidVrV6eM4PHWZK71Ctfc064xvkSvGGogvYju/RztAT7/7ls
 VF/9wq7Xdc9H3ER2xzISGqYQYLNFJbn/DflZceyC8J0R3RK6/cc=
 =31SM
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-fixes-v5.17-rc-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/fixes

Amlogic fixes for v5.17-rc
- meson6/meson8/meson8b UART compatible fixup to notably fix earlycon

* tag 'amlogic-fixes-v5.17-rc-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  ARM: dts: meson8b: Fix the UART device-tree schema validation
  ARM: dts: meson8: Fix the UART device-tree schema validation
  ARM: dts: meson: Fix the UART compatible strings

Link: https://lore.kernel.org/r/746a7f25-1c96-9d27-3a08-e86b2af608ef@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-08 10:51:05 +01:00
Tong Zhang
f2c4615362 staging: drop fpgaboot driver
The gs_fpgaboot driver is totally broken since 2014 and no one even
noticed the driver is not probing. Given the quality of the driver
and its current state it makes sense to drop it.

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Link: https://lore.kernel.org/r/20220204190847.3809405-1-ztong0001@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:46:18 +01:00
Ayan Choudhary
1b9a8d755f Staging: nvec: Fix ending in '(' error
This patch fixes the checkpatch.pl warning:

CHECK: Lines should not end with a '('
386: FILE: drivers/staging/nvec/nvec.c:386:
+		err = wait_for_completion_interruptible_timeout(

Signed-off-by: Ayan Choudhary <ayanchoudhary1025@gmail.com>
Link: https://lore.kernel.org/r/20220207133921.4287-1-ayanchoudhary1025@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:46:01 +01:00
Paulo Miguel Almeida
a2882e5ea3 staging: pi433: remove need to recompile code to debug fifo content
Debugging content present in the FIFO register is tricky as when we read
the FIFO register that changes the content of fifo struct which reduces
number of possible ways of debugging it. Rf69 uC has the possibility of
triggering certain IRQs depending on how many items are in the FIFO
queue, so being able to know what's in there is an important way to
troubleshoot certain problems.

This patch removes the requirement of having to compile pi433 driver
with DEBUG_FIFO_ACCESS set and let that be driven by printk verbositity
level and/or dynamic debug config instead.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YgCj2P59AbFFmnbA@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:45:42 +01:00
Paulo Miguel Almeida
1b6a614737 staging: pi433: standardize use of line escape chars in dev_dbg stmts
In this driver there are strings ending with of both '\n' and ''
(without '\n') when using dev_dbg function. While it doesn't affect
drivers functionality, it would be good to keep it consistent across the
driver's source code.

This patch add '\n' characters where it's missing to make it consistent
with the other dev_dbg instances.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YgA4XHU4uf6YkOk5@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:45:13 +01:00
Paulo Miguel Almeida
9e223aa451 staging: pi433: remove register debug dev_dbg stmts using DEBUG_VALUES
Which the recent addition of the debugfs dentry (regs), users can now
obtain rf69 register values without having to tweak constants
(DEBUG_VALUES) and recompile the pi433 module source code in order to
see those values.

This patch removes code blocks made obsolete by debugfs regs file.

Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/Yf9ivRB5qpmA5rY2@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:44:30 +01:00
Niklas Cassel
cc38ef9368 gpio: sifive: use the correct register to read output values
Setting the output of a GPIO to 1 using gpiod_set_value(), followed by
reading the same GPIO using gpiod_get_value(), will currently yield an
incorrect result.

This is because the SiFive GPIO device stores the output values in reg_set,
not reg_dat.

Supply the flag BGPIOF_READ_OUTPUT_REG_SET to bgpio_init() so that the
generic driver reads the correct register.

Fixes: 96868dce64 ("gpio/sifive: Add GPIO driver for SiFive SoCs")
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
[Bartosz: added the Fixes tag]
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-02-08 10:43:15 +01:00
Leonardo Araujo
1715618496 Staging: r8188eu: core: 'associcated' may be misspelled - perhaps 'associated'?
This patch fixes the following checkpatch.pl warning:

CHECK: 'associcated' may be misspelled - perhaps 'associated'?

Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
Link: https://lore.kernel.org/r/20220207234210.26097-1-leonardo.aa88@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:35:32 +01:00
Leonardo Araujo
4948dbb78d Staging: unisys: visorhba: alignment should match open parenthesis
Fixed a coding style issue.

Signed-off-by: Leonardo Araujo <leonardo.aa88@gmail.com>
Link: https://lore.kernel.org/r/20220207044230.19918-1-leonardo.aa88@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:34:53 +01:00
Andy Shevchenko
95a4eed7dd gpiolib: Never return internal error codes to user space
Currently it's possible that character device interface may return
the error codes which are not supposed to be seen by user space.
In this case it's EPROBE_DEFER.

Wrap it to return -ENODEV instead as sysfs does.

Fixes: d7c51b47ac ("gpio: userspace ABI for reading/writing GPIO lines")
Fixes: 61f922db72 ("gpio: userspace ABI for reading GPIO line events")
Fixes: 3c0d9c635a ("gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL")
Reported-by: Suresh Balakrishnan <suresh.balakrishnan@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-02-08 10:34:15 +01:00
Gustavo A. R. Silva
20198dd98c staging: gdm724x: Replace one-element array with flexible-array member
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

This issue was found with the help of Coccinelle and audited and fixed,
manually.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20220204232944.GA454945@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:33:45 +01:00
Martin Kaiser
1091a8737b staging: r8188eu: usb_suspend_sema is initialised but not used
usb_suspend_sema from struct dvobj_priv is initialised but never used.
Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206175925.461426-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:43 +01:00
Martin Kaiser
0266c945a8 staging: r8188eu: RegUsbSS is not used
RegUsbSS in struct dvobj_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206175925.461426-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:43 +01:00
Martin Kaiser
ac510bbe16 staging: r8188eu: dvobj_priv's signal_strength is not used
signal_strength is struct dvobj_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206175925.461426-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:43 +01:00
Martin Kaiser
a548aea7ff staging: r8188eu: usb_vendor_req_mutex is not used
usb_vendor_req_mutex in struct dvobj_priv is not used.
Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206175925.461426-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:43 +01:00
Martin Kaiser
c781d8db2c staging: r8188eu: remove unused struct hostapd_priv
struct hostapd_priv contains only a pointer to struct adapter.

Remove this struct and the unused phostapdpriv pointer in struct adapter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:03 +01:00
Martin Kaiser
f59d7c0b60 staging: r8188eu: not_indic_disco is unused
not_indic_disco in struct mlme_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:03 +01:00
Martin Kaiser
2a02c1adf8 staging: r8188eu: irq_alloc is not used
irq_alloc in struct dvobj_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:03 +01:00
Martin Kaiser
72d8054a5b staging: r8188eu: in_cta_test is always 0
in_cta_test in struct adapter is never set, so it's always 0.

Remove in_cta_test and related dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:03 +01:00
Martin Kaiser
e5b45a53ef staging: r8188eu: remove unused struct adapter components
Remove a number of unused components from struct adapter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:03 +01:00
Martin Kaiser
de424be4e9 staging: r8188eu: remove the global DriverState
DriverState in struct adapter is never set. It remains 0 (DRIVER_NORMAL)
all the time, DriverState != DRIVER_DISAPPEAR is always true.

Both DriverState and the check can be removed. enum driver_state contains
the possible values of DriverState. This enum can be removed as well.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
3c4b62e381 staging: r8188eu: remove unused enum _ADAPTER_TYPE
enum _ADAPTER_TYPE is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
e3b1450dfc staging: r8188eu: remove unused enum _IFACE_TYPE
enum _IFACE_TYPE is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
fc91b5bf8c staging: r8188eu: move local definitions into rtw_fw.h
Move some defines and the definition of struct rt_firmware_hdr
from rtw_fw.h to rtw_fw.c. These definitions are used only by
the fw layer.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
521e63c5d9 staging: r8188eu: remove debug code to bypass IQ calibration
Remove a check before the IQ calibration that is always false.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
fa6ffa4a75 staging: r8188eu: remove debug code to bypass LC calibration
Remove a check before the LC calibration that is always false.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
8a1cf651d6 staging: r8188eu: replace local OFDM_index with single variable
Replace the local OFDM_index array in the
odm_TXPowerTrackingCallback_ThermalMeter_8188E function
with a single variable. Only its first component is used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
18cb09cb25 staging: r8188eu: only OFDM_index[0] is used
Replace the OFDM_index array in struct odm_rf_cal with a single variable.
Only its first component is used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Martin Kaiser
c2e6b57778 staging: r8188eu: only OFDM_index_old[0] is used
The odm_TXPowerTrackingCallback_ThermalMeter_8188E function uses only
OFDM_index_old[0]. Use a single variable instead of an array.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220206161809.423031-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:29:02 +01:00
Michael Straube
bfa4b4e691 staging: r8188eu: remove UsbBulkOutSize from struct hal_data_8188e
UsbBulkOutSize in struct hal_data_8188e is only used to set a local
variable in rtl8188eu_xmitframe_complete(). Set the local variable
directly and remove UsbBulkOutSize from the hal_data_8188e structure.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220206144407.8397-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:18:17 +01:00
Martin Kaiser
3b011b097c staging: r8188eu: limit rf register writes to path a
The r8188eu driver uses only RF_PATH_A.

At the moment, the only exception are private ioctls. It does not make
sense if these ioctls set registers that are not used anywhere else in
the driver.

This patch limits the private ioctl 0x0C, i.e. the rtw_wx_write_rf
function, to RF_PATH_A. For any other setting, we return an error
saying the parameter is invalid.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220205113741.379070-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:17:57 +01:00
Martin Kaiser
49132583d2 staging: r8188eu: use a define for the radio path
Replace (enum rf_radio_path)0 with RF_PATH_A. This should make it
easier to see which path is selected.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220205113741.379070-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:17:57 +01:00
Martin Kaiser
2096151fbe staging: r8188eu: RfRegChnlVal[1] is set but not used
RfRegChnlVal[1] in hal_data_8188e is set but not used. This driver needs
only one RfRegChnlVal setting. Replace the array with a single u32.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220205113741.379070-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:17:57 +01:00
Martin Kaiser
246c4680a9 staging: r8188eu: remove constant rf variable
The rf variable in odm_TXPowerTrackingCallback_ThermalMeter_8188E
is always 1. The for loops that use rf will be executed only once.

We can remove the variable and the loops.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220205113741.379070-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:17:57 +01:00
Martin Kaiser
28ba3b7bfa staging: r8188eu: bTXPowerTracking is set but not used
bTXPowerTracking in struct odm_rf_cal is set but not used.
Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220205113741.379070-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 10:17:57 +01:00