<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/vme_user, branch v6.7</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: vme_user: prefer strscpy over strcpy</title>
<updated>2023-10-25T10:57:46+00:00</updated>
<author>
<name>Michael Straube</name>
<email>straube.linux@gmail.com</email>
</author>
<published>2023-10-23T09:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e26511f672432417cc1286e00bc65ab82012f5af'/>
<id>e26511f672432417cc1286e00bc65ab82012f5af</id>
<content type='text'>
Using strcpy has potential for buffer overflows. It should be replaced
with strscpy where possible. In this case the return value of strcpy is
not used, so we can safely replace it with strscpy.

Signed-off-by: Michael Straube &lt;straube.linux@gmail.com&gt;
Link: https://lore.kernel.org/r/20231023090001.7273-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using strcpy has potential for buffer overflows. It should be replaced
with strscpy where possible. In this case the return value of strcpy is
not used, so we can safely replace it with strscpy.

Signed-off-by: Michael Straube &lt;straube.linux@gmail.com&gt;
Link: https://lore.kernel.org/r/20231023090001.7273-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Use dev_err() in vme_check_window()</title>
<updated>2023-10-21T10:02:36+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-20T01:55:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3249888c1b8c9d9fdad9f818e7ac5d7646ff91a1'/>
<id>3249888c1b8c9d9fdad9f818e7ac5d7646ff91a1</id>
<content type='text'>
vme_check_window() uses printk() for logging error message. This
leads to the following checkpatch warning:
   WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
            dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Use dev_err() instead. Pass VME bridge device to vme_check_window() so
that the error message can be logged with the bridge device context.

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/221344ede933b1d9e6c31310b0f4dbb8be809c86.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vme_check_window() uses printk() for logging error message. This
leads to the following checkpatch warning:
   WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
            dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Use dev_err() instead. Pass VME bridge device to vme_check_window() so
that the error message can be logged with the bridge device context.

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/221344ede933b1d9e6c31310b0f4dbb8be809c86.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Remove NULL-checks</title>
<updated>2023-10-21T10:02:36+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-20T01:55:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c6054f43f782abcfc4ac887209c061a512bbab47'/>
<id>c6054f43f782abcfc4ac887209c061a512bbab47</id>
<content type='text'>
Don't check for empty bridge device &amp; resource in vme_alloc_consistent()
&amp; vme_free_consistent() since they can not be NULL. Both the VME bridge
device and the VME resource that are used in these functions are set at
probe time.

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/049bbedf458e8ac40f3dfff9c9b25dce89f5b642.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't check for empty bridge device &amp; resource in vme_alloc_consistent()
&amp; vme_free_consistent() since they can not be NULL. Both the VME bridge
device and the VME resource that are used in these functions are set at
probe time.

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/049bbedf458e8ac40f3dfff9c9b25dce89f5b642.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Remove printk() in find_bridge()</title>
<updated>2023-10-21T10:02:36+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-20T01:55:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=08c7bee3b3863eab155222b177cecf8aeaaa1232'/>
<id>08c7bee3b3863eab155222b177cecf8aeaaa1232</id>
<content type='text'>
Don't log error message in find_bridge(). The printk() triggers a
checkpatch warning:
    WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
             dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

It can't be replaced by dev_err() &amp; using pr_err() is not helpful as it
doesn't give much context to the user. It is better to remove it.

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/028725ebbc522f73c39f5b1ec4cc2bdbdf588971.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't log error message in find_bridge(). The printk() triggers a
checkpatch warning:
    WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
             dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

It can't be replaced by dev_err() &amp; using pr_err() is not helpful as it
doesn't give much context to the user. It is better to remove it.

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/028725ebbc522f73c39f5b1ec4cc2bdbdf588971.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Use __func__ instead of function name</title>
<updated>2023-10-21T10:02:36+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-20T01:55:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d964afa772e13628fafb1c77faa58341a1d8aa91'/>
<id>d964afa772e13628fafb1c77faa58341a1d8aa91</id>
<content type='text'>
Replace function names in message strings with __func__ to fix
all checkpatch warnings like:

    WARNING: Prefer using '"%s...", __func__' to using 'vme_lm_get',
             this function's name, in a string

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Acked-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Link: https://lore.kernel.org/r/db4ad6b878c4bb08fd5d15cf4a9287d7bb8c30df.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace function names in message strings with __func__ to fix
all checkpatch warnings like:

    WARNING: Prefer using '"%s...", __func__' to using 'vme_lm_get',
             this function's name, in a string

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Acked-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Link: https://lore.kernel.org/r/db4ad6b878c4bb08fd5d15cf4a9287d7bb8c30df.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Replace printk() with dev_*()</title>
<updated>2023-10-21T10:02:35+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-20T01:55:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3ad533b3fb9bd7ab0582497f67cf6b7b38bdb868'/>
<id>3ad533b3fb9bd7ab0582497f67cf6b7b38bdb868</id>
<content type='text'>
vme.c uses printk() to log messages. To improve and standardize message
formatting, use logging mechanisms dev_err()/dev_warn() instead. Retain
the printk log levels of the messages during replacement.

Issue found by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Acked-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Link: https://lore.kernel.org/r/a36a0b839f9c21efe1f2df6f9272ae882fd04fb8.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vme.c uses printk() to log messages. To improve and standardize message
formatting, use logging mechanisms dev_err()/dev_warn() instead. Retain
the printk log levels of the messages during replacement.

