lkml.org 
[lkml]   [2018]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 5/5] iommu/amd - Add a debugfs entry to specify a IOMMU device table entry
Hi Gary,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Gary-R-Hook/Add-debugfs-info-for-the-AMD-IOMMU/20180317-232302
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/iommu/amd_iommu_debugfs.c: In function 'amd_iommu_debugfs_devid_write':
>> drivers/iommu/amd_iommu_debugfs.c:145:3: warning: ignoring return value of 'kstrtoint', declared with attribute warn_unused_result [-Wunused-result]
kstrtoint(obuf, 0, &amd_iommu_devid);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/kstrtoint +145 drivers/iommu/amd_iommu_debugfs.c

123
124 static ssize_t amd_iommu_debugfs_devid_write(struct file *filp,
125 const char __user *ubuf,
126 size_t count, loff_t *offp)
127 {
128 unsigned int pci_id, pci_slot, pci_func;
129 unsigned int obuflen = 80;
130 ssize_t ret;
131 char *obuf;
132
133 obuf = kmalloc(OBUFLEN, GFP_KERNEL);
134 if (!obuf)
135 return -ENOMEM;
136
137 ret = simple_write_to_buffer(obuf, OBUFLEN, offp, ubuf, count);
138
139 if (strnchr(obuf, OBUFLEN, ':')) {
140 int n;
141 n = sscanf(obuf, "%x:%x.%x", &pci_id, &pci_slot, &pci_func);
142 if (n == 3)
143 amd_iommu_devid = PCI_DEVID(pci_id, PCI_DEVFN(pci_slot, pci_func));
144 } else {
> 145 kstrtoint(obuf, 0, &amd_iommu_devid);
146 }
147
148 kfree(obuf);
149
150 return ret;
151 }
152

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-03-17 21:11    [W:0.255 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site