<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/speakup/kobjects.c, branch v4.10</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Staging: speakup: constify attribute_group structures</title>
<updated>2016-10-02T15:14:03+00:00</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2016-09-29T15:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c4610f6e1db2dd04119bcef80ab9dc12bff62117'/>
<id>c4610f6e1db2dd04119bcef80ab9dc12bff62117</id>
<content type='text'>
Check for attribute_group structures that are only passed as a second
argument to the functions sysfs_remove_group and sysfs_create_group. As
these arguments are constant so, attribute_group structures having this
property  can also be made constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
(
sysfs_remove_group(e1,&amp;i@p)
|
sysfs_create_group(e1,&amp;i@p)
)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
   text	   data	    bss	    dec	    hex	filename
   7551	   1440	     16	   9007	   232f
drivers/staging/speakup/kobjects.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   7671	   1312	     16	   8999	   2327
drivers/staging/speakup/kobjects.o

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Acked-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&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>
Check for attribute_group structures that are only passed as a second
argument to the functions sysfs_remove_group and sysfs_create_group. As
these arguments are constant so, attribute_group structures having this
property  can also be made constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
(
sysfs_remove_group(e1,&amp;i@p)
|
sysfs_create_group(e1,&amp;i@p)
)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
   text	   data	    bss	    dec	    hex	filename
   7551	   1440	     16	   9007	   232f
drivers/staging/speakup/kobjects.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   7671	   1312	     16	   8999	   2327
drivers/staging/speakup/kobjects.o

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Acked-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: speakup: kobjects: Add space around the operator.</title>
<updated>2016-09-22T10:01:14+00:00</updated>
<author>
<name>Sandhya Bankar</name>
<email>bankarsandhya512@gmail.com</email>
</author>
<published>2016-09-22T09:57:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a04c28d0797bb9b8743efe814672dea8e3b91c55'/>
<id>a04c28d0797bb9b8743efe814672dea8e3b91c55</id>
<content type='text'>
This issue was found by checkpatch.

Signed-off-by: Sandhya Bankar &lt;bankarsandhya512@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 issue was found by checkpatch.

Signed-off-by: Sandhya Bankar &lt;bankarsandhya512@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>speakup: Add spinlock in synth_direct_store</title>
<updated>2016-09-12T11:13:25+00:00</updated>
<author>
<name>Pavel Andrianov</name>
<email>andrianov@ispras.ru</email>
</author>
<published>2016-09-05T13:17:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=777953182ea9a750e744bd0a50fb8893cd061397'/>
<id>777953182ea9a750e744bd0a50fb8893cd061397</id>
<content type='text'>
All operations with synth buffer should be protected,
as there are global pointers, which should be modified atomically.

Found by Linux Driver Verification project (linuxtesting.org)

Signed-off-by: Pavel Andrianov &lt;andrianov@ispras.ru&gt;
Acked-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Reviewed-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&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>
All operations with synth buffer should be protected,
as there are global pointers, which should be modified atomically.

Found by Linux Driver Verification project (linuxtesting.org)

Signed-off-by: Pavel Andrianov &lt;andrianov@ispras.ru&gt;
Acked-by: Vaishali Thakkar &lt;vaishali.thakkar@oracle.com&gt;
Reviewed-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: speakup: Add space around '|'</title>
<updated>2016-03-05T22:48:04+00:00</updated>
<author>
<name>Dilek Uzulmez</name>
<email>dilekuzulmez@gmail.com</email>
</author>
<published>2016-02-22T19:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e81e31fb8258cad1f0fc328a72e4e55057537433'/>
<id>e81e31fb8258cad1f0fc328a72e4e55057537433</id>
<content type='text'>
Add space around operator '|'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Dilek Uzulmez &lt;dilekuzulmez@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 space around operator '|'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Dilek Uzulmez &lt;dilekuzulmez@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: speakup: kobjects.c: Remove explicit NULL comparison</title>
<updated>2015-09-13T01:25:00+00:00</updated>
<author>
<name>Shraddha Barke</name>
<email>shraddha.6596@gmail.com</email>
</author>
<published>2015-09-11T06:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a90624cf253cc74e9464b42d54aa4825575edefe'/>
<id>a90624cf253cc74e9464b42d54aa4825575edefe</id>
<content type='text'>
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke &lt;shraddha.6596@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>
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke &lt;shraddha.6596@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: Fix warning reported by checkpatch</title>
<updated>2015-08-15T00:38:16+00:00</updated>
<author>
<name>Aleksei Fedotov</name>
<email>lexa@cfotr.com</email>
</author>
<published>2015-08-14T19:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=13d825edd4441dd3453de58d1bd2ade44d5ad2ab'/>
<id>13d825edd4441dd3453de58d1bd2ade44d5ad2ab</id>
<content type='text'>
This patch fixes the checkpatch.pl warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines

Signed-off-by: Aleksey Fedotov &lt;lexa@cfotr.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 fixes the checkpatch.pl warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines

Signed-off-by: Aleksey Fedotov &lt;lexa@cfotr.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: speakup: Remove unused variable</title>
<updated>2015-03-09T12:30:40+00:00</updated>
<author>
<name>Haneen Mohammed</name>
<email>hamohammed.sa@gmail.com</email>
</author>
<published>2015-03-07T21:03:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f7d63547ea7fe7e4a666aa97e095855e5064b70e'/>
<id>f7d63547ea7fe7e4a666aa97e095855e5064b70e</id>
<content type='text'>
This patch removes variable that was used to store only the return value of a function call.

The issue was detected and resolved using the following coccinelle script:

@@
expression ret;
identifier f;
@@

 -ret =
 +return
    f(...);
 -return ret;

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 removes variable that was used to store only the return value of a function call.

The issue was detected and resolved using the following coccinelle script:

@@
expression ret;
identifier f;
@@

 -ret =
 +return
    f(...);
 -return ret;

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: speakup: Combine the consecutive string</title>
<updated>2015-01-18T00:14:16+00:00</updated>
<author>
<name>Panir.Nyan</name>
<email>panir.nyan@gmail.com</email>
</author>
<published>2014-12-24T04:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=25c048680b53c689ec918b3adfcfe62e1f03d4f0'/>
<id>25c048680b53c689ec918b3adfcfe62e1f03d4f0</id>
<content type='text'>
Combine the consecutive string

Signed-off-by: Panir Nyan &lt;Panir.Nyan@gmail.com&gt;
Acked-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&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>
Combine the consecutive string

Signed-off-by: Panir Nyan &lt;Panir.Nyan@gmail.com&gt;
Acked-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: Change char * array type as static const</title>
<updated>2014-10-20T02:29:12+00:00</updated>
<author>
<name>Ebru Akagunduz</name>
<email>ebru.akagunduz@gmail.com</email>
</author>
<published>2014-10-04T10:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=333c474b828e52bce8731e97fef27c2e950b5728'/>
<id>333c474b828e52bce8731e97fef27c2e950b5728</id>
<content type='text'>
This patch fixes "char * array declaration might be better as static const"
checkpatch.pl warning in kobjects.c

Signed-off-by: Ebru Akagunduz &lt;ebru.akagunduz@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 fixes "char * array declaration might be better as static const"
checkpatch.pl warning in kobjects.c

Signed-off-by: Ebru Akagunduz &lt;ebru.akagunduz@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: Fixed else after return or break warning</title>
<updated>2014-10-20T02:29:12+00:00</updated>
<author>
<name>Yeliz Taneroglu</name>
<email>yeliztaneroglu@gmail.com</email>
</author>
<published>2014-10-03T11:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1f74d5f688faea24107de37893b7fd5a0e56ac49'/>
<id>1f74d5f688faea24107de37893b7fd5a0e56ac49</id>
<content type='text'>
The following patch fixes the checkpatch.pl warning:

drivers/staging/speakup/kobjects.c:812 warning: else is not generally useful after a break or return

Signed-off-by: Yeliz Taneroglu &lt;yeliztaneroglu@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>
The following patch fixes the checkpatch.pl warning:

drivers/staging/speakup/kobjects.c:812 warning: else is not generally useful after a break or return

Signed-off-by: Yeliz Taneroglu &lt;yeliztaneroglu@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
