Commit 17f18e0
virtio_console: Get rid of unneeded temporary variable
When compiling a kernel with GCC using `make W=1` with CONFIG_WERROR=y
(which is default nowadays), the build fails:
drivers/char/virtio_console.c:1427:9: note: ‘snprintf’ output between 9 and 27 bytes into a destination of size 16
Indeed, GCC can't see the limits of the variables that are in use.
Fix this by using dev_name() of the newly created device that is
luckily the same as the string used for the DebugFS node name.
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Amit Shah <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 790b2f2 commit 17f18e0
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1321 | 1321 | | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | | - | |
1325 | 1324 | | |
1326 | 1325 | | |
1327 | 1326 | | |
| |||
1424 | 1423 | | |
1425 | 1424 | | |
1426 | 1425 | | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
| 1426 | + | |
1430 | 1427 | | |
1431 | 1428 | | |
1432 | 1429 | | |
| |||
0 commit comments