Skip to contentSkip to conversation

Staging: sm750fb: Remove struct typedefs

PATCH In review Amitoj Kaur Chawla 2 participants 2 messages Mar 22, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: sm750fb: Remove struct typedefs

Remove typedef for struct. Warning found using checkpatch.pl
WARNING: do not add new typedefs

---
Changes in v2:
-Fix code error in removing typedef

 drivers/staging/sm750fb/ddk750_chip.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +12 -13
index 74a3642..3ac6478 100644
@@ -2,13 +2,12 @@
 #include "ddk750_reg.h"
 #include "ddk750_chip.h"
 #include "ddk750_power.h"
-struct _pllcalparam {
+struct pllcalparam {
 	unsigned char power;/* d : 0~ 6*/
 	unsigned char pod;
 	unsigned char od;
 	unsigned char value;/* value of  2 power d (2^d) */
-}
-pllcalparam;
+};
 
 
 logical_chip_type_t getChipType(void)
@@ -192,17 +191,17 @@ void setMasterClock(unsigned int frequency)
 		return;
 #endif
 	if (frequency != 0) {
-        /* Set the frequency to the maximum frequency that the SM750 engine can
-           run, which is about 190 MHz. */
-        if (frequency > MHz(190))
-            frequency = MHz(190);
+		/* Set the frequency to the maximum frequency that the SM750
+		engine can run, which is about 190 MHz. */
+		if (frequency > MHz(190))
+			frequency = MHz(190);
 
-        /* Calculate the divisor */
-        divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
+	/* Calculate the divisor */
+	divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
 
-        /* Set the corresponding divisor in the register. */
-        ulReg = PEEK32(CURRENT_GATE);
-        switch(divisor)
+	/* Set the corresponding divisor in the register. */
+	ulReg = PEEK32(CURRENT_GATE);
+	switch(divisor)
         {
             default:
             case 3:
@@ -219,7 +218,7 @@ void setMasterClock(unsigned int frequency)
                 break;
         }
 
-        setCurrentGate(ulReg);
+	setCurrentGate(ulReg);
     }
 }
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 2 lines · Amitoj Kaur Chawla

Remove typedef for struct. Warning found using checkpatch.pl
WARNING: do not add new typedefs

It looks like this patch is on top of your previous patches. It should be on top of the original staging kernel.

Indeed, if you have proposed another change in the same file (it looks like you have done something with indentation), you have to put them together into a patch series, until the previous one is accepted.

Finally, I don't have the impression that any uses of the typedef are updated. Are there any? If there are none, then just get rid of the whole thing. If there are some, they need to be updated.

julia

Quoted 75 lines

---
Changes in v2:
-Fix code error in removing typedef

 drivers/staging/sm750fb/ddk750_chip.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +12 -14
index 74a3642..3ac6478 100644
@@ -2,13 +2,12 @@
 #include "ddk750_reg.h"
 #include "ddk750_chip.h"
 #include "ddk750_power.h"
-struct _pllcalparam {
+struct pllcalparam {
 	unsigned char power;/* d : 0~ 6*/
 	unsigned char pod;
 	unsigned char od;
 	unsigned char value;/* value of  2 power d (2^d) */
-}
-pllcalparam;
+};
 
 
 logical_chip_type_t getChipType(void)
@@ -192,17 +191,17 @@ void setMasterClock(unsigned int frequency)
 		return;
 #endif
 	if (frequency != 0) {
-        /* Set the frequency to the maximum frequency that the SM750 engine can
-           run, which is about 190 MHz. */
-        if (frequency > MHz(190))
-            frequency = MHz(190);
+		/* Set the frequency to the maximum frequency that the SM750
+		engine can run, which is about 190 MHz. */
+		if (frequency > MHz(190))
+			frequency = MHz(190);
 
-        /* Calculate the divisor */
-        divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
+	/* Calculate the divisor */
+	divisor = (unsigned int) roundedDiv(getChipClock(), frequency);
 
-        /* Set the corresponding divisor in the register. */
-        ulReg = PEEK32(CURRENT_GATE);
-        switch(divisor)
+	/* Set the corresponding divisor in the register. */
+	ulReg = PEEK32(CURRENT_GATE);
+	switch(divisor)
         {
             default:
             case 3:
@@ -219,7 +218,7 @@ void setMasterClock(unsigned int frequency)
                 break;
         }
 
-        setCurrentGate(ulReg);
+	setCurrentGate(ulReg);
     }
 }
 
--

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/20150322174311.GA2426%40amitoj-Inspiron-3542.
For more options, visit https://groups.google.com/d/optout.