mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] 64 bit bug in video1394.c
@ 2001-08-16  4:47 jes
  0 siblings, 0 replies; 4+ messages in thread
From: jes @ 2001-08-16  4:47 UTC (permalink / raw)
  To: Peter Schlaile; +Cc: torvalds, alan, linux-kernel

Hi

drivers/ieee1394/video1394.c has a couple of instances where it saved
cpu flags in 'int' which breaks on 64 bit boxes.

Here's a patch.

Jes

--- drivers/ieee1394/video1394.c~	Wed Aug  8 00:08:04 2001
+++ drivers/ieee1394/video1394.c	Thu Aug 16 00:46:13 2001
@@ -1283,7 +1283,8 @@
 {
 	struct video_card *video = NULL;
 	struct ti_ohci *ohci;
-	int res = -EINVAL, flags;
+	int res = -EINVAL;
+	unsigned long flags;
 	struct list_head *lh;
 
         spin_lock_irqsave(&video1394_cards_lock, flags);
@@ -1320,7 +1321,8 @@
 
 static int video1394_open(struct inode *inode, struct file *file)
 {
-	int i = MINOR(inode->i_rdev), flags;
+	int i = MINOR(inode->i_rdev);
+	unsigned long flags;
 	struct video_card *video = NULL;
 	struct list_head *lh;
 
@@ -1350,7 +1352,8 @@
 	struct video_card *video = NULL;
 	struct ti_ohci *ohci;
 	u64 mask;
-	int i, flags;
+	int i;
+	unsigned long flags;
 	struct list_head *lh;
 
         spin_lock_irqsave(&video1394_cards_lock, flags);
@@ -1416,7 +1419,8 @@
 void irq_handler(int card, quadlet_t isoRecvIntEvent, 
 		 quadlet_t isoXmitIntEvent)
 {
-	int i, flags;
+	int i;
+	unsigned long flags;
 	struct video_card *video = NULL;
 	struct list_head *lh;
 
@@ -1465,7 +1469,7 @@
 static int video1394_init(struct ti_ohci *ohci)
 {
 	struct video_card *video = kmalloc(sizeof(struct video_card), GFP_KERNEL);
-	int flags;
+	unsigned long flags;
 	char name[16];
 
 	if (video == NULL) {
@@ -1525,7 +1529,8 @@
 /* Must be called under spinlock */
 static void remove_card(struct video_card *video)
 {
-	int i, flags;
+	int i;
+	unsigned long flags;
 
 	ohci1394_unregister_video(video->ohci, &video_tmpl);
 
@@ -1556,7 +1561,7 @@
 static void video1394_remove_host (struct hpsb_host *host)
 {
 	struct ti_ohci *ohci;
-	int flags;
+	unsigned long flags;
 	struct list_head *lh;
 
 	/* We only work with the OHCI-1394 driver */

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

* Re: [patch] 64 bit bug in video1394.c
  2001-08-16  4:49 jes
@ 2001-08-16  5:08 ` Jeff Chua
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Chua @ 2001-08-16  5:08 UTC (permalink / raw)
  To: jes; +Cc: alan, Linus Torvalds, Linux Kernel


Can't you just redefine int to unsigned long for 64-bit system?

Thanks,
Jeff
[ jchua@fedex.com ]

On Thu, 16 Aug 2001 jes@trained-monkey.org wrote:

> Hi
>
> drivers/message/i2o/i2o_block.c cpu flags in 'int' which breaks on 64
> bit boxes.
>
> Here's a patch.
>


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

* [patch] 64 bit bug in video1394.c
@ 2001-08-16  4:53 jes
  0 siblings, 0 replies; 4+ messages in thread
From: jes @ 2001-08-16  4:53 UTC (permalink / raw)
  To: alan; +Cc: torvalds, linux-kernel

Hi

More i2o 64 bit bugs.

Jes

--- drivers/message/i2o/i2o_config.c~	Wed Aug  8 00:08:04 2001
+++ drivers/message/i2o/i2o_config.c	Thu Aug 16 00:50:28 2001
@@ -790,7 +790,7 @@
 	struct i2o_cfg_info *p = NULL;
 	struct i2o_evt_get *uget = (struct i2o_evt_get*)arg;
 	struct i2o_evt_get kget;
-	unsigned int flags;
+	unsigned long flags;
 
 	for(p = open_files; p; p = p->next)
 		if(p->q_id == id)
@@ -819,7 +819,7 @@
 {
 	struct i2o_cfg_info *tmp = 
 		(struct i2o_cfg_info *)kmalloc(sizeof(struct i2o_cfg_info), GFP_KERNEL);
-	unsigned int flags;
+	unsigned long flags;
 
 	if(!tmp)
 		return -ENOMEM;
@@ -845,7 +845,7 @@
 {
 	u32 id = (u32)file->private_data;
 	struct i2o_cfg_info *p1, *p2;
-	unsigned int flags;
+	unsigned long flags;
 
 	lock_kernel();
 	p1 = p2 = NULL;
--- drivers/message/i2o/i2o_core.c~	Wed Aug  8 00:08:04 2001
+++ drivers/message/i2o/i2o_core.c	Thu Aug 16 00:51:26 2001
@@ -890,7 +890,7 @@
 	struct reply_info *reply = (struct reply_info *) reply_data;
 	u32 *msg = reply->msg;
 	struct i2o_controller *c = NULL;
-	int flags;
+	unsigned long flags;
 
 	lock_kernel();
 	daemonize();
@@ -2535,7 +2535,7 @@
 	DECLARE_WAIT_QUEUE_HEAD(wq_i2o_post);
 	int complete = 0;
 	int status;
-	int flags = 0;
+	unsigned long flags = 0;
 	struct i2o_post_wait_data *wait_data =
 		kmalloc(sizeof(struct i2o_post_wait_data), GFP_KERNEL);
 

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

* [patch] 64 bit bug in video1394.c
@ 2001-08-16  4:49 jes
  2001-08-16  5:08 ` Jeff Chua
  0 siblings, 1 reply; 4+ messages in thread
From: jes @ 2001-08-16  4:49 UTC (permalink / raw)
  To: alan; +Cc: torvalds, linux-kernel

Hi

drivers/message/i2o/i2o_block.c cpu flags in 'int' which breaks on 64
bit boxes.

Here's a patch.

Jes

--- drivers/message/i2o/i2o_block.c~	Wed Aug  8 00:08:04 2001
+++ drivers/message/i2o/i2o_block.c	Thu Aug 16 00:48:19 2001
@@ -721,7 +721,7 @@
 static int i2ob_evt(void *dummy)
 {
 	unsigned int evt;
-	unsigned int flags;
+	unsigned long flags;
 	int unit;
 	int i;
 	//The only event that has data is the SCSI_SMART event.
@@ -1706,7 +1706,7 @@
 {	
 	int unit = 0;
 	int i = 0;
-	int flags;
+	unsigned long flags;
 
 	spin_lock_irqsave(&io_request_lock, flags);
 

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

end of thread, other threads:[~2001-08-16  5:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-16  4:47 [patch] 64 bit bug in video1394.c jes
2001-08-16  4:49 jes
2001-08-16  5:08 ` Jeff Chua
2001-08-16  4:53 jes

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

all inboxes | Powered by JetHome®