Skip to content

Commit

Permalink
PCI: Use seq_puts() instead of seq_printf() in show_device()
Browse files Browse the repository at this point in the history
The driver name in /proc/bus/pci/devices can be printed without a printf
format specification, so use seq_puts() instead of seq_printf().

This issue was detected by using the Coccinelle software.

Link: https://lore.kernel.org/r/a6b110cb-0d0e-5dc3-9ca1-9041609cf74c@web.de
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Markus Elfring authored and Bjorn Helgaas committed Jul 2, 2019
1 parent 6d2e369 commit 590a18e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static int show_device(struct seq_file *m, void *v)
}
seq_putc(m, '\t');
if (drv)
seq_printf(m, "%s", drv->name);
seq_puts(m, drv->name);
seq_putc(m, '\n');
return 0;
}
Expand Down

0 comments on commit 590a18e

Please sign in to comment.