staging: sm750fb: Add void to function definition with no arguments
authorSupriya Karanth <iskaranth@gmail.com>
Wed, 11 Mar 2015 16:11:00 +0000 (01:11 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Mar 2015 17:41:14 +0000 (18:41 +0100)
Found by checkpatch.pl - ERROR: Bad function definition

A function with no arguments allows for variadic arguments. Add
void in between the empty parentheses to indicate that the function
takes no arguments.

changes made using coccinelle script:
@@
type T;
identifier f;
@@
T f(
+void
 ) {
...
}

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/ddk750_chip.c
drivers/staging/sm750fb/ddk750_display.c
drivers/staging/sm750fb/ddk750_dvi.c
drivers/staging/sm750fb/ddk750_power.c
drivers/staging/sm750fb/ddk750_sii164.c
drivers/staging/sm750fb/sm750_hw.c

index b71169e..3c77207 100644 (file)
@@ -11,7 +11,7 @@ typedef struct _pllcalparam{
 pllcalparam;
 
 
-logical_chip_type_t getChipType()
+logical_chip_type_t getChipType(void)
 {
        unsigned short physicalID;
        char physicalRev;
@@ -91,7 +91,7 @@ unsigned int getPllValue(clock_type_t clockType, pll_value_t *pPLL)
 }
 
 
-unsigned int getChipClock()
+unsigned int getChipClock(void)
 {
     pll_value_t pll;
 #if 1
@@ -232,7 +232,7 @@ void setMasterClock(unsigned int frequency)
 }
 
 
-unsigned int ddk750_getVMSize()
+unsigned int ddk750_getVMSize(void)
 {
        unsigned int reg;
        unsigned int data;
index a282a94..c84196a 100644 (file)
@@ -273,7 +273,7 @@ void ddk750_setLogicalDispOut(disp_output_t output)
 }
 
 
-int ddk750_initDVIDisp()
+int ddk750_initDVIDisp(void)
 {
     /* Initialize DVI. If the dviInit fail and the VendorID or the DeviceID are
        not zeroed, then set the failure flag. If it is zeroe, it might mean
index 1c083e7..f5932bb 100644 (file)
@@ -62,7 +62,7 @@ int dviInit(
  *  Output:
  *      Vendor ID
  */
-unsigned short dviGetVendorID()
+unsigned short dviGetVendorID(void)
 {
     dvi_ctrl_device_t *pCurrentDviCtrl;
 
@@ -82,7 +82,7 @@ unsigned short dviGetVendorID()
  *  Output:
  *      Device ID
  */
-unsigned short dviGetDeviceID()
+unsigned short dviGetDeviceID(void)
 {
     dvi_ctrl_device_t *pCurrentDviCtrl;
 
index 98dfcbd..cbb9767 100644 (file)
@@ -15,7 +15,7 @@ void ddk750_setDPMS(DPMS_t state)
        }
 }
 
-unsigned int getPowerMode()
+unsigned int getPowerMode(void)
 {
        if(getChipType() == SM750LE)
                return 0;
index faf8250..3d224d6 100644 (file)
@@ -34,7 +34,7 @@ static char *gDviCtrlChipName = "Silicon Image SiI 164";
  *  Output:
  *      Vendor ID
  */
-unsigned short sii164GetVendorID()
+unsigned short sii164GetVendorID(void)
 {
     unsigned short vendorID;
 
@@ -51,7 +51,7 @@ unsigned short sii164GetVendorID()
  *  Output:
  *      Device ID
  */
-unsigned short sii164GetDeviceID()
+unsigned short sii164GetDeviceID(void)
 {
     unsigned short deviceID;
 
@@ -264,7 +264,7 @@ long sii164InitChip(
  *  sii164ResetChip
  *      This function resets the DVI Controller Chip.
  */
-void sii164ResetChip()
+void sii164ResetChip(void)
 {
     /* Power down */
     sii164SetPower(0);
@@ -277,7 +277,7 @@ void sii164ResetChip()
  *      This function returns a char string name of the current DVI Controller chip.
  *      It's convenient for application need to display the chip name.
  */
-char *sii164GetChipString()
+char *sii164GetChipString(void)
 {
     return gDviCtrlChipName;
 }
@@ -375,7 +375,7 @@ void sii164EnableHotPlugDetection(
  *      0   - Not Connected
  *      1   - Connected
  */
-unsigned char sii164IsConnected()
+unsigned char sii164IsConnected(void)
 {
     unsigned char hotPlugValue;
 
@@ -394,7 +394,7 @@ unsigned char sii164IsConnected()
  *      0   - No interrupt
  *      1   - Interrupt occurs
  */
-unsigned char sii164CheckInterrupt()
+unsigned char sii164CheckInterrupt(void)
 {
     unsigned char detectReg;
 
@@ -409,7 +409,7 @@ unsigned char sii164CheckInterrupt()
  *  sii164ClearInterrupt
  *      Clear the hot plug interrupt.
  */
-void sii164ClearInterrupt()
+void sii164ClearInterrupt(void)
 {
     unsigned char detectReg;
 
index c44a50b..3050847 100644 (file)
@@ -581,7 +581,7 @@ void hw_sm750_initAccel(struct lynx_share * share)
        share->accel.de_init(&share->accel);
 }
 
-int hw_sm750le_deWait()
+int hw_sm750le_deWait(void)
 {
        int i=0x10000000;
        while(i--){
@@ -598,7 +598,7 @@ int hw_sm750le_deWait()
 }
 
 
-int hw_sm750_deWait()
+int hw_sm750_deWait(void)
 {
        int i=0x10000000;
        while(i--){