Re: PATCH: rio driver, boot code (1 of 3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 14 February 2006 19:22, Alan Cox wrote:
> This patch expands the HOST_DISABLE macro in rioboot.c. This is good
> anyway to remove obfuscation but also neccessary so that indent will
> process the file correctly.
>
> Signed-off-by: Alan Cox <[email protected]>
>
> --- linux.vanilla-2.6.16-rc3/drivers/char/rio/rioboot.c	2006-02-14
> 17:08:55.000000000 +0000 +++
> linux-2.6.16-rc3/drivers/char/rio/rioboot.c	2006-02-14 19:07:26.551366016
> +0000 @@ -493,14 +493,10 @@
>  		if ( RWORD(HostP->__ParmMapR) == OldParmMap ) {
>  			rio_dprintk (RIO_DEBUG_BOOT, "parmmap 0x%x\n",
> RWORD(HostP->__ParmMapR)); rio_dprintk (RIO_DEBUG_BOOT, "RIO Mesg Run
> Fail\n");
> -
> -#define	HOST_DISABLE \
> -		HostP->Flags &= ~RUN_STATE; \
> -		HostP->Flags |= RC_STUFFED; \
> -		RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot );\
> -		continue
> -
> -			HOST_DISABLE;
> +			HostP->Flags &= ~RUN_STATE; \
> +			HostP->Flags |= RC_STUFFED; \
> +			RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot);\ 
> +			continue

Missing semicolon, maybe lose the \ .

>  		}
>
>  		rio_dprintk (RIO_DEBUG_BOOT, "Running 0x%x\n",
> RWORD(HostP->__ParmMapR)); @@ -528,7 +524,10 @@
>  		if ( (RWORD(ParmMapP->links) & 0xFFFF) != 0xFFFF ) {
>  			rio_dprintk (RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
>  			rio_dprintk (RIO_DEBUG_BOOT, "Links = 0x%x\n",RWORD(ParmMapP->links));
> -			HOST_DISABLE;
> +			HostP->Flags &= ~RUN_STATE; \
> +			HostP->Flags |= RC_STUFFED; \
> +			RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot);\ 
> +			continue

Ditto.

>  		}
>
>  		WWORD(ParmMapP->links , RIO_LINK_ENABLE);
> @@ -550,7 +549,10 @@
>  							!RWORD(ParmMapP->init_done) ) {
>  			rio_dprintk (RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
>  			rio_dprintk (RIO_DEBUG_BOOT, "Timedout waiting for init_done\n");
> -			HOST_DISABLE;
> +			HostP->Flags &= ~RUN_STATE; \
> +			HostP->Flags |= RC_STUFFED; \
> +			RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot
> );\ +			continue

Aaand the same.. another reason why macros like these are evil.

-- 
Cheers,
Alistair.

'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux