All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: rio driver, boot code (1 of 3)
@ 2006-02-14 19:22 Alan Cox
  2006-02-14 19:38 ` Alistair John Strachan
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2006-02-14 19:22 UTC (permalink / raw)
  To: linux-kernel, torvalds, apkm

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 <alan@redhat.com>

--- 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
 		}
 
 		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
 		}
 
 		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
 		}
 
 		rio_dprintk (RIO_DEBUG_BOOT, "Got init_done\n");


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: rio driver, boot code (1 of 3)
  2006-02-14 19:22 PATCH: rio driver, boot code (1 of 3) Alan Cox
@ 2006-02-14 19:38 ` Alistair John Strachan
  2006-02-14 20:08   ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Alistair John Strachan @ 2006-02-14 19:38 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, torvalds, apkm

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 <alan@redhat.com>
>
> --- 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: rio driver, boot code (1 of 3)
  2006-02-14 19:38 ` Alistair John Strachan
@ 2006-02-14 20:08   ` Alan Cox
  2006-02-14 21:02     ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2006-02-14 20:08 UTC (permalink / raw)
  To: Alistair John Strachan; +Cc: linux-kernel, torvalds, apkm

On Maw, 2006-02-14 at 19:38 +0000, Alistair John Strachan wrote:
> 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.

Harmless but yes I'll send a diff to clean them up once the other three
are applied.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: rio driver, boot code (1 of 3)
  2006-02-14 20:08   ` Alan Cox
@ 2006-02-14 21:02     ` Linus Torvalds
  2006-02-14 23:20       ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2006-02-14 21:02 UTC (permalink / raw)
  To: Alan Cox; +Cc: Alistair John Strachan, Linux Kernel Mailing List, Andrew Morton



On Tue, 14 Feb 2006, Alan Cox wrote:
> 
> Harmless but yes I'll send a diff to clean them up once the other three
> are applied.

Not harmless. The other patches seem to assume that the first one was 
_not_ done. IOW, patch #2 contains:

	-
	-#define        HOST_DISABLE \
	-               HostP->Flags &= ~RUN_STATE; \
	-               HostP->Flags |= RC_STUFFED; \
	-               RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot );\
	-               continue
	-
	-                       HOST_DISABLE;

and will thus obviously not apply at all if patch #1 was applied.

It looks like the indent was done _after_ patch #1 was applied, but then 
the result was diffed against the state _before_ patch #1 was applied.

So I'll flush the series, hoping for a corrected one that actually applies 
in order..

		Linus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: rio driver, boot code (1 of 3)
  2006-02-14 21:02     ` Linus Torvalds
@ 2006-02-14 23:20       ` Alan Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2006-02-14 23:20 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Alistair John Strachan, Linux Kernel Mailing List, Andrew Morton

On Maw, 2006-02-14 at 13:02 -0800, Linus Torvalds wrote:
> It looks like the indent was done _after_ patch #1 was applied, but then 
> the result was diffed against the state _before_ patch #1 was applied.

Umm yes, so just apply #2 and #3. Sorry about that. I can send you a
single patch with the lot if you want but I didn't archive the inbetween
states


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-02-14 23:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-14 19:22 PATCH: rio driver, boot code (1 of 3) Alan Cox
2006-02-14 19:38 ` Alistair John Strachan
2006-02-14 20:08   ` Alan Cox
2006-02-14 21:02     ` Linus Torvalds
2006-02-14 23:20       ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.