public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] de620.c: nitpicking
@ 2001-01-08 22:11 Arnaldo Carvalho de Melo
  2001-01-08 22:25 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-08 22:11 UTC (permalink / raw)
  To: Bjorn Ekwall; +Cc: Alan Cox, linux-kernel

Bjorn/Alan,

	Yes, I'm a nitpicker ;)

--- linux-2.4.0-ac3/drivers/net/de620.c	Tue Dec 19 11:24:52 2000
+++ linux-2.4.0-ac3.acme/drivers/net/de620.c	Mon Jan  8 20:06:28 2001
@@ -563,7 +563,6 @@
 		printk(KERN_WARNING "%s: No tx-buffer available!\n", dev->name);
 		restore_flags(flags);
 		return 1;
-		break;
 	}
 	de620_write_block(dev, buffer, len);
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] de620.c: nitpicking
  2001-01-08 22:11 [PATCH] de620.c: nitpicking Arnaldo Carvalho de Melo
@ 2001-01-08 22:25 ` Arnaldo Carvalho de Melo
  2001-01-08 22:30   ` [PATCH] tidy 53c7,8xx.c was " Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-08 22:25 UTC (permalink / raw)
  To: Drew Eckhardt; +Cc: Alan Cox, linux-kernel

Hi,

	Please consider applying, no need to restore_flags here, as it is
restored in the beginning of this if block.

- Arnaldo


--- linux-2.4.0-ac3/drivers/scsi/53c7,8xx.c	Fri Oct 13 18:40:51 2000
+++ linux-2.4.0-ac3.acme/drivers/scsi/53c7,8xx.c	Mon Jan  8 20:24:35 2001
@@ -1899,7 +1899,6 @@
 		hostdata->script, start);
 	    printk ("scsi%d : DSPS = 0x%x\n", host->host_no,
 		NCR53c7x0_read32(DSPS_REG));
-	    restore_flags(flags);
 	    return -1;
 	}
     	hostdata->test_running = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* [PATCH] tidy 53c7,8xx.c was Re: [PATCH] de620.c: nitpicking
  2001-01-08 22:25 ` Arnaldo Carvalho de Melo
@ 2001-01-08 22:30   ` Arnaldo Carvalho de Melo
  2001-01-09  2:14     ` [PATCH] advansys.c: include missing restore_flags, etc Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-08 22:30 UTC (permalink / raw)
  To: Drew Eckhardt, Alan Cox, linux-kernel

ouch, sorry for the misleading subject, cut and paste sometimes doesn't work ;(

Em Mon, Jan 08, 2001 at 08:25:33PM -0200, Arnaldo Carvalho de Melo escreveu:
> Hi,
> 
> 	Please consider applying, no need to restore_flags here, as it is
> restored in the beginning of this if block.
> 
> - Arnaldo
> 
> 
> --- linux-2.4.0-ac3/drivers/scsi/53c7,8xx.c	Fri Oct 13 18:40:51 2000
> +++ linux-2.4.0-ac3.acme/drivers/scsi/53c7,8xx.c	Mon Jan  8 20:24:35 2001
> @@ -1899,7 +1899,6 @@
>  		hostdata->script, start);
>  	    printk ("scsi%d : DSPS = 0x%x\n", host->host_no,
>  		NCR53c7x0_read32(DSPS_REG));
> -	    restore_flags(flags);
>  	    return -1;
>  	}
>      	hostdata->test_running = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* [PATCH] advansys.c: include missing restore_flags, etc
  2001-01-08 22:30   ` [PATCH] tidy 53c7,8xx.c was " Arnaldo Carvalho de Melo
@ 2001-01-09  2:14     ` Arnaldo Carvalho de Melo
  2001-01-09  7:30       ` Pauline Middelink
                         ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-09  2:14 UTC (permalink / raw)
  To: linux; +Cc: Alan Cox, linux-kernel

Hi,

	Please consider applying, comments in the patch.

- Arnaldo


--- linux-2.4.0-ac4/drivers/scsi/advansys.c	Mon Jan  8 20:39:28 2001
+++ linux-2.4.0-ac4.acme/drivers/scsi/advansys.c	Tue Jan  9 00:12:03 2001
@@ -717,6 +717,13 @@
      Ken Mort <ken@mort.net> reported a DEBUG compile bug fixed
      in 3.2K.
 
+     Arnaldo Carvalho de Melo <acme@conectiva.com.br> fix issues
+     related to save_flags/restore_flags, some restore_flags and
+     DvcLeaveCritical were missing, use unsigned long flags instead
+     of int flags, a not needed cli commented out, like the sti
+     that matches it (in advansys_abort) - 08/01/2001
+     
+
   L. AdvanSys Contact Information
  
      Mail:                   Advanced System Products, Inc.
@@ -2098,8 +2105,8 @@
 STATIC uchar     AscGetChipIRQ(PortAddr, ushort);
 STATIC uchar     AscSetChipIRQ(PortAddr, uchar, ushort);
 STATIC ushort    AscGetChipBiosAddress(PortAddr, ushort);
-STATIC int       DvcEnterCritical(void);
-STATIC void      DvcLeaveCritical(int);
+STATIC unsigned long DvcEnterCritical(void);
+STATIC void      DvcLeaveCritical(unsigned long);
 STATIC void      DvcInPortWords(PortAddr, ushort *, int);
 STATIC void      DvcOutPortWords(PortAddr, ushort *, int);
 STATIC void      DvcOutPortDWords(PortAddr, ASC_DCNT *, int);
@@ -3103,8 +3110,8 @@
 /*
  * Device drivers must define the following functions.
  */
-STATIC int   DvcEnterCritical(void);
-STATIC void  DvcLeaveCritical(int);
+STATIC unsigned long  DvcEnterCritical(void);
+STATIC void  DvcLeaveCritical(unsigned long);
 STATIC void  DvcSleepMilliSecond(ADV_DCNT);
 STATIC uchar DvcAdvReadPCIConfigByte(ADV_DVC_VAR *, ushort);
 STATIC void  DvcAdvWritePCIConfigByte(ADV_DVC_VAR *, ushort, uchar);
@@ -5938,7 +5945,7 @@
 {
     struct Scsi_Host    *shp;
     asc_board_t         *boardp;
-    int                 flags;
+    unsigned long       flags;
     Scsi_Cmnd           *done_scp;
 
     shp = scp->host;
@@ -6033,7 +6040,7 @@
     asc_board_t         *boardp;
     ASC_DVC_VAR         *asc_dvc_varp;
     ADV_DVC_VAR         *adv_dvc_varp;
-    int                 flags;
+    unsigned long       flags;
     int                 do_scsi_done;
     int                 scp_found;
     Scsi_Cmnd           *done_scp = NULL;
@@ -6138,7 +6145,7 @@
                     ret = SCSI_ABORT_ERROR;
                     break;
                 }
-                cli();
+                /* cli(); XXX */
             } else {
                 /*
                  * Wide Board
@@ -6278,7 +6285,7 @@
     asc_board_t          *boardp;
     ASC_DVC_VAR          *asc_dvc_varp;
     ADV_DVC_VAR          *adv_dvc_varp;
-    int                  flags;
+    unsigned long        flags;
     Scsi_Cmnd            *done_scp = NULL, *last_scp = NULL;
     Scsi_Cmnd            *tscp, *new_last_scp;
     int                  do_scsi_done;
@@ -9954,10 +9961,10 @@
 #endif /* version < v2.1.0 */ 
 }
 
-STATIC int
+STATIC unsigned long
 DvcEnterCritical(void)
 {
-    int    flags;
+    unsigned long flags;
 
     save_flags(flags);
     cli();
@@ -9965,7 +9972,7 @@
 }
 
 STATIC void
-DvcLeaveCritical(int flags)
+DvcLeaveCritical(unsigned long flags)
 {
     restore_flags(flags);
 }
@@ -12173,7 +12180,7 @@
 )
 {
     PortAddr            iop_base;
-    int                 last_int_level;
+    unsigned long       last_int_level;
     int                 sta;
     int                 n_q_required;
     int                 disable_syn_offset_one_fix;
@@ -12235,6 +12242,7 @@
 #if !CC_VERY_LONG_SG_LIST
         if (sg_entry_cnt > ASC_MAX_SG_LIST)
         {
+            DvcLeaveCritical(last_int_level);
             return(ERR);
         }
 #endif /* !CC_VERY_LONG_SG_LIST */
@@ -13112,7 +13120,7 @@
     ASC_QDONE_INFO      scsiq_buf;
     ASC_QDONE_INFO *scsiq;
     ASC_ISR_CALLBACK    asc_isr_callback;
-    int                 last_int_level;
+    unsigned long       last_int_level;
 
     iop_base = asc_dvc->iop_base;
     asc_isr_callback = asc_dvc->isr_callback;
@@ -13137,6 +13145,7 @@
                             (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS),
                                  scsiq->q_status);
                 (*asc_isr_callback) (asc_dvc, scsiq);
+    		DvcLeaveCritical(last_int_level);
                 return (1);
             }
         }
@@ -13158,7 +13167,7 @@
     ASC_QDONE_INFO      scsiq_buf;
     ASC_QDONE_INFO *scsiq;
     ASC_ISR_CALLBACK    asc_isr_callback;
-    int                 last_int_level;
+    unsigned long       last_int_level;
 
     iop_base = asc_dvc->iop_base;
     asc_isr_callback = asc_dvc->isr_callback;
@@ -17570,7 +17579,7 @@
 AdvExeScsiQueue(ADV_DVC_VAR *asc_dvc,
                 ADV_SCSI_REQ_Q *scsiq)
 {
-    int                    last_int_level;
+    unsigned long          last_int_level;
     AdvPortAddr            iop_base;
     ADV_DCNT               req_size;
     ADV_PADDR              req_paddr;
@@ -17598,6 +17607,7 @@
      */
     if ((new_carrp = asc_dvc->carr_freelist) == NULL)
     {
+       DvcLeaveCritical(last_int_level);
        return ADV_BUSY;
     }
     asc_dvc->carr_freelist =
@@ -17835,7 +17845,7 @@
     ushort                      target_bit;
     ADV_CARR_T                  *free_carrp;
     ADV_VADDR                   irq_next_vpa;
-    int                         flags;
+    unsigned long               flags;
     ADV_SCSI_REQ_Q              *scsiq;
 
     flags = DvcEnterCritical();
@@ -17848,6 +17858,7 @@
     if ((int_stat & (ADV_INTR_STATUS_INTRA | ADV_INTR_STATUS_INTRB |
          ADV_INTR_STATUS_INTRC)) == 0)
     {
+        DvcLeaveCritical(flags);
         return ADV_FALSE;
     }
 
@@ -17982,7 +17993,7 @@
                ushort idle_cmd,
                ADV_DCNT idle_cmd_parameter)
 {
-    int         last_int_level;
+    unsigned long last_int_level;
     int         result;
     ADV_DCNT    i, j;
     AdvPortAddr iop_base;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] advansys.c: include missing restore_flags, etc
  2001-01-09  2:14     ` [PATCH] advansys.c: include missing restore_flags, etc Arnaldo Carvalho de Melo
@ 2001-01-09  7:30       ` Pauline Middelink
  2001-01-09 10:06         ` Arnaldo Carvalho de Melo
                           ` (2 more replies)
  2001-01-09 10:02       ` Russell King
  2001-01-09 11:18       ` [PATCH] ad1848.c: include missing restore_flags Arnaldo Carvalho de Melo
  2 siblings, 3 replies; 16+ messages in thread
From: Pauline Middelink @ 2001-01-09  7:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaldo Carvalho de Melo, linux, Alan Cox

