<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/sound/pci/riptide/riptide.c, branch automarkup</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=automarkup</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=automarkup'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2019-02-06T17:11:56+00:00</updated>
<entry>
<title>ALSA: pci: Clean up with new procfs helpers</title>
<updated>2019-02-06T17:11:56+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-02-04T15:01:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=47f2769b4b2e267cba135fc19c89c32d202b1415'/>
<id>urn:sha1:47f2769b4b2e267cba135fc19c89c32d202b1415</id>
<content type='text'>
Simplify the proc fs creation code with new helper functions,
snd_card_ro_proc_new() and snd_card_rw_proc_new().
Just a code refactoring and no functional changes.

Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pci: Remove superfluous snd_pcm_suspend*() calls</title>
<updated>2019-01-15T16:47:15+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-01-11T17:02:51+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=17bc4815de586d001c82d0ddf75247283c3f002a'/>
<id>urn:sha1:17bc4815de586d001c82d0ddf75247283c3f002a</id>
<content type='text'>
The call of snd_pcm_suspend_all() &amp; co became superfluous since we
call it in the PCM PM ops.  Let's remove them.

Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: riptide: Properly endian notations</title>
<updated>2018-07-27T07:06:02+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2018-07-25T21:24:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=be05e3de3a933156d472127f659d4473c461dcc5'/>
<id>urn:sha1:be05e3de3a933156d472127f659d4473c461dcc5</id>
<content type='text'>
The SG descriptor of Riptide contains the little-endian values, hence
we need to define with __le32 properly.  This fixes sparse warnings
like:
  sound/pci/riptide/riptide.c:1112:40: warning: cast to restricted __le32

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: riptide: Fix PCM format type conversion</title>
<updated>2018-07-27T07:05:26+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2018-07-25T21:19:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=94dfee0c1a33baa974cba0bd8b83021b1d801297'/>
<id>urn:sha1:94dfee0c1a33baa974cba0bd8b83021b1d801297</id>
<content type='text'>
The PCM format type is with __bitwise, hence it needs to be explicitly
declared as snd_pcm_format_t, as warned by sparse:
  sound/pci/riptide/riptide.c:1028:34: warning: incorrect type in argument 1 (different base types)
  sound/pci/riptide/riptide.c:1028:34:    expected restricted snd_pcm_format_t [usertype] format
  sound/pci/riptide/riptide.c:1028:34:    got unsigned char [unsigned] format

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: riptide: make snd_pcm_hardware const</title>
<updated>2017-08-12T21:31:53+00:00</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2017-08-12T15:31:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=14ff46fd99077c3c15cbf38ab1795cbd0f16669e'/>
<id>urn:sha1:14ff46fd99077c3c15cbf38ab1795cbd0f16669e</id>
<content type='text'>
Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Annotate hardware config module parameters in sound/pci/</title>
<updated>2017-04-20T11:02:32+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2017-04-04T15:54:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6192c41fc608b0a58d5540b015aa1672c266f3c5'/>
<id>urn:sha1:6192c41fc608b0a58d5540b015aa1672c266f3c5</id>
<content type='text'>
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 sound/pci/.

Suggested-by: Alan Cox &lt;gnomes@lxorguk.ukuu.org.uk&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Jaroslav Kysela &lt;perex@perex.cz&gt;
cc: Takashi Iwai &lt;tiwai@suse.com&gt;
cc: alsa-devel@alsa-project.org
</content>
</entry>
<entry>
<title>ALSA: pci: don't opencode IS_REACHABLE()</title>
<updated>2016-11-13T20:33:41+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2016-11-12T22:26:41+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b2fac0730347d591b528d8f0e4a9438c1bb6f558'/>
<id>urn:sha1:b2fac0730347d591b528d8f0e4a9438c1bb6f558</id>
<content type='text'>
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pci: constify local structures</title>
<updated>2016-09-12T06:17:19+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-09-11T13:05:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=071f1344f47946dfcb511bf0fbc998dd9a83be29'/>
<id>urn:sha1:071f1344f47946dfcb511bf0fbc998dd9a83be29</id>
<content type='text'>
For structure types defined in the same file or local header files, find
top-level static structure declarations that have the following
properties:
1. Never reassigned.
2. Address never taken
3. Not passed to a top-level macro call
4. No pointer or array-typed field passed to a function or stored in a
variable.
Declare structures having all of these properties as const.

Done using Coccinelle.
Based on a suggestion by Joe Perches &lt;joe@perches.com&gt;.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: constify snd_pcm_ops structures</title>
<updated>2016-09-02T09:49:10+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-09-01T22:13:10+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6769e988b0062bf8d63d35b0fdbb47b385dd3252'/>
<id>urn:sha1:6769e988b0062bf8d63d35b0fdbb47b385dd3252</id>
<content type='text'>
Check for snd_pcm_ops structures that are only stored in the ops field of a
snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops.  The corresponding field or parameter is declared const,
so snd_pcm_ops structures that have this property can be declared as const
also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_pcm_ops i@p = { ... };

@ok1@
identifier r.i;
struct snd_soc_platform_driver e;
position p;
@@
e.ops = &amp;i@p;

@ok2@
identifier r.i;
expression e1, e2;
position p;
@@
snd_pcm_set_ops(e1, e2, &amp;i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct snd_pcm_ops i = { ... };
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: riptide: Use DIV_ROUND_UP</title>
<updated>2016-06-30T06:34:35+00:00</updated>
<author>
<name>Amitoj Kaur Chawla</name>
<email>amitoj1606@gmail.com</email>
</author>
<published>2016-06-29T14:56:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=cf7d7edc7a120fd5001f6dcc1e9f2c8e9c09e6c9'/>
<id>urn:sha1:cf7d7edc7a120fd5001f6dcc1e9f2c8e9c09e6c9</id>
<content type='text'>
The kernel.h macro DIV_ROUND_UP performs the computation
(((n) + (d) - 1) /(d)) but is perhaps more readable.

The Coccinelle script used to make this change is as follows:
@haskernel@
@@

#include &lt;linux/kernel.h&gt;

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

Signed-off-by: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Reviewed-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
