Commit ef9efe43 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 8dfd588c b1734d23
...@@ -2666,7 +2666,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2666,7 +2666,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
mv_print_info(host); mv_print_info(host);
pci_set_master(pdev); pci_set_master(pdev);
pci_set_mwi(pdev); pci_try_set_mwi(pdev);
return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED, return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED,
IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht); IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht);
} }
......
...@@ -1040,7 +1040,7 @@ static int amb_open (struct atm_vcc * atm_vcc) ...@@ -1040,7 +1040,7 @@ static int amb_open (struct atm_vcc * atm_vcc)
struct atm_qos * qos; struct atm_qos * qos;
struct atm_trafprm * txtp; struct atm_trafprm * txtp;
struct atm_trafprm * rxtp; struct atm_trafprm * rxtp;
u16 tx_rate_bits; u16 tx_rate_bits = -1; // hush gcc
u16 tx_vc_bits = -1; // hush gcc u16 tx_vc_bits = -1; // hush gcc
u16 tx_frame_bits = -1; // hush gcc u16 tx_frame_bits = -1; // hush gcc
...@@ -1096,6 +1096,8 @@ static int amb_open (struct atm_vcc * atm_vcc) ...@@ -1096,6 +1096,8 @@ static int amb_open (struct atm_vcc * atm_vcc)
r = round_up; r = round_up;
} }
error = make_rate (pcr, r, &tx_rate_bits, NULL); error = make_rate (pcr, r, &tx_rate_bits, NULL);
if (error)
return error;
tx_vc_bits = TX_UBR_CAPPED; tx_vc_bits = TX_UBR_CAPPED;
tx_frame_bits = TX_FRAME_CAPPED; tx_frame_bits = TX_FRAME_CAPPED;
} }
......
...@@ -1591,7 +1591,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ...@@ -1591,7 +1591,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
int i; int i;
int size; int size;
int size0 = 0; int size0 = 0;
u32 f0; u32 f0 = 0;
int ind; int ind;
u8 op0 = 0; u8 op0 = 0;
...@@ -1946,7 +1946,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ...@@ -1946,7 +1946,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
int i; int i;
int size; int size;
int size0 = 0; int size0 = 0;
u32 f0; u32 f0 = 0;
int ind; int ind;
u8 op0 = 0; u8 op0 = 0;
......
...@@ -368,7 +368,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf, ...@@ -368,7 +368,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf,
int err, pnum, scrub = 0, idx = vol_id2idx(ubi, vol_id); int err, pnum, scrub = 0, idx = vol_id2idx(ubi, vol_id);
struct ubi_vid_hdr *vid_hdr; struct ubi_vid_hdr *vid_hdr;
struct ubi_volume *vol = ubi->volumes[idx]; struct ubi_volume *vol = ubi->volumes[idx];
uint32_t crc, crc1; uint32_t crc;
err = leb_read_lock(ubi, vol_id, lnum); err = leb_read_lock(ubi, vol_id, lnum);
if (err) if (err)
...@@ -451,7 +451,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf, ...@@ -451,7 +451,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf,
} }
if (check) { if (check) {
crc1 = crc32(UBI_CRC32_INIT, buf, len); uint32_t crc1 = crc32(UBI_CRC32_INIT, buf, len);
if (crc1 != crc) { if (crc1 != crc) {
ubi_warn("CRC error: calculated %#08x, must be %#08x", ubi_warn("CRC error: calculated %#08x, must be %#08x",
crc1, crc); crc1, crc);
......
...@@ -2292,10 +2292,15 @@ static int eepro100_resume(struct pci_dev *pdev) ...@@ -2292,10 +2292,15 @@ static int eepro100_resume(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata (pdev); struct net_device *dev = pci_get_drvdata (pdev);
struct speedo_private *sp = netdev_priv(dev); struct speedo_private *sp = netdev_priv(dev);
void __iomem *ioaddr = sp->regs; void __iomem *ioaddr = sp->regs;
int rc;
pci_set_power_state(pdev, PCI_D0); pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev); pci_restore_state(pdev);
pci_enable_device(pdev);
rc = pci_enable_device(pdev);
if (rc)
return rc;
pci_set_master(pdev); pci_set_master(pdev);
if (!netif_running(dev)) if (!netif_running(dev))
......
...@@ -671,7 +671,7 @@ static ssize_t natsemi_show_##_name(struct device *dev, \ ...@@ -671,7 +671,7 @@ static ssize_t natsemi_show_##_name(struct device *dev, \
#define NATSEMI_CREATE_FILE(_dev, _name) \ #define NATSEMI_CREATE_FILE(_dev, _name) \
device_create_file(&_dev->dev, &dev_attr_##_name) device_create_file(&_dev->dev, &dev_attr_##_name)
#define NATSEMI_REMOVE_FILE(_dev, _name) \ #define NATSEMI_REMOVE_FILE(_dev, _name) \
device_create_file(&_dev->dev, &dev_attr_##_name) device_remove_file(&_dev->dev, &dev_attr_##_name)
NATSEMI_ATTR(dspcfg_workaround); NATSEMI_ATTR(dspcfg_workaround);
......
...@@ -669,10 +669,15 @@ static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -669,10 +669,15 @@ static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state)
static int ne2k_pci_resume (struct pci_dev *pdev) static int ne2k_pci_resume (struct pci_dev *pdev)
{ {
struct net_device *dev = pci_get_drvdata (pdev); struct net_device *dev = pci_get_drvdata (pdev);
int rc;
pci_set_power_state(pdev, 0); pci_set_power_state(pdev, 0);
pci_restore_state(pdev); pci_restore_state(pdev);
pci_enable_device(pdev);
rc = pci_enable_device(pdev);
if (rc)
return rc;
NS8390_init(dev, 1); NS8390_init(dev, 1);
netif_device_attach(dev); netif_device_attach(dev);
......
...@@ -2833,6 +2833,8 @@ static int clock_rate_calc(uclong rate, uclong clock, int *br_io) ...@@ -2833,6 +2833,8 @@ static int clock_rate_calc(uclong rate, uclong clock, int *br_io)
int br, tc; int br, tc;
int br_pwr, error; int br_pwr, error;
*br_io = 0;
if (rate == 0) if (rate == 0)
return (0); return (0);
......
...@@ -595,8 +595,8 @@ recv_frame( struct net_device *dev ) ...@@ -595,8 +595,8 @@ recv_frame( struct net_device *dev )
u32 crc = CRC32_INITIAL; u32 crc = CRC32_INITIAL;
unsigned framelen, frameno, ack; unsigned framelen = 0, frameno, ack;
unsigned is_first, frame_ok; unsigned is_first, frame_ok = 0;
if( check_fhdr( ioaddr, &framelen, &frameno, &ack, &is_first, &crc ) ) { if( check_fhdr( ioaddr, &framelen, &frameno, &ack, &is_first, &crc ) ) {
frame_ok = framelen > 4 frame_ok = framelen > 4
...@@ -604,8 +604,7 @@ recv_frame( struct net_device *dev ) ...@@ -604,8 +604,7 @@ recv_frame( struct net_device *dev )
: skip_tail( ioaddr, framelen, crc ); : skip_tail( ioaddr, framelen, crc );
if( frame_ok ) if( frame_ok )
interpret_ack( dev, ack ); interpret_ack( dev, ack );
} else }
frame_ok = 0;
outb( inb( ioaddr + CSR0 ) ^ CT_ZER, ioaddr + CSR0 ); outb( inb( ioaddr + CSR0 ) ^ CT_ZER, ioaddr + CSR0 );
if( frame_ok ) { if( frame_ok ) {
......
...@@ -3453,7 +3453,6 @@ static void ixj_write_frame(IXJ *j) ...@@ -3453,7 +3453,6 @@ static void ixj_write_frame(IXJ *j)
{ {
int cnt, frame_count, dly; int cnt, frame_count, dly;
IXJ_WORD dat; IXJ_WORD dat;
BYTES blankword;
frame_count = 0; frame_count = 0;
if(j->flags.cidplay) { if(j->flags.cidplay) {
...@@ -3501,6 +3500,8 @@ static void ixj_write_frame(IXJ *j) ...@@ -3501,6 +3500,8 @@ static void ixj_write_frame(IXJ *j)
} }
if (frame_count >= 1) { if (frame_count >= 1) {
if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) { if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) {
BYTES blankword;
switch (j->play_mode) { switch (j->play_mode) {
case PLAYBACK_MODE_ULAW: case PLAYBACK_MODE_ULAW:
case PLAYBACK_MODE_ALAW: case PLAYBACK_MODE_ALAW:
...@@ -3508,6 +3509,7 @@ static void ixj_write_frame(IXJ *j) ...@@ -3508,6 +3509,7 @@ static void ixj_write_frame(IXJ *j)
break; break;
case PLAYBACK_MODE_8LINEAR: case PLAYBACK_MODE_8LINEAR:
case PLAYBACK_MODE_16LINEAR: case PLAYBACK_MODE_16LINEAR:
default:
blankword.low = blankword.high = 0x00; blankword.low = blankword.high = 0x00;
break; break;
case PLAYBACK_MODE_8LINEAR_WSS: case PLAYBACK_MODE_8LINEAR_WSS:
...@@ -3531,6 +3533,8 @@ static void ixj_write_frame(IXJ *j) ...@@ -3531,6 +3533,8 @@ static void ixj_write_frame(IXJ *j)
j->flags.play_first_frame = 0; j->flags.play_first_frame = 0;
} else if (j->play_codec == G723_63 && j->flags.play_first_frame) { } else if (j->play_codec == G723_63 && j->flags.play_first_frame) {
for (cnt = 0; cnt < 24; cnt++) { for (cnt = 0; cnt < 24; cnt++) {
BYTES blankword;
if(cnt == 12) { if(cnt == 12) {
blankword.low = 0x02; blankword.low = 0x02;
blankword.high = 0x00; blankword.high = 0x00;
...@@ -4868,6 +4872,7 @@ static char daa_CR_read(IXJ *j, int cr) ...@@ -4868,6 +4872,7 @@ static char daa_CR_read(IXJ *j, int cr)
bytes.high = 0xB0 + cr; bytes.high = 0xB0 + cr;
break; break;
case SOP_PU_PULSEDIALING: case SOP_PU_PULSEDIALING:
default:
bytes.high = 0xF0 + cr; bytes.high = 0xF0 + cr;
break; break;
} }
......
...@@ -630,7 +630,7 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time ...@@ -630,7 +630,7 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time
} else } else
status = urb->status; status = urb->status;
if (actual_length) if (status >= 0)
*actual_length = urb->actual_length; *actual_length = urb->actual_length;
return status; return status;
......
...@@ -1210,8 +1210,8 @@ static inline int audit_add_rule(struct audit_entry *entry, ...@@ -1210,8 +1210,8 @@ static inline int audit_add_rule(struct audit_entry *entry,
struct audit_entry *e; struct audit_entry *e;
struct audit_field *inode_f = entry->rule.inode_f; struct audit_field *inode_f = entry->rule.inode_f;
struct audit_watch *watch = entry->rule.watch; struct audit_watch *watch = entry->rule.watch;
struct nameidata *ndp, *ndw; struct nameidata *ndp = NULL, *ndw = NULL;
int h, err, putnd_needed = 0; int h, err;
#ifdef CONFIG_AUDITSYSCALL #ifdef CONFIG_AUDITSYSCALL
int dont_count = 0; int dont_count = 0;
...@@ -1239,7 +1239,6 @@ static inline int audit_add_rule(struct audit_entry *entry, ...@@ -1239,7 +1239,6 @@ static inline int audit_add_rule(struct audit_entry *entry,
err = audit_get_nd(watch->path, &ndp, &ndw); err = audit_get_nd(watch->path, &ndp, &ndw);
if (err) if (err)
goto error; goto error;
putnd_needed = 1;
} }
mutex_lock(&audit_filter_mutex); mutex_lock(&audit_filter_mutex);
...@@ -1269,14 +1268,11 @@ static inline int audit_add_rule(struct audit_entry *entry, ...@@ -1269,14 +1268,11 @@ static inline int audit_add_rule(struct audit_entry *entry,
#endif #endif
mutex_unlock(&audit_filter_mutex); mutex_unlock(&audit_filter_mutex);
if (putnd_needed) audit_put_nd(ndp, ndw); /* NULL args OK */
audit_put_nd(ndp, ndw);
return 0; return 0;
error: error:
if (putnd_needed) audit_put_nd(ndp, ndw); /* NULL args OK */
audit_put_nd(ndp, ndw);
if (watch) if (watch)
audit_put_watch(watch); /* tmp watch, matches initial get */ audit_put_watch(watch); /* tmp watch, matches initial get */
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment