aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-10-03 04:13:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:03:41 -0400
commit17a4506d0eb1f78c9018c06a79e7dd09ae78c3a8 (patch)
tree6d0721b3570cc189300f3c7035d12cfa634183f5 /drivers/isdn/hisax
parent31e7e1a806dab5e8e218b78e1b41887a4f6dfcc0 (diff)
[PATCH] ISDN warning fixes
Clean up warnings in drivers/isdn by using long not int for the values where we pass void * and cast to integer types. The code is ok (ok passing the stuff this way isn't pretty but the code is valid). In all the cases I checked out the right thing happens anyway but this removes all the warnings. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jeff Garzik <jeff@garzik.org> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/config.c6
-rw-r--r--drivers/isdn/hisax/hfc4s8s_l1.c7
-rw-r--r--drivers/isdn/hisax/hfc_sx.c4
-rw-r--r--drivers/isdn/hisax/hfc_usb.c4
-rw-r--r--drivers/isdn/hisax/hisax_fcpcipnp.c17
-rw-r--r--drivers/isdn/hisax/st5481_b.c8
-rw-r--r--drivers/isdn/hisax/st5481_d.c4
7 files changed, 24 insertions, 26 deletions
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index e10350360f2f..e4823ab2b127 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -1721,11 +1721,11 @@ static void hisax_b_l1l2(struct hisax_if *ifc, int pr, void *arg)
1721 hisax_b_sched_event(bcs, B_RCVBUFREADY); 1721 hisax_b_sched_event(bcs, B_RCVBUFREADY);
1722 break; 1722 break;
1723 case PH_DATA | CONFIRM: 1723 case PH_DATA | CONFIRM:
1724 bcs->tx_cnt -= (int) arg; 1724 bcs->tx_cnt -= (long)arg;
1725 if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag)) { 1725 if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag)) {
1726 u_long flags; 1726 u_long flags;
1727 spin_lock_irqsave(&bcs->aclock, flags); 1727 spin_lock_irqsave(&bcs->aclock, flags);
1728 bcs->ackcnt += (int) arg; 1728 bcs->ackcnt += (long)arg;
1729 spin_unlock_irqrestore(&bcs->aclock, flags); 1729 spin_unlock_irqrestore(&bcs->aclock, flags);
1730 schedule_event(bcs, B_ACKPENDING); 1730 schedule_event(bcs, B_ACKPENDING);
1731 } 1731 }
@@ -1789,7 +1789,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg)
1789 1789
1790 switch (pr) { 1790 switch (pr) {
1791 case PH_ACTIVATE | REQUEST: 1791 case PH_ACTIVATE | REQUEST:
1792 B_L2L1(b_if, pr, (void *) st->l1.mode); 1792 B_L2L1(b_if, pr, (void *)(unsigned long)st->l1.mode);
1793 break; 1793 break;
1794 case PH_DATA | REQUEST: 1794 case PH_DATA | REQUEST:
1795 case PH_PULL | INDICATION: 1795 case PH_PULL | INDICATION:
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index 3a5ca8a68fc4..0ca5e66d2f5a 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -424,7 +424,7 @@ bch_l2l1(struct hisax_if *ifc, int pr, void *arg)
424 struct hfc4s8s_btype *bch = ifc->priv; 424 struct hfc4s8s_btype *bch = ifc->priv;
425 struct hfc4s8s_l1 *l1 = bch->l1p; 425 struct hfc4s8s_l1 *l1 = bch->l1p;
426 struct sk_buff *skb = (struct sk_buff *) arg; 426 struct sk_buff *skb = (struct sk_buff *) arg;
427 int mode = (int) arg; 427 long mode = (long) arg;
428 u_long flags; 428 u_long flags;
429 429
430 switch (pr) { 430 switch (pr) {
@@ -914,7 +914,7 @@ tx_d_frame(struct hfc4s8s_l1 *l1p)
914 struct sk_buff *skb; 914 struct sk_buff *skb;
915 u_char f1, f2; 915 u_char f1, f2;
916 u_char *cp; 916 u_char *cp;
917 int cnt; 917 long cnt;
918 918
919 if (l1p->l1_state != 7) 919 if (l1p->l1_state != 7)
920 return; 920 return;
@@ -980,7 +980,8 @@ tx_b_frame(struct hfc4s8s_btype *bch)
980 struct sk_buff *skb; 980 struct sk_buff *skb;
981 struct hfc4s8s_l1 *l1 = bch->l1p; 981 struct hfc4s8s_l1 *l1 = bch->l1p;
982 u_char *cp; 982 u_char *cp;
983 int cnt, max, hdlc_num, ack_len = 0; 983 int cnt, max, hdlc_num;
984 long ack_len = 0;
984 985
985 if (!l1->enabled || (bch->mode == L1_MODE_NULL)) 986 if (!l1->enabled || (bch->mode == L1_MODE_NULL))
986 return; 987 return;
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index f27c1608a3a7..b7e8e23be337 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -970,7 +970,7 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg)
970 break; 970 break;
971 case (HW_TESTLOOP | REQUEST): 971 case (HW_TESTLOOP | REQUEST):
972 spin_lock_irqsave(&cs->lock, flags); 972 spin_lock_irqsave(&cs->lock, flags);
973 switch ((int) arg) { 973 switch ((long) arg) {
974 case (1): 974 case (1):
975 Write_hfc(cs, HFCSX_B1_SSL, 0x80); /* tx slot */ 975 Write_hfc(cs, HFCSX_B1_SSL, 0x80); /* tx slot */
976 Write_hfc(cs, HFCSX_B1_RSL, 0x80); /* rx slot */ 976 Write_hfc(cs, HFCSX_B1_RSL, 0x80); /* rx slot */
@@ -986,7 +986,7 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg)
986 default: 986 default:
987 spin_unlock_irqrestore(&cs->lock, flags); 987 spin_unlock_irqrestore(&cs->lock, flags);
988 if (cs->debug & L1_DEB_WARN) 988 if (cs->debug & L1_DEB_WARN)
989 debugl1(cs, "hfcsx_l1hw loop invalid %4x", (int) arg); 989 debugl1(cs, "hfcsx_l1hw loop invalid %4lx", arg);
990 return; 990 return;
991 } 991 }
992 cs->hw.hfcsx.trm |= 0x80; /* enable IOM-loop */ 992 cs->hw.hfcsx.trm |= 0x80; /* enable IOM-loop */
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index b5e571a52694..6b88ecb5047d 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -696,7 +696,7 @@ tx_iso_complete(struct urb *urb, struct pt_regs *regs)
696 fifo->delete_flg = TRUE; 696 fifo->delete_flg = TRUE;
697 fifo->hif->l1l2(fifo->hif, 697 fifo->hif->l1l2(fifo->hif,
698 PH_DATA | CONFIRM, 698 PH_DATA | CONFIRM,
699 (void *) fifo->skbuff-> 699 (void *) (unsigned long) fifo->skbuff->
700 truesize); 700 truesize);
701 if (fifo->skbuff && fifo->delete_flg) { 701 if (fifo->skbuff && fifo->delete_flg) {
702 dev_kfree_skb_any(fifo->skbuff); 702 dev_kfree_skb_any(fifo->skbuff);
@@ -1144,7 +1144,7 @@ hfc_usb_l2l1(struct hisax_if *my_hisax_if, int pr, void *arg)
1144 set_hfcmode(hfc, 1144 set_hfcmode(hfc,
1145 (fifo->fifonum == 1145 (fifo->fifonum ==
1146 HFCUSB_B1_TX) ? 0 : 1, 1146 HFCUSB_B1_TX) ? 0 : 1,
1147 (int) arg); 1147 (long) arg);
1148 fifo->hif->l1l2(fifo->hif, 1148 fifo->hif->l1l2(fifo->hif,
1149 PH_ACTIVATE | INDICATION, 1149 PH_ACTIVATE | INDICATION,
1150 NULL); 1150 NULL);
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index 1d7cf3bd6aa3..881a4165cfb4 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -546,7 +546,7 @@ static inline void hdlc_xpr_irq(struct fritz_bcs *bcs)
546 } 546 }
547 bcs->tx_cnt = 0; 547 bcs->tx_cnt = 0;
548 bcs->tx_skb = NULL; 548 bcs->tx_skb = NULL;
549 B_L1L2(bcs, PH_DATA | CONFIRM, (void *) skb->truesize); 549 B_L1L2(bcs, PH_DATA | CONFIRM, (void *)(unsigned long)skb->truesize);
550 dev_kfree_skb_irq(skb); 550 dev_kfree_skb_irq(skb);
551} 551}
552 552
@@ -635,7 +635,7 @@ static void fritz_b_l2l1(struct hisax_if *ifc, int pr, void *arg)
635 hdlc_fill_fifo(bcs); 635 hdlc_fill_fifo(bcs);
636 break; 636 break;
637 case PH_ACTIVATE | REQUEST: 637 case PH_ACTIVATE | REQUEST:
638 mode = (int) arg; 638 mode = (long) arg;
639 DBG(4,"B%d,PH_ACTIVATE_REQUEST %d", bcs->channel + 1, mode); 639 DBG(4,"B%d,PH_ACTIVATE_REQUEST %d", bcs->channel + 1, mode);
640 modehdlc(bcs, mode); 640 modehdlc(bcs, mode);
641 B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL); 641 B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL);
@@ -998,18 +998,15 @@ static int __init hisax_fcpcipnp_init(void)
998 998
999 retval = pci_register_driver(&fcpci_driver); 999 retval = pci_register_driver(&fcpci_driver);
1000 if (retval) 1000 if (retval)
1001 goto out; 1001 return retval;
1002#ifdef __ISAPNP__ 1002#ifdef __ISAPNP__
1003 retval = pnp_register_driver(&fcpnp_driver); 1003 retval = pnp_register_driver(&fcpnp_driver);
1004 if (retval < 0) 1004 if (retval < 0) {
1005 goto out_unregister_pci; 1005 pci_unregister_driver(&fcpci_driver);
1006 return retval;
1007 }
1006#endif 1008#endif
1007 return 0; 1009 return 0;
1008
1009 out_unregister_pci:
1010 pci_unregister_driver(&fcpci_driver);
1011 out:
1012 return retval;
1013} 1010}
1014 1011
1015static void __exit hisax_fcpcipnp_exit(void) 1012static void __exit hisax_fcpcipnp_exit(void)
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
index 22fd5db18d48..aca2a3954b14 100644
--- a/drivers/isdn/hisax/st5481_b.c
+++ b/drivers/isdn/hisax/st5481_b.c
@@ -86,7 +86,7 @@ static void usb_b_out(struct st5481_bcs *bcs,int buf_nr)
86 if (!skb->len) { 86 if (!skb->len) {
87 // Frame sent 87 // Frame sent
88 b_out->tx_skb = NULL; 88 b_out->tx_skb = NULL;
89 B_L1L2(bcs, PH_DATA | CONFIRM, (void *) skb->truesize); 89 B_L1L2(bcs, PH_DATA | CONFIRM, (void *)(unsigned long) skb->truesize);
90 dev_kfree_skb_any(skb); 90 dev_kfree_skb_any(skb);
91 91
92/* if (!(bcs->tx_skb = skb_dequeue(&bcs->sq))) { */ 92/* if (!(bcs->tx_skb = skb_dequeue(&bcs->sq))) { */
@@ -350,7 +350,7 @@ void st5481_b_l2l1(struct hisax_if *ifc, int pr, void *arg)
350{ 350{
351 struct st5481_bcs *bcs = ifc->priv; 351 struct st5481_bcs *bcs = ifc->priv;
352 struct sk_buff *skb = arg; 352 struct sk_buff *skb = arg;
353 int mode; 353 long mode;
354 354
355 DBG(4, ""); 355 DBG(4, "");
356 356
@@ -360,8 +360,8 @@ void st5481_b_l2l1(struct hisax_if *ifc, int pr, void *arg)
360 bcs->b_out.tx_skb = skb; 360 bcs->b_out.tx_skb = skb;
361 break; 361 break;
362 case PH_ACTIVATE | REQUEST: 362 case PH_ACTIVATE | REQUEST:
363 mode = (int) arg; 363 mode = (long) arg;
364 DBG(4,"B%d,PH_ACTIVATE_REQUEST %d", bcs->channel + 1, mode); 364 DBG(4,"B%d,PH_ACTIVATE_REQUEST %ld", bcs->channel + 1, mode);
365 st5481B_mode(bcs, mode); 365 st5481B_mode(bcs, mode);
366 B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL); 366 B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL);
367 break; 367 break;
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
index 493dc94992e5..98adec440590 100644
--- a/drivers/isdn/hisax/st5481_d.c
+++ b/drivers/isdn/hisax/st5481_d.c
@@ -374,7 +374,7 @@ static void usb_d_out_complete(struct urb *urb, struct pt_regs *regs)
374{ 374{
375 struct st5481_adapter *adapter = urb->context; 375 struct st5481_adapter *adapter = urb->context;
376 struct st5481_d_out *d_out = &adapter->d_out; 376 struct st5481_d_out *d_out = &adapter->d_out;
377 int buf_nr; 377 long buf_nr;
378 378
379 DBG(2, ""); 379 DBG(2, "");
380 380
@@ -546,7 +546,7 @@ static void dout_reseted(struct FsmInst *fsm, int event, void *arg)
546static void dout_complete(struct FsmInst *fsm, int event, void *arg) 546static void dout_complete(struct FsmInst *fsm, int event, void *arg)
547{ 547{
548 struct st5481_adapter *adapter = fsm->userdata; 548 struct st5481_adapter *adapter = fsm->userdata;
549 int buf_nr = (int) arg; 549 long buf_nr = (long) arg;
550 550
551 usb_d_out(adapter, buf_nr); 551 usb_d_out(adapter, buf_nr);
552} 552}