Skip to content

Commit c796268

Browse files
seokw-Ryanjgross1
authored andcommitted
xen-pciback: Replace scnprintf() with sysfs_emit_at()
This is the third revision (v3) of this patch series. No changes since v2—only adding Reviewed-by lines. Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Ryan Chung <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Message-ID: <[email protected]>
1 parent b7efeb0 commit c796268

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/xen/xen-pciback/pci_stub.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ static ssize_t slots_show(struct device_driver *drv, char *buf)
12611261
if (count >= PAGE_SIZE)
12621262
break;
12631263

1264-
count += scnprintf(buf + count, PAGE_SIZE - count,
1264+
count += sysfs_emit_at(buf, count,
12651265
"%04x:%02x:%02x.%d\n",
12661266
pci_dev_id->domain, pci_dev_id->bus,
12671267
PCI_SLOT(pci_dev_id->devfn),
@@ -1290,7 +1290,7 @@ static ssize_t irq_handlers_show(struct device_driver *drv, char *buf)
12901290
if (!dev_data)
12911291
continue;
12921292
count +=
1293-
scnprintf(buf + count, PAGE_SIZE - count,
1293+
sysfs_emit_at(buf, count,
12941294
"%s:%s:%sing:%ld\n",
12951295
pci_name(psdev->dev),
12961296
dev_data->isr_on ? "on" : "off",
@@ -1375,7 +1375,7 @@ static ssize_t quirks_show(struct device_driver *drv, char *buf)
13751375
if (count >= PAGE_SIZE)
13761376
goto out;
13771377

1378-
count += scnprintf(buf + count, PAGE_SIZE - count,
1378+
count += sysfs_emit_at(buf, count,
13791379
"%02x:%02x.%01x\n\t%04x:%04x:%04x:%04x\n",
13801380
quirk->pdev->bus->number,
13811381
PCI_SLOT(quirk->pdev->devfn),
@@ -1391,7 +1391,7 @@ static ssize_t quirks_show(struct device_driver *drv, char *buf)
13911391
if (count >= PAGE_SIZE)
13921392
goto out;
13931393

1394-
count += scnprintf(buf + count, PAGE_SIZE - count,
1394+
count += sysfs_emit_at(buf, count,
13951395
"\t\t%08x:%01x:%08x\n",
13961396
cfg_entry->base_offset +
13971397
field->offset, field->size,
@@ -1462,7 +1462,7 @@ static ssize_t permissive_show(struct device_driver *drv, char *buf)
14621462
if (!dev_data || !dev_data->permissive)
14631463
continue;
14641464
count +=
1465-
scnprintf(buf + count, PAGE_SIZE - count, "%s\n",
1465+
sysfs_emit_at(buf, count, "%s\n",
14661466
pci_name(psdev->dev));
14671467
}
14681468
spin_unlock_irqrestore(&pcistub_devices_lock, flags);
@@ -1521,7 +1521,7 @@ static ssize_t allow_interrupt_control_show(struct device_driver *drv,
15211521
if (!dev_data || !dev_data->allow_interrupt_control)
15221522
continue;
15231523
count +=
1524-
scnprintf(buf + count, PAGE_SIZE - count, "%s\n",
1524+
sysfs_emit_at(buf, count, "%s\n",
15251525
pci_name(psdev->dev));
15261526
}
15271527
spin_unlock_irqrestore(&pcistub_devices_lock, flags);

0 commit comments

Comments
 (0)