<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/drivers/nfc/st21nfca, branch master</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2019-11-07T05:48:29+00:00</updated>
<entry>
<title>NFC: st21nfca: fix double free</title>
<updated>2019-11-07T05:48:29+00:00</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2019-11-07T01:33:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=99a8efbb6e30b72ac98cecf81103f847abffb1e5'/>
<id>urn:sha1:99a8efbb6e30b72ac98cecf81103f847abffb1e5</id>
<content type='text'>
The variable nfcid_skb is not changed in the callee nfc_hci_get_param()
if error occurs. Consequently, the freed variable nfcid_skb will be
freed again, resulting in a double free bug. Set nfcid_skb to NULL after
releasing it to fix the bug.

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>st21nfca_connectivity_event_received: null check the allocation</title>
<updated>2019-07-25T18:47:10+00:00</updated>
<author>
<name>Navid Emamdoost</name>
<email>navid.emamdoost@gmail.com</email>
</author>
<published>2019-07-23T22:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=9891d06836e67324c9e9c4675ed90fc8b8110034'/>
<id>urn:sha1:9891d06836e67324c9e9c4675ed90fc8b8110034</id>
<content type='text'>
devm_kzalloc may fail and return null. So the null check is needed.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 399</title>
<updated>2019-06-05T15:37:12+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-31T08:09:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=46fe7771647f220451ae20c001072e7a7de36f1a'/>
<id>urn:sha1:46fe7771647f220451ae20c001072e7a7de36f1a</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms and conditions of the gnu general public license
  version 2 as published by the free software foundation this program
  is distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not see http www gnu org
  licenses

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 33 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531081038.745679586@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier - Makefile/Kconfig</title>
<updated>2019-05-21T08:50:46+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1'/>
<id>urn:sha1:ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1</id>
<content type='text'>
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 &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>NFC: st21nfca: Fix fall-through warnings</title>
<updated>2019-04-09T17:08:27+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-02-12T17:35:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a01bcfd6990d18d97f88c01d3082e562a562cc4d'/>
<id>urn:sha1:a01bcfd6990d18d97f88c01d3082e562a562cc4d</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings by adding a missing break
and a fall-through annotation:

drivers/nfc/st21nfca/dep.c: In function ‘st21nfca_tm_event_send_data’:
drivers/nfc/st21nfca/dep.c:391:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   switch (cmd1) {
   ^~~~~~
drivers/nfc/st21nfca/dep.c:404:2: note: here
  default:
  ^~~~~~~
In file included from ./include/linux/kernel.h:15,
                 from ./include/linux/skbuff.h:17,
                 from ./include/net/nfc/hci.h:21,
                 from drivers/nfc/st21nfca/dep.c:17:
drivers/nfc/st21nfca/dep.c: In function ‘st21nfca_im_recv_dep_res_cb’:
./include/linux/printk.h:303:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nfc/st21nfca/dep.c:622:4: note: in expansion of macro ‘pr_err’
    pr_err("Received a ACK/NACK PDU\n");
    ^~~~~~
drivers/nfc/st21nfca/dep.c:623:3: note: here
   case ST21NFCA_NFC_DEP_PFB_I_PDU:
   ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
</content>
</entry>
<entry>
<title>treewide: setup_timer() -&gt; timer_setup() (2 field)</title>
<updated>2017-11-21T23:57:09+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-10-18T03:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=86cb30ec07cdc78ad94d94bb3756c7c2d46968b9'/>
<id>urn:sha1:86cb30ec07cdc78ad94d94bb3756c7c2d46968b9</id>
<content type='text'>
This converts all remaining setup_timer() calls that use a nested field
to reach a struct timer_list. Coccinelle does not have an easy way to
match multiple fields, so a new script is needed to change the matches of
"&amp;_E-&gt;_timer" into "&amp;_E-&gt;_field1._timer" in all the rules.

spatch --very-quiet --all-includes --include-headers \
	-I ./arch/x86/include -I ./arch/x86/include/generated \
	-I ./include -I ./arch/x86/include/uapi \
	-I ./arch/x86/include/generated/uapi -I ./include/uapi \
	-I ./include/generated/uapi --include ./include/linux/kconfig.h \
	--dir . \
	--cocci-file ~/src/data/timer_setup-2fields.cocci

@fix_address_of depends@
expression e;
@@

 setup_timer(
-&amp;(e)
+&amp;e
 , ...)

// Update any raw setup_timer() usages that have a NULL callback, but
// would otherwise match change_timer_function_usage, since the latter
// will update all function assignments done in the face of a NULL
// function initialization in setup_timer().
@change_timer_function_usage_NULL@
expression _E;
identifier _field1;
identifier _timer;
type _cast_data;
@@

(
-setup_timer(&amp;_E-&gt;_field1._timer, NULL, _E);
+timer_setup(&amp;_E-&gt;_field1._timer, NULL, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, NULL, (_cast_data)_E);
+timer_setup(&amp;_E-&gt;_field1._timer, NULL, 0);
|
-setup_timer(&amp;_E._field1._timer, NULL, &amp;_E);
+timer_setup(&amp;_E._field1._timer, NULL, 0);
|
-setup_timer(&amp;_E._field1._timer, NULL, (_cast_data)&amp;_E);
+timer_setup(&amp;_E._field1._timer, NULL, 0);
)

@change_timer_function_usage@
expression _E;
identifier _field1;
identifier _timer;
struct timer_list _stl;
identifier _callback;
type _cast_func, _cast_data;
@@

(
-setup_timer(&amp;_E-&gt;_field1._timer, _callback, _E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, &amp;_callback, _E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, _callback, (_cast_data)_E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, &amp;_callback, (_cast_data)_E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, (_cast_func)_callback, _E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, (_cast_func)&amp;_callback, _E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, (_cast_func)_callback, (_cast_data)_E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, (_cast_func)&amp;_callback, (_cast_data)_E);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, _callback, (_cast_data)_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, _callback, (_cast_data)&amp;_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, &amp;_callback, (_cast_data)_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, &amp;_callback, (_cast_data)&amp;_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, (_cast_func)_callback, (_cast_data)_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, (_cast_func)_callback, (_cast_data)&amp;_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, (_cast_func)&amp;_callback, (_cast_data)_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, (_cast_func)&amp;_callback, (_cast_data)&amp;_E);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
 _E-&gt;_field1._timer@_stl.function = _callback;
|
 _E-&gt;_field1._timer@_stl.function = &amp;_callback;
|
 _E-&gt;_field1._timer@_stl.function = (_cast_func)_callback;
|
 _E-&gt;_field1._timer@_stl.function = (_cast_func)&amp;_callback;
|
 _E._field1._timer@_stl.function = _callback;
|
 _E._field1._timer@_stl.function = &amp;_callback;
|
 _E._field1._timer@_stl.function = (_cast_func)_callback;
|
 _E._field1._timer@_stl.function = (_cast_func)&amp;_callback;
)

// callback(unsigned long arg)
@change_callback_handle_cast
 depends on change_timer_function_usage@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._field1;
identifier change_timer_function_usage._timer;
type _origtype;
identifier _origarg;
type _handletype;
identifier _handle;
@@

 void _callback(
-_origtype _origarg
+struct timer_list *t
 )
 {
(
	... when != _origarg
	_handletype *_handle =
-(_handletype *)_origarg;
+from_timer(_handle, t, _field1._timer);
	... when != _origarg
|
	... when != _origarg
	_handletype *_handle =
-(void *)_origarg;
+from_timer(_handle, t, _field1._timer);
	... when != _origarg
|
	... when != _origarg
	_handletype *_handle;
	... when != _handle
	_handle =
-(_handletype *)_origarg;
+from_timer(_handle, t, _field1._timer);
	... when != _origarg
|
	... when != _origarg
	_handletype *_handle;
	... when != _handle
	_handle =
-(void *)_origarg;
+from_timer(_handle, t, _field1._timer);
	... when != _origarg
)
 }

// callback(unsigned long arg) without existing variable
@change_callback_handle_cast_no_arg
 depends on change_timer_function_usage &amp;&amp;
                     !change_callback_handle_cast@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._field1;
identifier change_timer_function_usage._timer;
type _origtype;
identifier _origarg;
type _handletype;
@@

 void _callback(
-_origtype _origarg
+struct timer_list *t
 )
 {
+	_handletype *_origarg = from_timer(_origarg, t, _field1._timer);
+
	... when != _origarg
-	(_handletype *)_origarg
+	_origarg
	... when != _origarg
 }

// Avoid already converted callbacks.
@match_callback_converted
 depends on change_timer_function_usage &amp;&amp;
            !change_callback_handle_cast &amp;&amp;
	    !change_callback_handle_cast_no_arg@
identifier change_timer_function_usage._callback;
identifier t;
@@

 void _callback(struct timer_list *t)
 { ... }

// callback(struct something *handle)
@change_callback_handle_arg
 depends on change_timer_function_usage &amp;&amp;
	    !match_callback_converted &amp;&amp;
            !change_callback_handle_cast &amp;&amp;
            !change_callback_handle_cast_no_arg@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._field1;
identifier change_timer_function_usage._timer;
type _handletype;
identifier _handle;
@@

 void _callback(
-_handletype *_handle
+struct timer_list *t
 )
 {
+	_handletype *_handle = from_timer(_handle, t, _field1._timer);
	...
 }

// If change_callback_handle_arg ran on an empty function, remove
// the added handler.
@unchange_callback_handle_arg
 depends on change_timer_function_usage &amp;&amp;
	    change_callback_handle_arg@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._field1;
identifier change_timer_function_usage._timer;
type _handletype;
identifier _handle;
identifier t;
@@

 void _callback(struct timer_list *t)
 {
-	_handletype *_handle = from_timer(_handle, t, _field1._timer);
 }

// We only want to refactor the setup_timer() data argument if we've found
// the matching callback. This undoes changes in change_timer_function_usage.
@unchange_timer_function_usage
 depends on change_timer_function_usage &amp;&amp;
            !change_callback_handle_cast &amp;&amp;
            !change_callback_handle_cast_no_arg &amp;&amp;
	    !change_callback_handle_arg@
expression change_timer_function_usage._E;
identifier change_timer_function_usage._field1;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type change_timer_function_usage._cast_data;
@@

(
-timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
+setup_timer(&amp;_E-&gt;_field1._timer, _callback, (_cast_data)_E);
|
-timer_setup(&amp;_E._field1._timer, _callback, 0);
+setup_timer(&amp;_E._field1._timer, _callback, (_cast_data)&amp;_E);
)

// If we fixed a callback from a .function assignment, fix the
// assignment cast now.
@change_timer_function_assignment
 depends on change_timer_function_usage &amp;&amp;
            (change_callback_handle_cast ||
             change_callback_handle_cast_no_arg ||
             change_callback_handle_arg)@
expression change_timer_function_usage._E;
identifier change_timer_function_usage._field1;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type _cast_func;
typedef TIMER_FUNC_TYPE;
@@

(
 _E-&gt;_field1._timer.function =
-_callback
+(TIMER_FUNC_TYPE)_callback
 ;
|
 _E-&gt;_field1._timer.function =
-&amp;_callback
+(TIMER_FUNC_TYPE)_callback
 ;
|
 _E-&gt;_field1._timer.function =
-(_cast_func)_callback;
+(TIMER_FUNC_TYPE)_callback
 ;
|
 _E-&gt;_field1._timer.function =
-(_cast_func)&amp;_callback
+(TIMER_FUNC_TYPE)_callback
 ;
|
 _E._field1._timer.function =
-_callback
+(TIMER_FUNC_TYPE)_callback
 ;
|
 _E._field1._timer.function =
-&amp;_callback;
+(TIMER_FUNC_TYPE)_callback
 ;
|
 _E._field1._timer.function =
-(_cast_func)_callback
+(TIMER_FUNC_TYPE)_callback
 ;
|
 _E._field1._timer.function =
-(_cast_func)&amp;_callback
+(TIMER_FUNC_TYPE)_callback
 ;
)

