cdrom: Remove unused variable using Coccinelle
PATCH 1/1 cdrom: Remove unused variable using Coccinelle
The variable tocuse is initialized but never used otherwise.
semantic patch used for this change is as follows:
// <smpl>
@@
type T;
identifier i;
constant C;
@@
(
extern T i;
|
- T i;
<+... when != i
- i = C;
...+>
)
// </smpl>
Signed-off-by Shyam Saini <[email protected]>
--- drivers/cdrom/gdrom.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/cdrom/gdrom.c +1 -3
@@ -332,15 +332,13 @@ static int get_entry_track(int track)static int gdrom_get_last_session (struct cdrom_device_info *cd_info,struct cdrom_multisession *ms_info) { -int fentry, lentry, track, data, tocuse, err; +int fentry, lentry, track, data, err;if (!gd.toc)return -ENOMEM ; - tocuse =1 ;/* Check if GD-ROM */ err =gdrom_readtoc_cmd (gd.toc,1 );/* Not a GD-ROM so check if standard CD-ROM */ if (err) { - tocuse =0 ; err =gdrom_readtoc_cmd (gd.toc,0 );if (err) {pr_info ("Could not get CD table of contents\n" );
Signature · 1 line
2.7.4