On Tue, 09 Jan 2001 around 00:14:43 -0200, Arnaldo Carvalho de Melo wrote:
> Hi,
> 
> 	Please consider applying, comments in the patch.
> 
> - Arnaldo
> 
> 
> --- linux-2.4.0-ac4/drivers/scsi/advansys.c	Mon Jan  8 20:39:28 2001
> +++ linux-2.4.0-ac4.acme/drivers/scsi/advansys.c	Tue Jan  9 00:12:03 2001

> -STATIC int
> +STATIC unsigned long
>  DvcEnterCritical(void)
>  {
> -    int    flags;
> +    unsigned long flags;
>  
>      save_flags(flags);
>      cli();
> @@ -9965,7 +9972,7 @@
>  }

Err, according tho wise ppl on this list, this does not work on
MIPSes. The flags thing must stay in the same stackframe.

(I know, not your fault, but since you are patching the driver...)

>  STATIC void
> -DvcLeaveCritical(int flags)
> +DvcLeaveCritical(unsigned long flags)
>  {
>      restore_flags(flags);
>  }

Item.

    Met vriendelijke groet,
        Pauline Middelink
-- 
GPG Key fingerprint = 2D5B 87A7 DDA6 0378 5DEA  BD3B 9A50 B416 E2D0 C3C2
For more details look at my website http://www.polyware.nl/~middelink
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] advansys.c: include missing restore_flags, etc
  2001-01-09  2:14     ` [PATCH] advansys.c: include missing restore_flags, etc Arnaldo Carvalho de Melo
  2001-01-09  7:30       ` Pauline Middelink
@ 2001-01-09 10:02       ` Russell King
  2001-01-09 11:18       ` [PATCH] ad1848.c: include missing restore_flags Arnaldo Carvalho de Melo
  2 siblings, 0 replies; 16+ messages in thread
From: Russell King @ 2001-01-09 10:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux, Alan Cox, linux-kernel

Arnaldo Carvalho de Melo writes:
> 	Please consider applying, comments in the patch.

Can't the following be fixed properly?

> -STATIC int
> +STATIC unsigned long
>  DvcEnterCritical(void)
>  {
> -    int    flags;
> +    unsigned long flags;
>  
>      save_flags(flags);
>      cli();

Guess what happens here?

    return flags;

> @@ -9965,7 +9972,7 @@
>  }
>  
>  STATIC void
> -DvcLeaveCritical(int flags)
> +DvcLeaveCritical(unsigned long flags)
>  {
>      restore_flags(flags);
>  }

The above doesn't work on some architectures.  Its better to use a macro
if you want to separate this out.  ie, something like (davem will have to
okay it tho):

#define DvcEnterCritical()				\
 ({ unsigned long __flags; save_flags(__flags); cli(); __flags; })

#define DvcLeaveCritical(flags)				\
 do { restore_flags(flags); } while (0)

This should then ensure that you don't end up with problems associated
with register windows on the sparc or whatever.  Even better would be
to use a spinlock instead of Dvc?????Critical.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |         Russell King        rmk@arm.linux.org.uk      --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] advansys.c: include missing restore_flags, etc
  2001-01-09  7:30       ` Pauline Middelink
@ 2001-01-09 10:06         ` Arnaldo Carvalho de Melo
  2001-01-09 10:23         ` Alan Cox
  2001-01-10  7:48         ` Ralf Baechle
  2 siblings, 0 replies; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-09 10:06 UTC (permalink / raw)
  To: Pauline Middelink, linux-kernel, linux, Alan Cox

Em Tue, Jan 09, 2001 at 08:30:07AM +0100, Pauline Middelink escreveu:
> > +STATIC unsigned long
> >  DvcEnterCritical(void)
> >  {
> > -    int    flags;
> > +    unsigned long flags;
> >  
> >      save_flags(flags);
> >      cli();
> > @@ -9965,7 +9972,7 @@
> >  }
> 
> Err, according tho wise ppl on this list, this does not work on
> MIPSes. The flags thing must stay in the same stackframe.
> 
> (I know, not your fault, but since you are patching the driver...)

yap, know that, just thought that this beast was only for i386, will submit
another patch, and I think that some other drivers does this as well...

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] advansys.c: include missing restore_flags, etc
  2001-01-09  7:30       ` Pauline Middelink
  2001-01-09 10:06         ` Arnaldo Carvalho de Melo
