26 Sep, 2018
1 commit
-
[ Upstream commit faa1a47388b33623e4d504c23569188907b039a0 ]
Return an error code on failure. Change leading spaces to tab on the
first if.Problem found using Coccinelle.
Signed-off-by: Julia Lawall
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Sasha Levin
Signed-off-by: Greg Kroah-Hartman
08 Apr, 2018
1 commit
-
commit 823f7923833c6cc2b16e601546d607dcfb368004 upstream.
WCH CH382L is a PCI-E adapter with 1 parallel port. It is similair to CH382
but serial ports are not soldered on board. Detected as
Serial controller: Device 1c00:3050 (rev 10) (prog-if 05 [16850])Signed-off-by: Alexander Gerasiov
Cc: stable
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
06 Sep, 2017
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc driver update for 4.14-rc1.Lots of different stuff in here, it's been an active development cycle
for some reason. Highlights are:- updated binder driver, this brings binder up to date with what
shipped in the Android O release, plus some more changes that
happened since then that are in the Android development trees.- coresight updates and fixes
- mux driver file renames to be a bit "nicer"
- intel_th driver updates
- normal set of hyper-v updates and changes
- small fpga subsystem and driver updates
- lots of const code changes all over the driver trees
- extcon driver updates
- fmc driver subsystem upadates
- w1 subsystem minor reworks and new features and drivers added
- spmi driver updates
Plus a smattering of other minor driver updates and fixes.
All of these have been in linux-next with no reported issues for a
while"* tag 'char-misc-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (244 commits)
ANDROID: binder: don't queue async transactions to thread.
ANDROID: binder: don't enqueue death notifications to thread todo.
ANDROID: binder: Don't BUG_ON(!spin_is_locked()).
ANDROID: binder: Add BINDER_GET_NODE_DEBUG_INFO ioctl
ANDROID: binder: push new transactions to waiting threads.
ANDROID: binder: remove proc waitqueue
android: binder: Add page usage in binder stats
android: binder: fixup crash introduced by moving buffer hdr
drivers: w1: add hwmon temp support for w1_therm
drivers: w1: refactor w1_slave_show to make the temp reading functionality separate
drivers: w1: add hwmon support structures
eeprom: idt_89hpesx: Support both ACPI and OF probing
mcb: Fix an error handling path in 'chameleon_parse_cells()'
MCB: add support for SC31 to mcb-lpc
mux: make device_type const
char: virtio: constify attribute_group structures.
Documentation/ABI: document the nvmem sysfs files
lkdtm: fix spelling mistake: "incremeted" -> "incremented"
perf: cs-etm: Fix ETMv4 CONFIGR entry in perf.data file
nvmem: include linux/err.h from header
...
28 Aug, 2017
3 commits
-
Use api pair of request_mem_region and release_mem_region
instead of release_resource.Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
based on checkpatch, cleanup the "do not initialise statics to" 0 or NULL.
Signed-off-by: Carlos Palminha
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
The kernel adds newline automatically between printk calls, we must use
pr_cont if we want multiple printk strings on the same line.Signed-off-by: Mikulas Patocka
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
22 Aug, 2017
1 commit
-
Signed-off-by: Helge Deller
20 Apr, 2017
1 commit
-
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image. Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify. The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.This patch annotates drivers in drivers/parport/.
Suggested-by: Alan Cox
Signed-off-by: David Howells
cc: Sudip Mukherjee
16 Mar, 2017
1 commit
-
Usually every parallel port will have a single pardev registered with
it. But ppdev driver is an exception. This userspace parallel port
driver allows to create multiple parrallel port devices for a single
parallel port. And as a result we were having a nice warning like:
"sysctl table check failed:
/dev/parport/parport0/devices/ppdev0/timeslice Sysctl already exists"Use the same logic as used in parport_register_device() and register
the proc files only once for each parallel port.Fixes: 6fa45a226897 ("parport: add device-model to parport subsystem")
Cc: stable # v4.4+
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1414656
Bugzilla: https://bugs.archlinux.org/task/52322
Tested-by: James Feeney
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
02 Mar, 2017
1 commit
-
…hed.h> into <linux/sched/signal.h>
Fix up affected files that include this signal functionality via sched.h.
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
28 Feb, 2017
2 commits
-
Now that %z is standartised in C99 there is no reason to support %Z.
Unlike %L it doesn't even make format strings smaller.Use BUILD_BUG_ON in a couple ATM drivers.
In case anyone didn't notice lib/vsprintf.o is about half of SLUB which
is in my opinion is quite an achievement. Hopefully this patch inspires
someone else to trim vsprintf.c more.Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2
Signed-off-by: Alexey Dobriyan
Cc: Andy Shevchenko
Cc: Rasmus Villemoes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix typos and add the following to the scripts/spelling.txt:
overwrien||overwritten
Link: http://lkml.kernel.org/r/1481573103-11329-30-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Jan, 2017
1 commit
-
Signed-off-by: Helge Deller
25 Dec, 2016
1 commit
-
This was entirely automated, using the script by Al:
PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*'
sed -i -e "s!$PATT!#include !" \
$(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)to do the replacement at the end of the merge window.
Requested-by: Al Viro
Signed-off-by: Linus Torvalds
01 May, 2016
1 commit
-
The drivers which depends on parport may sometimes try to iniitialize
and register with parport bus even before parport has actually
registered with the device layer.
The simplest solution is to mark the init function as subsys_initcall()
and load the parport before the other drivers loads.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
04 Jan, 2016
11 commits
-
It is not an usual practise to assign some value to a variable in the if
test condition.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
checkpatch complains that space is prohibited between function name and
open parenthesis '('.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
checkpatch was complaining about NULL comparisons.
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
If kmalloc() or kzalloc() fails we will get sufficient messages in the logs,
no need to print these extra messages.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
checkpatch was complaining about braces for single statement block.
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
user visible strings should not be split as that affects the ability to
grep.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
Code should be indented using tabs and not by space.
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
The multi-line comments were not according to the kernel coding style.
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
All symbols were exported at the end of the file but they are supposed
to be exported just after the function. And checkpatch was complaining
about it.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
Trailing white space is not accepted in kernel coding style. Remove
them.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
s/regsiter/register/
Signed-off-by: Geliang Tang
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
26 Jul, 2015
1 commit
-
This reverts commit 23c405912b88 ("parport: fix memory leak")
par_dev->state was already being removed in parport_unregister_device().
Reported-by: Ying Huang
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
23 Jul, 2015
3 commits
-
After the reference count becomes 0 when put_device() is called, it will
execute the release callback where we are freeing all the allocated
memory associated with the device. So if we just continue on the error
path then we are again freeing devname and trying to dereference par_dev
which has already been free-ed in the release callback.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
After the reference count becomes 0 when put_device() is called, it will
execute the release callback where we are freeing all the allocated
memory associated with the device. We missed freeing par_dev->state.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman -
After registering the device if exclusive access fails for any reason
then we need to unregister the device to remove all references.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
13 Jun, 2015
1 commit
-
As of now we were starting the registration process and after the device
is registered we were checking if the device can be used by the
parport. Now lets check it first so that we do not need to go through
the registration process only to fail at the end.
The original exclusive access check at the end is still there so that we
do not get any surprises if two different process registers its device
with same parport and with exclusive access at the same time.Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
01 Jun, 2015
1 commit
-
parport subsystem starts using the device-model. Drivers using the
device-model has to define devmodel as true and should register the
device with parport using parport_register_dev_model().Tested-by: Jean Delvare
Tested-by: Alan Cox
Signed-off-by: Sudip Mukherjee
Signed-off-by: Greg Kroah-Hartman
15 Jan, 2015
1 commit
-
IRQ_TYPE_SLOW is no longer used by the Atari platform interrupt code
since commit 734085651c9b80aa ("[PATCH] m68k: convert atari irq code")
in v2.6.18-rc1, so drop it.Note that its value has been reused for a different purpose
(IRQ_TYPE_NONE) since commit 6a6de9ef5850d063 ("[PATCH] genirq: core")
in v2.6.18-rc1.Signed-off-by: Geert Uytterhoeven
15 Dec, 2014
2 commits
-
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver update for 3.19-rc1Lots of little things all over the place in different drivers, and a
new subsystem, "coresight" has been added. Full details are in the
shortlog"* tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
parport: parport_pc, do not remove parent devices early
spmi: Remove shutdown/suspend/resume kernel-doc
carma-fpga-program: drop videobuf dependency
carma-fpga: drop videobuf dependency
carma-fpga-program.c: fix compile errors
i8k: Fix temperature bug handling in i8k_get_temp()
cxl: Name interrupts in /proc/interrupt
CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
coresight-replicator: remove .owner field for driver
coresight: fixed comments in coresight.h
coresight: fix typo in comment in coresight-priv.h
coresight: bindings for coresight drivers
coresight: Adding ABI documentation
w1: support auto-load of w1_bq27000 module.
w1: avoid potential u16 overflow
cn: verify msg->len before making callback
mei: export fw status registers through sysfs
mei: read and print all six FW status registers
mei: txe: add cherrytrail device id
mei: kill cached host and me csr values
... -
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev__once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
27 Nov, 2014
1 commit
-
When the parport_pc module is removed from the system, all parport
devices are iterated in parport_pc_exit and removed by a call to
parport_pc_unregister_port. Note that some parport devices have its
'struct device' parent, known as port->dev. And when port->dev is a
platform device, it is destroyed in parport_pc_exit too.Now, when parport_pc_unregister_port is called for a going port,
drv->detach(port) is called for every parport driver in the system.
ppdev can be one of them. ppdev's detach() tears down its per-port
sysfs directory, which established port->dev as a parent earlier.But since parport_pc_exit kills port->dev parents before unregisters
ports proper, ppdev's sysfs directory has no living parent anymore.
This results in the following warning:WARNING: CPU: 1 PID: 785 at fs/sysfs/group.c:219 sysfs_remove_group+0x9b/0xa0
sysfs group ffffffff81c69e20 not found for kobject 'parport1'
Modules linked in: parport_pc(E-) ppdev(E) [last unloaded: ppdev]
CPU: 1 PID: 785 Comm: rmmod Tainted: G W E 3.18.0-rc5-next-20141120+ #824
...
Call Trace:
...
[] warn_slowpath_fmt+0x46/0x50
[] sysfs_remove_group+0x9b/0xa0
[] dpm_sysfs_remove+0x57/0x60
[] device_del+0x49/0x240
[] device_unregister+0x22/0x70
[] device_destroy+0x3c/0x50
[] pp_detach+0x4a/0x60 [ppdev]
[] parport_remove_port+0x11d/0x150
[] parport_pc_unregister_port+0x28/0xf0 [parport_pc]
[] parport_pc_exit+0x76/0x468 [parport_pc]
[] SyS_delete_module+0x18c/0x230It is also easily reproducible on qemu with two dummy ports '-parallel
/dev/null -parallel /dev/null'.So switch the order of killing the two structures. But since port is
freed by parport_pc_unregister_port, we have to remember port->dev
in a local variable.Perhaps nothing worse than the warning happens thanks to the device
refcounting. We *should* be on the safe side.Signed-off-by: Jiri Slaby
Reviewed-by: Takashi Iwai
Tested-by: Martin Pluskal
Signed-off-by: Greg Kroah-Hartman
07 Nov, 2014
1 commit
-
WCH382 is a PCI-E card with 1 LPT and 2 DB9 COM ports detected as
Serial controller: Device 1c00:3250 (rev 10) (prog-if 05 [16850])Signed-off-by: Sergej Pupykin
Signed-off-by: Greg Kroah-Hartman
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
24 Sep, 2014
1 commit
-
We definitely know that only x86 (32-bit) architecture is affected by the issue, so implement a stub instead of the actual check for other architectures.
We also know that motherboard LPT chipset is affected, so the port is either come from
parport_pc_init (when `io' module param is used) or
parport_pc_find_isa_ports (when default LPT ports are probbed: 0x378, 0x278, 0x3bc).
In both cases the port considered as 'legacy' and `dev' member of struct parport is NULL. See also comments for `struct parport' in parport.hSigned-off-by: Matwey V. Kornilov
Signed-off-by: Greg Kroah-Hartman