<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/speakup/kobjects.c, branch v4.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: speakup: Replace strncpy with memcpy</title>
<updated>2018-07-02T08:39:06+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2018-07-01T20:57:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fd29edc7232bc19f969e8f463138afc5472b3d5f'/>
<id>fd29edc7232bc19f969e8f463138afc5472b3d5f</id>
<content type='text'>
gcc 8.1.0 generates the following warnings.

drivers/staging/speakup/kobjects.c: In function 'punc_store':
drivers/staging/speakup/kobjects.c:522:2: warning:
	'strncpy' output truncated before terminating nul
	copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:504:6: note: length computed here

drivers/staging/speakup/kobjects.c: In function 'synth_store':
drivers/staging/speakup/kobjects.c:391:2: warning:
	'strncpy' output truncated before terminating nul
	copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:388:8: note: length computed here

Using strncpy() is indeed less than perfect since the length of data to
be copied has already been determined with strlen(). Replace strncpy()
with memcpy() to address the warning and optimize the code a little.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&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>
gcc 8.1.0 generates the following warnings.

drivers/staging/speakup/kobjects.c: In function 'punc_store':
drivers/staging/speakup/kobjects.c:522:2: warning:
	'strncpy' output truncated before terminating nul
	copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:504:6: note: length computed here

drivers/staging/speakup/kobjects.c: In function 'synth_store':
drivers/staging/speakup/kobjects.c:391:2: warning:
	'strncpy' output truncated before terminating nul
	copying as many bytes from a string as its length
drivers/staging/speakup/kobjects.c:388:8: note: length computed here

Using strncpy() is indeed less than perfect since the length of data to
be copied has already been determined with strlen(). Replace strncpy()
with memcpy() to address the warning and optimize the code a little.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&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 SPDX identifier.</title>
<updated>2018-01-15T15:03:44+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-11T10:08:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6496922817e1a1cba8a2d9939ca5de53c5d55239'/>
<id>6496922817e1a1cba8a2d9939ca5de53c5d55239</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the remaining staging speakup files to have a proper SPDX
identifier, based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Cc: William Hubbs &lt;w.d.hubbs@gmail.com&gt;
Cc: Chris Brannon &lt;chris@the-brannons.com&gt;
Cc: Kirk Reiser &lt;kirk@reisers.ca&gt;
Cc: 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>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the remaining staging speakup files to have a proper SPDX
identifier, based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Cc: William Hubbs &lt;w.d.hubbs@gmail.com&gt;
Cc: Chris Brannon &lt;chris@the-brannons.com&gt;
Cc: Kirk Reiser &lt;kirk@reisers.ca&gt;
Cc: 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: Removed Unnecessary parentheses.</title>
<updated>2017-03-23T13:20:41+00:00</updated>
<author>
<name>Arushi Singhal</name>
<email>arushisinghal19971997@gmail.com</email>
</author>
<published>2017-03-21T11:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3b4ad1ecd1e1e4d940310bbbb99dee3d163f292b'/>
<id>3b4ad1ecd1e1e4d940310bbbb99dee3d163f292b</id>
<content type='text'>
Unnecessary parentheses are removed to improve readability.

Signed-off-by: Arushi Singhal &lt;arushisinghal19971997@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>
Unnecessary parentheses are removed to improve readability.

Signed-off-by: Arushi Singhal &lt;arushisinghal19971997@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: fix "Alignment match open parenthesis"</title>
<updated>2017-03-13T22:07:43+00:00</updated>
<author>
<name>Arushi Singhal</name>
<email>arushisinghal19971997@gmail.com</email>
</author>
<published>2017-03-13T20:40:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=533131df8a1a554089d6b356866f61e553917b16'/>
<id>533131df8a1a554089d6b356866f61e553917b16</id>
<content type='text'>
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".

Signed-off-by: Arushi Singhal &lt;arushisinghal19971997@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 checkpatch issues: "CHECK: Alignment should match open parenthesis".

Signed-off-by: Arushi Singhal &lt;arushisinghal19971997@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: kobjects: Delete comparison</title>
<updated>2017-03-09T13:29:40+00:00</updated>
<author>
<name>Tamara Diaconita</name>
<email>diaconitatamara@gmail.com</email>
</author>
<published>2017-03-07T16:38:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c9862fe6dd4fc28793ad2fee363d0452c1506da7'/>
<id>c9862fe6dd4fc28793ad2fee363d0452c1506da7</id>
<content type='text'>
Comparison to NULL is not necessary because 'if' statement tests if
'synth' is NULL anyway.

Delete comparison in 'if' structure to fix the checkpath.pl issue :
CHECK: Comparison to NULL could be written 'synth'.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@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>
Comparison to NULL is not necessary because 'if' statement tests if
'synth' is NULL anyway.

Delete comparison in 'if' structure to fix the checkpath.pl issue :
CHECK: Comparison to NULL could be written 'synth'.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: kobjects: Rearrange headers</title>
<updated>2017-03-09T13:29:40+00:00</updated>
<author>
<name>Tamara Diaconita</name>
<email>diaconitatamara@gmail.com</email>
</author>
<published>2017-03-07T16:38:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6f7c59a8c75f16fd4e872792ec45e83e7ed9e03e'/>
<id>6f7c59a8c75f16fd4e872792ec45e83e7ed9e03e</id>
<content type='text'>
Put a part from the headers of some functions in a new line to have less than
80 characters.

Fixed the checkpath.pl issue:
CHECK: line over 80 characters.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@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>
Put a part from the headers of some functions in a new line to have less than
80 characters.

Fixed the checkpath.pl issue:
CHECK: line over 80 characters.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: kobjects: Align the code</title>
<updated>2017-03-09T13:29:40+00:00</updated>
<author>
<name>Tamara Diaconita</name>
<email>diaconitatamara@gmail.com</email>
</author>
<published>2017-03-07T16:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c9219a55f0ab3db6f34c018cc935a43a70e8674e'/>
<id>c9219a55f0ab3db6f34c018cc935a43a70e8674e</id>
<content type='text'>
Fixed the checkpath.pl issue:
CHECK: Aligment should match open paranthesis.

Added and deleted spaces and tabs to align the code.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@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>
Fixed the checkpath.pl issue:
CHECK: Aligment should match open paranthesis.

Added and deleted spaces and tabs to align the code.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: kobjects: Delete blank line</title>
<updated>2017-03-09T13:29:40+00:00</updated>
<author>
<name>Tamara Diaconita</name>
<email>diaconitatamara@gmail.com</email>
</author>
<published>2017-03-07T16:38:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=51c3d03470a2f8ee9833e3f052d5b1518eeb2c48'/>
<id>51c3d03470a2f8ee9833e3f052d5b1518eeb2c48</id>
<content type='text'>
Delet the blank line after an open brace '{' to fix the checkpath.pl issue:
CHECK: Blank lines aren't necessary after an open brace '{'.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@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>
Delet the blank line after an open brace '{' to fix the checkpath.pl issue:
CHECK: Blank lines aren't necessary after an open brace '{'.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: kobjects: Delete space</title>
<updated>2017-03-09T13:28:21+00:00</updated>
<author>
<name>Tamara Diaconita</name>
<email>diaconitatamara@gmail.com</email>
</author>
<published>2017-03-07T16:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b10ef8aae9656f9d4372d7f4b57b65262146bd87'/>
<id>b10ef8aae9656f9d4372d7f4b57b65262146bd87</id>
<content type='text'>
Added a space after multiple casts to fix the checkpath.pl issue:
CHECK: No space is necessary after a cast.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@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>
Added a space after multiple casts to fix the checkpath.pl issue:
CHECK: No space is necessary after a cast.

Signed-off-by: Tamara Diaconita &lt;diaconita.tamara@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: speakup: Replace BUG_ON() with WARN_ON().</title>
<updated>2017-03-06T08:17:05+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>rvarsha016@gmail.com</email>
</author>
<published>2017-02-25T12:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d351c2db5420bb17dcd2d9aac7ddb5f64c6d04b3'/>
<id>d351c2db5420bb17dcd2d9aac7ddb5f64c6d04b3</id>
<content type='text'>
BUG_ON() is replaced with WARN_ON() and EINVAL is returned, when
WARN_ON() is true. This fixes the following checkpatch issue:

Avoid crashing the kernel - try using WARN_ON &amp; recovery code rather
than BUG() or BUG_ON().

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.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>
BUG_ON() is replaced with WARN_ON() and EINVAL is returned, when
WARN_ON() is true. This fixes the following checkpatch issue:

Avoid crashing the kernel - try using WARN_ON &amp; recovery code rather
than BUG() or BUG_ON().

Signed-off-by: Varsha Rao &lt;rvarsha016@gmail.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>
</feed>
