Skip to content

Commit

Permalink
Merge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/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
  • Loading branch information
Linus Torvalds committed Jul 17, 2007
2 parents 8dfd588 + b1734d2 commit ef9efe4
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 23 deletions.
2 changes: 1 addition & 1 deletion drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2666,7 +2666,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
mv_print_info(host);

pci_set_master(pdev);
pci_set_mwi(pdev);
pci_try_set_mwi(pdev);
return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED,
IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht);
}
Expand Down
4 changes: 3 additions & 1 deletion drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ static int amb_open (struct atm_vcc * atm_vcc)
struct atm_qos * qos;
struct atm_trafprm * txtp;
struct atm_trafprm * rxtp;
u16 tx_rate_bits;
u16 tx_rate_bits = -1; // hush gcc
u16 tx_vc_bits = -1; // hush gcc
u16 tx_frame_bits = -1; // hush gcc

Expand Down Expand Up @@ -1096,6 +1096,8 @@ static int amb_open (struct atm_vcc * atm_vcc)
r = round_up;
}
error = make_rate (pcr, r, &tx_rate_bits, NULL);
if (error)
return error;
tx_vc_bits = TX_UBR_CAPPED;
tx_frame_bits = TX_FRAME_CAPPED;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/mthca/mthca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
int i;
int size;
int size0 = 0;
u32 f0;
u32 f0 = 0;
int ind;
u8 op0 = 0;

Expand Down Expand Up @@ -1946,7 +1946,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
int i;
int size;
int size0 = 0;
u32 f0;
u32 f0 = 0;
int ind;
u8 op0 = 0;

Expand Down
4 changes: 2 additions & 2 deletions drivers/mtd/ubi/eba.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
struct ubi_vid_hdr *vid_hdr;
struct ubi_volume *vol = ubi->volumes[idx];
uint32_t crc, crc1;
uint32_t crc;

err = leb_read_lock(ubi, vol_id, lnum);
if (err)
Expand Down Expand Up @@ -451,7 +451,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf,
}

if (check) {
crc1 = crc32(UBI_CRC32_INIT, buf, len);
uint32_t crc1 = crc32(UBI_CRC32_INIT, buf, len);
if (crc1 != crc) {
ubi_warn("CRC error: calculated %#08x, must be %#08x",
crc1, crc);
Expand Down
7 changes: 6 additions & 1 deletion drivers/net/eepro100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2292,10 +2292,15 @@ static int eepro100_resume(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata (pdev);
struct speedo_private *sp = netdev_priv(dev);
void __iomem *ioaddr = sp->regs;
int rc;

pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
pci_enable_device(pdev);

rc = pci_enable_device(pdev);
if (rc)
return rc;

pci_set_master(pdev);

if (!netif_running(dev))
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/natsemi.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ static ssize_t natsemi_show_##_name(struct device *dev, \
#define NATSEMI_CREATE_FILE(_dev, _name) \
device_create_file(&_dev->dev, &dev_attr_##_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);

Expand Down
7 changes: 6 additions & 1 deletion drivers/net/ne2k-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
struct net_device *dev = pci_get_drvdata (pdev);
int rc;

pci_set_power_state(pdev, 0);
pci_restore_state(pdev);
pci_enable_device(pdev);

rc = pci_enable_device(pdev);
if (rc)
return rc;

NS8390_init(dev, 1);
netif_device_attach(dev);

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wan/pc300_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2833,6 +2833,8 @@ static int clock_rate_calc(uclong rate, uclong clock, int *br_io)
int br, tc;
int br_pwr, error;

*br_io = 0;

if (rate == 0)
return (0);

Expand Down
7 changes: 3 additions & 4 deletions drivers/net/wan/sbni.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,17 +595,16 @@ recv_frame( struct net_device *dev )

u32 crc = CRC32_INITIAL;

unsigned framelen, frameno, ack;
unsigned is_first, frame_ok;
unsigned framelen = 0, frameno, ack;
unsigned is_first, frame_ok = 0;

if( check_fhdr( ioaddr, &framelen, &frameno, &ack, &is_first, &crc ) ) {
frame_ok = framelen > 4
? upload_data( dev, framelen, frameno, is_first, crc )
: skip_tail( ioaddr, framelen, crc );
if( frame_ok )
interpret_ack( dev, ack );
} else
frame_ok = 0;
}

outb( inb( ioaddr + CSR0 ) ^ CT_ZER, ioaddr + CSR0 );
if( frame_ok ) {
Expand Down
7 changes: 6 additions & 1 deletion drivers/telephony/ixj.c
Original file line number Diff line number Diff line change
Expand Up @@ -3453,7 +3453,6 @@ static void ixj_write_frame(IXJ *j)
{
int cnt, frame_count, dly;
IXJ_WORD dat;
BYTES blankword;

frame_count = 0;
if(j->flags.cidplay) {
Expand Down Expand Up @@ -3501,13 +3500,16 @@ static void ixj_write_frame(IXJ *j)
}
if (frame_count >= 1) {
if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) {
BYTES blankword;

switch (j->play_mode) {
case PLAYBACK_MODE_ULAW:
case PLAYBACK_MODE_ALAW:
blankword.low = blankword.high = 0xFF;
break;
case PLAYBACK_MODE_8LINEAR:
case PLAYBACK_MODE_16LINEAR:
default:
blankword.low = blankword.high = 0x00;
break;
case PLAYBACK_MODE_8LINEAR_WSS:
Expand All @@ -3531,6 +3533,8 @@ static void ixj_write_frame(IXJ *j)
j->flags.play_first_frame = 0;
} else if (j->play_codec == G723_63 && j->flags.play_first_frame) {
for (cnt = 0; cnt < 24; cnt++) {
BYTES blankword;

if(cnt == 12) {
blankword.low = 0x02;
blankword.high = 0x00;
Expand Down Expand Up @@ -4868,6 +4872,7 @@ static char daa_CR_read(IXJ *j, int cr)
bytes.high = 0xB0 + cr;
break;
case SOP_PU_PULSEDIALING:
default:
bytes.high = 0xF0 + cr;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/misc/auerswald.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int time
} else
status = urb->status;

if (actual_length)
if (status >= 0)
*actual_length = urb->actual_length;

return status;
Expand Down
12 changes: 4 additions & 8 deletions kernel/auditfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,8 +1210,8 @@ static inline int audit_add_rule(struct audit_entry *entry,
struct audit_entry *e;
struct audit_field *inode_f = entry->rule.inode_f;
struct audit_watch *watch = entry->rule.watch;
struct nameidata *ndp, *ndw;
int h, err, putnd_needed = 0;
struct nameidata *ndp = NULL, *ndw = NULL;
int h, err;
#ifdef CONFIG_AUDITSYSCALL
int dont_count = 0;

Expand Down Expand Up @@ -1239,7 +1239,6 @@ static inline int audit_add_rule(struct audit_entry *entry,
err = audit_get_nd(watch->path, &ndp, &ndw);
if (err)
goto error;
putnd_needed = 1;
}

mutex_lock(&audit_filter_mutex);
Expand Down Expand Up @@ -1269,14 +1268,11 @@ static inline int audit_add_rule(struct audit_entry *entry,
#endif
mutex_unlock(&audit_filter_mutex);

if (putnd_needed)
audit_put_nd(ndp, ndw);

audit_put_nd(ndp, ndw); /* NULL args OK */
return 0;

error:
if (putnd_needed)
audit_put_nd(ndp, ndw);
audit_put_nd(ndp, ndw); /* NULL args OK */
if (watch)
audit_put_watch(watch); /* tmp watch, matches initial get */
return err;
Expand Down

0 comments on commit ef9efe4

Please sign in to comment.