Commit Graph
873808 Commits
Author SHA1 Message Date
Christoph Hellwig 67f30ad19c au1100fb: fix DMA API abuse
Virtual addresses return from dma(m)_alloc_coherent are opaque in what
backs then, and drivers must not poke into them.  Switch the driver
to use the generic DMA API mmap helper to avoid these games.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Bartlomiej Zolnierkiewicz <[email protected]>
2019-06-03 16:00:08 +02:00
Christoph Hellwig e58cfbfb32 MIPS: remove the _dma_cache_wback_inv export
This export is not used in modular code, which is a good thing as
everyone should use the proper DMA API instead.

Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Paul Burton <[email protected]>
2019-06-03 16:00:08 +02:00
Laurentiu Tudor 2d7a3dc3e2 USB: drop HCD_LOCAL_MEM flag
With the addition of the local memory allocator, the HCD_LOCAL_MEM
flag can be dropped and the checks against it replaced with a check
for the localmem_pool ptr being initialized.

Signed-off-by: Laurentiu Tudor <[email protected]>
Tested-by: Fredrik Noring <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:08 +02:00
Laurentiu Tudor 7d99532955 usb: host: ohci-tmio: init genalloc for local memory
In preparation for dropping the existing "coherent" dma mem declaration
APIs, replace the current dma_declare_coherent_memory() based mechanism
with the creation of a genalloc pool that will be used in the OHCI
subsystem as replacement for the DMA APIs.

Signed-off-by: Laurentiu Tudor <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:07 +02:00
Laurentiu Tudor 7d9e6f5aeb usb: host: ohci-sm501: init genalloc for local memory
In preparation for dropping the existing "coherent" dma mem declaration
APIs, replace the current dma_declare_coherent_memory() based mechanism
with the creation of a genalloc pool that will be used in the OHCI
subsystem as replacement for the DMA APIs.

Signed-off-by: Laurentiu Tudor <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:07 +02:00
Laurentiu Tudor b0310c2f09 USB: use genalloc for USB HCs with local memory
For HCs that have local memory, replace the current DMA API usage with
a genalloc generic allocator to manage the mappings for these devices.
To help users, introduce a new HCD API, usb_hcd_setup_local_mem() that
will setup up the genalloc backing up the device local memory. It will
be used in subsequent patches.  This is in preparation for dropping
the existing "coherent" dma mem declaration APIs.  The current
implementation was relying on a short circuit in the DMA API that in
the end, was acting as an allocator for these type of devices.

Signed-off-by: Laurentiu Tudor <[email protected]>
Tested-by: Fredrik Noring <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:07 +02:00
Fredrik Noring da83a72295 lib/genalloc: add gen_pool_dma_zalloc() for zeroed DMA allocations
gen_pool_dma_zalloc() is a zeroed memory variant of
gen_pool_dma_alloc().  Also document the return values of both, and
indicate NULL as a "%NULL" constant.

Signed-off-by: Fredrik Noring <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:07 +02:00
Nicolin Chen dd3dcede9f dma-contiguous: fix !CONFIG_DMA_CMA version of dma_{alloc, free}_contiguous()
Commit fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous()
helpers") adds a pair of new helper functions so as to abstract code in
the dma-direct (and other places in the future), however it breaks QEMU
boot feature using x86_64 defconfig.

That's because x86_64 defconfig has CONFIG_DMA_CMA=n so those two newly
introduced helper functions are empty in their !CONFIG_DMA_CMA version,
while previously the platform independent dma-direct code had fallback
alloc_pages_node() and __free_pages().

So this patch fixes it by adding alloc_pages_node() and __free_pages()
in the !CONFIG_DMA_CMA version of the two helper functions.

Tested with below QEMU command:
  qemu-system-x86_64 -m 512m \
      -drive file=images/x86_64/rootfs.ext4,format=raw,if=ide \
      -append 'console=ttyS0 root=/dev/sda' -nographic \
      -kernel arch/x86_64/boot/bzImage

with the rootfs from the below link:
  https://github.com/ClangBuiltLinux/continuous-integration/raw/master/images/x86_64/rootfs.ext4

Fixes: fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers")
Reported-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nicolin Chen <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:07 +02:00
Nicolin Chen bd2e75633c dma-contiguous: use fallback alloc_pages for single pages
The addresses within a single page are always contiguous, so it's
not so necessary to always allocate one single page from CMA area.
Since the CMA area has a limited predefined size of space, it may
run out of space in heavy use cases, where there might be quite a
lot CMA pages being allocated for single pages.

However, there is also a concern that a device might care where a
page comes from -- it might expect the page from CMA area and act
differently if the page doesn't.

