Re: [PATCH 2/2] Staging: keucr: Remove BOOLEAN type from driver.

From: Belisko Marek
Date: Wed Mar 02 2011 - 16:12:22 EST


On Wed, Mar 2, 2011 at 10:04 PM, Roel Van Nyen <roel.vannyen@xxxxxxxxx> wrote:
> Remove BOOLEAN type, replacing it with bool and removing some that were not in use.
>
> Signed-off-by: Roel Van Nyen <roel.vannyen@xxxxxxxxx>
> ---
> Âdrivers/staging/keucr/common.h  |  Â2 --
> Âdrivers/staging/keucr/smil.h   |  Â4 ++--
> Âdrivers/staging/keucr/smilmain.c | Â Â4 ++--
> Âdrivers/staging/keucr/usb.h   Â|  Â4 +---
> Â4 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/keucr/common.h b/drivers/staging/keucr/common.h
> index 07aabf4..5dda691 100644
> --- a/drivers/staging/keucr/common.h
> +++ b/drivers/staging/keucr/common.h
> @@ -1,8 +1,6 @@
> Â#ifndef COMMON_INCD
> Â#define COMMON_INCD
>
> -typedef u8 BOOLEAN;
> -
> Â#define swapWORD(w) Â Â((((unsigned short)(w) << 8) & 0xff00) | Â Â Â Â\
> Â Â Â Â Â Â Â Â Â Â Â Â (((unsigned short)(w) >> 8) & 0x00ff))
> Â#define swapDWORD(dw) Â((((unsigned long)(dw) << 24) & 0xff000000) | Â \
> diff --git a/drivers/staging/keucr/smil.h b/drivers/staging/keucr/smil.h
> index c108545..a3addff 100644
> --- a/drivers/staging/keucr/smil.h
> +++ b/drivers/staging/keucr/smil.h
> @@ -223,11 +223,11 @@ int     Media_D_OneSectWriteNext  Â(struct us_data *,u8 *);
> Âint     Media_D_OneSectWriteFlush  (struct us_data *);
>
> Â/******************************************/
> -void    ÂSM_EnableLED        Â(struct us_data *,BOOLEAN);
> +void    ÂSM_EnableLED        Â(struct us_data *, bool enabled);
> Âvoid    ÂLed_D_TernOn        Â(void);
> Âvoid    ÂLed_D_TernOff        (void);
>
> -int     Media_D_EraseAllRedtData  Â(u32 Index, BOOLEAN CheckBlock);
> +int     Media_D_EraseAllRedtData  Â(u32 Index);
Shouldn't there be something like:
int Media_D_EraseAllRedtData (u32 Index, bool CheckBlock); ???

> Â//u32    Media_D_GetMediaInfo    Â(struct us_data * fdoExt, PIOCTL_MEDIA_INFO_IN pParamIn, PIOCTL_MEDIA_INFO_OUT pParamOut);
>
> Â//----- SMILSub.c ----------------------------------------------------
> diff --git a/drivers/staging/keucr/smilmain.c b/drivers/staging/keucr/smilmain.c
> index 64f2d51..3c035d2 100644
> --- a/drivers/staging/keucr/smilmain.c
> +++ b/drivers/staging/keucr/smilmain.c
> @@ -527,7 +527,7 @@ int Media_D_OneSectWriteFlush(PFDO_DEVICE_EXTENSION fdoExt)
> Â//
> Â////LED Tern On/Off Subroutine
> Â////----- SM_EnableLED() -----------------------------------------------
> -//void SM_EnableLED(PFDO_DEVICE_EXTENSION fdoExt, BOOLEAN enable)
> +//void SM_EnableLED(PFDO_DEVICE_EXTENSION fdoExt)
> Â//{
> Â// Â Âif (fdoExt->Drive_IsSWLED)
> Â// Â Â{
> @@ -1778,7 +1778,7 @@ int MarkFail_D_PhyOneBlock(struct us_data *us)
> Â//}
> Â//
> Â////----- Media_D_EraseAllRedtData() -----------------------------------
> -//int Media_D_EraseAllRedtData(u32 Index, BOOLEAN CheckBlock)
> +//int Media_D_EraseAllRedtData(u32 Index, bool CheckBlock)
> Â//{
> Â// Â Âu8 Â Âi;
> Â//
> diff --git a/drivers/staging/keucr/usb.h b/drivers/staging/keucr/usb.h
> index 154ec9e..a85b20f 100644
> --- a/drivers/staging/keucr/usb.h
> +++ b/drivers/staging/keucr/usb.h
> @@ -199,10 +199,8 @@ struct us_data {
> Â Â Â Âu8 Â Â Â ÂMMC_HIGH_CAPACITY;
>
> Â Â Â Â//----- MS Control Data ----------------
> - Â Â Â BOOLEAN Â Â Â Â Â Â MS_SWWP;
> Â Â Â Âu32 Â Â Â Â Â Â Â MSP_TotalBlock;
>    ÂMS_LibControl    MS_Lib;
> - Â Â Â BOOLEAN Â Â Â Â Â Â MS_IsRWPage;
> Â Â Â Âu16 Â Â Â Â Â Â Â ÂMS_Model;
>
> Â Â Â Â//----- SM Control Data ----------------
> @@ -215,7 +213,7 @@ struct us_data {
>    Âint       SrbStatus;
>
> Â Â Â Â//------Power Managerment ---------------
> - Â Â Â BOOLEAN Â Â Â Â Power_IsResum;
> +    bool     Power_IsResum;
> Â};
>
> Â/* Convert between us_data and the corresponding Scsi_Host */
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>



--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/