Commit 585dc70d authored by Rashika Kheria's avatar Rashika Kheria Committed by Greg Kroah-Hartman

Staging: keucr: Fix externs are avoided in smilmain.c

This patch fixes the following checkpatch.pl warning in smilmain.c-
WARNING: externs should be avoided in .c files
Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 278660a4
...@@ -4,46 +4,26 @@ ...@@ -4,46 +4,26 @@
#include "smcommon.h" #include "smcommon.h"
#include "smil.h" #include "smil.h"
int Check_D_LogCHS(WORD *, BYTE *, BYTE *); static int Conv_D_MediaAddr(struct us_data *, DWORD);
void Initialize_D_Media(void); static int Inc_D_MediaAddr(struct us_data *);
void PowerOff_D_Media(void); static int Media_D_ReadOneSect(struct us_data *, WORD, BYTE *);
int Check_D_MediaPower(void);
int Check_D_MediaExist(void); static int Copy_D_BlockAll(struct us_data *, DWORD);
int Check_D_MediaWP(void);
int Check_D_MediaFmt(struct us_data *); static int Assign_D_WriteBlock(void);
int Check_D_MediaFmtForEraseAll(struct us_data *); static int Release_D_ReadBlock(struct us_data *);
int Conv_D_MediaAddr(struct us_data *, DWORD); static int Release_D_WriteBlock(struct us_data *);
int Inc_D_MediaAddr(struct us_data *); static int Release_D_CopySector(struct us_data *);
int Check_D_FirstSect(void);
int Check_D_LastSect(void); static int Copy_D_PhyOneSect(struct us_data *);
int Media_D_ReadOneSect(struct us_data *, WORD, BYTE *); static int Read_D_PhyOneSect(struct us_data *, WORD, BYTE *);
int Media_D_WriteOneSect(struct us_data *, WORD, BYTE *); static int Erase_D_PhyOneBlock(struct us_data *);
int Media_D_CopyBlockHead(struct us_data *);
int Media_D_CopyBlockTail(struct us_data *); static int Set_D_PhyFmtValue(struct us_data *);
int Media_D_EraseOneBlock(void); static int Search_D_CIS(struct us_data *);
int Media_D_EraseAllBlock(void); static int Make_D_LogTable(struct us_data *);
int Copy_D_BlockAll(struct us_data *, DWORD); static int MarkFail_D_PhyOneBlock(struct us_data *);
int Copy_D_BlockHead(struct us_data *);
int Copy_D_BlockTail(struct us_data *);
int Reassign_D_BlockHead(struct us_data *);
int Assign_D_WriteBlock(void);
int Release_D_ReadBlock(struct us_data *);
int Release_D_WriteBlock(struct us_data *);
int Release_D_CopySector(struct us_data *);
int Copy_D_PhyOneSect(struct us_data *);
int Read_D_PhyOneSect(struct us_data *, WORD, BYTE *);
int Write_D_PhyOneSect(struct us_data *, WORD, BYTE *);
int Erase_D_PhyOneBlock(struct us_data *);
int Set_D_PhyFmtValue(struct us_data *);
int Search_D_CIS(struct us_data *);
int Make_D_LogTable(struct us_data *);
void Check_D_BlockIsFull(void);
int MarkFail_D_PhyOneBlock(struct us_data *);
DWORD ErrXDCode; DWORD ErrXDCode;
DWORD ErrCode; DWORD ErrCode;
...@@ -167,7 +147,7 @@ int Media_D_CopySector(struct us_data *us, DWORD start, WORD count, BYTE *buf) ...@@ -167,7 +147,7 @@ int Media_D_CopySector(struct us_data *us, DWORD start, WORD count, BYTE *buf)
} }
/* ----- Release_D_CopySector() ------------------------------------------ */ /* ----- Release_D_CopySector() ------------------------------------------ */
int Release_D_CopySector(struct us_data *us) static int Release_D_CopySector(struct us_data *us)
{ {
Log2Phy[Media.Zone][Media.LogBlock] = WriteBlock; Log2Phy[Media.Zone][Media.LogBlock] = WriteBlock;
Media.PhyBlock = ReadBlock; Media.PhyBlock = ReadBlock;
...@@ -211,7 +191,7 @@ int Check_D_MediaFmt(struct us_data *us) ...@@ -211,7 +191,7 @@ int Check_D_MediaFmt(struct us_data *us)
/* SmartMedia Physical Address Control Subroutine */ /* SmartMedia Physical Address Control Subroutine */
/* ----- Conv_D_MediaAddr() --------------------------------------------- */ /* ----- Conv_D_MediaAddr() --------------------------------------------- */
int Conv_D_MediaAddr(struct us_data *us, DWORD addr) static int Conv_D_MediaAddr(struct us_data *us, DWORD addr)
{ {
DWORD temp; DWORD temp;
...@@ -240,7 +220,7 @@ int Conv_D_MediaAddr(struct us_data *us, DWORD addr) ...@@ -240,7 +220,7 @@ int Conv_D_MediaAddr(struct us_data *us, DWORD addr)
} }
/* ----- Inc_D_MediaAddr() ---------------------------------------------- */ /* ----- Inc_D_MediaAddr() ---------------------------------------------- */
int Inc_D_MediaAddr(struct us_data *us) static int Inc_D_MediaAddr(struct us_data *us)
{ {
WORD LogBlock = Media.LogBlock; WORD LogBlock = Media.LogBlock;
...@@ -290,7 +270,7 @@ int Inc_D_MediaAddr(struct us_data *us) ...@@ -290,7 +270,7 @@ int Inc_D_MediaAddr(struct us_data *us)
/* SmartMedia Read/Write Subroutine with Retry */ /* SmartMedia Read/Write Subroutine with Retry */
/* ----- Media_D_ReadOneSect() ------------------------------------------ */ /* ----- Media_D_ReadOneSect() ------------------------------------------ */
int Media_D_ReadOneSect(struct us_data *us, WORD count, BYTE *buf) static int Media_D_ReadOneSect(struct us_data *us, WORD count, BYTE *buf)
{ {
DWORD err, retry; DWORD err, retry;
...@@ -334,7 +314,7 @@ int Media_D_ReadOneSect(struct us_data *us, WORD count, BYTE *buf) ...@@ -334,7 +314,7 @@ int Media_D_ReadOneSect(struct us_data *us, WORD count, BYTE *buf)
/* SmartMedia Physical Sector Data Copy Subroutine */ /* SmartMedia Physical Sector Data Copy Subroutine */
/* ----- Copy_D_BlockAll() ---------------------------------------------- */ /* ----- Copy_D_BlockAll() ---------------------------------------------- */
int Copy_D_BlockAll(struct us_data *us, DWORD mode) static int Copy_D_BlockAll(struct us_data *us, DWORD mode)
{ {
BYTE sect; BYTE sect;
...@@ -371,7 +351,7 @@ int Copy_D_BlockAll(struct us_data *us, DWORD mode) ...@@ -371,7 +351,7 @@ int Copy_D_BlockAll(struct us_data *us, DWORD mode)
/* SmartMedia Physical Block Assign/Release Subroutine */ /* SmartMedia Physical Block Assign/Release Subroutine */
/* ----- Assign_D_WriteBlock() ------------------------------------------ */ /* ----- Assign_D_WriteBlock() ------------------------------------------ */
int Assign_D_WriteBlock(void) static int Assign_D_WriteBlock(void)
{ {
ReadBlock = Media.PhyBlock; ReadBlock = Media.PhyBlock;
...@@ -404,7 +384,7 @@ int Assign_D_WriteBlock(void) ...@@ -404,7 +384,7 @@ int Assign_D_WriteBlock(void)
} }
/* ----- Release_D_ReadBlock() ------------------------------------------ */ /* ----- Release_D_ReadBlock() ------------------------------------------ */
int Release_D_ReadBlock(struct us_data *us) static int Release_D_ReadBlock(struct us_data *us)
{ {
DWORD mode; DWORD mode;
...@@ -438,7 +418,7 @@ int Release_D_ReadBlock(struct us_data *us) ...@@ -438,7 +418,7 @@ int Release_D_ReadBlock(struct us_data *us)
} }
/* ----- Release_D_WriteBlock() ----------------------------------------- */ /* ----- Release_D_WriteBlock() ----------------------------------------- */
int Release_D_WriteBlock(struct us_data *us) static int Release_D_WriteBlock(struct us_data *us)
{ {
SectCopyMode = COMPLETED; SectCopyMode = COMPLETED;
Media.PhyBlock = WriteBlock; Media.PhyBlock = WriteBlock;
...@@ -452,7 +432,7 @@ int Release_D_WriteBlock(struct us_data *us) ...@@ -452,7 +432,7 @@ int Release_D_WriteBlock(struct us_data *us)
/* SmartMedia Physical Sector Data Copy Subroutine */ /* SmartMedia Physical Sector Data Copy Subroutine */
/* ----- Copy_D_PhyOneSect() -------------------------------------------- */ /* ----- Copy_D_PhyOneSect() -------------------------------------------- */
int Copy_D_PhyOneSect(struct us_data *us) static int Copy_D_PhyOneSect(struct us_data *us)
{ {
int i; int i;
DWORD err, retry; DWORD err, retry;
...@@ -529,7 +509,7 @@ int Copy_D_PhyOneSect(struct us_data *us) ...@@ -529,7 +509,7 @@ int Copy_D_PhyOneSect(struct us_data *us)
/* SmartMedia Physical Sector Read/Write/Erase Subroutine */ /* SmartMedia Physical Sector Read/Write/Erase Subroutine */
/* ----- Read_D_PhyOneSect() -------------------------------------------- */ /* ----- Read_D_PhyOneSect() -------------------------------------------- */
int Read_D_PhyOneSect(struct us_data *us, WORD count, BYTE *buf) static int Read_D_PhyOneSect(struct us_data *us, WORD count, BYTE *buf)
{ {
int i; int i;
DWORD retry; DWORD retry;
...@@ -580,7 +560,7 @@ int Read_D_PhyOneSect(struct us_data *us, WORD count, BYTE *buf) ...@@ -580,7 +560,7 @@ int Read_D_PhyOneSect(struct us_data *us, WORD count, BYTE *buf)
} }
/* ----- Erase_D_PhyOneBlock() ------------------------------------------ */ /* ----- Erase_D_PhyOneBlock() ------------------------------------------ */
int Erase_D_PhyOneBlock(struct us_data *us) static int Erase_D_PhyOneBlock(struct us_data *us)
{ {
if (Ssfdc_D_EraseBlock(us)) { if (Ssfdc_D_EraseBlock(us)) {
ErrCode = ERR_HwError; ErrCode = ERR_HwError;
...@@ -597,7 +577,7 @@ int Erase_D_PhyOneBlock(struct us_data *us) ...@@ -597,7 +577,7 @@ int Erase_D_PhyOneBlock(struct us_data *us)
/* SmartMedia Physical Format Check Local Subroutine */ /* SmartMedia Physical Format Check Local Subroutine */
/* ----- Set_D_PhyFmtValue() -------------------------------------------- */ /* ----- Set_D_PhyFmtValue() -------------------------------------------- */
int Set_D_PhyFmtValue(struct us_data *us) static int Set_D_PhyFmtValue(struct us_data *us)
{ {
if (Set_D_SsfdcModel(us->SM_DeviceID)) if (Set_D_SsfdcModel(us->SM_DeviceID))
return ERROR; return ERROR;
...@@ -606,7 +586,7 @@ int Set_D_PhyFmtValue(struct us_data *us) ...@@ -606,7 +586,7 @@ int Set_D_PhyFmtValue(struct us_data *us)
} }
/* ----- Search_D_CIS() ------------------------------------------------- */ /* ----- Search_D_CIS() ------------------------------------------------- */
int Search_D_CIS(struct us_data *us) static int Search_D_CIS(struct us_data *us)
{ {
Media.Zone = 0; Media.Zone = 0;
Media.Sector = 0; Media.Sector = 0;
...@@ -660,7 +640,7 @@ int Search_D_CIS(struct us_data *us) ...@@ -660,7 +640,7 @@ int Search_D_CIS(struct us_data *us)
} }
/* ----- Make_D_LogTable() ---------------------------------------------- */ /* ----- Make_D_LogTable() ---------------------------------------------- */
int Make_D_LogTable(struct us_data *us) static int Make_D_LogTable(struct us_data *us)
{ {
WORD phyblock, logblock; WORD phyblock, logblock;
...@@ -761,7 +741,7 @@ int Make_D_LogTable(struct us_data *us) ...@@ -761,7 +741,7 @@ int Make_D_LogTable(struct us_data *us)
} }
/* ----- MarkFail_D_PhyOneBlock() --------------------------------------- */ /* ----- MarkFail_D_PhyOneBlock() --------------------------------------- */
int MarkFail_D_PhyOneBlock(struct us_data *us) static int MarkFail_D_PhyOneBlock(struct us_data *us)
{ {
BYTE sect; BYTE sect;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment