+ isdn-warning-fixes.patch added to -mm tree

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

 



The patch titled

     ISDN warning fixes

has been added to the -mm tree.  Its filename is

     isdn-warning-fixes.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ISDN warning fixes
From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: Karsten Keil <kkeil@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/isdn/hisax/config.c         |    6 +++---
 drivers/isdn/hisax/hfc4s8s_l1.c     |    7 ++++---
 drivers/isdn/hisax/hfc_sx.c         |    4 ++--
 drivers/isdn/hisax/hfc_usb.c        |    4 ++--
 drivers/isdn/hisax/hisax_fcpcipnp.c |   17 +++++++----------
 drivers/isdn/hisax/st5481_b.c       |    8 ++++----
 drivers/isdn/hisax/st5481_d.c       |    4 ++--
 7 files changed, 24 insertions(+), 26 deletions(-)

diff -puN drivers/isdn/hisax/config.c~isdn-warning-fixes drivers/isdn/hisax/config.c
--- a/drivers/isdn/hisax/config.c~isdn-warning-fixes
+++ a/drivers/isdn/hisax/config.c
@@ -1721,11 +1721,11 @@ static void hisax_b_l1l2(struct hisax_if
 		hisax_b_sched_event(bcs, B_RCVBUFREADY);
 		break;
 	case PH_DATA | CONFIRM:
-		bcs->tx_cnt -= (int) arg;
+		bcs->tx_cnt -= (long)arg;
 		if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag)) {
 			u_long	flags;
 			spin_lock_irqsave(&bcs->aclock, flags);
-			bcs->ackcnt += (int) arg;
+			bcs->ackcnt += (long)arg;
 			spin_unlock_irqrestore(&bcs->aclock, flags);
 			schedule_event(bcs, B_ACKPENDING);
 		}
@@ -1789,7 +1789,7 @@ static void hisax_b_l2l1(struct PStack *
 
 	switch (pr) {
 	case PH_ACTIVATE | REQUEST:
-		B_L2L1(b_if, pr, (void *) st->l1.mode);
+		B_L2L1(b_if, pr, (void *)(unsigned long)st->l1.mode);
 		break;
 	case PH_DATA | REQUEST:
 	case PH_PULL | INDICATION:
diff -puN drivers/isdn/hisax/hfc4s8s_l1.c~isdn-warning-fixes drivers/isdn/hisax/hfc4s8s_l1.c
--- a/drivers/isdn/hisax/hfc4s8s_l1.c~isdn-warning-fixes
+++ a/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -424,7 +424,7 @@ bch_l2l1(struct hisax_if *ifc, int pr, v
 	struct hfc4s8s_btype *bch = ifc->priv;
 	struct hfc4s8s_l1 *l1 = bch->l1p;
 	struct sk_buff *skb = (struct sk_buff *) arg;
-	int mode = (int) arg;
+	long mode = (long) arg;
 	u_long flags;
 
 	switch (pr) {
@@ -914,7 +914,7 @@ tx_d_frame(struct hfc4s8s_l1 *l1p)
 	struct sk_buff *skb;
 	u_char f1, f2;
 	u_char *cp;
-	int cnt;
+	long cnt;
 
 	if (l1p->l1_state != 7)
 		return;
@@ -980,7 +980,8 @@ tx_b_frame(struct hfc4s8s_btype *bch)
 	struct sk_buff *skb;
 	struct hfc4s8s_l1 *l1 = bch->l1p;
 	u_char *cp;
-	int cnt, max, hdlc_num, ack_len = 0;
+	int cnt, max, hdlc_num;
+	long ack_len = 0;
 
 	if (!l1->enabled || (bch->mode == L1_MODE_NULL))
 		return;
diff -puN drivers/isdn/hisax/hfc_sx.c~isdn-warning-fixes drivers/isdn/hisax/hfc_sx.c
--- a/drivers/isdn/hisax/hfc_sx.c~isdn-warning-fixes
+++ a/drivers/isdn/hisax/hfc_sx.c
@@ -970,7 +970,7 @@ HFCSX_l1hw(struct PStack *st, int pr, vo
 			break;
 		case (HW_TESTLOOP | REQUEST):
 			spin_lock_irqsave(&cs->lock, flags);
-			switch ((int) arg) {
+			switch ((long) arg) {
 				case (1):
 					Write_hfc(cs, HFCSX_B1_SSL, 0x80);	/* tx slot */
 					Write_hfc(cs, HFCSX_B1_RSL, 0x80);	/* rx slot */
@@ -986,7 +986,7 @@ HFCSX_l1hw(struct PStack *st, int pr, vo
 				default:
 					spin_unlock_irqrestore(&cs->lock, flags);
 					if (cs->debug & L1_DEB_WARN)
-						debugl1(cs, "hfcsx_l1hw loop invalid %4x", (int) arg);
+						debugl1(cs, "hfcsx_l1hw loop invalid %4lx", arg);
 					return;
 			}
 			cs->hw.hfcsx.trm |= 0x80;	/* enable IOM-loop */
diff -puN drivers/isdn/hisax/hfc_usb.c~isdn-warning-fixes drivers/isdn/hisax/hfc_usb.c
--- a/drivers/isdn/hisax/hfc_usb.c~isdn-warning-fixes
+++ a/drivers/isdn/hisax/hfc_usb.c
@@ -696,7 +696,7 @@ tx_iso_complete(struct urb *urb, struct 
 				fifo->delete_flg = TRUE;
 				fifo->hif->l1l2(fifo->hif,
 						PH_DATA | CONFIRM,
-						(void *) fifo->skbuff->
+						(void *) (unsigned long) fifo->skbuff->
 						truesize);
 				if (fifo->skbuff && fifo->delete_flg) {
 					dev_kfree_skb_any(fifo->skbuff);
@@ -1144,7 +1144,7 @@ hfc_usb_l2l1(struct hisax_if *my_hisax_i
 				set_hfcmode(hfc,
 					    (fifo->fifonum ==
 					     HFCUSB_B1_TX) ? 0 : 1,
-					    (int) arg);
+					    (long) arg);
 				fifo->hif->l1l2(fifo->hif,
 						PH_ACTIVATE | INDICATION,
 						NULL);
diff -puN drivers/isdn/hisax/hisax_fcpcipnp.c~isdn-warning-fixes drivers/isdn/hisax/hisax_fcpcipnp.c
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c~isdn-warning-fixes
+++ a/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -546,7 +546,7 @@ static inline void hdlc_xpr_irq(struct f
 	}
 	bcs->tx_cnt = 0;
 	bcs->tx_skb = NULL;
-	B_L1L2(bcs, PH_DATA | CONFIRM, (void *) skb->truesize);
+	B_L1L2(bcs, PH_DATA | CONFIRM, (void *)(unsigned long)skb->truesize);
 	dev_kfree_skb_irq(skb);
 }
 
@@ -635,7 +635,7 @@ static void fritz_b_l2l1(struct hisax_if
 		hdlc_fill_fifo(bcs);
 		break;
 	case PH_ACTIVATE | REQUEST:
-		mode = (int) arg;
+		mode = (long) arg;
 		DBG(4,"B%d,PH_ACTIVATE_REQUEST %d", bcs->channel + 1, mode);
 		modehdlc(bcs, mode);
 		B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL);
@@ -998,18 +998,15 @@ static int __init hisax_fcpcipnp_init(vo
 
 	retval = pci_register_driver(&fcpci_driver);
 	if (retval)
-		goto out;
+		return retval;
 #ifdef __ISAPNP__
 	retval = pnp_register_driver(&fcpnp_driver);
-	if (retval < 0)
-		goto out_unregister_pci;
+	if (retval < 0) {
+		pci_unregister_driver(&fcpci_driver);
+		return retval;
+	}
 #endif
 	return 0;
-
- out_unregister_pci:
-	pci_unregister_driver(&fcpci_driver);
- out:
-	return retval;
 }
 
 static void __exit hisax_fcpcipnp_exit(void)
diff -puN drivers/isdn/hisax/st5481_b.c~isdn-warning-fixes drivers/isdn/hisax/st5481_b.c
--- a/drivers/isdn/hisax/st5481_b.c~isdn-warning-fixes
+++ a/drivers/isdn/hisax/st5481_b.c
@@ -86,7 +86,7 @@ static void usb_b_out(struct st5481_bcs 
 			if (!skb->len) {
 				// Frame sent
 				b_out->tx_skb = NULL;
-				B_L1L2(bcs, PH_DATA | CONFIRM, (void *) skb->truesize);
+				B_L1L2(bcs, PH_DATA | CONFIRM, (void *)(unsigned long) skb->truesize);
 				dev_kfree_skb_any(skb);
 
 /* 				if (!(bcs->tx_skb = skb_dequeue(&bcs->sq))) { */
@@ -350,7 +350,7 @@ void st5481_b_l2l1(struct hisax_if *ifc,
 {
 	struct st5481_bcs *bcs = ifc->priv;
 	struct sk_buff *skb = arg;
-	int mode;
+	long mode;
 
 	DBG(4, "");
 
@@ -360,8 +360,8 @@ void st5481_b_l2l1(struct hisax_if *ifc,
 		bcs->b_out.tx_skb = skb;
 		break;
 	case PH_ACTIVATE | REQUEST:
-		mode = (int) arg;
-		DBG(4,"B%d,PH_ACTIVATE_REQUEST %d", bcs->channel + 1, mode);
+		mode = (long) arg;
+		DBG(4,"B%d,PH_ACTIVATE_REQUEST %ld", bcs->channel + 1, mode);
 		st5481B_mode(bcs, mode);
 		B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL);
 		break;
diff -puN drivers/isdn/hisax/st5481_d.c~isdn-warning-fixes drivers/isdn/hisax/st5481_d.c
--- a/drivers/isdn/hisax/st5481_d.c~isdn-warning-fixes
+++ a/drivers/isdn/hisax/st5481_d.c
@@ -374,7 +374,7 @@ static void usb_d_out_complete(struct ur
 {
 	struct st5481_adapter *adapter = urb->context;
 	struct st5481_d_out *d_out = &adapter->d_out;
-	int buf_nr;
+	long buf_nr;
 	
 	DBG(2, "");
 
@@ -546,7 +546,7 @@ static void dout_reseted(struct FsmInst 
 static void dout_complete(struct FsmInst *fsm, int event, void *arg)
 {
 	struct st5481_adapter *adapter = fsm->userdata;
-	int buf_nr = (int) arg;
+	long buf_nr = (long) arg;
 
 	usb_d_out(adapter, buf_nr);
 }
_

Patches currently in -mm which might be from alan@xxxxxxxxxxxxxxxxxxx are

origin.patch
libata-add-40pin-short-cable-support-honour-drive.patch
fix-gregkh-driver-nozomi.patch
via-pata-controller-xfer-fixes.patch
ahci-ati-sb600-sata-support-for-various-modes.patch
ioremap-balanced-with-iounmap-drivers-scsi-ncr53c8xxc.patch
edac-new-opteron-athlon64-memory-controller-driver.patch
edac-new-opteron-athlon64-memory-controller-driver-tidy.patch
char-kill-unneeded-memsets.patch
char-serial167-remove-useless-tty-check.patch
isdn-warning-fixes.patch
pci-mxser-pci-refcounts.patch
mxser-make-an-experimental-clone.patch
char-mxser_new-correct-include-file.patch
char-mxser_new-upgrade-to-191.patch
char-mxser_new-rework-to-allow-dynamic-structs.patch
non-libata-driver-for-jmicron-devices.patch
ide-claim-extra-dma-ports-regardless-of-channel.patch
ide-always-release-dma-engine.patch
ide-error-handling-fixes.patch
ide-hpt3xxn-clocking-fixes.patch
ide-fix-hpt37x-timing-tables.patch
ide-optimize-hpt37x-timing-tables.patch
ide-fix-hpt3xx-hotswap-support.patch
ide-fix-the-case-of-multiple-hpt3xx-chips-present.patch
ide-hpt3xx-fix-pci-clock-detection.patch
ide-hpt3xx-fix-pci-clock-detection-fix-2.patch
piix-fix-82371mx-enablebits.patch
piix-remove-check-for-broken-mw-dma-mode-0.patch
piix-slc90e66-pio-mode-fallback-fix.patch
make-number-of-ide-interfaces-configurable.patch
ide_dma_speed-fixes.patch
hpt3xx-rework-rate-filtering.patch
hpt3xx-rework-rate-filtering-tidy.patch
hpt3xx-print-the-real-chip-name-at-startup.patch
hpt3xx-switch-to-using-pci_get_slot.patch
hpt3xx-cache-channels-mcr-address.patch
hpt3x7-merge-speedproc-handlers.patch
hpt370-clean-up-dma-timeout-handling.patch
enable-cdrom-dma-access-with-pdc20265_old.patch
ide-fix-revision-comparison-in-ide_in_drive_list.patch
ide-backport-piix-fixes-from-libata-into-the-legacy-driver.patch
hpt3xx-init-code-rewrite.patch
move-ide-to-unmaintained-drop-reference-to-old-git-tree.patch
drivers-ide-cleanups.patch
ide-remove-dma_base2-field-from-ide_hwif_t.patch
ide-reprogram-disk-pio-timings-on-resume.patch
config_pm=n-slim-drivers-ide-pci-sc1200c.patch
ide-fix-crash-on-repeated-reset.patch
ide-fix-crash-on-repeated-reset-tidy.patch
ide-more-pci_find-cleanup.patch
sstfb-clean-ups.patch
pci_module_init-convertion-in-ata_genericc.patch
pci_module_init-convertion-in-ata_genericc-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux