[xilinx-xlnx:xlnx_rebase_v5.15 498/907] drivers/ptp/ptp_xilinx.c:107:44: warning: shift count is negative
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 423a108a01e05e84b59a4c4885c16bf3cd8c90c7
commit: 98c6cc90c5d398e87b8602a47eb26f9702064a0d [498/907] ptp: Add Xilinx PTP timer driver
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220210/202202100131.xqR3xweN-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Xilinx/linux-xlnx/commit/98c6cc90c5d398e87b8602a47eb26...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15
git checkout 98c6cc90c5d398e87b8602a47eb26f9702064a0d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/clk/ drivers/gpu/drm/xlnx/ drivers/net/ethernet/xilinx/ drivers/phy/xilinx/ drivers/ptp/ drivers/staging/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/ptp/ptp_xilinx.c:107:44: warning: shift count is negative [-Wshift-count-negative]
ts->tv_sec = (((u64)sech << 32) | secl) & XPTPTIMER_MAX_SEC_MASK;
^~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp_xilinx.c:53:33: note: expanded from macro 'XPTPTIMER_MAX_SEC_MASK'
#define XPTPTIMER_MAX_SEC_MASK GENMASK(XPTPTIMER_MAX_SEC_SIZE - 1, 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:38:31: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~
include/linux/bits.h:36:11: note: expanded from macro '__GENMASK'
(~UL(0) >> (BITS_PER_LONG - 1 - (h))))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ptp/ptp_xilinx.c:216:10: warning: shift count >= width of type [-Wshift-count-overflow]
sign = XPTPTIMER_TOD_OFFSET_NEG;
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp_xilinx.c:55:34: note: expanded from macro 'XPTPTIMER_TOD_OFFSET_NEG'
#define XPTPTIMER_TOD_OFFSET_NEG BIT(47)
^~~~~~~
include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
#define BIT(nr) (UL(1) << (nr))
^ ~~~~
drivers/ptp/ptp_xilinx.c:347:43: warning: shift count is negative [-Wshift-count-negative]
ts.tv_sec = (((u64)sech << 32) | secl) & XPTPTIMER_MAX_SEC_MASK;
^~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp_xilinx.c:53:33: note: expanded from macro 'XPTPTIMER_MAX_SEC_MASK'
#define XPTPTIMER_MAX_SEC_MASK GENMASK(XPTPTIMER_MAX_SEC_SIZE - 1, 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:38:31: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~
include/linux/bits.h:36:11: note: expanded from macro '__GENMASK'
(~UL(0) >> (BITS_PER_LONG - 1 - (h))))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp_xilinx.c:353:44: warning: shift count is negative [-Wshift-count-negative]
tsp.tv_sec = (((u64)sech << 32) | secl) & XPTPTIMER_MAX_SEC_MASK;
^~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp_xilinx.c:53:33: note: expanded from macro 'XPTPTIMER_MAX_SEC_MASK'
#define XPTPTIMER_MAX_SEC_MASK GENMASK(XPTPTIMER_MAX_SEC_SIZE - 1, 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:38:31: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^~~~~~~~~~~~~~~
include/linux/bits.h:36:11: note: expanded from macro '__GENMASK'
(~UL(0) >> (BITS_PER_LONG - 1 - (h))))
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
vim +107 drivers/ptp/ptp_xilinx.c
89
90 /*
91 * Inline timer helpers
92 */
93 static inline void xlnx_tod_read(struct xlnx_ptp_timer *timer,
94 struct timespec64 *ts)
95 {
96 u32 sech, secl, nsec;
97
98 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SNAPSHOT_OFFSET,
99 XPTPTIMER_SNAPSHOT_MASK);
100
101 /* use TX port here */
102 nsec = xlnx_ptp_ior(timer, XPTPTIMER_PORT_TX_NS_SNAP_OFFSET);
103 secl = xlnx_ptp_ior(timer, XPTPTIMER_PORT_TX_SEC_0_SNAP_OFFSET);
104 sech = xlnx_ptp_ior(timer, XPTPTIMER_PORT_TX_SEC_1_SNAP_OFFSET);
105
106 ts->tv_nsec = nsec;
> 107 ts->tv_sec = (((u64)sech << 32) | secl) & XPTPTIMER_MAX_SEC_MASK;
108 }
109
110 static inline void xlnx_tod_offset_write(struct xlnx_ptp_timer *timer,
111 const struct timespec64 *ts)
112 {
113 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SEC_SYS_OFST_1_OFFSET,
114 upper_32_bits(ts->tv_sec));
115 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SEC_SYS_OFST_0_OFFSET,
116 lower_32_bits(ts->tv_sec));
117 xlnx_ptp_iow(timer, XPTPTIMER_TOD_NS_SYS_OFST_OFFSET,
118 (u32)(ts->tv_nsec));
119
120 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SW_LOAD_OFFSET,
121 XPTPTIMER_LOAD_OFFSET_MASK);
122 }
123
124 static inline void xlnx_tod_load_write(struct xlnx_ptp_timer *timer,
125 const struct timespec64 *ts)
126 {
127 struct timespec64 offset;
128
129 offset.tv_sec = 0;
130 offset.tv_nsec = 0;
131
132 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SW_SEC_1_OFFSET,
133 upper_32_bits(ts->tv_sec));
134 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SW_SEC_0_OFFSET,
135 lower_32_bits(ts->tv_sec));
136 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SW_NS_OFFSET, ts->tv_nsec);
137
138 /* Make sure offset registers are cleared */
139 xlnx_tod_offset_write(timer, &offset);
140 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SW_LOAD_OFFSET,
141 XPTPTIMER_LOAD_OFFSET_MASK);
142
143 xlnx_ptp_iow(timer, XPTPTIMER_TOD_SW_LOAD_OFFSET,
144 XPTPTIMER_LOAD_TOD_MASK);
145 timer->timeoffset = 0;
146 }
147
148 static inline void xlnx_port_period_write(struct xlnx_ptp_timer *timer, u64 adj)
149 {
150 u32 adjhigh = upper_32_bits(adj);
151
152 xlnx_ptp_iow(timer, XPTPTIMER_PORT_TX_PERIOD_0_OFFSET, (u32)(adj));
153 xlnx_ptp_iow(timer, XPTPTIMER_PORT_RX_PERIOD_0_OFFSET, (u32)(adj));
154 spin_lock(&timer->reg_lock);
155 xlnx_ptp_iow(timer, XPTPTIMER_PORT_TX_PERIOD_1_OFFSET, adjhigh);
156 xlnx_ptp_iow(timer, XPTPTIMER_PORT_RX_PERIOD_1_OFFSET, adjhigh);
157
158 spin_unlock(&timer->reg_lock);
159 }
160
161 /*
162 * PTP clock operations
163 */
164 /**
165 * xlnx_ptp_adjfine - Fine adjustment of the frequency on the hardware clock
166 * @ptp: ptp clock structure
167 * @scaled_ppm: signed scaled parts per million for frequency adjustment.
168 * Return: 0 on success
169 * TX and RX port periods are reloaded with the adjusted value.
170 *
171 */
172 static int xlnx_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
173 {
174 struct xlnx_ptp_timer *timer = container_of(ptp, struct xlnx_ptp_timer,
175 ptp_clock_info);
176 bool neg_adj = false;
177 u64 adj;
178
179 if (scaled_ppm < 0) {
180 neg_adj = true;
181 scaled_ppm = -scaled_ppm;
182 }
183
184 adj = mul_u64_u32_div(timer->incr, scaled_ppm, USEC_PER_SEC);
185 adj >>= PPM_FRACTION; /* remove fractions */
186 adj = neg_adj ? (timer->incr - adj) : (timer->incr + adj);
187
188 xlnx_port_period_write(timer, adj);
189
190 return 0;
191 }
192
193 /**
194 * xlnx_ptp_adjtime - Adjust the current time on the hardware clock
195 * @ptp: ptp clock structure
196 * @delta: signed time in ns to be adjusted.
197 * Return: 0 on success
198 * System, TX and RX ports are reloaded with the adjusted time.
199 *
200 */
201 static int xlnx_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
202 {
203 struct xlnx_ptp_timer *timer = container_of(ptp, struct xlnx_ptp_timer,
204 ptp_clock_info);
205 struct timespec64 offset;
206 u64 sign = 0;
207 s64 cumulative_delta = timer->timeoffset;
208
209 spin_lock(&timer->reg_lock);
210
211 /* Fixed offset between system and port timer */
212 delta += timer->static_delay;
213 cumulative_delta += delta;
214 timer->timeoffset = cumulative_delta;
215 if (cumulative_delta < 0) {
> 216 sign = XPTPTIMER_TOD_OFFSET_NEG;
217 cumulative_delta = -cumulative_delta;
218 }
219 offset = ns_to_timespec64(cumulative_delta);
220 offset.tv_sec |= sign;
221
222 xlnx_tod_offset_write(timer, (const struct timespec64 *)&offset);
223
224 spin_unlock(&timer->reg_lock);
225
226 return 0;
227 }
228
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[luxis1999-iommufd:iommufd-v5.17-rc1 22/28] drivers/iommu/iommufd/io_pagetable.c:488:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
by kernel test robot
tree: https://github.com/luxis1999/iommufd iommufd-v5.17-rc1
head: ebf68af0385d0d5c209e63e8065d31db938275d8
commit: e8571fda9f22c4c339a8c908ba5db3dc78bd3fc8 [22/28] vfio/pci: Add bind_iommufd() support
config: i386-randconfig-s001 (https://download.01.org/0day-ci/archive/20220210/202202100006.o4WZWkXH-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/luxis1999/iommufd/commit/e8571fda9f22c4c339a8c908ba5db...
git remote add luxis1999-iommufd https://github.com/luxis1999/iommufd
git fetch --no-tags luxis1999-iommufd iommufd-v5.17-rc1
git checkout e8571fda9f22c4c339a8c908ba5db3dc78bd3fc8
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/iommu/iommufd/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/iommu/iommufd/io_pagetable.c:488:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/iommu/iommufd/io_pagetable.c:488:13: sparse: unsigned long *
>> drivers/iommu/iommufd/io_pagetable.c:488:13: sparse: unsigned int *
drivers/iommu/iommufd/io_pagetable.c:548:13: sparse: sparse: incompatible types in comparison expression (different type sizes):
drivers/iommu/iommufd/io_pagetable.c:548:13: sparse: unsigned long *
drivers/iommu/iommufd/io_pagetable.c:548:13: sparse: unsigned int *
--
>> drivers/iommu/iommufd/vfio_compat.c:240:17: sparse: sparse: cast removes address space '__user' of expression
>> drivers/iommu/iommufd/vfio_compat.c:240:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct vfio_iommu_type1_info_cap_iova_range [noderef] __user *ucap_iovas @@ got struct vfio_iommu_type1_info_cap_iova_range * @@
drivers/iommu/iommufd/vfio_compat.c:240:17: sparse: expected struct vfio_iommu_type1_info_cap_iova_range [noderef] __user *ucap_iovas
drivers/iommu/iommufd/vfio_compat.c:240:17: sparse: got struct vfio_iommu_type1_info_cap_iova_range *
vim +488 drivers/iommu/iommufd/io_pagetable.c
01c5309803286f Jason Gunthorpe 2021-11-11 462
01c5309803286f Jason Gunthorpe 2021-11-11 463 /**
01c5309803286f Jason Gunthorpe 2021-11-11 464 * iopt_access_pages - Return a list of pages under the iova
01c5309803286f Jason Gunthorpe 2021-11-11 465 *
01c5309803286f Jason Gunthorpe 2021-11-11 466 * Reads @npages starting at iova and returns the struct page * pointers. These
01c5309803286f Jason Gunthorpe 2021-11-11 467 * can be kmap'd by the caller for CPU access.
01c5309803286f Jason Gunthorpe 2021-11-11 468 *
01c5309803286f Jason Gunthorpe 2021-11-11 469 * The caller must perform iopt_unaccess_pages() when done to balance this.
01c5309803286f Jason Gunthorpe 2021-11-11 470 *
01c5309803286f Jason Gunthorpe 2021-11-11 471 * iova can be unaligned from PAGE_SIZE. The first returned byte starts at
01c5309803286f Jason Gunthorpe 2021-11-11 472 * page_to_phys(out_pages[0]) + (iova % PAGE_SIZE). The caller promises not
01c5309803286f Jason Gunthorpe 2021-11-11 473 * to touch memory outside the requested iova slice.
01c5309803286f Jason Gunthorpe 2021-11-11 474 *
01c5309803286f Jason Gunthorpe 2021-11-11 475 * FIXME: callers that need a DMA mapping via a sgl should create another
01c5309803286f Jason Gunthorpe 2021-11-11 476 * interface to build the SGL efficiently
01c5309803286f Jason Gunthorpe 2021-11-11 477 */
01c5309803286f Jason Gunthorpe 2021-11-11 478 int iopt_access_pages(struct io_pagetable *iopt, unsigned long iova,
01c5309803286f Jason Gunthorpe 2021-11-11 479 size_t length, struct page **out_pages, bool write)
01c5309803286f Jason Gunthorpe 2021-11-11 480 {
01c5309803286f Jason Gunthorpe 2021-11-11 481 unsigned long cur_iova = iova;
01c5309803286f Jason Gunthorpe 2021-11-11 482 unsigned long last_iova;
01c5309803286f Jason Gunthorpe 2021-11-11 483 struct iopt_area *area;
01c5309803286f Jason Gunthorpe 2021-11-11 484 int rc;
01c5309803286f Jason Gunthorpe 2021-11-11 485
01c5309803286f Jason Gunthorpe 2021-11-11 486 if (!length)
01c5309803286f Jason Gunthorpe 2021-11-11 487 return -EINVAL;
01c5309803286f Jason Gunthorpe 2021-11-11 @488 if (check_add_overflow(iova, length - 1, &last_iova))
01c5309803286f Jason Gunthorpe 2021-11-11 489 return -EOVERFLOW;
01c5309803286f Jason Gunthorpe 2021-11-11 490
01c5309803286f Jason Gunthorpe 2021-11-11 491 down_read(&iopt->rwsem);
01c5309803286f Jason Gunthorpe 2021-11-11 492 for (area = iopt_area_iter_first(iopt, iova, last_iova); area;
01c5309803286f Jason Gunthorpe 2021-11-11 493 area = iopt_area_iter_next(area, iova, last_iova)) {
01c5309803286f Jason Gunthorpe 2021-11-11 494 unsigned long last = min(last_iova, iopt_area_last_iova(area));
01c5309803286f Jason Gunthorpe 2021-11-11 495 unsigned long last_index;
01c5309803286f Jason Gunthorpe 2021-11-11 496 unsigned long index;
01c5309803286f Jason Gunthorpe 2021-11-11 497
01c5309803286f Jason Gunthorpe 2021-11-11 498 /* Need contiguous areas in the access */
01c5309803286f Jason Gunthorpe 2021-11-11 499 if (iopt_area_iova(area) < cur_iova) {
01c5309803286f Jason Gunthorpe 2021-11-11 500 rc = -EINVAL;
01c5309803286f Jason Gunthorpe 2021-11-11 501 goto out_remove;
01c5309803286f Jason Gunthorpe 2021-11-11 502 }
01c5309803286f Jason Gunthorpe 2021-11-11 503
01c5309803286f Jason Gunthorpe 2021-11-11 504 index = iopt_iova_to_index(area, cur_iova);
01c5309803286f Jason Gunthorpe 2021-11-11 505 last_index = iopt_iova_to_index(area, last);
01c5309803286f Jason Gunthorpe 2021-11-11 506 rc = iopt_pages_add_user(area->pages, index, last_index,
01c5309803286f Jason Gunthorpe 2021-11-11 507 out_pages, write);
01c5309803286f Jason Gunthorpe 2021-11-11 508 if (rc)
01c5309803286f Jason Gunthorpe 2021-11-11 509 goto out_remove;
01c5309803286f Jason Gunthorpe 2021-11-11 510 if (last == last_iova)
01c5309803286f Jason Gunthorpe 2021-11-11 511 break;
01c5309803286f Jason Gunthorpe 2021-11-11 512 /*
01c5309803286f Jason Gunthorpe 2021-11-11 513 * Can't cross areas that are not aligned to the system page
01c5309803286f Jason Gunthorpe 2021-11-11 514 * size with this API.
01c5309803286f Jason Gunthorpe 2021-11-11 515 */
01c5309803286f Jason Gunthorpe 2021-11-11 516 if (cur_iova % PAGE_SIZE) {
01c5309803286f Jason Gunthorpe 2021-11-11 517 rc = -EINVAL;
01c5309803286f Jason Gunthorpe 2021-11-11 518 goto out_remove;
01c5309803286f Jason Gunthorpe 2021-11-11 519 }
01c5309803286f Jason Gunthorpe 2021-11-11 520 cur_iova = last + 1;
01c5309803286f Jason Gunthorpe 2021-11-11 521 out_pages += last_index - index;
01c5309803286f Jason Gunthorpe 2021-11-11 522 atomic_inc(&area->num_users);
01c5309803286f Jason Gunthorpe 2021-11-11 523 }
01c5309803286f Jason Gunthorpe 2021-11-11 524
01c5309803286f Jason Gunthorpe 2021-11-11 525 up_read(&iopt->rwsem);
01c5309803286f Jason Gunthorpe 2021-11-11 526 return 0;
01c5309803286f Jason Gunthorpe 2021-11-11 527
01c5309803286f Jason Gunthorpe 2021-11-11 528 out_remove:
01c5309803286f Jason Gunthorpe 2021-11-11 529 if (cur_iova != iova)
01c5309803286f Jason Gunthorpe 2021-11-11 530 iopt_unaccess_pages(iopt, iova, cur_iova - iova);
01c5309803286f Jason Gunthorpe 2021-11-11 531 return rc;
01c5309803286f Jason Gunthorpe 2021-11-11 532 }
01c5309803286f Jason Gunthorpe 2021-11-11 533
:::::: The code at line 488 was first introduced by commit
:::::: 01c5309803286f2c29a6f40bca7f489fce968c42 iommufd: Data structure to provide IOVA to PFN mapping
:::::: TO: Jason Gunthorpe <jgg(a)nvidia.com>
:::::: CC: Jason Gunthorpe <jgg(a)nvidia.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[PATCH] drm/i915/: fix noderef.cocci warnings
by kernel test robot
From: kernel test robot <lkp(a)intel.com>
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1310:32-38: ERROR: application of sizeof to pointer
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1322:32-38: ERROR: application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
CC: Michael Cheng <michael.cheng(a)intel.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url: https://github.com/0day-ci/linux/commits/Michael-Cheng/Use-drm_clflush-in...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
i915_gem_execbuffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -1307,7 +1307,7 @@ static void clflush_write32(u32 *addr, u
{
if (unlikely(flushes & (CLFLUSH_BEFORE | CLFLUSH_AFTER))) {
if (flushes & CLFLUSH_BEFORE)
- drm_clflush_virt_range(addr, sizeof(addr));
+ drm_clflush_virt_range(addr, sizeof(*addr));
*addr = value;
@@ -1319,7 +1319,7 @@ static void clflush_write32(u32 *addr, u
* to ensure ordering of clflush wrt to the system.
*/
if (flushes & CLFLUSH_AFTER)
- drm_clflush_virt_range(addr, sizeof(addr));
+ drm_clflush_virt_range(addr, sizeof(*addr));
} else
*addr = value;
}
7 months, 1 week
[luxis1999-iommufd:iommufd-v5.17-rc1 23/28] include/linux/iommufd.h:30:1: error: expected identifier or '(' before '{' token
by kernel test robot
tree: https://github.com/luxis1999/iommufd iommufd-v5.17-rc1
head: ebf68af0385d0d5c209e63e8065d31db938275d8
commit: 68a771c26362267465beafd67fabe1e751604493 [23/28] vfio/pci: Add VFIO_DEVICE_ATTACH_IOASPT
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220210/202202100016.xxWqSxcW-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/luxis1999/iommufd/commit/68a771c26362267465beafd67fabe...
git remote add luxis1999-iommufd https://github.com/luxis1999/iommufd
git fetch --no-tags luxis1999-iommufd iommufd-v5.17-rc1
git checkout 68a771c26362267465beafd67fabe1e751604493
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/vfio/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/vfio/vfio.c:35:
>> include/linux/iommufd.h:30:1: error: expected identifier or '(' before '{' token
30 | {
| ^
include/linux/iommufd.h:29:1: warning: 'iommufd_bind_pci_device' declared 'static' but never defined [-Wunused-function]
29 | iommufd_bind_pci_device(int fd, struct pci_dev *pdev, u32 *id);
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +30 include/linux/iommufd.h
faffab36f0032f0 Jason Gunthorpe 2021-11-11 26
faffab36f0032f0 Jason Gunthorpe 2021-11-11 27 #else /* !CONFIG_IOMMUFD */
faffab36f0032f0 Jason Gunthorpe 2021-11-11 28 static inline struct iommufd_device *
faffab36f0032f0 Jason Gunthorpe 2021-11-11 29 iommufd_bind_pci_device(int fd, struct pci_dev *pdev, u32 *id);
faffab36f0032f0 Jason Gunthorpe 2021-11-11 @30 {
faffab36f0032f0 Jason Gunthorpe 2021-11-11 31 return ERR_PTR(-EOPNOTSUPP);
faffab36f0032f0 Jason Gunthorpe 2021-11-11 32 }
faffab36f0032f0 Jason Gunthorpe 2021-11-11 33
:::::: The code at line 30 was first introduced by commit
:::::: faffab36f0032f06ff2478067840ead66e38b543 iommufd: Add kAPI toward external drivers
:::::: TO: Jason Gunthorpe <jgg(a)nvidia.com>
:::::: CC: Jason Gunthorpe <jgg(a)nvidia.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week