<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/ft1000, branch v4.1</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: ft1000: Drop unneeded cast on netdev_priv</title>
<updated>2015-04-03T12:00:14+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2015-03-29T12:54:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a4820acfaf179982a86783ee0c0d5d39a9c5ab20'/>
<id>a4820acfaf179982a86783ee0c0d5d39a9c5ab20</id>
<content type='text'>
The result of netdev_priv is already implicitly cast to the type of the
left side of the assignment.

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

// &lt;smpl&gt;
@@
type T;
T *x;
@@

x =
- (T *)
  netdev_priv(...)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The result of netdev_priv is already implicitly cast to the type of the
left side of the assignment.

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

// &lt;smpl&gt;
@@
type T;
T *x;
@@

x =
- (T *)
  netdev_priv(...)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ft1000-pcmcia: ft1000_hw.c: code refactoring: add ft1000_read_dsp_timer()</title>
<updated>2015-03-26T10:07:41+00:00</updated>
<author>
<name>Daniele Alessandrelli</name>
<email>daniele.alessandrelli@gmail.com</email>
</author>
<published>2015-03-16T22:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=de5160ffd279dc6e7fa070a4a3852c6c5be42f9c'/>
<id>de5160ffd279dc6e7fa070a4a3852c6c5be42f9c</id>
<content type='text'>
Add new function ft1000_read_dsp_timer() replacing recurring code block for
reading DSP timer. Such code refactoring solves all remaining "line over 80
characters" warnings reported by checkpatch.pl.

Signed-off-by: Daniele Alessandrelli &lt;daniele.alessandrelli@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new function ft1000_read_dsp_timer() replacing recurring code block for
reading DSP timer. Such code refactoring solves all remaining "line over 80
characters" warnings reported by checkpatch.pl.

Signed-off-by: Daniele Alessandrelli &lt;daniele.alessandrelli@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ft1000-pcmcia: ft1000_hw.c: fix style issues not requiring code refactoring</title>
<updated>2015-03-26T10:07:41+00:00</updated>
<author>
<name>Daniele Alessandrelli</name>
<email>daniele.alessandrelli@gmail.com</email>
</author>
<published>2015-03-16T22:53:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=21a1d41174a16c1bba8b43eb607ac031f31533ae'/>
<id>21a1d41174a16c1bba8b43eb607ac031f31533ae</id>
<content type='text'>
Fix all the trivial style issues (as reported by checkpatch.pl) not requiring
code refactoring. A following patch is expected to fix the remaining issues by
performing some code refactoring.

Signed-off-by: Daniele Alessandrelli &lt;daniele.alessandrelli@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix all the trivial style issues (as reported by checkpatch.pl) not requiring
code refactoring. A following patch is expected to fix the remaining issues by
performing some code refactoring.

Signed-off-by: Daniele Alessandrelli &lt;daniele.alessandrelli@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: ft1000: replace pr_err with dev_err</title>
<updated>2015-03-18T10:16:36+00:00</updated>
<author>
<name>Haneen Mohammed</name>
<email>hamohammed.sa@gmail.com</email>
</author>
<published>2015-03-17T05:37:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=41f06c619a302fa386e4d784c8ceed250d4c3754'/>
<id>41f06c619a302fa386e4d784c8ceed250d4c3754</id>
<content type='text'>
This patch replace pr_err with dev_err, when appropriate device
structure is found.

Issue found using the following Coccinelle script:

@r exists@
identifier f, s, i;
position p;
@@

f(...,struct s *i,...) {
&lt;+...
when != i == NULL
pr_err@p(...);
...+&gt;
}

@rr@
identifier r.s, fld;
@@

struct s {
	...
	struct device *fld;
	...
};

@@
identifier r.i, rr.fld;
position r.p;
@@
-pr_err@p
+dev_err
   (
+ i-&gt;fld,
...)

Signed-off-by: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replace pr_err with dev_err, when appropriate device
structure is found.

Issue found using the following Coccinelle script:

@r exists@
identifier f, s, i;
position p;
@@

f(...,struct s *i,...) {
&lt;+...
when != i == NULL
pr_err@p(...);
...+&gt;
}

@rr@
identifier r.s, fld;
@@

struct s {
	...
	struct device *fld;
	...
};

@@
identifier r.i, rr.fld;
position r.p;
@@
-pr_err@p
+dev_err
   (
+ i-&gt;fld,
...)

Signed-off-by: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: ft1000: Remove parentheses around right side an assignment</title>
<updated>2015-03-16T15:24:19+00:00</updated>
<author>
<name>Haneen Mohammed</name>
<email>hamohammed.sa@gmail.com</email>
</author>
<published>2015-03-13T17:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=964308a6b40bcea5f8a3c3af678c0a87a9b94907'/>
<id>964308a6b40bcea5f8a3c3af678c0a87a9b94907</id>
<content type='text'>
Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed &lt;hamohammed.sa@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: ft1000: Iterate list using list_for_each_entry</title>
<updated>2015-03-16T15:22:16+00:00</updated>
<author>
<name>Somya Anand</name>
<email>somyaanand214@gmail.com</email>
</author>
<published>2015-03-13T19:33:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d19cb862948a2de32068b6775a4e0a14fa4d8ec9'/>
<id>d19cb862948a2de32068b6775a4e0a14fa4d8ec9</id>
<content type='text'>
Code using doubly linked list is iterated generally  using list_empty and
list_entry functions, but it can be better written using list_for_each_entry
macro.

This patch replaces the while loop containing list_empty and list_entry with
list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a
macro which is used to iterate over a list of given type. So while loop used to
iterate over a list can be replaced with list_for_each_entry macro. However, if
list_del is used in the loop, then list_for_each_entry_safe is a better choice.
This transformation is done by using the following coccinelle script.

@ rule1 @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry;
@@

- while (list_empty(&amp;E1) == 0)
+ list_for_each_entry (I1, &amp;E1, I2)
 {
	...when != T *I1;
- 	I1 = list_entry(E1.next, T, I2);
    ...when != list_del(...);
       when != list_del_init(...);
 }

@ rule2  @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry_safe;
@@
   T *I1;
+  T *tmp;
  ...
- while (list_empty(&amp;E1) == 0)
+ list_for_each_entry_safe (I1, tmp, &amp;E1, I2)
 {
	...when != T *I1;
- 	I1 = list_entry(E1.next, T, I2);
    ...
 }

Signed-off-by: Somya Anand &lt;somyaanand214@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Code using doubly linked list is iterated generally  using list_empty and
list_entry functions, but it can be better written using list_for_each_entry
macro.

This patch replaces the while loop containing list_empty and list_entry with
list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a
macro which is used to iterate over a list of given type. So while loop used to
iterate over a list can be replaced with list_for_each_entry macro. However, if
list_del is used in the loop, then list_for_each_entry_safe is a better choice.
This transformation is done by using the following coccinelle script.

@ rule1 @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry;
@@

- while (list_empty(&amp;E1) == 0)
+ list_for_each_entry (I1, &amp;E1, I2)
 {
	...when != T *I1;
- 	I1 = list_entry(E1.next, T, I2);
    ...when != list_del(...);
       when != list_del_init(...);
 }

@ rule2  @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry_safe;
@@
   T *I1;
+  T *tmp;
  ...
- while (list_empty(&amp;E1) == 0)
+ list_for_each_entry_safe (I1, tmp, &amp;E1, I2)
 {
	...when != T *I1;
- 	I1 = list_entry(E1.next, T, I2);
    ...
 }

Signed-off-by: Somya Anand &lt;somyaanand214@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: ft1000: Use module_pcmcia_driver</title>
<updated>2015-03-16T15:17:31+00:00</updated>
<author>
<name>Vaishali Thakkar</name>
<email>vthakkar1994@gmail.com</email>
</author>
<published>2015-03-12T11:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5cc8c56841f28a08c93a63d166530eef82f11073'/>
<id>5cc8c56841f28a08c93a63d166530eef82f11073</id>
<content type='text'>
Macro module_pcmcia_driver is used for drivers whose init
and exit paths does only register and unregister to pcmcia
API. So, here remove some boilerplate code by using
module_pcmcia_driver.

Signed-off-by: Vaishali Thakkar &lt;vthakkar1994@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Macro module_pcmcia_driver is used for drivers whose init
and exit paths does only register and unregister to pcmcia
API. So, here remove some boilerplate code by using
module_pcmcia_driver.

Signed-off-by: Vaishali Thakkar &lt;vthakkar1994@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: ft1000: ft1000-usb: ft1000_hw.c: adjust function arguments</title>
<updated>2015-03-15T17:41:12+00:00</updated>
<author>
<name>Aya Mahfouz</name>
<email>mahfouz.saif.elyazal@gmail.com</email>
</author>
<published>2015-03-10T17:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2f4a748f59924118129306d0e89af7a35b77365e'/>
<id>2f4a748f59924118129306d0e89af7a35b77365e</id>
<content type='text'>
Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer casts.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&amp;
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, there were some
cases that were handled manually. In addition, handling pointer casts
were done manually too because not all replacements generated by the
script were suitable. When pointer casts on function arguments were
in the form:
    &lt;func&gt;(...,(&lt;type&gt; *)&amp;&lt;expression&gt;,...)

the replacements were discarded due to compilation warnings.

Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer casts.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&amp;
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, there were some
cases that were handled manually. In addition, handling pointer casts
were done manually too because not all replacements generated by the
script were suitable. When pointer casts on function arguments were
in the form:
    &lt;func&gt;(...,(&lt;type&gt; *)&amp;&lt;expression&gt;,...)

the replacements were discarded due to compilation warnings.

Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: ft1000: ft1000-usb: ft1000_download.c: adjust function arguments</title>
<updated>2015-03-15T17:41:12+00:00</updated>
<author>
<name>Aya Mahfouz</name>
<email>mahfouz.saif.elyazal@gmail.com</email>
</author>
<published>2015-03-10T17:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6e2fef9d3260e169c17fc5eea842ff4c64c23e5c'/>
<id>6e2fef9d3260e169c17fc5eea842ff4c64c23e5c</id>
<content type='text'>
Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer cast.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&amp;
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
    &lt;func&gt;(...,(&lt;type&gt; *)&amp;&lt;expression&gt;,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer cast.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&amp;
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
    &lt;func&gt;(...,(&lt;type&gt; *)&amp;&lt;expression&gt;,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: ft1000: ft1000-usb: adjust function arguments</title>
<updated>2015-03-15T17:41:12+00:00</updated>
<author>
<name>Aya Mahfouz</name>
<email>mahfouz.saif.elyazal@gmail.com</email>
</author>
<published>2015-03-10T17:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cb53b00de93d4a165b31781e9d4598415e3c07a4'/>
<id>cb53b00de93d4a165b31781e9d4598415e3c07a4</id>
<content type='text'>
Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer cast.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&amp;
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
    &lt;func&gt;(...,(&lt;type&gt; *)&amp;&lt;expression&gt;,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer cast.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&amp;
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
    &lt;func&gt;(...,(&lt;type&gt; *)&amp;&lt;expression&gt;,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
