[PATCH 01/33] staging: vc04_services: Remove DUMP_CONTEXT_T typedef
Dominic Braun
inf.braun at fau.de
Tue Dec 11 18:30:58 UTC 2018
Typedefing structs is not encouraged in the kernel.
The removal of typedefs was requested in interface/vchi/TODO in commit
7626e002225a4c1b9455689b1f22909dfeff43ca.
Signed-off-by: Dominic Braun <inf.braun at fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner at fau.de>
---
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index f28f681192dd..7f670852102d 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -153,12 +153,12 @@ struct vchiq_instance_struct {
VCHIQ_DEBUGFS_NODE_T debugfs_node;
};
-typedef struct dump_context_struct {
+struct dump_context_struct {
char __user *buf;
size_t actual;
size_t space;
loff_t offset;
-} DUMP_CONTEXT_T;
+};
static struct cdev vchiq_cdev;
static dev_t vchiq_devid;
@@ -2111,7 +2111,8 @@ static int vchiq_release(struct inode *inode, struct file *file)
void
vchiq_dump(void *dump_context, const char *str, int len)
{
- DUMP_CONTEXT_T *context = (DUMP_CONTEXT_T *)dump_context;
+ struct dump_context_struct *context =
+ (struct dump_context_struct *)dump_context;
if (context->actual < context->space) {
int copy_bytes;
@@ -2239,7 +2240,7 @@ static ssize_t
vchiq_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- DUMP_CONTEXT_T context;
+ struct dump_context_struct context;
context.buf = buf;
context.actual = 0;
--
2.17.1
More information about the devel
mailing list