@ 2001-01-09 10:23         ` Alan Cox
  2001-01-09 23:12           ` Pauline Middelink
  2001-01-10  7:48         ` Ralf Baechle
  2 siblings, 1 reply; 16+ messages in thread
From: Alan Cox @ 2001-01-09 10:23 UTC (permalink / raw)
  To: Pauline Middelink; +Cc: linux-kernel, Arnaldo Carvalho de Melo, linux, Alan Cox

> >      save_flags(flags);
> >      cli();
> > @@ -9965,7 +9972,7 @@
> >  }
> 
> Err, according tho wise ppl on this list, this does not work on
> MIPSes. The flags thing must stay in the same stackframe.

Certainly doesnt work on sparc32, but then it didnt before. Inline it might
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* [PATCH] ad1848.c: include missing restore_flags
  2001-01-09  2:14     ` [PATCH] advansys.c: include missing restore_flags, etc Arnaldo Carvalho de Melo
  2001-01-09  7:30       ` Pauline Middelink
  2001-01-09 10:02       ` Russell King
@ 2001-01-09 11:18       ` Arnaldo Carvalho de Melo
  2001-01-09 12:00         ` [PATCH] sscape.c: " Arnaldo Carvalho de Melo
  2 siblings, 1 reply; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-09 11:18 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Alan,

	Please apply.

- Arnaldo

--- linux-2.4.0-ac4/drivers/sound/ad1848.c	Thu Aug 24 07:40:05 2000
+++ linux-2.4.0-ac4.acme/drivers/sound/ad1848.c	Tue Jan  9 08:55:58 2001
@@ -28,6 +28,7 @@
  *		          of irqs. Use dev_id.
  * Christoph Hellwig	: adapted to module_init/module_exit
  * Aki Laukkanen	: added power management support
+ * Arnaldo C. de Melo	: added missing restore_flags in ad1848_resume
  *
  * Status:
  *		Tested. Believed fully functional.
@@ -2751,6 +2752,7 @@
 		bits = interrupt_bits[devc->irq];
 		if (bits == -1) {
 			printk(KERN_ERR "MSS: Bad IRQ %d\n", devc->irq);
+			restore_flags(flags);
 			return -1;
 		}
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* [PATCH] sscape.c: include missing restore_flags
  2001-01-09 11:18       ` [PATCH] ad1848.c: include missing restore_flags Arnaldo Carvalho de Melo
@ 2001-01-09 12:00         ` Arnaldo Carvalho de Melo
  2001-01-09 12:24           ` [PATCH] via-macii.c: restore_flags on failure Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-09 12:00 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Alan,

	Please apply.

- Arnaldo

--- linux-2.4.0-ac4/drivers/sound/sscape.c	Mon Jan  8 20:39:30 2001
+++ linux-2.4.0-ac4.acme/drivers/sound/sscape.c	Tue Jan  9 09:16:39 2001
@@ -16,6 +16,7 @@
  * Christoph Hellwig	: adapted to module_init/module_exit
  * Bartlomiej Zolnierkiewicz : added __init to attach_sscape()
  * Chris Rankin		: Specify that this module owns the coprocessor
+ * Arnaldo C. de Melo	: added missing restore_flags in sscape_pnp_upload_file
  */
 
 #include <linux/init.h>
@@ -969,7 +970,10 @@
 		memcpy(devc->raw_buf, dt, l); dt += l;
 		sscape_start_dma(devc->dma, devc->raw_buf_phys, l, 0x48);
 		sscape_pnp_start_dma ( devc, 0 );
-		if (sscape_pnp_wait_dma ( devc, 0 ) == 0) return 0;
+		if (sscape_pnp_wait_dma ( devc, 0 ) == 0) {
+			restore_flags(flags);	    
+			return 0;
+		}
 	}
 	
 	restore_flags(flags);	    
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* [PATCH] via-macii.c: restore_flags on failure
  2001-01-09 12:00         ` [PATCH] sscape.c: " Arnaldo Carvalho de Melo
