14 Jun, 2020
1 commit
-
Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
'---help---'"), the number of '---help---' has been gradually
decreasing, but there are still more than 2400 instances.This commit finishes the conversion. While I touched the lines,
I also fixed the indentation.There are a variety of indentation styles found.
a) 4 spaces + '---help---'
b) 7 spaces + '---help---'
c) 8 spaces + '---help---'
d) 1 space + 1 tab + '---help---'
e) 1 tab + '---help---' (correct indentation)
f) 1 tab + 1 space + '---help---'
g) 1 tab + 2 spaces + '---help---'In order to convert all of them to 1 tab + 'help', I ran the
following commend:$ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
Signed-off-by: Masahiro Yamada
30 Jan, 2020
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc/whatever driver changes for 5.6-rc1Included in here are loads of things from a variety of different
driver subsystems:
- soundwire updates
- binder updates
- nvmem updates
- firmware drivers updates
- extcon driver updates
- various misc driver updates
- fpga driver updates
- interconnect subsystem and driver updates
- bus driver updates
- uio driver updates
- mei driver updates
- w1 driver cleanups
- various other small driver updatesAll of these have been in linux-next for a while with no reported
issues"* tag 'char-misc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (86 commits)
mei: me: add jasper point DID
char: hpet: Use flexible-array member
binder: fix log spam for existing debugfs file creation.
mei: me: add comet point (lake) H device ids
nvmem: add QTI SDAM driver
dt-bindings: nvmem: add binding for QTI SPMI SDAM
dt-bindings: imx-ocotp: Add i.MX8MP compatible
dt-bindings: soundwire: fix example
soundwire: cadence: fix kernel-doc parameter descriptions
soundwire: intel: report slave_ids for each link to SOF driver
siox: Use the correct style for SPDX License Identifier
w1: omap-hdq: Simplify driver with PM runtime autosuspend
firmware: stratix10-svc: Remove unneeded semicolon
firmware: google: Probe for a GSMI handler in firmware
firmware: google: Unregister driver_info on failure and exit in gsmi
firmware: google: Release devices before unregistering the bus
slimbus: qcom: add missed clk_disable_unprepare in remove
slimbus: Use the correct style for SPDX License Identifier
slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel()
dt-bindings: SLIMBus: add slim devices optional properties
...
15 Jan, 2020
1 commit
-
With CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, the stack usage in vme_fake
grows above the warning limit:drivers/vme/bridges/vme_fake.c: In function 'fake_master_read':
drivers/vme/bridges/vme_fake.c:610:1: error: the frame size of 1160 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
drivers/vme/bridges/vme_fake.c: In function 'fake_master_write':
drivers/vme/bridges/vme_fake.c:797:1: error: the frame size of 1160 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]The problem is that in some configurations, each call to
fake_vmereadX() puts another variable on the stack.Reduce the amount of inlining to get back to the previous state,
with no function using more than 200 bytes each.Signed-off-by: Arnd Bergmann
Link: https://lore.kernel.org/r/20200107200610.3482901-1-arnd@arndb.de
Signed-off-by: Greg Kroah-Hartman
06 Jan, 2020
1 commit
-
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.Signed-off-by: Christoph Hellwig
Acked-by: Arnd Bergmann
31 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later versionextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 3029 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman
21 May, 2019
1 commit
-
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
14 Sep, 2018
1 commit
-
put_device will call vme_dev_release to free vdev, kfree is
unnecessary here.Signed-off-by: Ding Xiang
Signed-off-by: Greg Kroah-Hartman
16 Jul, 2018
1 commit
-
Variable i is being assigned but is never used hence it is redundant
and can be removed.Cleans up clang warning:
warning: variable 'i' set but not used [-Wunused-but-set-variable]Signed-off-by: Colin Ian King
Reviewed-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
18 Dec, 2017
1 commit
-
The driver may sleep under a spinlock.
The function call path is:
tsi148_master_write \ tsi148_master_read (acquire the spinlock)
vme_register_error_handler
kmalloc(GFP_KERNEL) --> may sleepTo fix it, GFP_KERNEL is replaced with GFP_ATOMIC.
This bug is found by my static analysis tool(DSAC) and checked by my code review.
Signed-off-by: Jia-Ju Bai
Signed-off-by: Greg Kroah-Hartman
17 Nov, 2017
1 commit
-
…/git/gregkh/char-misc
Pull char/misc updates from Greg KH:
"Here is the big set of char/misc and other driver subsystem patches
for 4.15-rc1.There are small changes all over here, hyperv driver updates, pcmcia
driver updates, w1 driver updats, vme driver updates, nvmem driver
updates, and lots of other little one-off driver updates as well. The
shortlog has the full details.All of these have been in linux-next for quite a while with no
reported issues"* tag 'char-misc-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (90 commits)
VME: Return -EBUSY when DMA list in use
w1: keep balance of mutex locks and refcnts
MAINTAINERS: Update VME subsystem tree.
nvmem: sunxi-sid: add support for A64/H5's SID controller
nvmem: imx-ocotp: Update module description
nvmem: imx-ocotp: Enable i.MX7D OTP write support
nvmem: imx-ocotp: Add i.MX7D timing write clock setup support
nvmem: imx-ocotp: Move i.MX6 write clock setup to dedicated function
nvmem: imx-ocotp: Add support for banked OTP addressing
nvmem: imx-ocotp: Pass parameters via a struct
nvmem: imx-ocotp: Restrict OTP write to IMX6 processors
nvmem: uniphier: add UniPhier eFuse driver
dt-bindings: nvmem: add description for UniPhier eFuse
nvmem: set nvmem->owner to nvmem->dev->driver->owner if unset
nvmem: qfprom: fix different address space warnings of sparse
nvmem: mtk-efuse: fix different address space warnings of sparse
nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it
nvmem: imx-iim: use stack for nvmem_config instead of malloc'ing it
thunderbolt: tb: fix use after free in tb_activate_pcie_devices
MAINTAINERS: Add git tree for Thunderbolt development
...
08 Nov, 2017
1 commit
-
The VME subsystem currently returns -EBUSY when trying to free a DMA
resource that is busy, but returns -EINVAL when trying to free a DMA list
that is in use. Switch to returning -EBUSY when trying to free a DMA list
that is in use for consistency and correctness.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
20 Oct, 2017
1 commit
-
Martyn writes:
VME Subsystem changes for master v4.14-rc4:
- Corrections across the VME subsystem to better align with the preferred
kernel coding style.
14 Oct, 2017
14 commits
-
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitThe script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written …
Thus fix the affected source code places.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Replace the specification of data structures by variable references
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.Signed-off-by: Markus Elfring
[martyn@welchs.me.uk: Correct long line]
Signed-off-by: Martyn Welch -
Omit extra messages for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitThe script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written …
Thus fix the affected source code places.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Replace the specification of data structures by variable references
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Omit extra messages for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitThe script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written …
Thus fix the affected source code places.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Replace the specification of data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Return directly without using an intermediate local variable
in these functions.Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bitThe script “checkpatch.pl” pointed information out like the following.
Comparison to NULL could be written …
Thus fix the affected source code places.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Assign a pointer to a data structure member without using an intermediate
local variable.Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Replace the specification of data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch -
Omit extra messages for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Martyn Welch
04 Oct, 2017
1 commit
-
The controversial part of this patch is that I've changed it so we now
prevent integer overflows for VME_USER types and before we didn't. I
view it as kernel-hardening. I looked at a couple places that used
VME_USER types and they seemed pretty suspicious so I'm pretty sure
preventing overflows here is a good idea.The most common problem which this function is for cases like VME_A16
where we don't put an upper bound on "size" so you could have "size" set
to U64_MAX and a valid vme_base would overflow the "vme_base + size"
into the valid range as well.In the VME_A64 case, the integer overflow checking doesn't work because
"U64_MAX + 1" has an integer overflow and it's just a complicated way of
saying zero. That VME_A64 case is sort of interesting as well because
there is a VME_A64_MAX define which is set to "U64_MAX + 1". The
compiler will never let anyone use it since it can't be stored in a u64
variable... With my patch it's now limited to just U64_MAX.Anyway, I put one integer overflow check at the start of the function
and deleted all existing checks.Signed-off-by: Dan Carpenter
Acked-by: Dmitry Kalinkin
Signed-off-by: Greg Kroah-Hartman
17 Mar, 2017
1 commit
-
Add kernel-doc comments to the VME driver API and structures. This
documentation will be integrated into the RST documentation in a later
patch.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
25 Jan, 2017
1 commit
-
Commit 050c3d52cc7810d9d17b8cd231708609af6876ae ("vme: make core
vme support explicitly non-modular") dropped the remove function
because it appeared as if it was for removal of the bus, which is
not supported.However, vme_bus_remove() is called when a VME device is removed
from the bus and not when the bus is removed; as it calls the VME
device driver's cleanup function. Without this function, the
remove() in the VME device driver is never called and VME device
drivers cannot be reloaded again.Here we restore the remove function that was deleted in that
commit, and the reference to the function in the bus structure.Fixes: 050c3d52cc78 ("vme: make core vme support explicitly non-modular")
Cc: Manohar Vanga
Acked-by: Martyn Welch
Cc: devel@driverdev.osuosl.org
Signed-off-by: Stefano Babic
Signed-off-by: Paul Gortmaker
Cc: stable # 4.9
Signed-off-by: Greg Kroah-Hartman
11 Jan, 2017
1 commit
-
In ca91cx42_slave_get function, the value pointed by vme_base pointer is
set through:*vme_base = ioread32(bridge->base + CA91CX42_VSI_BS[i]);
So it must be dereferenced to be used in calculation of pci_base:
*pci_base = (dma_addr_t)*vme_base + pci_offset;
This bug was caught thanks to the following gcc warning:
drivers/vme/bridges/vme_ca91cx42.c: In function ‘ca91cx42_slave_get’:
drivers/vme/bridges/vme_ca91cx42.c:467:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
*pci_base = (dma_addr_t)vme_base + pci_offset;Signed-off-by: Augusto Mecking Caringi
Acked-By: Martyn Welch
Cc: stable
Signed-off-by: Greg Kroah-Hartman
28 Oct, 2016
1 commit
-
The function vme_get_size returns the size of the window to the caller,
however it doesn't check the return value of the call to vme_master_get.Return 0 on failure rather than anything else.
Suggested-by: Dan Carpenter
Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
27 Sep, 2016
2 commits
-
image->lock is unlocked in some error handling path without take the
lock, so remove those unexpected unlock.Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver")
Signed-off-by: Wei Yongjun
Signed-off-by: Greg Kroah-Hartman -
We get 4 warnings when building kernel with W=1:
drivers/vme/bridges/vme_fake.c:384:6: warning: no previous prototype for 'fake_lm_check' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:619:6: warning: no previous prototype for 'fake_vmewrite8' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:649:6: warning: no previous prototype for 'fake_vmewrite16' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:679:6: warning: no previous prototype for 'fake_vmewrite32' [-Wmissing-prototypes]In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.Signed-off-by: Baoyou Xie
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
13 Sep, 2016
1 commit
-
casting between dma_addr_t and a pointer is generally tricky,
as they might not be the same size and almost never point into
the same address space. With 32-bit ARM systems and LPAE, we
get this warning for the vme_fake driver that stores a pointer
in a dma_addr_t variable:drivers/vme/bridges/vme_fake.c: In function 'fake_slave_set':
drivers/vme/bridges/vme_fake.c:204:29: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]To make this clearer while fixing the warning, I'm adding
a set of helper functions for the type conversion.Signed-off-by: Arnd Bergmann
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
31 Aug, 2016
4 commits
-
This patch introduces a fake VME bridge driver. This driver currently
emulates a subset of the VME bridge functionality. This allows some VME
subsystem development and even some VME device driver development to be
carried out in the absence of a proper VME bus.Signed-off-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
The Kconfig currently controlling compilation of this code is:
drivers/vme/Kconfig:menuconfig VME_BUS
drivers/vme/Kconfig: bool "VME bridge support"...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.We replace module.h and moduleparam.h (unused) with init.h and also
export.h ; the latter since this file does export some syms.Since this is a struct bus_type and not a platform_driver, we don't
have any ".suppress_bind_attrs" to be concerned about when we
drop the ".remove" code from this file.Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.Cc: Manohar Vanga
Signed-off-by: Paul Gortmaker
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
These drivers have a PCI device ID table but the PCI module
alias information is not created so module autoloading won't work.Signed-off-by: Alessio Igor Bogani
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman -
Make the location monitor callback function prototype more useful by
changing the argument from an integer to a void pointer.All VME bridge drivers were simply passing the location monitor index
(e.g. 0-3) as the argument to these callbacks. It is much more useful
to pass back a pointer to data that the callback-registering driver
cares about.There appear to be no in-kernel callers of vme_lm_attach (or
vme_lme_request for that matter), so this change only affects the VME
subsystem and bridge drivers.This has been tested with Tsi148 hardware, but the CA91Cx42 changes
have only been compiled.Signed-off-by: Aaron Sierra
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman
02 May, 2016
1 commit
-
Consolidate vme_bridge structure setup that every bridge was required
to do itself. This came about because .irq_mtx is only used within the
VME core, but was required to be setup externally.This returns the structure passed in to support shorthand like this:
bridge = vme_init_bridge(&priv->bridge);
Signed-off-by: Aaron Sierra
Acked-by: Martyn Welch
Signed-off-by: Greg Kroah-Hartman