aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 18:19:06 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 18:19:06 -0400
commitb8c638acacfe32c0bde361916467af00691f1965 (patch)
treea5655f484fa731d5ffd49c284f0372c4e055d144
parentef9efe43f2eddabee1e78a90c7c8451505bf05e1 (diff)
parent8e1c091cccd551557d24ce845715e8ceb6c49d36 (diff)
Merge branch 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6: arch/i386/* fs/* ipc/*: mark variables with uninitialized_var() drivers/*: mark variables with uninitialized_var()
-rw-r--r--arch/i386/kernel/efi.c2
-rw-r--r--drivers/atm/zatm.c4
-rw-r--r--drivers/char/cyclades.c4
-rw-r--r--drivers/mtd/ubi/eba.c2
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/tokenring/smctr.c6
-rw-r--r--drivers/usb/misc/auerswald.c2
-rw-r--r--drivers/video/matrox/matroxfb_maven.c9
-rw-r--r--drivers/video/riva/riva_hw.c7
-rw-r--r--fs/ocfs2/file.c3
-rw-r--r--fs/udf/super.c2
-rw-r--r--ipc/msg.c4
-rw-r--r--ipc/sem.c2
13 files changed, 32 insertions, 17 deletions
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index a1808022ea19..2452c6fbe992 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callback_t callback, void *arg)
278 struct range { 278 struct range {
279 unsigned long start; 279 unsigned long start;
280 unsigned long end; 280 unsigned long end;
281 } prev, curr; 281 } uninitialized_var(prev), curr;
282 efi_memory_desc_t *md; 282 efi_memory_desc_t *md;
283 unsigned long start, end; 283 unsigned long start, end;
284 void *p; 284 void *p;
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 020a87a476c8..58583c6ac5be 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -915,7 +915,7 @@ static int open_tx_first(struct atm_vcc *vcc)
915 unsigned long flags; 915 unsigned long flags;
916 u32 *loop; 916 u32 *loop;
917 unsigned short chan; 917 unsigned short chan;
918 int pcr,unlimited; 918 int unlimited;
919 919
920 DPRINTK("open_tx_first\n"); 920 DPRINTK("open_tx_first\n");
921 zatm_dev = ZATM_DEV(vcc->dev); 921 zatm_dev = ZATM_DEV(vcc->dev);
@@ -936,6 +936,8 @@ static int open_tx_first(struct atm_vcc *vcc)
936 vcc->qos.txtp.max_pcr >= ATM_OC3_PCR); 936 vcc->qos.txtp.max_pcr >= ATM_OC3_PCR);
937 if (unlimited && zatm_dev->ubr != -1) zatm_vcc->shaper = zatm_dev->ubr; 937 if (unlimited && zatm_dev->ubr != -1) zatm_vcc->shaper = zatm_dev->ubr;
938 else { 938 else {
939 int uninitialized_var(pcr);
940
939 if (unlimited) vcc->qos.txtp.max_sdu = ATM_MAX_AAL5_PDU; 941 if (unlimited) vcc->qos.txtp.max_sdu = ATM_MAX_AAL5_PDU;
940 if ((zatm_vcc->shaper = alloc_shaper(vcc->dev,&pcr, 942 if ((zatm_vcc->shaper = alloc_shaper(vcc->dev,&pcr,
941 vcc->qos.txtp.min_pcr,vcc->qos.txtp.max_pcr,unlimited)) 943 vcc->qos.txtp.min_pcr,vcc->qos.txtp.max_pcr,unlimited))
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 7b0839426e18..9e0adfe27c12 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -4466,10 +4466,10 @@ static void cy_hangup(struct tty_struct *tty)
4466static int __devinit cy_init_card(struct cyclades_card *cinfo) 4466static int __devinit cy_init_card(struct cyclades_card *cinfo)
4467{ 4467{
4468 struct cyclades_port *info; 4468 struct cyclades_port *info;
4469 u32 mailbox; 4469 u32 uninitialized_var(mailbox);
4470 unsigned int nports; 4470 unsigned int nports;
4471 unsigned short chip_number; 4471 unsigned short chip_number;
4472 int index, port; 4472 int uninitialized_var(index), port;
4473 4473
4474 spin_lock_init(&cinfo->card_lock); 4474 spin_lock_init(&cinfo->card_lock);
4475 4475
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 4dc10c8ab964..7c6b223b3f8a 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; 371 uint32_t uninitialized_var(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)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 982a9010c7a9..bb6896ae3151 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2338,7 +2338,7 @@ static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb,
2338{ 2338{
2339 struct skb_shared_info *info = skb_shinfo(skb); 2339 struct skb_shared_info *info = skb_shinfo(skb);
2340 unsigned int cur_frag, entry; 2340 unsigned int cur_frag, entry;
2341 struct TxDesc *txd; 2341 struct TxDesc * uninitialized_var(txd);
2342 2342
2343 entry = tp->cur_tx; 2343 entry = tp->cur_tx;
2344 for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) { 2344 for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) {
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 58d7e5d452fa..f83bb5cb0d3d 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -3692,7 +3692,6 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
3692 __u16 rcode, correlator; 3692 __u16 rcode, correlator;
3693 int err = 0; 3693 int err = 0;
3694 __u8 xframe = 1; 3694 __u8 xframe = 1;
3695 __u16 tx_fstatus;
3696 3695
3697 rmf->vl = SWAP_BYTES(rmf->vl); 3696 rmf->vl = SWAP_BYTES(rmf->vl);
3698 if(rx_status & FCB_RX_STATUS_DA_MATCHED) 3697 if(rx_status & FCB_RX_STATUS_DA_MATCHED)
@@ -3783,7 +3782,9 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
3783 } 3782 }
3784 break; 3783 break;
3785 3784
3786 case TX_FORWARD: 3785 case TX_FORWARD: {
3786 __u16 uninitialized_var(tx_fstatus);
3787
3787 if((rcode = smctr_rcv_tx_forward(dev, rmf)) 3788 if((rcode = smctr_rcv_tx_forward(dev, rmf))
3788 != POSITIVE_ACK) 3789 != POSITIVE_ACK)
3789 { 3790 {
@@ -3811,6 +3812,7 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
3811 } 3812 }
3812 } 3813 }
3813 break; 3814 break;
3815 }
3814 3816
3815 /* Received MAC Frames Processed by CRS/REM/RPS. */ 3817 /* Received MAC Frames Processed by CRS/REM/RPS. */
3816 case RSP: 3818 case RSP:
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 3e22b2ff9e74..42d4e6454a77 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -664,7 +664,7 @@ static int auerchain_control_msg (pauerchain_t acp, struct usb_device *dev, unsi
664 int ret; 664 int ret;
665 struct usb_ctrlrequest *dr; 665 struct usb_ctrlrequest *dr;
666 struct urb *urb; 666 struct urb *urb;
667 int length; 667 int uninitialized_var(length);
668 668
669 dbg ("auerchain_control_msg"); 669 dbg ("auerchain_control_msg");
670 dr = kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL); 670 dr = kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index 5d29a26b8cdf..de0d755f9019 100644
--- a/drivers/video/matrox/matroxfb_maven.c
+++ b/drivers/video/matrox/matroxfb_maven.c
@@ -273,8 +273,11 @@ static int matroxfb_PLL_mavenclock(const struct matrox_pll_features2* pll,
273 } 273 }
274 } 274 }
275 } 275 }
276
277 /* if h2/post/in/feed have not been assigned, return zero (error) */
276 if (besth2 < 2) 278 if (besth2 < 2)
277 return 0; 279 return 0;
280
278 dprintk(KERN_ERR "clk: %02X %02X %02X %d %d\n", *in, *feed, *post, fxtal, fwant); 281 dprintk(KERN_ERR "clk: %02X %02X %02X %d %d\n", *in, *feed, *post, fxtal, fwant);
279 return fxtal * (*feed) / (*in) * ctl->den; 282 return fxtal * (*feed) / (*in) * ctl->den;
280} 283}
@@ -284,7 +287,7 @@ static unsigned int matroxfb_mavenclock(const struct matrox_pll_ctl* ctl,
284 unsigned int* in, unsigned int* feed, unsigned int* post, 287 unsigned int* in, unsigned int* feed, unsigned int* post,
285 unsigned int* htotal2) { 288 unsigned int* htotal2) {
286 unsigned int fvco; 289 unsigned int fvco;
287 unsigned int p; 290 unsigned int uninitialized_var(p);
288 291
289 fvco = matroxfb_PLL_mavenclock(&maven1000_pll, ctl, htotal, vtotal, in, feed, &p, htotal2); 292 fvco = matroxfb_PLL_mavenclock(&maven1000_pll, ctl, htotal, vtotal, in, feed, &p, htotal2);
290 if (!fvco) 293 if (!fvco)
@@ -715,7 +718,9 @@ static int maven_find_exact_clocks(unsigned int ht, unsigned int vt,
715 m->regs[0x82] = 0x81; 718 m->regs[0x82] = 0x81;
716 719
717 for (x = 0; x < 8; x++) { 720 for (x = 0; x < 8; x++) {
718 unsigned int a, b, c, h2; 721 unsigned int c;
722 unsigned int uninitialized_var(a), uninitialized_var(b),
723 uninitialized_var(h2);
719 unsigned int h = ht + 2 + x; 724 unsigned int h = ht + 2 + x;
720 725
721 if (!matroxfb_mavenclock((m->mode == MATROXFB_OUTPUT_MODE_PAL) ? &maven_PAL : &maven_NTSC, h, vt, &a, &b, &c, &h2)) { 726 if (!matroxfb_mavenclock((m->mode == MATROXFB_OUTPUT_MODE_PAL) ? &maven_PAL : &maven_NTSC, h, vt, &a, &b, &c, &h2)) {
diff --git a/drivers/video/riva/riva_hw.c b/drivers/video/riva/riva_hw.c
index 70bfd78eca81..13307703a9f0 100644
--- a/drivers/video/riva/riva_hw.c
+++ b/drivers/video/riva/riva_hw.c
@@ -1223,6 +1223,8 @@ static int CalcVClock
1223 } 1223 }
1224 } 1224 }
1225 } 1225 }
1226
1227 /* non-zero: M/N/P/clock values assigned. zero: error (not set) */
1226 return (DeltaOld != 0xFFFFFFFF); 1228 return (DeltaOld != 0xFFFFFFFF);
1227} 1229}
1228/* 1230/*
@@ -1240,7 +1242,10 @@ int CalcStateExt
1240 int dotClock 1242 int dotClock
1241) 1243)
1242{ 1244{
1243 int pixelDepth, VClk, m, n, p; 1245 int pixelDepth;
1246 int uninitialized_var(VClk),uninitialized_var(m),
1247 uninitialized_var(n), uninitialized_var(p);
1248
1244 /* 1249 /*
1245 * Save mode parameters. 1250 * Save mode parameters.
1246 */ 1251 */
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index f04c7aa834cb..004c2abbc732 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1867,7 +1867,8 @@ static ssize_t ocfs2_file_buffered_write(struct file *file, loff_t *ppos,
1867 loff_t pos; 1867 loff_t pos;
1868 const struct iovec *cur_iov = iov; 1868 const struct iovec *cur_iov = iov;
1869 struct page *user_page, *page; 1869 struct page *user_page, *page;
1870 char *buf, *dst; 1870 char * uninitialized_var(buf);
1871 char *dst;
1871 void *fsdata; 1872 void *fsdata;
1872 1873
1873 /* 1874 /*
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 6658afb41cc7..d6a504f5d758 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1356,7 +1356,7 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
1356 case UDF_VIRTUAL_MAP15: 1356 case UDF_VIRTUAL_MAP15:
1357 case UDF_VIRTUAL_MAP20: 1357 case UDF_VIRTUAL_MAP20:
1358 { 1358 {
1359 kernel_lb_addr ino; 1359 kernel_lb_addr uninitialized_var(ino);
1360 1360
1361 if (!UDF_SB_LASTBLOCK(sb)) 1361 if (!UDF_SB_LASTBLOCK(sb))
1362 { 1362 {
diff --git a/ipc/msg.c b/ipc/msg.c
index cbd27e519943..a03fcb522fff 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -385,7 +385,7 @@ copy_msqid_from_user(struct msq_setbuf *out, void __user *buf, int version)
385asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) 385asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf)
386{ 386{
387 struct kern_ipc_perm *ipcp; 387 struct kern_ipc_perm *ipcp;
388 struct msq_setbuf setbuf; 388 struct msq_setbuf uninitialized_var(setbuf);
389 struct msg_queue *msq; 389 struct msg_queue *msq;
390 int err, version; 390 int err, version;
391 struct ipc_namespace *ns; 391 struct ipc_namespace *ns;
@@ -509,7 +509,7 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf)
509 err = audit_ipc_obj(ipcp); 509 err = audit_ipc_obj(ipcp);
510 if (err) 510 if (err)
511 goto out_unlock_up; 511 goto out_unlock_up;
512 if (cmd==IPC_SET) { 512 if (cmd == IPC_SET) {
513 err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid, 513 err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid,
514 setbuf.mode); 514 setbuf.mode);
515 if (err) 515 if (err)
diff --git a/ipc/sem.c b/ipc/sem.c
index 89bfdffb38d8..b676fef6d208 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -856,7 +856,7 @@ static int semctl_down(struct ipc_namespace *ns, int semid, int semnum,
856{ 856{
857 struct sem_array *sma; 857 struct sem_array *sma;
858 int err; 858 int err;
859 struct sem_setbuf setbuf; 859 struct sem_setbuf uninitialized_var(setbuf);
860 struct kern_ipc_perm *ipcp; 860 struct kern_ipc_perm *ipcp;
861 861
862 if(cmd == IPC_SET) { 862 if(cmd == IPC_SET) {