diff options
author | Jason Gunthorpe <[email protected]> | 2021-04-06 16:40:27 -0300 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2021-04-07 15:39:16 -0600 |
commit | 91b9969d9c6bb7c02253bbfc536bfd892f636fdc (patch) | |
tree | db6bbb6639ffa0c14f8dae99463064417ea90d56 /tools/perf/util/trace-event-scripting.c | |
parent | 2a3d15f270efa50d78d8a32d895e9d5396668f3a (diff) |
vfio/mdev: Simplify driver registration
This is only done once, we don't need to generate code to initialize a
structure stored in the ELF .data segment. Fill in the three required
.driver members directly instead of copying data into them during
mdev_register_driver().
Further the to_mdev_driver() function doesn't belong in a public header,
just inline it into the two places that need it. Finally, we can now
clearly see that 'drv' derived from dev->driver cannot be NULL, firstly
because the driver core forbids it, and secondly because NULL won't pass
through the container_of(). Remove the dead code.
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions