Skip to contentSkip to conversation

drivers/net/usb/sierra_net.c: removes unnecessary semicolon

PATCH Applied Peter Senna Tschudin 5 participants 15 messages Sep 6, 2012 – Sep 23, 2012

Subsystems (12)
lore
Share & tools
lore
#0 lore raw

PATCH 1/10 drivers/net/usb/sierra_net.c: removes unnecessary semicolon

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/net/usb/sierra_net.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/sierra_net.c +1 -1
diff -u -p a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
@@ -842,7 +842,7 @@ static int sierra_net_rx_fixup(struct us
 				netdev_err(dev->net, "HIP/ETH: Invalid pkt\n");
 
 			dev->net->stats.rx_frame_errors++;
-			/* dev->net->stats.rx_errors incremented by caller */;
+			/* dev->net->stats.rx_errors incremented by caller */
 			return 0;
 		}
 
#13 lore raw

PATCH 10/10 drivers/block/ataflop.c: removes unnecessary semicolon

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/block/ataflop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/ataflop.c +1 -1
diff -u -p a/drivers/block/ataflop.c b/drivers/block/ataflop.c
@@ -775,7 +775,7 @@ static void fd_calibrate( void )
 	}
 
 	if (ATARIHW_PRESENT(FDCSPEED))
-		dma_wd.fdc_speed = 0; 	/* always seek with 8 Mhz */;
+		dma_wd.fdc_speed = 0; 	/* always seek with 8 Mhz */
 	DPRINT(("fd_calibrate\n"));
 	SET_IRQ_HANDLER( fd_calibrate_done );
 	/* we can't verify, since the speed may be incorrect */
#1 lore raw

PATCH 2/10 drivers/scsi/sym53c8xx_2/sym_fw.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/scsi/sym53c8xx_2/sym_fw.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/sym53c8xx_2/sym_fw.c +3 -3
diff -u -p a/drivers/scsi/sym53c8xx_2/sym_fw.c b/drivers/scsi/sym53c8xx_2/sym_fw.c
@@ -386,7 +386,7 @@ void sym_fw_bind_script(struct sym_hcb *
 				sym_name(np), (int) (cur-start));
 			++cur;
 			continue;
-		};
+		}
 
 		/*
 		 *  We use the bogus value 0xf00ff00f ;-)
@@ -494,7 +494,7 @@ void sym_fw_bind_script(struct sym_hcb *
 		default:
 			relocs = 0;
 			break;
-		};
+		}
 
 		/*
 		 *  Scriptify:) the opcode.
@@ -550,5 +550,5 @@ void sym_fw_bind_script(struct sym_hcb *
 
 			*cur++ = cpu_to_scr(new);
 		}
-	};
+	}
 }
#2 lore raw

PATCH 3/10 drivers/media/radio/si4713-i2c.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/media/radio/si4713-i2c.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/media/radio/si4713-i2c.c +6 -6
diff -u -p a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c
@@ -1009,7 +1009,7 @@ static int si4713_choose_econtrol_action
 
 	default:
 		rval = -EINVAL;
-	};
+	}
 
 	return rval;
 }
@@ -1081,7 +1081,7 @@ static int si4713_write_econtrol_string(
 	default:
 		rval = -EINVAL;
 		break;
-	};
+	}
 
 exit:
 	return rval;
@@ -1130,7 +1130,7 @@ static int si4713_write_econtrol_tune(st
 	default:
 		rval = -EINVAL;
 		goto unlock;
-	};
+	}
 
 	if (sdev->power_state)
 		rval = si4713_tx_tune_power(sdev, power, antcap);
@@ -1420,7 +1420,7 @@ static int si4713_read_econtrol_string(s
 	default:
 		rval = -EINVAL;
 		break;
-	};
+	}
 
 exit:
 	return rval;
@@ -1473,7 +1473,7 @@ static int si4713_read_econtrol_tune(str
 		break;
 	default:
 		rval = -EINVAL;
-	};
+	}
 
 unlock:
 	mutex_unlock(&sdev->mutex);
@@ -1698,7 +1698,7 @@ static int si4713_queryctrl(struct v4l2_
 	default:
 		rval = -EINVAL;
 		break;
-	};
+	}
 
 	return rval;
 }
#3 lore raw

PATCH 4/10 drivers/media/dvb-frontends/sp8870.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/media/dvb-frontends/sp8870.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/dvb-frontends/sp8870.c +3 -3
diff -u -p a/drivers/media/dvb-frontends/sp8870.c b/drivers/media/dvb-frontends/sp8870.c
@@ -188,7 +188,7 @@ static int configure_reg0xc05 (struct dt
 		break;
 	default:
 		return -EINVAL;
-	};
+	}
 
 	switch (p->hierarchy) {
 	case HIERARCHY_NONE:
@@ -207,7 +207,7 @@ static int configure_reg0xc05 (struct dt
 		break;
 	default:
 		return -EINVAL;
-	};
+	}
 
 	switch (p->code_rate_HP) {
 	case FEC_1_2:
@@ -229,7 +229,7 @@ static int configure_reg0xc05 (struct dt
 		break;
 	default:
 		return -EINVAL;
-	};
+	}
 
 	if (known_parameters)
 		*reg0xc05 |= (2 << 1);	/* use specified parameters */
#4 lore raw

PATCH 5/10 drivers/media/dvb-frontends/itd1000.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/media/dvb-frontends/itd1000.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/itd1000.c +1 -1
diff -u -p a/drivers/media/dvb-frontends/itd1000.c b/drivers/media/dvb-frontends/itd1000.c
@@ -231,7 +231,7 @@ static void itd1000_set_lo(struct itd100
 	state->frequency = ((plln * 1000) + (pllf * 1000)/1048576) * 2*FREF;
 	itd_dbg("frequency: %dkHz (wanted) %dkHz (set), PLLF = %d, PLLN = %d\n", freq_khz, state->frequency, pllf, plln);
 
-	itd1000_write_reg(state, PLLNH, 0x80); /* PLLNH */;
+	itd1000_write_reg(state, PLLNH, 0x80); /* PLLNH */
 	itd1000_write_reg(state, PLLNL, plln & 0xff);
 	itd1000_write_reg(state, PLLFH, (itd1000_read_reg(state, PLLFH) & 0xf0) | ((pllf >> 16) & 0x0f));
 	itd1000_write_reg(state, PLLFM, (pllf >> 8) & 0xff);
#5 lore raw

PATCH 6/10 drivers/media/pci/cx88/cx88-blackbird.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/media/pci/cx88/cx88-blackbird.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/pci/cx88/cx88-blackbird.c +3 -3
diff -u -p a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -721,7 +721,7 @@ static int vidioc_g_fmt_vid_cap (struct
 
 	f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;
 	f->fmt.pix.bytesperline = 0;
-	f->fmt.pix.sizeimage    = 188 * 4 * mpegbufs; /* 188 * 4 * 1024; */;
+	f->fmt.pix.sizeimage    = 188 * 4 * mpegbufs; /* 188 * 4 * 1024; */
 	f->fmt.pix.colorspace   = V4L2_COLORSPACE_SMPTE170M;
 	f->fmt.pix.width        = dev->width;
 	f->fmt.pix.height       = dev->height;
@@ -739,7 +739,7 @@ static int vidioc_try_fmt_vid_cap (struc
 
 	f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;
 	f->fmt.pix.bytesperline = 0;
-	f->fmt.pix.sizeimage    = 188 * 4 * mpegbufs; /* 188 * 4 * 1024; */;
+	f->fmt.pix.sizeimage    = 188 * 4 * mpegbufs; /* 188 * 4 * 1024; */
 	f->fmt.pix.colorspace   = V4L2_COLORSPACE_SMPTE170M;
 	dprintk(1, "VIDIOC_TRY_FMT: w: %d, h: %d, f: %d\n",
 		dev->width, dev->height, fh->mpegq.field );
@@ -755,7 +755,7 @@ static int vidioc_s_fmt_vid_cap (struct
 
 	f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;
 	f->fmt.pix.bytesperline = 0;
-	f->fmt.pix.sizeimage    = 188 * 4 * mpegbufs; /* 188 * 4 * 1024; */;
+	f->fmt.pix.sizeimage    = 188 * 4 * mpegbufs; /* 188 * 4 * 1024; */
 	f->fmt.pix.colorspace   = V4L2_COLORSPACE_SMPTE170M;
 	dev->width              = f->fmt.pix.width;
 	dev->height             = f->fmt.pix.height;
#6 lore raw

PATCH 7/10 drivers/video/sis/initextlfb.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/video/sis/initextlfb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/sis/initextlfb.c +1 -1
diff -u -p a/drivers/video/sis/initextlfb.c b/drivers/video/sis/initextlfb.c
@@ -65,7 +65,7 @@ sisfb_mode_rate_to_dclock(struct SiS_Pri
     }
 #endif
 
-    if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) {;
+    if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) {
        printk(KERN_ERR "Could not find mode %x\n", ModeNo);
        return 65000;
     }
#8 lore raw

PATCH 8/10 net/mac80211/scan.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 net/mac80211/scan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/scan.c +1 -1
diff -u -p a/net/mac80211/scan.c b/net/mac80211/scan.c
@@ -407,7 +407,7 @@ static void ieee80211_scan_state_send_pr
 	enum ieee80211_band band = local->hw.conf.channel->band;
 
 	sdata = rcu_dereference_protected(local->scan_sdata,
-					  lockdep_is_held(&local->mtx));;
+					  lockdep_is_held(&local->mtx));
 
 	for (i = 0; i < local->scan_req->n_ssids; i++)
 		ieee80211_send_probe_req(
#11 lore raw

PATCH 9/10 drivers/net/wireless/rtlwifi/rtl8192de/phy.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
 drivers/net/wireless/rtlwifi/rtl8192de/phy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rtlwifi/rtl8192de/phy.c +1 -1
diff -u -p a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
@@ -1314,7 +1314,7 @@ static void _rtl92d_phy_restore_rf_env(s
 	struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath];
 
 	RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "===>\n");
-	/*----Restore RFENV control type----*/ ;
+	/*----Restore RFENV control type----*/
 	switch (rfpath) {
 	case RF90_PATH_A:
 	case RF90_PATH_C:
Acked-by on v1 9/10
#12 lore raw

Re: [PATCH 9/10] drivers/net/wireless/rtlwifi/rtl8192de/phy.c: removes unnecessary semicolon

Quoted 18 lines · Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

---
  drivers/net/wireless/rtlwifi/rtl8192de/phy.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c

drivers/net/wireless/rtlwifi/rtl8192de/phy.c static void _rtl92d_phy_restore_rf_env(s · line 1320

Quoted 8 lines
drivers/net/wireless/rtlwifi/rtl8192de/phy.c +1 -1
@@ -1314,7 +1314,7 @@ static void _rtl92d_phy_restore_rf_env(s
  	struct bb_reg_def *pphyreg = &rtlphy->phyreg_def[rfpath];
 
  	RT_TRACE(rtlpriv, COMP_RF, DBG_LOUD, "===>\n");
-	/*----Restore RFENV control type----*/ ;
+	/*----Restore RFENV control type----*/
  	switch (rfpath) {
  	case RF90_PATH_A:
  	case RF90_PATH_C:

Thanks,

Larry

#10 lore raw

Re: [PATCH 8/10] net/mac80211/scan.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin

Please note that there are some false positives reported by this semantic patch, so I'm still working on it. I've removed lists from CC, kept only kernel-janitors.

// <smpl>
@r_case@
position p;
@@
switch (...)
{
case ...: ...;@p
}

@r_default@
position p;
@@
switch (...)
{
default: ...;@p
}

@r1@
statement S;
position p1;
position p != {r_case.p, r_default.p};
identifier label;
@@
(
label:;
|
S@p1;@p
)

@script:python r2@
p << r1.p;
p_case << r_case.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Quoted 11 lines · Johannes Berg
Quoted 5 lines · Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Applied. It'd be nice to have the spatch, I guess :)

johannes

Signature · 1 line
Peter
#7 lore raw

Re: [PATCH 7/10] drivers/video/sis/initextlfb.c: removes unnecessary semicolon

In reply to Peter Senna Tschudin
Quoted 7 lines · Peter Senna Tschudin

From: Peter Senna Tschudin <[email protected]>

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Applied.

Thanks,

Florian Tobias Schandinat

Quoted 19 lines
---
 drivers/video/sis/initextlfb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/video/sis/initextlfb.c b/drivers/video/sis/initextlfb.c

drivers/video/sis/initextlfb.c +1 -1
@@ -65,7 +65,7 @@ sisfb_mode_rate_to_dclock(struct SiS_Pri
     }
 #endif
 
-    if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) {;
+    if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) {
        printk(KERN_ERR "Could not find mode %x\n", ModeNo);
        return 65000;
     }