keucr: fixes space required after error
This patch fixes the following checkpatch error, ERROR: space required after that ' ' Signed-off-by: Amarjargal Gundjalam <amarjargal16@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c41d74c31e
commit
99b49747cd
|
@ -4,7 +4,7 @@
|
||||||
#include "smcommon.h"
|
#include "smcommon.h"
|
||||||
#include "smil.h"
|
#include "smil.h"
|
||||||
|
|
||||||
int Check_D_LogCHS (WORD *,BYTE *,BYTE *);
|
int Check_D_LogCHS (WORD *, BYTE *, BYTE *);
|
||||||
void Initialize_D_Media (void);
|
void Initialize_D_Media (void);
|
||||||
void PowerOff_D_Media (void);
|
void PowerOff_D_Media (void);
|
||||||
int Check_D_MediaPower (void);
|
int Check_D_MediaPower (void);
|
||||||
|
@ -61,10 +61,10 @@ DWORD MediaChange;
|
||||||
static DWORD SectCopyMode;
|
static DWORD SectCopyMode;
|
||||||
|
|
||||||
//BIT Control Macro
|
//BIT Control Macro
|
||||||
static BYTE BitData[] = { 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80 } ;
|
static BYTE BitData[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 } ;
|
||||||
#define Set_D_Bit(a,b) (a[(BYTE)((b)/8)]|= BitData[(b)%8])
|
#define Set_D_Bit(a, b) (a[(BYTE)((b)/8)]|= BitData[(b)%8])
|
||||||
#define Clr_D_Bit(a,b) (a[(BYTE)((b)/8)]&=~BitData[(b)%8])
|
#define Clr_D_Bit(a, b) (a[(BYTE)((b)/8)]&=~BitData[(b)%8])
|
||||||
#define Chk_D_Bit(a,b) (a[(BYTE)((b)/8)] & BitData[(b)%8])
|
#define Chk_D_Bit(a, b) (a[(BYTE)((b)/8)] & BitData[(b)%8])
|
||||||
|
|
||||||
//extern PBYTE SMHostAddr;
|
//extern PBYTE SMHostAddr;
|
||||||
BYTE IsSSFDCCompliance;
|
BYTE IsSSFDCCompliance;
|
||||||
|
@ -142,7 +142,7 @@ int SM_FreeMem(void)
|
||||||
|
|
||||||
//SmartMedia Read/Write/Erase Function
|
//SmartMedia Read/Write/Erase Function
|
||||||
//----- Media_D_ReadSector() -------------------------------------------
|
//----- Media_D_ReadSector() -------------------------------------------
|
||||||
int Media_D_ReadSector(struct us_data *us, DWORD start,WORD count,BYTE *buf)
|
int Media_D_ReadSector(struct us_data *us, DWORD start, WORD count, BYTE *buf)
|
||||||
{
|
{
|
||||||
WORD len, bn;
|
WORD len, bn;
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ int Media_D_ReadSector(struct us_data *us, DWORD start,WORD count,BYTE *buf)
|
||||||
}
|
}
|
||||||
// here
|
// here
|
||||||
//----- Media_D_CopySector() ------------------------------------------
|
//----- Media_D_CopySector() ------------------------------------------
|
||||||
int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf)
|
int Media_D_CopySector(struct us_data *us, DWORD start, WORD count, BYTE *buf)
|
||||||
{
|
{
|
||||||
//DWORD mode;
|
//DWORD mode;
|
||||||
//int i;
|
//int i;
|
||||||
|
@ -205,7 +205,7 @@ int Media_D_CopySector(struct us_data *us, DWORD start,WORD count,BYTE *buf)
|
||||||
bn = count;
|
bn = count;
|
||||||
|
|
||||||
//if (Ssfdc_D_CopyBlock(fdoExt,count,buf,Redundant))
|
//if (Ssfdc_D_CopyBlock(fdoExt,count,buf,Redundant))
|
||||||
if (Ssfdc_D_CopyBlock(us,bn,buf,Redundant)) {
|
if (Ssfdc_D_CopyBlock(us, bn, buf, Redundant)) {
|
||||||
ErrCode = ERR_WriteFault;
|
ErrCode = ERR_WriteFault;
|
||||||
return ErrCode;
|
return ErrCode;
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ int Release_D_CopySector(struct us_data *us)
|
||||||
return SMSUCCESS;
|
return SMSUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Clr_D_Bit(Assign[Media.Zone],Media.PhyBlock);
|
Clr_D_Bit(Assign[Media.Zone], Media.PhyBlock);
|
||||||
Media.PhyBlock=WriteBlock;
|
Media.PhyBlock=WriteBlock;
|
||||||
|
|
||||||
return SMSUCCESS;
|
return SMSUCCESS;
|
||||||
|
@ -1209,8 +1209,8 @@ int Assign_D_WriteBlock(void)
|
||||||
ReadBlock=Media.PhyBlock;
|
ReadBlock=Media.PhyBlock;
|
||||||
|
|
||||||
for(WriteBlock=AssignStart[Media.Zone]; WriteBlock<Ssfdc.MaxBlocks; WriteBlock++) {
|
for(WriteBlock=AssignStart[Media.Zone]; WriteBlock<Ssfdc.MaxBlocks; WriteBlock++) {
|
||||||
if (!Chk_D_Bit(Assign[Media.Zone],WriteBlock)) {
|
if (!Chk_D_Bit(Assign[Media.Zone], WriteBlock)) {
|
||||||
Set_D_Bit(Assign[Media.Zone],WriteBlock);
|
Set_D_Bit(Assign[Media.Zone], WriteBlock);
|
||||||
AssignStart[Media.Zone]=WriteBlock+1;
|
AssignStart[Media.Zone]=WriteBlock+1;
|
||||||
Media.PhyBlock=WriteBlock;
|
Media.PhyBlock=WriteBlock;
|
||||||
SectCopyMode=REQ_ERASE;
|
SectCopyMode=REQ_ERASE;
|
||||||
|
@ -1220,8 +1220,8 @@ int Assign_D_WriteBlock(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
for(WriteBlock=0; WriteBlock<AssignStart[Media.Zone]; WriteBlock++) {
|
for(WriteBlock=0; WriteBlock<AssignStart[Media.Zone]; WriteBlock++) {
|
||||||
if (!Chk_D_Bit(Assign[Media.Zone],WriteBlock)) {
|
if (!Chk_D_Bit(Assign[Media.Zone], WriteBlock)) {
|
||||||
Set_D_Bit(Assign[Media.Zone],WriteBlock);
|
Set_D_Bit(Assign[Media.Zone], WriteBlock);
|
||||||
AssignStart[Media.Zone]=WriteBlock+1;
|
AssignStart[Media.Zone]=WriteBlock+1;
|
||||||
Media.PhyBlock=WriteBlock;
|
Media.PhyBlock=WriteBlock;
|
||||||
SectCopyMode=REQ_ERASE;
|
SectCopyMode=REQ_ERASE;
|
||||||
|
@ -1264,7 +1264,7 @@ int Release_D_ReadBlock(struct us_data *us)
|
||||||
if (ErrCode==ERR_HwError) return ERROR;
|
if (ErrCode==ERR_HwError) return ERROR;
|
||||||
if (MarkFail_D_PhyOneBlock(us)) return ERROR;
|
if (MarkFail_D_PhyOneBlock(us)) return ERROR;
|
||||||
} else
|
} else
|
||||||
Clr_D_Bit(Assign[Media.Zone],Media.PhyBlock);
|
Clr_D_Bit(Assign[Media.Zone], Media.PhyBlock);
|
||||||
} else if (MarkFail_D_PhyOneBlock(us))
|
} else if (MarkFail_D_PhyOneBlock(us))
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
|
||||||
|
@ -1302,20 +1302,20 @@ int Copy_D_PhyOneSect(struct us_data *us)
|
||||||
for(retry=0; retry<2; retry++) {
|
for(retry=0; retry<2; retry++) {
|
||||||
if (retry!=0) {
|
if (retry!=0) {
|
||||||
Ssfdc_D_Reset(us);
|
Ssfdc_D_Reset(us);
|
||||||
if (Ssfdc_D_ReadCisSect(us,WorkBuf,WorkRedund)) {
|
if (Ssfdc_D_ReadCisSect(us, WorkBuf, WorkRedund)) {
|
||||||
ErrCode = ERR_HwError;
|
ErrCode = ERR_HwError;
|
||||||
MediaChange=ERROR;
|
MediaChange=ERROR;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Check_D_CISdata(WorkBuf,WorkRedund)) {
|
if (Check_D_CISdata(WorkBuf, WorkRedund)) {
|
||||||
ErrCode = ERR_HwError;
|
ErrCode = ERR_HwError;
|
||||||
MediaChange=ERROR;
|
MediaChange=ERROR;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Ssfdc_D_ReadSect(us,WorkBuf,WorkRedund)) {
|
if (Ssfdc_D_ReadSect(us, WorkBuf, WorkRedund)) {
|
||||||
ErrCode = ERR_HwError;
|
ErrCode = ERR_HwError;
|
||||||
MediaChange=ERROR;
|
MediaChange=ERROR;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
@ -1328,7 +1328,7 @@ int Copy_D_PhyOneSect(struct us_data *us)
|
||||||
err=SMSUCCESS;
|
err=SMSUCCESS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!Check_D_Correct(WorkBuf,WorkRedund)) {
|
if (!Check_D_Correct(WorkBuf, WorkRedund)) {
|
||||||
err=SMSUCCESS;
|
err=SMSUCCESS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1384,12 +1384,12 @@ int Read_D_PhyOneSect(struct us_data *us, WORD count, BYTE *buf)
|
||||||
if (retry!=0) {
|
if (retry!=0) {
|
||||||
Ssfdc_D_Reset(us);
|
Ssfdc_D_Reset(us);
|
||||||
|
|
||||||
if (Ssfdc_D_ReadCisSect(us,WorkBuf,WorkRedund)) {
|
if (Ssfdc_D_ReadCisSect(us, WorkBuf, WorkRedund)) {
|
||||||
ErrCode = ERR_HwError;
|
ErrCode = ERR_HwError;
|
||||||
MediaChange=ERROR;
|
MediaChange=ERROR;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
if (Check_D_CISdata(WorkBuf,WorkRedund)) {
|
if (Check_D_CISdata(WorkBuf, WorkRedund)) {
|
||||||
ErrCode = ERR_HwError;
|
ErrCode = ERR_HwError;
|
||||||
MediaChange=ERROR;
|
MediaChange=ERROR;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
@ -1397,7 +1397,7 @@ int Read_D_PhyOneSect(struct us_data *us, WORD count, BYTE *buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (Ssfdc_D_ReadSect(fdoExt,buf,Redundant))
|
//if (Ssfdc_D_ReadSect(fdoExt,buf,Redundant))
|
||||||
if (Ssfdc_D_ReadBlock(us,count,buf,Redundant)) {
|
if (Ssfdc_D_ReadBlock(us, count, buf, Redundant)) {
|
||||||
ErrCode = ERR_HwError;
|
ErrCode = ERR_HwError;
|
||||||
MediaChange=ERROR;
|
MediaChange=ERROR;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
@ -1410,7 +1410,7 @@ int Read_D_PhyOneSect(struct us_data *us, WORD count, BYTE *buf)
|
||||||
if (!Check_D_ReadError(Redundant))
|
if (!Check_D_ReadError(Redundant))
|
||||||
return SMSUCCESS;
|
return SMSUCCESS;
|
||||||
|
|
||||||
if (!Check_D_Correct(buf,Redundant)) {
|
if (!Check_D_Correct(buf, Redundant)) {
|
||||||
ErrCode = ERR_CorReadErr;
|
ErrCode = ERR_CorReadErr;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
@ -1569,12 +1569,12 @@ int Search_D_CIS(struct us_data *us)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!Check_D_DataStatus(Redundant)) {
|
if (!Check_D_DataStatus(Redundant)) {
|
||||||
if (Ssfdc_D_ReadSect(us,WorkBuf,Redundant)) {
|
if (Ssfdc_D_ReadSect(us, WorkBuf, Redundant)) {
|
||||||
Ssfdc_D_Reset(us);
|
Ssfdc_D_Reset(us);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Check_D_CISdata(WorkBuf,Redundant)) {
|
if (Check_D_CISdata(WorkBuf, Redundant)) {
|
||||||
Ssfdc_D_Reset(us);
|
Ssfdc_D_Reset(us);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
@ -1595,7 +1595,7 @@ int Search_D_CIS(struct us_data *us)
|
||||||
//----- Make_D_LogTable() ----------------------------------------------
|
//----- Make_D_LogTable() ----------------------------------------------
|
||||||
int Make_D_LogTable(struct us_data *us)
|
int Make_D_LogTable(struct us_data *us)
|
||||||
{
|
{
|
||||||
WORD phyblock,logblock;
|
WORD phyblock, logblock;
|
||||||
//SSFDCTYPE_T aa = (SSFDCTYPE_T ) &Ssfdc;
|
//SSFDCTYPE_T aa = (SSFDCTYPE_T ) &Ssfdc;
|
||||||
//ADDRESS_T bb = (ADDRESS_T) &Media;
|
//ADDRESS_T bb = (ADDRESS_T) &Media;
|
||||||
|
|
||||||
|
@ -1622,7 +1622,7 @@ int Make_D_LogTable(struct us_data *us)
|
||||||
|
|
||||||
for(Media.PhyBlock=0; Media.PhyBlock<Ssfdc.MaxBlocks; Media.PhyBlock++) {
|
for(Media.PhyBlock=0; Media.PhyBlock<Ssfdc.MaxBlocks; Media.PhyBlock++) {
|
||||||
if ((!Media.Zone) && (Media.PhyBlock<=CisArea.PhyBlock)) {
|
if ((!Media.Zone) && (Media.PhyBlock<=CisArea.PhyBlock)) {
|
||||||
Set_D_Bit(Assign[Media.Zone],Media.PhyBlock);
|
Set_D_Bit(Assign[Media.Zone], Media.PhyBlock);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1634,7 +1634,7 @@ int Make_D_LogTable(struct us_data *us)
|
||||||
if (!Check_D_DataBlank(Redundant))
|
if (!Check_D_DataBlank(Redundant))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Set_D_Bit(Assign[Media.Zone],Media.PhyBlock);
|
Set_D_Bit(Assign[Media.Zone], Media.PhyBlock);
|
||||||
|
|
||||||
if (Check_D_FailBlock(Redundant))
|
if (Check_D_FailBlock(Redundant))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -131,7 +131,7 @@ void fill_inquiry_response(struct us_data *us, unsigned char *data, unsigned int
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (data[0]&0x20) {
|
if (data[0]&0x20) {
|
||||||
memset(data+8,0,28);
|
memset(data+8, 0, 28);
|
||||||
} else {
|
} else {
|
||||||
u16 bcdDevice = le16_to_cpu(us->pusb_dev->descriptor.bcdDevice);
|
u16 bcdDevice = le16_to_cpu(us->pusb_dev->descriptor.bcdDevice);
|
||||||
memcpy(data+8, us->unusual_dev->vendorName,
|
memcpy(data+8, us->unusual_dev->vendorName,
|
||||||
|
|
Loading…
Reference in a new issue