From: Amarjargal Gundjalam Date: Fri, 17 May 2013 08:02:22 +0000 (-0700) Subject: keucr: Fixes return is not a function error in smilmain.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ef0b9c110e72290ee662d99105e4f947d9d565c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git keucr: Fixes return is not a function error in smilmain.c Fixes the following checkpatch error, ERROR: return is not a function, parentheses are not required Signed-off-by: Amarjargal Gundjalam Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/keucr/smilmain.c b/drivers/staging/keucr/smilmain.c index cc49038e55d6..263ca4a3535d 100644 --- a/drivers/staging/keucr/smilmain.c +++ b/drivers/staging/keucr/smilmain.c @@ -90,7 +90,7 @@ BYTE IsXDCompliance; // } // // Initialize_D_Media(); -// return(NO_ERROR); +// return NO_ERROR; //} //----- SM_FreeMem() ------------------------------------------------- @@ -108,38 +108,38 @@ int SM_FreeMem(void) Log2Phy[i] = NULL; } } - return(NO_ERROR); + return NO_ERROR; } ////----- Pwoff_D_SmartMedia() ------------------------------------------- //int Pwoff_D_SmartMedia(void) //{ // PowerOff_D_Media(); -// return(NO_ERROR); +// return NO_ERROR; //} // ////----- Check_D_SmartMedia() ------------------------------------------- //int Check_D_SmartMedia(void) //{ // if (Check_D_MediaExist()) -// return(ErrCode); +// return ErrCode; // -// return(NO_ERROR); +// return NO_ERROR; //} // ////----- Check_D_Parameter() -------------------------------------------- //int Check_D_Parameter(PFDO_DEVICE_EXTENSION fdoExt,WORD *pcyl,BYTE *phead,BYTE *psect) //{ // if (Check_D_MediaPower()) -// return(ErrCode); +// return ErrCode; // // if (Check_D_MediaFmt(fdoExt)) -// return(ErrCode); +// return ErrCode; // // if (Check_D_LogCHS(pcyl,phead,psect)) -// return(ErrCode); +// return ErrCode; // -// return(NO_ERROR); +// return NO_ERROR; //} //SmartMedia Read/Write/Erase Function @@ -149,11 +149,11 @@ int Media_D_ReadSector(struct us_data *us, DWORD start,WORD count,BYTE *buf) WORD len, bn; //if (Check_D_MediaPower()) ; ¦b 6250 don't care - // return(ErrCode); + // return ErrCode; //if (Check_D_MediaFmt(fdoExt)) ; - // return(ErrCode); + // return ErrCode; if (Conv_D_MediaAddr(us, start)) - return(ErrCode); + return ErrCode; while(1) { @@ -167,7 +167,7 @@ int Media_D_ReadSector(struct us_data *us, DWORD start,WORD count,BYTE *buf) if (Media_D_ReadOneSect(us, bn, buf)) { ErrCode = ERR_EccReadErr; - return(ErrCode); + return ErrCode; } Media.Sector += bn; @@ -179,10 +179,10 @@ int Media_D_ReadSector(struct us_data *us, DWORD start,WORD count,BYTE *buf) buf += bn * SECTSIZE; if (Inc_D_MediaAddr(us)) - return(ErrCode); + return ErrCode; } - return(NO_ERROR); + return NO_ERROR; } // here //----- Media_D_CopySector() ------------------------------------------ @@ -196,12 +196,12 @@ int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf) /* pr_info("Media_D_CopySector !!!\n"); */ if (Conv_D_MediaAddr(us, start)) - return(ErrCode); + return ErrCode; while(1) { if (Assign_D_WriteBlock()) - return(ERROR); + return ERROR; len = Ssfdc.MaxSectors - Media.Sector; if (count > len) @@ -213,7 +213,7 @@ int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf) if (Ssfdc_D_CopyBlock(us,bn,buf,Redundant)) { ErrCode = ERR_WriteFault; - return(ErrCode); + return ErrCode; } Media.Sector = 0x1F; @@ -223,7 +223,7 @@ int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf) if (ErrCode==ERR_HwError) { ErrCode = ERR_WriteFault; - return(ErrCode); + return ErrCode; } } count -= bn; @@ -234,10 +234,10 @@ int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf) buf += bn * SECTSIZE; if (Inc_D_MediaAddr(us)) - return(ErrCode); + return ErrCode; } - return(NO_ERROR); + return NO_ERROR; } //----- Release_D_CopySector() ------------------------------------------ @@ -252,13 +252,13 @@ int Release_D_CopySector(struct us_data *us) if (Media.PhyBlock==NO_ASSIGN) { Media.PhyBlock=WriteBlock; - return(SMSUCCESS); + return SMSUCCESS; } Clr_D_Bit(Assign[Media.Zone],Media.PhyBlock); Media.PhyBlock=WriteBlock; - return(SMSUCCESS); + return SMSUCCESS; } /* //----- Media_D_WriteSector() ------------------------------------------ @@ -270,16 +270,16 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT ADDRESS_T bb = (ADDRESS_T) &Media; //if (Check_D_MediaPower()) - // return(ErrCode); + // return ErrCode; // //if (Check_D_MediaFmt(fdoExt)) - // return(ErrCode); + // return ErrCode; // //if (Check_D_MediaWP()) - // return(ErrCode); + // return ErrCode; if (Conv_D_MediaAddr(fdoExt, start)) - return(ErrCode); + return ErrCode; //ENE_Print("Media_D_WriteSector --- Sector = %x\n", Media.Sector); if (Check_D_FirstSect()) @@ -287,7 +287,7 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT if (Media_D_CopyBlockHead(fdoExt)) { ErrCode = ERR_WriteFault; - return(ErrCode); + return ErrCode; } } @@ -296,7 +296,7 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT if (!Check_D_FirstSect()) { if (Assign_D_WriteBlock()) - return(ErrCode); + return ErrCode; } len = Ssfdc.MaxSectors - Media.Sector; @@ -311,7 +311,7 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT if (Media_D_WriteOneSect(fdoExt, bn, buf)) { ErrCode = ERR_WriteFault; - return(ErrCode); + return ErrCode; } Media.Sector += bn - 1; @@ -323,7 +323,7 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT { if (ErrCode==ERR_HwError) { ErrCode = ERR_WriteFault; - return(ErrCode); + return ErrCode; } } } @@ -339,45 +339,45 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT // break; if (Inc_D_MediaAddr(fdoExt)) - return(ErrCode); + return ErrCode; } if (!Check_D_LastSect()) - return(NO_ERROR); + return NO_ERROR; if (Inc_D_MediaAddr(fdoExt)) - return(ErrCode); + return ErrCode; if (Media_D_CopyBlockTail(fdoExt)) { ErrCode = ERR_WriteFault; - return(ErrCode); + return ErrCode; } - return(NO_ERROR); + return NO_ERROR; } // ////----- Media_D_EraseBlock() ------------------------------------------- //int Media_D_EraseBlock(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count) //{ // if (Check_D_MediaPower()) -// return(ErrCode); +// return ErrCode; // // if (Check_D_MediaFmt(fdoExt)) -// return(ErrCode); +// return ErrCode; // // if (Check_D_MediaWP()) -// return(ErrCode); +// return ErrCode; // // if (Conv_D_MediaAddr(start)) -// return(ErrCode); +// return ErrCode; // // while(Check_D_FirstSect()) { // if (Inc_D_MediaAddr(fdoExt)) -// return(ErrCode); +// return ErrCode; // // if (--count<=0) -// return(NO_ERROR); +// return NO_ERROR; // } // // while(1) { @@ -386,14 +386,14 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT // if (ErrCode==ERR_HwError) // { // ErrCode = ERR_WriteFault; -// return(ErrCode); +// return ErrCode; // } // // if (Inc_D_MediaAddr(fdoExt)) -// return(ErrCode); +// return ErrCode; // // if (--count<=0) -// return(NO_ERROR); +// return NO_ERROR; // } //} // @@ -401,18 +401,18 @@ int Media_D_WriteSector(PFDO_DEVICE_EXTENSION fdoExt, DWORD start,WORD count,BYT //int Media_D_EraseAll(PFDO_DEVICE_EXTENSION fdoExt) //{ // if (Check_D_MediaPower()) -// return(ErrCode); +// return ErrCode; // // if (Check_D_MediaFmtForEraseAll(fdoExt)) -// return(ErrCode); +// return ErrCode; // // if (Check_D_MediaWP()) -// return(ErrCode); +// return ErrCode; // // if (Media_D_EraseAllBlock()) -// return(ErrCode); +// return ErrCode; // -// return(NO_ERROR); +// return NO_ERROR; //} //SmartMedia Write Function for One Sector Write Mode @@ -424,24 +424,24 @@ int Media_D_OneSectWriteStart(PFDO_DEVICE_EXTENSION fdoExt,DWORD start,BYTE *buf // ADDRESS_T bb = (ADDRESS_T) &Media; // // //if (Check_D_MediaPower()) -// // return(ErrCode); +// // return ErrCode; // //if (Check_D_MediaFmt(fdoExt)) -// // return(ErrCode); +// // return ErrCode; // //if (Check_D_MediaWP()) -// // return(ErrCode); +// // return ErrCode; // if (Conv_D_MediaAddr(fdoExt, start)) -// return(ErrCode); +// return ErrCode; // // if (Check_D_FirstSect()) // if (Media_D_CopyBlockHead(fdoExt)) // { // ErrCode = ERR_WriteFault; -// return(ErrCode); +// return ErrCode; // } // // if (!Check_D_FirstSect()) // if (Assign_D_WriteBlock()) -// return(ErrCode); +// return ErrCode; // // //for(i=0;iChildDeviceObject) return(ERROR); +// //if (!fdoExt->ChildDeviceObject) return ERROR; // //pdoExt = fdoExt->ChildDeviceObject->DeviceExtension; // // Ssfdc_D_ReadID(idcode, READ_ID_1); // //if (Set_D_SsfdcModel(idcode[1])) if (Set_D_SsfdcModel(us->SM_DeviceID)) - return(ERROR); + return ERROR; // //Use Multi-function pin to differentiate SM and xD. // UserDefData_1 = ReadPCIReg(fdoExt->BusID, fdoExt->DevID, fdoExt->FuncID, PCI_REG_USER_DEF) & 0x80; @@ -1487,7 +1487,7 @@ int Set_D_PhyFmtValue(struct us_data *us) // { // Ssfdc_D_ReadID(idcode, READ_ID_3); // if (idcode[2] != 0xB5) -// return(ERROR); +// return ERROR; // } // } // @@ -1508,7 +1508,7 @@ int Set_D_PhyFmtValue(struct us_data *us) // { // Ssfdc_D_ReadID(idcode, READ_ID_3); // if (idcode[2] != 0xB5) -// return(ERROR); +// return ERROR; // } // } // @@ -1524,7 +1524,7 @@ int Set_D_PhyFmtValue(struct us_data *us) // if (!IsXDCompliance) // fdoExt->DiskType = DISKTYPE_SM; // else -// return(ERROR); +// return ERROR; // } // // if (fdoExt->UserDef_DiskType == 0x04) fdoExt->DiskType = DISKTYPE_XD; @@ -1540,7 +1540,7 @@ int Set_D_PhyFmtValue(struct us_data *us) // } // } - return(SMSUCCESS); + return SMSUCCESS; } //----- Search_D_CIS() ------------------------------------------------- @@ -1556,7 +1556,7 @@ int Search_D_CIS(struct us_data *us) if (Ssfdc_D_ReadRedtData(us, Redundant)) { Ssfdc_D_Reset(us); - return(ERROR); + return ERROR; } if (!Check_D_FailBlock(Redundant)) @@ -1566,7 +1566,7 @@ int Search_D_CIS(struct us_data *us) if (Media.PhyBlock==(Ssfdc.MaxBlocks-Ssfdc.MaxLogBlocks-1)) { Ssfdc_D_Reset(us); - return(ERROR); + return ERROR; } while (Media.Sector