// Sometimes timer functions are called directly. Replace matched args.
@change_timer_function_calls
 depends on change_timer_function_usage &amp;&amp;
            (change_callback_handle_cast ||
             change_callback_handle_cast_no_arg ||
             change_callback_handle_arg)@
expression _E;
identifier change_timer_function_usage._field1;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type _cast_data;
@@

 _callback(
(
-(_cast_data)_E
+&amp;_E-&gt;_field1._timer
|
-(_cast_data)&amp;_E
+&amp;_E._field1._timer
|
-_E
+&amp;_E-&gt;_field1._timer
)
 )

// If a timer has been configured without a data argument, it can be
// converted without regard to the callback argument, since it is unused.
@match_timer_function_unused_data@
expression _E;
identifier _field1;
identifier _timer;
identifier _callback;
@@

(
-setup_timer(&amp;_E-&gt;_field1._timer, _callback, 0);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, _callback, 0L);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E-&gt;_field1._timer, _callback, 0UL);
+timer_setup(&amp;_E-&gt;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, _callback, 0);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, _callback, 0L);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_E._field1._timer, _callback, 0UL);
+timer_setup(&amp;_E._field1._timer, _callback, 0);
|
-setup_timer(&amp;_field1._timer, _callback, 0);
+timer_setup(&amp;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_field1._timer, _callback, 0L);
+timer_setup(&amp;_field1._timer, _callback, 0);
|
-setup_timer(&amp;_field1._timer, _callback, 0UL);
+timer_setup(&amp;_field1._timer, _callback, 0);
|
-setup_timer(_field1._timer, _callback, 0);
+timer_setup(_field1._timer, _callback, 0);
|
-setup_timer(_field1._timer, _callback, 0L);
+timer_setup(_field1._timer, _callback, 0);
|
-setup_timer(_field1._timer, _callback, 0UL);
+timer_setup(_field1._timer, _callback, 0);
)

@change_callback_unused_data
 depends on match_timer_function_unused_data@
identifier match_timer_function_unused_data._callback;
type _origtype;
identifier _origarg;
@@

 void _callback(
-_origtype _origarg
+struct timer_list *unused
 )
 {
	... when != _origarg
 }

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>treewide: init_timer() -&gt; setup_timer()</title>
<updated>2017-11-21T23:57:06+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-10-16T20:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=b9eaf18722221ef8b2bd6a67240ebe668622152a'/>
<id>urn:sha1:b9eaf18722221ef8b2bd6a67240ebe668622152a</id>
<content type='text'>
This mechanically converts all remaining cases of ancient open-coded timer
setup with the old setup_timer() API, which is the first step in timer
conversions. This has no behavioral changes, since it ultimately just
changes the order of assignment to fields of struct timer_list when
finding variations of:

    init_timer(&amp;t);
    f.function = timer_callback;
    t.data = timer_callback_arg;

to be converted into:

    setup_timer(&amp;t, timer_callback, timer_callback_arg);

The conversion is done with the following Coccinelle script, which
is an improved version of scripts/cocci/api/setup_timer.cocci, in the
following ways:
 - assignments-before-init_timer() cases
 - limit the .data case removal to the specific struct timer_list instance
 - handling calls by dereference (timer-&gt;field vs timer.field)

spatch --very-quiet --all-includes --include-headers \
	-I ./arch/x86/include -I ./arch/x86/include/generated \
	-I ./include -I ./arch/x86/include/uapi \
	-I ./arch/x86/include/generated/uapi -I ./include/uapi \
	-I ./include/generated/uapi --include ./include/linux/kconfig.h \
	--dir . \
	--cocci-file ~/src/data/setup_timer.cocci

@fix_address_of@
expression e;
@@

 init_timer(
-&amp;(e)
+&amp;e
 , ...)

// Match the common cases first to avoid Coccinelle parsing loops with
// "... when" clauses.

@match_immediate_function_data_after_init_timer@
expression e, func, da;
@@

-init_timer
+setup_timer
 ( \(&amp;e\|e\)
+, func, da
 );
(
-\(e.function\|e-&gt;function\) = func;
-\(e.data\|e-&gt;data\) = da;
|
-\(e.data\|e-&gt;data\) = da;
-\(e.function\|e-&gt;function\) = func;
)

@match_immediate_function_data_before_init_timer@
expression e, func, da;
@@

(
-\(e.function\|e-&gt;function\) = func;
-\(e.data\|e-&gt;data\) = da;
|
-\(e.data\|e-&gt;data\) = da;
-\(e.function\|e-&gt;function\) = func;
)
-init_timer
+setup_timer
 ( \(&amp;e\|e\)
+, func, da
 );

@match_function_and_data_after_init_timer@
expression e, e2, e3, e4, e5, func, da;
@@

-init_timer
+setup_timer
 ( \(&amp;e\|e\)
+, func, da
 );
 ... when != func = e2
     when != da = e3
(
-e.function = func;
... when != da = e4
-e.data = da;
|
-e-&gt;function = func;
... when != da = e4
-e-&gt;data = da;
|
-e.data = da;
... when != func = e5
-e.function = func;
|
-e-&gt;data = da;
... when != func = e5
-e-&gt;function = func;
)

@match_function_and_data_before_init_timer@
expression e, e2, e3, e4, e5, func, da;
@@
(
-e.function = func;
... when != da = e4
-e.data = da;
|
-e-&gt;function = func;
... when != da = e4
-e-&gt;data = da;
|
-e.data = da;
... when != func = e5
-e.function = func;
|
-e-&gt;data = da;
... when != func = e5
-e-&gt;function = func;
)
... when != func = e2
    when != da = e3
-init_timer
+setup_timer
 ( \(&amp;e\|e\)
+, func, da
 );

@r1 exists@
expression t;
identifier f;
position p;
@@

f(...) { ... when any
  init_timer@p(\(&amp;t\|t\))
  ... when any
}

@r2 exists@
expression r1.t;
identifier g != r1.f;
expression e8;
@@

g(...) { ... when any
  \(t.data\|t-&gt;data\) = e8
  ... when any
}

// It is dangerous to use setup_timer if data field is initialized
// in another function.
@script:python depends on r2@
p &lt;&lt; r1.p;
@@

cocci.include_match(False)

@r3@
expression r1.t, func, e7;
position r1.p;
@@

(
-init_timer@p(&amp;t);
+setup_timer(&amp;t, func, 0UL);
... when != func = e7
-t.function = func;
|
-t.function = func;
... when != func = e7
-init_timer@p(&amp;t);
+setup_timer(&amp;t, func, 0UL);
|
-init_timer@p(t);
+setup_timer(t, func, 0UL);
... when != func = e7
-t-&gt;function = func;
|
-t-&gt;function = func;
... when != func = e7
-init_timer@p(t);
+setup_timer(t, func, 0UL);
)

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>nfc: st21nfca: constify i2c_device_id</title>
<updated>2017-11-05T23:56:56+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-08-21T17:04:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a122ffd0911d563f4b5e95120259ec5d2e8e3c4f'/>
<id>urn:sha1:a122ffd0911d563f4b5e95120259ec5d2e8e3c4f</id>
<content type='text'>
i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by &lt;linux/i2c.h&gt; work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: st21nfca: Get rid of code duplication in -&gt;probe()</title>
<updated>2017-06-22T21:51:44+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-06-19T10:08:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=d31748be2ba37b29bc051f1b5ce2f30294db2cc1'/>
<id>urn:sha1:d31748be2ba37b29bc051f1b5ce2f30294db2cc1</id>
<content type='text'>
Since OF and ACPI case almost the same get rid of code duplication
by moving gpiod_get() calls directly to -&gt;probe().

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: st21nfca: Add GPIO ACPI mapping table</title>
<updated>2017-06-22T21:51:44+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2017-06-19T10:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=394671e79ee6e9e23ddd673ba5bbae5887f97182'/>
<id>urn:sha1:394671e79ee6e9e23ddd673ba5bbae5887f97182</id>
<content type='text'>
In order to make GPIO ACPI library stricter prepare users of
gpiod_get_index() to correctly behave when there no mapping is
provided by firmware.

Here we add explicit mapping between _CRS GpioIo() resources and
their names used in the driver.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
</feed>