@ 2001-01-09 12:24           ` Arnaldo Carvalho de Melo
  2001-01-09 13:38             ` [PATCH] dn_keyb.c: " Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-09 12:24 UTC (permalink / raw)
  To: Joshua M.Thompson; +Cc: Alan Cox, linux-kernel

Hi,

	Please consider applying.

- Arnaldo

--- linux-2.4.0-ac4/drivers/macintosh/via-macii.c	Tue Dec 19 11:25:39 2000
+++ linux-2.4.0-ac4.acme/drivers/macintosh/via-macii.c	Tue Jan  9 10:18:17 2001
@@ -9,6 +9,9 @@
  *
  * Rewrite for Unified ADB by Joshua M. Thompson (funaho@jurai.org)
  *
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * - restore_flags on failure in macii_init - 09/01/2001
+ *
  * 1999-08-02 (jmt) - Initial rewrite for Unified ADB.
  */
  
@@ -147,15 +150,16 @@
 	cli();
 	
 	err = macii_init_via();
-	if (err) return err;
+	if (err) goto out;
 
 	err = request_irq(IRQ_MAC_ADB, macii_interrupt, IRQ_FLG_LOCK, "ADB",
 		    macii_interrupt);
-	if (err) return err;
+	if (err) goto out;
 
 	macii_state = idle;
-	restore_flags(flags);	
-	return 0;
+	err = 0;
+out:	restore_flags(flags);	
+	return err;
 }
 
 /* initialize the hardware */	
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* [PATCH] dn_keyb.c: restore_flags on failure
  2001-01-09 12:24           ` [PATCH] via-macii.c: restore_flags on failure Arnaldo Carvalho de Melo
@ 2001-01-09 13:38             ` Arnaldo Carvalho de Melo
  2001-01-09 16:17               ` Alan Cox
  0 siblings, 1 reply; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-09 13:38 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Alan,

	Please consider applying. I don't who is the maintainer, no
references in the driver, CREDITS or MAINTAINERS

- Arnaldo

--- linux-2.4.0-ac4/drivers/char/dn_keyb.c	Fri Jul 28 06:34:40 2000
+++ linux-2.4.0-ac4.acme/drivers/char/dn_keyb.c	Tue Jan  9 10:32:17 2001
@@ -435,15 +435,14 @@
 	for(;length;length--) {
 		keyb_cmds[keyb_cmd_write++]=*(cmd++);
 		if(keyb_cmd_write==keyb_cmd_read)
-			return;
+			goto out;
 		if(keyb_cmd_write==APOLLO_KEYB_CMD_ENTRIES)
 			keyb_cmd_write=0;
 	}
 	if(!keyb_cmd_transmit)  {
  	   sio01.BRGtest_cra=5;
 	}
-	restore_flags(flags);
-
+out:	restore_flags(flags);
 }
 
 static struct busmouse apollo_mouse = {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] dn_keyb.c: restore_flags on failure
  2001-01-09 16:17               ` Alan Cox
@ 2001-01-09 15:30                 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 16+ messages in thread
From: Arnaldo Carvalho de Melo @ 2001-01-09 15:30 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Em Tue, Jan 09, 2001 at 04:17:30PM +0000, Alan Cox escreveu:
> >  		keyb_cmds[keyb_cmd_write++]=*(cmd++);
> >  		if(keyb_cmd_write==keyb_cmd_read)
> > -			return;
> ># +			goto out;
> 
> Hans Grobler beat you to this one

Ok, I'll talk with him in private to have a proper janitor union, avoiding
duplicate work, I'll talk with Panin too 8)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] dn_keyb.c: restore_flags on failure
  2001-01-09 13:38             ` [PATCH] dn_keyb.c: " Arnaldo Carvalho de Melo
@ 2001-01-09 16:17               ` Alan Cox
  2001-01-09 15:30                 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 16+ messages in thread
From: Alan Cox @ 2001-01-09 16:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Alan Cox, linux-kernel

