aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 18:18:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 18:18:33 -0400
commitef9efe43f2eddabee1e78a90c7c8451505bf05e1 (patch)
treeb371cf7186d383890f6df1d127ce27fec67a0c3c
parent8dfd588c3180b7403c402b4545164ee4543f8f86 (diff)
parentb1734d2388cc45ecdec58615e35955d0d402f938 (diff)
Merge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6: drivers/atm/ambassador: kill uninit'd var warning, and fix bug [libata] sata_mv: use pci_try_set_mwi() drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning drivers/net/wan/sbni: kill uninit'd var warning drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var drivers/telephony/ixj: cleanup and fix gcc warning drivers/net/wan/pc300_drv: fix bug caught by gcc warning drivers/usb/misc/auerswald: fix status check, remove redundant check [netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails [netdrvr] natsemi: Fix device removal bug kernel/auditfilter: kill bogus uninit'd-var compiler warning
-rw-r--r--drivers/ata/sata_mv.c2
-rw-r--r--drivers/atm/ambassador.c4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c4
-rw-r--r--drivers/mtd/ubi/eba.c4
-rw-r--r--drivers/net/eepro100.c7
-rw-r--r--drivers/net/natsemi.c2
-rw-r--r--drivers/net/ne2k-pci.c7
-rw-r--r--drivers/net/wan/pc300_drv.c2
-rw-r--r--drivers/net/wan/sbni.c7
-rw-r--r--drivers/telephony/ixj.c7
-rw-r--r--drivers/usb/misc/auerswald.c2
-rw-r--r--kernel/auditfilter.c12
12 files changed, 37 insertions, 23 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 5d576435fccc..fb8a749423ca 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2666,7 +2666,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2666 mv_print_info(host); 2666 mv_print_info(host);
2667 2667
2668 pci_set_master(pdev); 2668 pci_set_master(pdev);
2669 pci_set_mwi(pdev); 2669 pci_try_set_mwi(pdev);
2670 return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED, 2670 return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED,
2671 IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht); 2671 IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht);
2672} 2672}
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 59651abfa4f8..b34b3829f6a9 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -1040,7 +1040,7 @@ static int amb_open (struct atm_vcc * atm_vcc)
1040 struct atm_qos * qos; 1040 struct atm_qos * qos;
1041 struct atm_trafprm * txtp; 1041 struct atm_trafprm * txtp;
1042 struct atm_trafprm * rxtp; 1042 struct atm_trafprm * rxtp;
1043 u16 tx_rate_bits; 1043 u16 tx_rate_bits = -1; // hush gcc
1044 u16 tx_vc_bits = -1; // hush gcc 1044 u16 tx_vc_bits = -1; // hush gcc
1045 u16 tx_frame_bits = -1; // hush gcc 1045 u16 tx_frame_bits = -1; // hush gcc
1046 1046
@@ -1096,6 +1096,8 @@ static int amb_open (struct atm_vcc * atm_vcc)
1096 r = round_up; 1096 r = round_up;
1097 } 1097 }
1098 error = make_rate (pcr, r, &tx_rate_bits, NULL); 1098 error = make_rate (pcr, r, &tx_rate_bits, NULL);
1099 if (error)
1100 return error;
1099 tx_vc_bits = TX_UBR_CAPPED; 1101 tx_vc_bits = TX_UBR_CAPPED;
1100 tx_frame_bits = TX_FRAME_CAPPED; 1102 tx_frame_bits = TX_FRAME_CAPPED;
1101 } 1103 }
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index eef415b12b2e..11f1d99db40b 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -1591,7 +1591,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1591 int i; 1591 int i;
1592 int size; 1592 int size;
1593 int size0 = 0; 1593 int size0 = 0;
1594 u32 f0; 1594 u32 f0 = 0;
1595 int ind; 1595 int ind;
1596 u8 op0 = 0; 1596 u8 op0 = 0;
1597 1597
@@ -1946,7 +1946,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1946 int i; 1946 int i;
1947 int size; 1947 int size;
1948 int size0 = 0; 1948 int size0 = 0;
1949 u32 f0; 1949 u32 f0 = 0;
1950 int ind; 1950 int ind;
1951 u8 op0 = 0; 1951 u8 op0 = 0;
1952 1952
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 74002945b71b..4dc10c8ab964 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -368,7 +368,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf,
368 int err, pnum, scrub = 0, idx = vol_id2idx(ubi, vol_id); 368 int err, pnum, scrub = 0, idx = vol_id2idx(ubi, vol_id);
369 struct ubi_vid_hdr *vid_hdr; 369 struct ubi_vid_hdr *vid_hdr;
370 struct ubi_volume *vol = ubi->volumes[idx]; 370 struct ubi_volume *vol = ubi->volumes[idx];
371 uint32_t crc, crc1; 371 uint32_t crc;
372 372
373 err = leb_read_lock(ubi, vol_id, lnum); 373 err = leb_read_lock(ubi, vol_id, lnum);
374 if (err) 374 if (err)
@@ -451,7 +451,7 @@ retry:
451 } 451 }
452 452
453 if (check) { 453 if (check) {
454 crc1 = crc32(UBI_CRC32_INIT, buf, len); 454 uint32_t crc1 = crc32(UBI_CRC32_INIT, buf, len);
455 if (crc1 != crc) { 455 if (crc1 != crc) {
456 ubi_warn("CRC error: calculated %#08x, must be %#08x", 456 ubi_warn("CRC error: calculated %#08x, must be %#08x",
457 crc1, crc); 457 crc1, crc);
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 9afa47edfc58..3c54014acece 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -2292,10 +2292,15 @@ static int eepro100_resume(struct pci_dev *pdev)
2292 struct net_device *dev = pci_get_drvdata (pdev); 2292 struct net_device *dev = pci_get_drvdata (pdev);
2293 struct speedo_private *sp = netdev_priv(dev); 2293 struct speedo_private *sp = netdev_priv(dev);
2294 void __iomem *ioaddr = sp->regs; 2294 void __iomem *ioaddr = sp->regs;
2295 int rc;
2295 2296
2296 pci_set_power_state(pdev, PCI_D0); 2297 pci_set_power_state(pdev, PCI_D0);
2297 pci_restore_state(pdev); 2298 pci_restore_state(pdev);
2298 pci_enable_device(pdev); 2299
2300 rc = pci_enable_device(pdev);
2301 if (rc)
2302 return rc;
2303
2299 pci_set_master(pdev); 2304 pci_set_master(pdev);
2300 2305
2301 if (!netif_running(dev)) 2306 if (!netif_running(dev))
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 3450051ae56b..6bb48ba80964 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -671,7 +671,7 @@ static ssize_t natsemi_show_##_name(struct device *dev, \
671#define NATSEMI_CREATE_FILE(_dev, _name) \ 671#define NATSEMI_CREATE_FILE(_dev, _name) \
672 device_create_file(&_dev->dev, &dev_attr_##_name) 672 device_create_file(&_dev->dev, &dev_attr_##_name)
673#define NATSEMI_REMOVE_FILE(_dev, _name) \ 673#define NATSEMI_REMOVE_FILE(_dev, _name) \
674 device_create_file(&_dev->dev, &dev_attr_##_name) 674 device_remove_file(&_dev->dev, &dev_attr_##_name)
675 675
676NATSEMI_ATTR(dspcfg_workaround); 676NATSEMI_ATTR(dspcfg_workaround);
677 677
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index 995c0a5d4066..cfdeaf7aa163 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -669,10 +669,15 @@ static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state)
669static int ne2k_pci_resume (struct pci_dev *pdev) 669static int ne2k_pci_resume (struct pci_dev *pdev)
670{ 670{
671 struct net_device *dev = pci_get_drvdata (pdev); 671 struct net_device *dev = pci_get_drvdata (pdev);
672 int rc;
672 673
673 pci_set_power_state(pdev, 0); 674 pci_set_power_state(pdev, 0);
674 pci_restore_state(pdev); 675 pci_restore_state(pdev);
675 pci_enable_device(pdev); 676
677 rc = pci_enable_device(pdev);
678 if (rc)
679 return rc;
680
676 NS8390_init(dev, 1); 681 NS8390_init(dev, 1);
677 netif_device_attach(dev); 682 netif_device_attach(dev);
678 683
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index ec1c556a47ca..5d8c78ee2cd9 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -2833,6 +2833,8 @@ static int clock_rate_calc(uclong rate, uclong clock, int *br_io)
2833 int br, tc; 2833 int br, tc;
2834 int br_pwr, error; 2834 int br_pwr, error;
2835 2835
2836 *br_io = 0;
2837
2836 if (rate == 0) 2838 if (rate == 0)
2837 return (0); 2839 return (0);
2838 2840
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 35eded7ffb2d..1cc18e787a65 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -595,8 +595,8 @@ recv_frame( struct net_device *dev )
595 595
596 u32 crc = CRC32_INITIAL; 596 u32 crc = CRC32_INITIAL;
597 597
598 unsigned framelen, frameno, ack; 598 unsigned framelen = 0, frameno, ack;
599 unsigned is_first, frame_ok; 599 unsigned is_first, frame_ok = 0;
600 600
601 if( check_fhdr( ioaddr, &framelen, &frameno, &ack, &is_first, &crc ) ) { 601 if( check_fhdr( ioaddr, &framelen, &frameno, &ack, &is_first, &crc ) ) {
602 frame_ok = framelen > 4 602 frame_ok = framelen > 4
@@ -604,8 +604,7 @@ recv_frame( struct net_device *dev )
604 : skip_tail( ioaddr, framelen, crc ); 604 : skip_tail( ioaddr, framelen, crc );
605 if( frame_ok ) 605 if( frame_ok )
606 interpret_ack( dev, ack ); 606 interpret_ack( dev, ack );
607 } else 607 }
608 frame_ok = 0;
609 608
610 outb( inb( ioaddr + CSR0 ) ^ CT_ZER, ioaddr + CSR0 ); 609 outb( inb( ioaddr + CSR0 ) ^ CT_ZER, ioaddr + CSR0 );
611 if( frame_ok ) { 610 if( frame_ok ) {
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index c7b0a357b04a..49cd9793404f 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -3453,7 +3453,6 @@ static void ixj_write_frame(IXJ *j)
3453{ 3453{
3454 int cnt, frame_count, dly; 3454 int cnt, frame_count, dly;
3455 IXJ_WORD dat; 3455 IXJ_WORD dat;
3456 BYTES blankword;
3457 3456
3458 frame_count = 0; 3457 frame_count = 0;
3459 if(j->flags.cidplay) { 3458 if(j->flags.cidplay) {
@@ -3501,6 +3500,8 @@ static void ixj_write_frame(IXJ *j)
3501 } 3500 }
3502 if (frame_count >= 1) { 3501 if (frame_count >= 1) {
3503 if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) { 3502 if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) {
3503 BYTES blankword;
3504
3504 switch (j->play_mode) { 3505 switch (j->play_mode) {
3505 case PLAYBACK_MODE_ULAW: 3506 case PLAYBACK_MODE_ULAW:
3506 case PLAYBACK_MODE_ALAW: 3507 case PLAYBACK_MODE_ALAW:
@@ -3508,6 +3509,7 @@ static void ixj_write_frame(IXJ *j)
3508 break; 3509 break;
3509 case PLAYBACK_MODE_8LINEAR: 3510 case PLAYBACK_MODE_8LINEAR:
3510 case PLAYBACK_MODE_16LINEAR: 3511 case PLAYBACK_MODE_16LINEAR:
3512 default:
3511 blankword.low = blankword.high = 0x00; 3513 blankword.low = blankword.high = 0x00;
3512 break; 3514 break;
3513 case PLAYBACK_MODE_8LINEAR_WSS: 3515 case PLAYBACK_MODE_8LINEAR_WSS:
@@ -3531,6 +3533,8 @@ static void ixj_write_frame(IXJ *j)
3531 j->flags.play_first_frame = 0; 3533 j->flags.play_first_frame = 0;
3532 } else if (j->play_codec == G723_63 && j->flags.play_first_frame) { 3534 } else if (j->play_codec == G723_63 && j->flags.play_first_frame) {
3533 for (cnt = 0; cnt < 24; cnt++) { 3535 for (cnt = 0; cnt < 24; cnt++) {
3536 BYTES blankword;
3537
3534 if(cnt == 12) { 3538 if(cnt == 12) {
3535 blankword.low = 0x02; 3539 blankword.low = 0x02;
3536 blankword.high = 0x00; 3540 blankword.high = 0x00;
@@ -4868,6 +4872,7 @@ static char daa_CR_read(IXJ *j, int cr)
4868 bytes.high = 0xB0 + cr; 4872 bytes.high = 0xB0 + cr;
4869 break; 4873 break;
4870 case SOP_PU_PULSEDIALING: 4874 case SOP_PU_PULSEDIALING:
4875 default:
4871 bytes.high = 0xF0 + cr; 4876 bytes.high = 0xF0 + cr;
4872 break; 4877 break;
4873 } 4878 }
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 1fd5fc220cd7..3e22b2ff9e74 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -630,7 +630,7 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time
630 } else 630 } else
631 status = urb->status; 631 status = urb->status;
632 632
633 if (actual_length) 633 if (status >= 0)
634 *actual_length = urb->actual_length; 634 *actual_length = urb->actual_length;
635 635
636 return status; 636 return status;
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index ce61f423542c..1bf093dcffe0 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1210,8 +1210,8 @@ static inline int audit_add_rule(struct audit_entry *entry,
1210 struct audit_entry *e; 1210 struct audit_entry *e;
1211 struct audit_field *inode_f = entry->rule.inode_f; 1211 struct audit_field *inode_f = entry->rule.inode_f;
1212 struct audit_watch *watch = entry->rule.watch; 1212 struct audit_watch *watch = entry->rule.watch;
1213 struct nameidata *ndp, *ndw; 1213 struct nameidata *ndp = NULL, *ndw = NULL;
1214 int h, err, putnd_needed = 0; 1214 int h, err;
1215#ifdef CONFIG_AUDITSYSCALL 1215#ifdef CONFIG_AUDITSYSCALL
1216 int dont_count = 0; 1216 int dont_count = 0;
1217 1217
@@ -1239,7 +1239,6 @@ static inline int audit_add_rule(struct audit_entry *entry,
1239 err = audit_get_nd(watch->path, &ndp, &ndw); 1239 err = audit_get_nd(watch->path, &ndp, &ndw);
1240 if (err) 1240 if (err)
1241 goto error; 1241 goto error;
1242 putnd_needed = 1;
1243 } 1242 }
1244 1243
1245 mutex_lock(&audit_filter_mutex); 1244 mutex_lock(&audit_filter_mutex);
@@ -1269,14 +1268,11 @@ static inline int audit_add_rule(struct audit_entry *entry,
1269#endif 1268#endif
1270 mutex_unlock(&audit_filter_mutex); 1269 mutex_unlock(&audit_filter_mutex);
1271 1270
1272 if (putnd_needed) 1271 audit_put_nd(ndp, ndw); /* NULL args OK */
1273 audit_put_nd(ndp, ndw);
1274
1275 return 0; 1272 return 0;
1276 1273
1277error: 1274error:
1278 if (putnd_needed) 1275 audit_put_nd(ndp, ndw); /* NULL args OK */
1279 audit_put_nd(ndp, ndw);
1280 if (watch) 1276 if (watch)
1281 audit_put_watch(watch); /* tmp watch, matches initial get */ 1277 audit_put_watch(watch); /* tmp watch, matches initial get */
1282 return err; 1278 return err;