Displaying 8 results from an estimated 8 matches for "container_of_const".
2023 Apr 10
2
[PATCH v2 2/2] tools/virtio: fix build caused by virtio_ring changes
On Mon, Apr 10, 2023 at 08:00:33AM -0400, Michael S. Tsirkin wrote:
> On Mon, Apr 10, 2023 at 08:28:45PM +0900, Shunsuke Mie wrote:
> > Fix the build dependency for virtio_test. The virtio_ring that is used from
> > the test requires container_of_const(). Change to use container_of.h kernel
> > header directly and adapt related codes.
> >
> > Signed-off-by: Shunsuke Mie <mie at igel.co.jp>
>
> This is only for next right? That's where container_of_const
> things are I think ...
container_of_const() is in 6....
2023 Apr 10
1
[PATCH] tools/virtio: fix build caused by virtio_ring changes
Fix the build dependency for virtio_test. virtio_ring requires
container_of_const() and struce device.
Signed-off-by: Shunsuke Mie <mie at igel.co.jp>
---
tools/include/linux/container_of.h | 36 ++++++++++++++++++++++++++++++
tools/virtio/linux/compiler.h | 3 +++
tools/virtio/linux/kernel.h | 5 +----
tools/virtio/linux/module.h | 1 +
4 files cha...
2023 Mar 15
2
[PATCH v2 3/3] virtio_ring: Use const to annotate read-only pointer params
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
Use `container_of_const` to implement `to_vvq`, which ensures the
const-ness of read-only parameters and avoids accidental modification
of their members.
Signed-off-by: Feng Liu <feliu at nvidia.com>
Reviewed-by: Jiri Pirko <jiri at nvidia.com>
---
v0 -> v1
feedbacks from Michael S. Tsirkin
- use `contain...
2023 Mar 10
0
[PATCH v2 3/3] virtio_ring: Use const to annotate read-only pointer params
Add const to make the read-only pointer parameters clear, similar to
many existing functions.
To implement this change, the commit also introduces the use of
`container_of_const` to implement `to_vvq`, which ensures the const-ness
of read-only parameters and avoids accidental modification of their
members.
Signed-off-by: Feng Liu <feliu at nvidia.com>
Reviewed-by: Jiri Pirko <jiri at nvidia.com>
Reviewed-by: Parav Pandit <parav at nvidia.com>
Reviewed-by...
2023 Mar 15
4
[PATCH v2 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Allow non power of 2 sizes for packed virtqueues.
Patch-2 Avoid using inline for small functions.
Patch-3 Use const to
2023 Mar 10
4
[PATCH v2 0/3] virtio_ring: Clean up code for virtio ring and pci
This patch series performs a clean up of the code in virtio_ring and
virtio_pci, modifying it to conform with the Linux kernel coding style
guidance [1]. The modifications ensure the code easy to read and
understand. This small series does few short cleanups in the code.
Patch-1 Allow non power of 2 sizes for virtqueues
Patch-2 Avoid using inline for small functions.
Patch-3 Use const to annotate
2023 Apr 17
1
[PATCH v3 RESEND 1/2] virtio_ring: add a struct device forward declaration
The virtio_ring header file uses the struct device without a forward
declaration.
Signed-off-by: Shunsuke Mie <mie at igel.co.jp>
---
Changes from v2: https://lore.kernel.org/virtualization/20230410074929-mutt-send-email-mst at kernel.org/
- Fix a typo of commit title
include/linux/virtio_ring.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/virtio_ring.h
2023 Apr 10
2
[PATCH v2 1/2] virtio_ring: add a struce device forward declaration
The virtio_ring header file uses the struct device without a forward
declaration.
Signed-off-by: Shunsuke Mie <mie at igel.co.jp>
---
include/linux/virtio_ring.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h
index 8b95b69ef694..77a9c2f52919 100644
--- a/include/linux/virtio_ring.h
+++ b/include/linux/virtio_ring.h
@@ -58,6