This patch tries to use the fallback alloc_pages path, instead of
one-page size allocations from the global CMA area in case that a
device does not have its own CMA area. This'd save resources from
the CMA global area for more CMA allocations, and also reduce CMA
fragmentations resulted from trivial allocations.

Signed-off-by: Nicolin Chen <[email protected]>
Tested-by: dann frazier <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:07 +02:00
Nicolin Chen b1d2dc009d dma-contiguous: add dma_{alloc,free}_contiguous() helpers
Both dma_alloc_from_contiguous() and dma_release_from_contiguous() are
very simply implemented, but requiring callers to pass certain
parameters like count and align, and taking a boolean parameter to check
__GFP_NOWARN in the allocation flags. So every function call duplicates
similar work:

	unsigned long order = get_order(size);
	size_t count = size >> PAGE_SHIFT;

	page = dma_alloc_from_contiguous(dev, count, order,
			gfp & __GFP_NOWARN);

	[...]

	dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT);

Additionally, as CMA can be used only in the context which permits
sleeping, most of callers do a gfpflags_allow_blocking() check and a
corresponding fallback allocation of normal pages upon any false result:

	if (gfpflags_allow_blocking(flag))
		page = dma_alloc_from_contiguous();
	if (!page)
		page = alloc_pages();

	[...]

	if (!dma_release_from_contiguous(dev, page, count))
		__free_pages(page, get_order(size));

So this patch simplifies those function calls by abstracting these
operations into the two new functions: dma_{alloc,free}_contiguous.

As some callers of dma_{alloc,release}_from_contiguous() might be
complicated, this patch just implements these two new functions to
kernel/dma/direct.c only as an initial step.

Suggested-by: Christoph Hellwig <[email protected]>
Signed-off-by: Nicolin Chen <[email protected]>
Tested-by: dann frazier <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
2019-06-03 16:00:07 +02:00
Greg Kroah-Hartman db0487abd6 arm: dump: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Russell King <[email protected]>
Cc: Jinbum Park <[email protected]>
Cc: [email protected]
Reviewed-by: Kees Cook <[email protected]>
Acked-by: Laura Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:07 +02:00
Greg Kroah-Hartman 30ed997a87 arm: omap2: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Kevin Hilman <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:07 +02:00
Greg Kroah-Hartman d5ddd5a517 arm: omap1: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Paul Walmsley <[email protected]>
Cc: Aaro Koskinen <[email protected]>
Cc: Russell King <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:07 +02:00
Greg Kroah-Hartman ad09137631 x86: xen: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Boris Ostrovsky <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:07 +02:00
Greg Kroah-Hartman 2d146b924e backing-dev: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

And as the return value does not matter at all, no need to save the
dentry in struct backing_dev_info, so delete it.

Cc: Andrew Morton <[email protected]>
Cc: Anders Roxell <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: [email protected]
Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:07 +02:00
Greg Kroah-Hartman c4e41349a8 mm: cleancache: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: [email protected]
Acked-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:07 +02:00
Greg Kroah-Hartman 8c0fd1fa64 kprobes: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: "Naveen N. Rao" <[email protected]>
Cc: Anil S Keshavamurthy <[email protected]>
Cc: "David S. Miller" <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:07 +02:00
Greg Kroah-Hartman 4aa3b1f67d fail_function: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Kees Cook <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "Naveen N. Rao" <[email protected]>
Cc: zhong jiang <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:49:06 +02:00
Greg Kroah-Hartman 03eb2a08fc sh: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Yoshinori Sato <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:39:40 +02:00
Greg Kroah-Hartman 2fcc6e202a hwpoison-inject: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Naoya Horiguchi <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:39:40 +02:00
Greg Kroah-Hartman 282401df90 mm: kmemleak: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Catalin Marinas <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:39:39 +02:00
Greg Kroah-Hartman 4268509a36 zsmalloc: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Minchan Kim <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:39:39 +02:00
Greg Kroah-Hartman 3e6f176f30 blktrace: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Jens Axboe <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:39:39 +02:00
Greg Kroah-Hartman 6a54cd872f trace: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Steven Rostedt <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:39:39 +02:00
Greg Kroah-Hartman de2fadf566 zswap: ignore debugfs_create_dir() return value
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Seth Jennings <[email protected]>
Cc: [email protected]
Acked-by: Dan Streetman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:39:39 +02:00
YueHaibing 32adeab3e3 usb: phy: mv-usb: Remove set but not used variable 'phy'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/phy/phy-mv-usb.c: In function mv_otg_work:
drivers/usb/phy/phy-mv-usb.c:404:18: warning: variable phy set but not used [-Wunused-but-set-variable]

It's no used since commit e47d92545c ("usb: move
the OTG state from the USB PHY to the OTG structure")

Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:57 +02:00
Hariprasad Kelam 8e4c5d31e9 usb: ftdi-elan: fix possible condition with no effect (if == else)
fix  below warning reported by coccicheck

./drivers/usb/misc/ftdi-elan.c:2026:11-13: WARNING: possible condition
with no effect (if == else)

Signed-off-by: Hariprasad Kelam <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:57 +02:00
YueHaibing 53cdff30fc USB: ohci-spear: Remove set but not used variable 'ohci'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/host/ohci-spear.c: In function spear_ohci_hcd_drv_probe:
drivers/usb/host/ohci-spear.c:38:19: warning: variable ohci set but not used [-Wunused-but-set-variable]

It is never used since commit 1cc6ac59ff ("USB:
OHCI: make ohci-spear a separate driver")
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:57 +02:00
Greg Kroah-Hartman c8a93dcd0c USB: atm: ueagle-atm.c: remove redundant license text
Now that we have the correct SPDX tag for the ueagle-atm.c file, the
wall of "boiler-plate" text is not needed.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Thomas Gleixner <[email protected]>
Cc: Matthieu CASTET <[email protected]>
Cc: Stanislaw Gruszka <[email protected]>
Cc: Damien Bergamini <[email protected]>
Cc: Duncan Sands <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:57 +02:00
Greg Kroah-Hartman 5e456a9263 USB: atm: ueagle-atm.c: fix SPDX tag to be BSD2
Thomas rightly points out that I got the BSD clause count wrong for this
driver, it should be 2, not 3 based on the text in the license here, so
fix that up.

He also raises the question that the license text points to a v2 only
license, yet the text in the header says "or later".  Given that the
text in the header says "or later" and all of the other USB atm drivers
are licensed in that way, I am going to leave the string as-is for that
mark.

Reported-by: Thomas Gleixner <[email protected]>
Cc: Matthieu CASTET <[email protected]>
Cc: Stanislaw Gruszka <[email protected]>
Cc: Damien Bergamini <[email protected]>
Cc: Duncan Sands <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:57 +02:00
YueHaibing 5a1d99b11b usb: ohci-s3c2410: Remove set but not used variable 'hcd'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/host/ohci-s3c2410.c: In function s3c2410_hcd_oc:
drivers/usb/host/ohci-s3c2410.c:296:18: warning: variable hcd set but not used [-Wunused-but-set-variable]

It is never used, so can be removed.

Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:57 +02:00
Colin Ian King 6dade7ad88 usb: cdc-wdm: remove redundant assignment to rv
The variable rv is assigned with a value that is never read and
it is re-assigned a new value on the next statement. The
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:56 +02:00
YueHaibing 2e5a359e4a usb: host: ohci-st: Remove set but not used variable 'ohci'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/host/ohci-st.c: In function st_ohci_platform_probe:
drivers/usb/host/ohci-st.c:135:19: warning: variable ohci set but not used [-Wunused-but-set-variable]

It's never used, so can be removed.

Signed-off-by: YueHaibing <[email protected]>
Acked-by: Patrice Chotard <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:56 +02:00
YueHaibing 05387733ed usb: host: ehci-st: Remove set but not used variable 'ehci'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/host/ehci-st.c: In function st_ehci_platform_probe:
drivers/usb/host/ehci-st.c:155:19: warning: variable ehci set but not used [-Wunused-but-set-variable]

It is never used, so can be removed.

Signed-off-by: YueHaibing <[email protected]>
Acked-by: Patrice Chotard <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 15:21:56 +02:00
Faiz Abbas 7397993145 mmc: sdhci_am654: Fix SLOTTYPE write
In the call to regmap_update_bits() for SLOTTYPE, the mask and value
fields are exchanged. Fix this.

Signed-off-by: Faiz Abbas <[email protected]>
Fixes: 41fd4caeb0 ("mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver")
Cc: [email protected]
Signed-off-by: Ulf Hansson <[email protected]>
2019-06-03 15:18:25 +02:00
Anson Huang 15f5276a2f soc: imx: Add SCU SoC info driver support
Add i.MX SCU SoC info driver to support i.MX8QXP SoC, introduce
driver dependency into Kconfig as CONFIG_IMX_SCU must be
selected to support i.MX SCU SoC driver, also need to use
platform driver model to make sure IMX_SCU driver is probed
before i.MX SCU SoC driver.

With this patch, SoC info can be read from sysfs:

i.mx8qxp-mek# cat /sys/devices/soc0/family
Freescale i.MX

i.mx8qxp-mek# cat /sys/devices/soc0/soc_id
0x2

i.mx8qxp-mek# cat /sys/devices/soc0/machine
Freescale i.MX8QXP MEK

i.mx8qxp-mek# cat /sys/devices/soc0/revision
1.1

Signed-off-by: Anson Huang <[email protected]>
Reviewed-by: Abel Vesa <[email protected]>
Reviewed-by: Dong Aisheng <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
2019-06-03 20:30:37 +08:00
Gustavo A. R. Silva 2649939ad7 usb: typec: ucsi: ccg: fix memory leak in do_flash
In case memory resources for *fw* were successfully allocated,
release them before return.

Addresses-Coverity-ID: 1445499 ("Resource leak")
Fixes: 5c9ae5a875 ("usb: typec: ucsi: ccg: add firmware flashing support")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:24:57 +02:00
Michael Straube 7acc77d208 staging: rtl8188eu: remove ODM_PhyStatusQuery() wrapper
Function ODM_PhyStatusQuery() is just a wrapper around
ODM_PhyStatusQuery_92CSeries(). Rename ODM_PhyStatusQuery_92CSeries()
to ODM_PhyStatusQuery() and remove the wrapper.

Signed-off-by: Michael Straube <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:19:33 +02:00
Nishka Dasgupta d7255ba4d6 staging: vt6655: Change return type of function and remove variable
Remove return variable bResult from function CARDbRadioPowerOff and
change the return type of the function to void as it always returns true
and the return value is never stored nor checked when called.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:19:33 +02:00
Michael Straube ee598a61ec staging: rtl8188eu: remove unused definitions from ieee80211.h
MGMT_QUEUE_NUM, ETH_TYPE_LEN and PAYLOAD_TYPE_LEN are defined but
not used in the driver code, so remove them.

Signed-off-by: Michael Straube <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:17:01 +02:00
Michael Straube 14f252e821 staging: rtl8188eu: remove redundant definition of ETH_ALEN
ETH_ALEN is defined in linux/if_ether.h which is included by
osdep_service.h, so remove the redundant definition from ieee80211.h.

osdep_service.h:33:#include <linux/etherdevice.h>
etherdevice.h:25:#include <linux/if_ether.h>

Signed-off-by: Michael Straube <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:17:01 +02:00
Geordan Neukum 677b993a57 staging: kpc2000: kpc_spi: use devm_* API to manage mapped I/O space
The kpc_spi driver does not unmap its I/O space upon error cases in the
probe() function or upon remove(). Make the driver clean up after itself
more maintainably by migrating to using the managed resource API.

Signed-off-by: Geordan Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:17:01 +02:00
Geordan Neukum 1914e9ebd3 staging: kpc2000: kpc_spi: remove function kp_spi_bytes_per_word()
The static function kp_spi_bytes_per_word() is defined in kpc2000_spi.c,
but it is completely unused. As this function is unused, it can and
should be removed.

Signed-off-by: Geordan Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:17:01 +02:00
Geordan Neukum 66594e3f48 staging: kpc2000: kpc_spi: remove fifo_depth from kp_spi struct
The kp_spi structure contains a member 'fifo_depth'. This member is
never used. Therefore, it should be removed.

Signed-off-by: Geordan Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:15:23 +02:00
Geordan Neukum 32ed45068c staging: kpc2000: kpc_spi: column-align switch and subordinate cases
The linux style guide prescribes that switch statements and their
subordinate case labels should be column-aligned rather than
double-indenting the case label. Make kpc2000_spi.c follow the desired
style with respect to switch/case alignment.

Signed-off-by: Geordan Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:15:23 +02:00
Geordan Neukum 4d632cdbdd staging: kpc2000: kpc_spi: Remove unnecessary consecutive newlines
The kpc2000_spi.c file contains instances of unnecessary consecutive
newlines which negatively impact the readability of the file. Remove
all unnecessary consecutive newlines.

Signed-off-by: Geordan Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:15:23 +02:00
Nishka Dasgupta fc3e78dfcf staging: rtl8712: Replace function r8712_init_mlme_priv
Delete r8712_init_mlme_priv as it does nothing except call
_init_mlme_priv, and rename _init_mlme_priv to
r8712_init_mlme_priv.
Change the type of the new r8712_init_mlme_priv (formerly _init_mlme_priv)
to (non-static) int, from static sint.

Signed-off-by: Nishka Dasgupta <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:14:55 +02:00
Nishka Dasgupta 7ec3ff690d staging: rtl8712: ieee80211.c: Remove leading p from variable names
Remove leading p from the names of the following pointer variables:
- pregistrypriv
- pdev_network
- pie
- pbuf.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:14:55 +02:00
Colin Ian King 313cca245d staging: vc04_services: remove redundant assignment to pointer service
Pointer service is being set to NULL however this value is never
read and so the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:14:55 +02:00
Jeremy Sowden a31f13af7d staging: kpc2000: removed misc device.
Now that all the card information is available via sysfs, the misc
device is no longer necessary.  Removed it.

Signed-off-by: Jeremy Sowden <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-03 14:11:29 +02:00