>  		keyb_cmds[keyb_cmd_write++]=*(cmd++);
>  		if(keyb_cmd_write==keyb_cmd_read)
> -			return;
># +			goto out;

Hans Grobler beat you to this one
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] advansys.c: include missing restore_flags, etc
  2001-01-09 10:23         ` Alan Cox
@ 2001-01-09 23:12           ` Pauline Middelink
  0 siblings, 0 replies; 16+ messages in thread
From: Pauline Middelink @ 2001-01-09 23:12 UTC (permalink / raw)
  To: linux-kernel

On Tue, 09 Jan 2001 around 10:23:47 +0000, Alan Cox wrote:
> > >      save_flags(flags);
> > >      cli();
> > > @@ -9965,7 +9972,7 @@
> > >  }
> > 
> > Err, according tho wise ppl on this list, this does not work on
> > MIPSes. The flags thing must stay in the same stackframe.
> 
> Certainly doesnt work on sparc32, but then it didnt before. Inline it might

Oops my bad. Sparc it is.

    Met vriendelijke groet,
        Pauline Middelink
-- 
GPG Key fingerprint = 2D5B 87A7 DDA6 0378 5DEA  BD3B 9A50 B416 E2D0 C3C2
For more details look at my website http://www.polyware.nl/~middelink
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] advansys.c: include missing restore_flags, etc
  2001-01-09  7:30       ` Pauline Middelink
  2001-01-09 10:06         ` Arnaldo Carvalho de Melo
  2001-01-09 10:23         ` Alan Cox
@ 2001-01-10  7:48         ` Ralf Baechle
  2 siblings, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2001-01-10  7:48 UTC (permalink / raw)
  To: Pauline Middelink, linux-kernel, Arnaldo Carvalho de Melo, linux,
	Alan Cox

On Tue, Jan 09, 2001 at 08:30:07AM +0100, Pauline Middelink wrote:

> > -STATIC int
> > +STATIC unsigned long
> >  DvcEnterCritical(void)
> >  {
> > -    int    flags;
> > +    unsigned long flags;
> >  
> >      save_flags(flags);
> >      cli();
> > @@ -9965,7 +9972,7 @@
> >  }
> 
> Err, according tho wise ppl on this list, this does not work on
> MIPSes. The flags thing must stay in the same stackframe.

Nope, that's on Sparc.

> >  STATIC void
> > -DvcLeaveCritical(int flags)
> > +DvcLeaveCritical(unsigned long flags)
> >  {
> >      restore_flags(flags);
> >  }
> 
> Item.

My Latin teach says it's ``idem''.

  Ralf

--
"Embrace, Enhance, Eliminate" - it worked for the pope, it'll work for Bill.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-01-10  8:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-08 22:11 [PATCH] de620.c: nitpicking Arnaldo Carvalho de Melo
2001-01-08 22:25 ` Arnaldo Carvalho de Melo
2001-01-08 22:30   ` [PATCH] tidy 53c7,8xx.c was " Arnaldo Carvalho de Melo
2001-01-09  2:14     ` [PATCH] advansys.c: include missing restore_flags, etc Arnaldo Carvalho de Melo
2001-01-09  7:30       ` Pauline Middelink
2001-01-09 10:06         ` Arnaldo Carvalho de Melo
2001-01-09 10:23         ` Alan Cox
2001-01-09 23:12           ` Pauline Middelink
2001-01-10  7:48         ` Ralf Baechle
2001-01-09 10:02       ` Russell King
2001-01-09 11:18       ` [PATCH] ad1848.c: include missing restore_flags Arnaldo Carvalho de Melo
2001-01-09 12:00         ` [PATCH] sscape.c: " Arnaldo Carvalho de Melo
2001-01-09 12:24           ` [PATCH] via-macii.c: restore_flags on failure Arnaldo Carvalho de Melo
2001-01-09 13:38             ` [PATCH] dn_keyb.c: " Arnaldo Carvalho de Melo
2001-01-09 16:17               ` Alan Cox
2001-01-09 15:30                 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox