staging: vc04_services: Removed unnecessary variable
Subsystems (2)
PATCH 1/1 staging: vc04_services: Removed unnecessary variable
Removed unnecessary variable and used instead the parameter that was already defined
--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +1 -3
@@ -755,9 +755,7 @@ static const char *msg_type_str(unsigned int msg_type) void *context, void *dest, size_t offset, size_t maxsize) { - void *src = context; - -memcpy (dest + offset, src + offset, maxsize); + memcpy(dest + offset, context + offset, maxsize);return maxsize; }
Signature · 1 line
1.9.1
Quoted 13 lines · Narcisa Ana Maria Vasile
Removed unnecessary variable and used instead the parameter that was already defined
Signed-off-by Narcisa Ana Maria Vasile <[email protected]>--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +0
-0
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c static const char *msg_type_str(unsigned int msg_type) · line 758
Quoted 7 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +1
-3@@ -755,9 +755,7 @@ static const char *msg_type_str(unsigned int msg_type) void *context, void *dest, size_t offset, size_t maxsize) { - void *src = context; - -memcpy (dest + offset, src + offset, maxsize); + memcpy(dest + offset, context + offset, maxsize);
You have to watch for this, because the type could change, which could change the result of the pointer arithmetic. But that doens't happen here
- it's void * both times.
Quoted 13 lines
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +0
-1return maxsize; } --1.9.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1488328859-6925-1-git-send-email-narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.