Issue found by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Acked-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Link: https://lore.kernel.org/r/a36a0b839f9c21efe1f2df6f9272ae882fd04fb8.1697763267.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: replace strcpy with strscpy</title>
<updated>2023-10-21T09:59:33+00:00</updated>
<author>
<name>Calvince Otieno</name>
<email>calvncce@gmail.com</email>
</author>
<published>2023-10-19T06:55:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cf4381ee0bdb3c6a15d4b3e62fc4055050939772'/>
<id>cf4381ee0bdb3c6a15d4b3e62fc4055050939772</id>
<content type='text'>
Checkpatch suggests using strscpy() instead of strcpy().

The advantages of strscpy() are that it always adds a NUL terminator
and prevents read/write overflows if the source string is not properly
terminated.

strcpy() lacks built-in bounds checking for the destination buffer,
making it susceptible to buffer overflows. These overflows can lead
to various unpredictable behaviors.

In this specific context, both strscpy and strcpy performs the same
operation without any functional difference.

The reason for this equivalence is that the driver_name string "vme_fake"
is shorter than the size of the fake_bridge-&gt;name array which is defined
as 16 characters (struct vme_bridge {char name[VMENAMSIZ];...}). Thus,
there is no risk of buffer overflow in either case. VMENAMSIZ variable
holds a constant value of 16 (#define VMENAMSIZ 16)

The null-terminated "vme_fake" string
(static const char driver_name[] = "vme_fake";) can be safely copied into
fake_bridge-&gt;name using either strscpy or strcpy.

While using strscpy() does not address any bugs, it is considered a better
practice and aligns with checkpatch recommendations.

Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Calvince Otieno &lt;calvncce@gmail.com&gt;
Link: https://lore.kernel.org/r/ZTDS2H48JBUTiwZi@lab-ubuntu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Checkpatch suggests using strscpy() instead of strcpy().

The advantages of strscpy() are that it always adds a NUL terminator
and prevents read/write overflows if the source string is not properly
terminated.

strcpy() lacks built-in bounds checking for the destination buffer,
making it susceptible to buffer overflows. These overflows can lead
to various unpredictable behaviors.

In this specific context, both strscpy and strcpy performs the same
operation without any functional difference.

The reason for this equivalence is that the driver_name string "vme_fake"
is shorter than the size of the fake_bridge-&gt;name array which is defined
as 16 characters (struct vme_bridge {char name[VMENAMSIZ];...}). Thus,
there is no risk of buffer overflow in either case. VMENAMSIZ variable
holds a constant value of 16 (#define VMENAMSIZ 16)

The null-terminated "vme_fake" string
(static const char driver_name[] = "vme_fake";) can be safely copied into
fake_bridge-&gt;name using either strscpy or strcpy.

While using strscpy() does not address any bugs, it is considered a better
practice and aligns with checkpatch recommendations.

Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Calvince Otieno &lt;calvncce@gmail.com&gt;
Link: https://lore.kernel.org/r/ZTDS2H48JBUTiwZi@lab-ubuntu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Add spaces around '&lt;&lt;' operator</title>
<updated>2023-10-15T16:21:18+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-13T23:47:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4aa8371e4a9b9d77372e8535144da8c5d99aac7d'/>
<id>4aa8371e4a9b9d77372e8535144da8c5d99aac7d</id>
<content type='text'>
Add spaces around all instances of &lt;&lt; in the header vme_tsi148.h to
conform with Linux coding style. Issue found by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Link: https://lore.kernel.org/r/f84f353dedc28f99e42d2419b379ace41d0cb218.1697240381.git.soumya.negi97@gmail.com
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 spaces around all instances of &lt;&lt; in the header vme_tsi148.h to
conform with Linux coding style. Issue found by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Link: https://lore.kernel.org/r/f84f353dedc28f99e42d2419b379ace41d0cb218.1697240381.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Add spaces around '*'</title>
<updated>2023-10-15T16:21:18+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-13T23:47:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2170f5bffb12868ba3f2dc5dbf79cd87f9ac6fa6'/>
<id>2170f5bffb12868ba3f2dc5dbf79cd87f9ac6fa6</id>
<content type='text'>
Add space around * operator to adhere to Linux coding style. Issue found
by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Link: https://lore.kernel.org/r/81181dcc1ffa648f32cbe3c4ec8731e66349e450.1697240381.git.soumya.negi97@gmail.com
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 to adhere to Linux coding style. Issue found
by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Link: https://lore.kernel.org/r/81181dcc1ffa648f32cbe3c4ec8731e66349e450.1697240381.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vme_user: Fix unbalanced {} in if-else blocks</title>
<updated>2023-10-15T16:21:18+00:00</updated>
<author>
<name>Soumya Negi</name>
<email>soumya.negi97@gmail.com</email>
</author>
<published>2023-10-13T23:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2a7f242e88d1fb4bcebe92e38f57a4cbacf40f7c'/>
<id>2a7f242e88d1fb4bcebe92e38f57a4cbacf40f7c</id>
<content type='text'>
Add missing braces so that {} are balanced in all arms of if-else
statements as per Linux coding style. Issue found by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Link: https://lore.kernel.org/r/b0fad6de7405a105235b3b595e0bb2c51be7dcf0.1697240381.git.soumya.negi97@gmail.com
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 missing braces so that {} are balanced in all arms of if-else
statements as per Linux coding style. Issue found by checkpatch.pl

Signed-off-by: Soumya Negi &lt;soumya.negi97@gmail.com&gt;
Link: https://lore.kernel.org/r/b0fad6de7405a105235b3b595e0bb2c51be7dcf0.1697240381.git.soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
