Staging: sm750fb: Remove struct typedefs
Subsystems (2)
PATCH 1/1 Staging: sm750fb: Remove struct typedefs
Remove typedef for struct. Warning found using checkpatch.pl
WARNING: do not add new typedefs
--- drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_chip.c +1 -1
@@ -2,7 +2,7 @@#include "ddk750_reg.h" #include "ddk750_chip.h" #include "ddk750_power.h" -typedef struct _pllcalparam{ +struct _pllcalparam {unsigned char power;/* d : 0~ 6*/ unsigned char pod;unsigned char od;
Signature · 1 line
1.9.1
Quoted 2 lines · Amitoj Kaur Chawla
Remove typedef for struct. Warning found using checkpatch.pl
WARNING: do not add new typedefs
This is not correct. First, the syntax of typedef is as follows:
typedef {type} {typename};
By removing the word typedef, you make something like:
{type} {typename};
But now typename is interpreted as the name of an identifier. You have a useless variable, and if typename was every used, then you should have syntax errors. If you think that you have compiled the code that uses this type name, then you have probably not. Check that there is a .o file for each .c file that references this type.
The proper way to remove the typedef is to remove both typedef and the type name, and then adjust the uses of the type name to refer to {type}. You may also want to change the name of type to be more friendly, as when typedef is used, it is often the type name that is friendly. You can often use type name. If it has the form foo_t, it would be better to drop the final _t.
You can find many examples of correct typedef removals in the outreachy mailing list.
julia
Quoted 28 lines
Signed-off-by Amitoj Kaur Chawla <[email protected]>--- drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/sm750fb/ddk750_chip.c +1
-2@@ -2,7 +2,7 @@#include "ddk750_reg.h" #include "ddk750_chip.h" #include "ddk750_power.h" -typedef struct _pllcalparam{ +struct _pllcalparam {unsigned char power;/* d : 0~ 6*/ unsigned char pod;unsigned char od; --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/20150322155542.GA1063%40amitoj-Inspiron-3542.
For more options, visit https://groups.google.com/d/optout.