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
28 May, 2018
1 commit
-
Convert the S_ symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.see: https://lkml.org/lkml/2016/8/2/1945
Done with automated conversion via:
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplaceMiscellanea:
o Wrapped one multi-line call to a single line
Signed-off-by: Joe Perches
Acked-by: Vinod Koul
Signed-off-by: Takashi Iwai
12 Jan, 2018
2 commits
-
Some obsoleted functions are still declared in sound_core.c.
Get rid of them.Signed-off-by: Takashi Iwai
-
These helpers are no longer used after the removal of the legacy OSS
drivers. Let's clean up.Signed-off-by: Takashi Iwai
07 Nov, 2015
1 commit
-
init_oss_soundcore() compares returned value of register_chrdev()
with -1, while other error codes can be returned.Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
Signed-off-by: Takashi Iwai
25 Oct, 2013
1 commit
-
Signed-off-by: Al Viro
04 Jul, 2013
1 commit
-
Calling dev_set_name with a single paramter causes it to be handled as a
format string. Many callers are passing potentially dynamic string
content, so use "%s" in those cases to avoid any potential accidents,
including wrappers like device_create*() and bdi_register().Signed-off-by: Kees Cook
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Mar, 2013
1 commit
-
script/kernel-doc reports the following type of warnings (when run in verbose
mode):Warning(sound/core/init.c:152): No description found for return value of
'snd_card_create'To fix that:
- add missing descriptions of function return values
- use "Return:" sections to describe those return valuesAlong the way:
- complete some descriptions
- fix some typosSigned-off-by: Yacine Belkadi
Signed-off-by: Takashi Iwai
18 Dec, 2012
1 commit
-
In commit 9c0ece069b32 ("Get rid of Documentation/feature-removal.txt"),
Linus removed feature-removal-schedule.txt from Documentation, but there
is still some reference to this file. So remove them.Signed-off-by: Tao Ma
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 May, 2012
1 commit
-
The upper limit of the available minors isn't necessarily 128 + unit,
but it's rather up to 256. Fixing this allows more than 8 devices.Signed-off-by: Takashi Iwai
04 Jan, 2012
1 commit
-
both callers of device_get_devnode() are only interested in lower 16bits
and nobody tries to return anything wider than 16bit anyway.Signed-off-by: Al Viro
10 Mar, 2011
1 commit
-
Since OSS driver creates the device entries for /dev/audio* and
/dev/dspW* by itself without coping with sound_core, it leads to
conflicts with others and let sysfs spewing warnings.This patch rewrites the registration part of OSS driver to use
the standard method also for additional minor devices.Reported-by: Steven Rostedt (with ktest.pl)
Tested-by: Steven Rostedt (with ktest.pl)
Signed-off-by: Takashi Iwai
18 Nov, 2010
1 commit
-
The big kernel lock has been removed from all these files at some point,
leaving only the #include.Remove this too as a cleanup.
Signed-off-by: Arnd Bergmann
Signed-off-by: Linus Torvalds
15 Oct, 2010
1 commit
-
All file_operations should get a .llseek operation so we can make
nonseekable_open the default for future file operations without a
.llseek pointer.The three cases that we can automatically detect are no_llseek, seq_lseek
and default_llseek. For cases where we can we can automatically prove that
the file offset is always ignored, we use noop_llseek, which maintains
the current behavior of not returning an error from a seek.New drivers should normally not use noop_llseek but instead use no_llseek
and call nonseekable_open at open time. Existing drivers can be converted
to do the same when the maintainer knows for certain that no user code
relies on calling seek on the device file.The generated code is often incorrectly indented and right now contains
comments that clarify for each added line why a specific variant was
chosen. In the version that gets submitted upstream, the comments will
be gone and I will manually fix the indentation, because there does not
seem to be a way to do that using coccinelle.Some amount of new code is currently sitting in linux-next that should get
the same modifications, which I will do at the end of the merge window.Many thanks to Julia Lawall for helping me learn to write a semantic
patch that does all this.===== begin semantic patch =====
// This adds an llseek= method to all file operations,
// as a preparation for making no_llseek the default.
//
// The rules are
// - use no_llseek explicitly if we do nonseekable_open
// - use seq_lseek for sequential files
// - use default_llseek if we know we access f_pos
// - use noop_llseek if we know we don't access f_pos,
// but we still want to allow users to call lseek
//
@ open1 exists @
identifier nested_open;
@@
nested_open(...)
{}
@ open exists@
identifier open_f;
identifier i, f;
identifier open1.nested_open;
@@
int open_f(struct inode *i, struct file *f)
{}
@ read disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{}
@ read_no_fpos disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
... when != off
}@ write @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{}
@ write_no_fpos @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
... when != off
}@ fops0 @
identifier fops;
@@
struct file_operations fops = {
...
};@ has_llseek depends on fops0 @
identifier fops0.fops;
identifier llseek_f;
@@
struct file_operations fops = {
...
.llseek = llseek_f,
...
};@ has_read depends on fops0 @
identifier fops0.fops;
identifier read_f;
@@
struct file_operations fops = {
...
.read = read_f,
...
};@ has_write depends on fops0 @
identifier fops0.fops;
identifier write_f;
@@
struct file_operations fops = {
...
.write = write_f,
...
};@ has_open depends on fops0 @
identifier fops0.fops;
identifier open_f;
@@
struct file_operations fops = {
...
.open = open_f,
...
};// use no_llseek if we call nonseekable_open
////////////////////////////////////////////
@ nonseekable1 depends on !has_llseek && has_open @
identifier fops0.fops;
identifier nso ~= "nonseekable_open";
@@
struct file_operations fops = {
... .open = nso, ...
+.llseek = no_llseek, /* nonseekable */
};@ nonseekable2 depends on !has_llseek @
identifier fops0.fops;
identifier open.open_f;
@@
struct file_operations fops = {
... .open = open_f, ...
+.llseek = no_llseek, /* open uses nonseekable */
};// use seq_lseek for sequential files
/////////////////////////////////////
@ seq depends on !has_llseek @
identifier fops0.fops;
identifier sr ~= "seq_read";
@@
struct file_operations fops = {
... .read = sr, ...
+.llseek = seq_lseek, /* we have seq_read */
};// use default_llseek if there is a readdir
///////////////////////////////////////////
@ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier readdir_e;
@@
// any other fop is used that changes pos
struct file_operations fops = {
... .readdir = readdir_e, ...
+.llseek = default_llseek, /* readdir is present */
};// use default_llseek if at least one of read/write touches f_pos
/////////////////////////////////////////////////////////////////
@ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read.read_f;
@@
// read fops use offset
struct file_operations fops = {
... .read = read_f, ...
+.llseek = default_llseek, /* read accesses f_pos */
};@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write.write_f;
@@
// write fops use offset
struct file_operations fops = {
... .write = write_f, ...
+ .llseek = default_llseek, /* write accesses f_pos */
};// Use noop_llseek if neither read nor write accesses f_pos
///////////////////////////////////////////////////////////@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
identifier write_no_fpos.write_f;
@@
// write fops use offset
struct file_operations fops = {
...
.write = write_f,
.read = read_f,
...
+.llseek = noop_llseek, /* read and write both use no f_pos */
};@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write_no_fpos.write_f;
@@
struct file_operations fops = {
... .write = write_f, ...
+.llseek = noop_llseek, /* write uses no f_pos */
};@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
@@
struct file_operations fops = {
... .read = read_f, ...
+.llseek = noop_llseek, /* read uses no f_pos */
};@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
@@
struct file_operations fops = {
...
+.llseek = noop_llseek, /* no read or write fn */
};
===== End semantic patch =====Signed-off-by: Arnd Bergmann
Cc: Julia Lawall
Cc: Christoph Hellwig
12 Jul, 2010
1 commit
-
This moves the lock_kernel() call from soundcore_open
to the individual OSS device drivers, where we can deal
with it one driver at a time if needed, or just kill
off the drivers.All core components in ALSA already provide
adequate locking in their open()-functions
and do not require the big kernel lock, so
there is no need to add the BKL there.Signed-off-by: Arnd Bergmann
Signed-off-by: Takashi Iwai
06 Jul, 2010
1 commit
-
Most of this function is protected by the sound_loader_lock.
We can push down the BKL to this call out err = file->f_op->open(inode,file);In order to build the sound core without the BKL, we
will need to push the lock_kernel() call into the ~20
device drivers that register their file operations.Signed-off-by: John Kacur
Signed-off-by: Arnd Bergmann
Acked-by: Alan Cox
Signed-off-by: Takashi Iwai
15 Jan, 2010
1 commit
-
This is needed for built-in drivers which are built before the sound directory,
like thinkpad_acpi.Otherwise, registering a card fails.
Signed-off-by: Thadeu Lima de Souza Cascardo
Signed-off-by: Takashi Iwai
04 Dec, 2009
1 commit
-
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.Signed-off-by: André Goddard Rosa
Signed-off-by: Jiri Kosina
20 Sep, 2009
1 commit
-
This allows subsytems to provide devtmpfs with non-default permissions
for the device node. Instead of the default mode of 0600, null, zero,
random, urandom, full, tty, ptmx now have a mode of 0666, which allows
non-privileged processes to access standard device nodes in case no
other userspace process applies the expected permissions.This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
10 Aug, 2009
2 commits
-
If any OSS support is enabled, regardless of built-in or module,
sound_core claims full OSS major number (that is, the old 0-255
region) to trap open attempts and request sound modules using custom
module aliases. This feature is redundant as chrdev already has such
mechanism. This preemptive claiming prevents alternative OSS
implementation.The custom module aliases are scheduled to be removed and the previous
patch made soundcore emit the standard chrdev aliases too to help
transition.This patch schedule the feature for removal in a year and makes it
optional so that developers and distros can try new things in the
meantime without rebuilding the kernel. The pre-claiming can be
turned off by using SOUND_OSS_CORE_PRECLAIM and/or kernel parameter
soundcore.preclaim_oss.As this allows sound minors to be individually grabbed by other users,
this patch updates sound_insert_unit() such that if registering
individual device region fails, it tries the next available slot.For details on removal plan, please read the entry added by this patch
in feature-removal-schedule.txt .Signed-off-by: Tejun Heo
Cc: Alan Cox
Signed-off-by: Takashi Iwai -
Till now missing OSS devices emitted sound-slot/service-* module
alises instead of the standard char-major-* if a missing device number
is opened if soundcore is loaded. The custom module aliases don't
have any inherent benefit than backward compatibility.sound-slot/service-* module aliases is scheduled to be removed and to
help the transition this patch makes soundcore emit the standard
module alises along with the custom ones.Signed-off-by: Tejun Heo
Cc: Alan Cox
Signed-off-by: Takashi Iwai
04 Jul, 2009
1 commit
-
Signed-off-by: Kay Sievers
Signed-off-by: Takashi Iwai
16 Jun, 2009
1 commit
-
This adds support to the sound core to report the proper device name to
userspace for their devices.Signed-off-by: Kay Sievers
Signed-off-by: Jan Blunck
Signed-off-by: Greg Kroah-Hartman
15 Dec, 2008
1 commit
-
Include sound/core.h in sound_core.c so that sound_class is declared
before it is defined, avoiding it looking like it should be static.Signed-off-by: Mark Brown
Signed-off-by: Takashi Iwai
21 Nov, 2008
1 commit
-
Fix the following sparse warnings:
sound/sound_core.c:460:2: warning: returning void-valued expression
sound/sound_core.c:477:2: warning: returning void-valued expression
sound/sound_core.c:510:5: warning: symbol 'soundcore_open' was not
declared. Should it be static?Signed-off-by: Hannes Eder
Signed-off-by: Takashi Iwai
28 Oct, 2008
1 commit
-
…i-ioremap-bar' into for-linus
27 Oct, 2008
1 commit
-
Signed-off-by: Alan Cox
Signed-off-by: Takashi Iwai
17 Oct, 2008
1 commit
-
Now that device_create() has been audited, rename things back to the
original call to be sane.Cc: Jaroslav Kysela
Signed-off-by: Greg Kroah-Hartman
09 Sep, 2008
1 commit
-
The __exit cleanup_oss_soundcore() is called from
the __init init_soundcore(). This causes section mismatch
and breaks kernel's linking on sparc64.Remove the __exit attribute from the cleanup_oss_soundcore().
Signed-off-by: Krzysztof Helt
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
29 Aug, 2008
1 commit
-
sound/sound_core.c implements soundcore.ko and contains two parts -
sound_class which is shared by both ALSA and OSS and device
redirection support for OSS. It's always compiled when any sound
support is enabled although it's necessary only when OSS (the actual
one or emulation) is enabled. This is slightly wasteful and as device
redirection always registers character device region for major 14, it
prevents alternative implementation.This patch introduces a new config SOUND_OSS_CORE which is selected
iff OSS support is actually necessary and build the OSS core part
conditionally.If OSS is disabled, soundcore merely contains sound_class but leaving
it that way seems to be the simplest approach as otherwise sound_class
should be in ALSA core file if OSS is disabled but should be in
soundcore if OSS is enabled. Also, there's also the user confusion
factor.Signed-off-by: Tejun Heo
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
22 Jul, 2008
1 commit
-
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.Cc: Jaroslav Kysela
Signed-off-by: Greg Kroah-Hartman
21 Jun, 2008
1 commit
-
Signed-off-by: Jonathan Corbet
13 Feb, 2007
1 commit
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Dec, 2006
1 commit
-
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.It also makes the struct sound_card to show up as a "real" device
where all the different sound class devices are placed as childs
and different card attribute files can hang off of. /sys/class/sound is
still a flat directory, but the symlink targets of all devices belonging
to the same card, point the the /sys/devices tree below the new card
device object.Thanks to Kay for the updates to this patch.
Signed-off-by: Kay Sievers
Acked-by: Jaroslav Kysela
Signed-off-by: Greg Kroah-Hartman
04 Oct, 2006
1 commit
-
This patch contains the scheduled removal of OSS drivers that:
- have ALSA drivers for the same hardware without known regressions and
- whose Kconfig options have been removed in 2.6.17.[michal.k.k.piotrowski@gmail.com: build fix]
Signed-off-by: Adrian Bunk
Signed-off-by: Michal Piotrowski
Cc: David Woodhouse
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Sep, 2006
1 commit
-
All sound/sound_firmware.c contains is mod_firmware_load() that is a legacy
API only used by some OSS drivers.This patch builds it into an own sound_firmware module that is only built
depending on CONFIG_SOUND_PRIME making the kernel slightly smaller for ALSA
users.[alan@lxorguk.ukuu.org.uk: comment fix]
Signed-off-by: Adrian Bunk
Acked-by: Takashi Iwai
Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
27 Jun, 2006
1 commit
-
Signed-off-by: Greg Kroah-Hartman
29 Mar, 2006
1 commit
-
Mark the f_ops members of inodes as const, as well as fix the
ripple-through this causes by places that copy this f_ops and then "do
stuff" with it.Signed-off-by: Arjan van de Ven
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Oct, 2005
1 commit
-
The previous patch adding the ability to nest struct class_device
changed the paramaters to the call class_device_create(). This patch
fixes up all in-kernel users of the function.Signed-off-by: Greg Kroah-Hartman