Commit 5891d9dd2a47d38c205115211841a3d82304628f

Authored by Jan Kara
1 parent 0cc6d77e55

udf: Remove dead code

Remove code that gets never used.

Signed-off-by: Jan Kara <jack@suse.cz>

Showing 2 changed files with 0 additions and 90 deletions Side-by-side Diff

... ... @@ -18,59 +18,6 @@
18 18 #include <linux/string.h>
19 19 #include <linux/buffer_head.h>
20 20  
21   -#if 0
22   -static uint8_t *udf_filead_read(struct inode *dir, uint8_t *tmpad,
23   - uint8_t ad_size, struct kernel_lb_addr fe_loc,
24   - int *pos, int *offset, struct buffer_head **bh,
25   - int *error)
26   -{
27   - int loffset = *offset;
28   - int block;
29   - uint8_t *ad;
30   - int remainder;
31   -
32   - *error = 0;
33   -
34   - ad = (uint8_t *)(*bh)->b_data + *offset;
35   - *offset += ad_size;
36   -
37   - if (!ad) {
38   - brelse(*bh);
39   - *error = 1;
40   - return NULL;
41   - }
42   -
43   - if (*offset == dir->i_sb->s_blocksize) {
44   - brelse(*bh);
45   - block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos);
46   - if (!block)
47   - return NULL;
48   - *bh = udf_tread(dir->i_sb, block);
49   - if (!*bh)
50   - return NULL;
51   - } else if (*offset > dir->i_sb->s_blocksize) {
52   - ad = tmpad;
53   -
54   - remainder = dir->i_sb->s_blocksize - loffset;
55   - memcpy((uint8_t *)ad, (*bh)->b_data + loffset, remainder);
56   -
57   - brelse(*bh);
58   - block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos);
59   - if (!block)
60   - return NULL;
61   - (*bh) = udf_tread(dir->i_sb, block);
62   - if (!*bh)
63   - return NULL;
64   -
65   - memcpy((uint8_t *)ad + remainder, (*bh)->b_data,
66   - ad_size - remainder);
67   - *offset = ad_size - remainder;
68   - }
69   -
70   - return ad;
71   -}
72   -#endif
73   -
74 21 struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos,
75 22 struct udf_fileident_bh *fibh,
76 23 struct fileIdentDesc *cfi,
... ... @@ -247,39 +194,6 @@
247 194  
248 195 return fi;
249 196 }
250   -
251   -#if 0
252   -static struct extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset)
253   -{
254   - struct extent_ad *ext;
255   - struct fileEntry *fe;
256   - uint8_t *ptr;
257   -
258   - if ((!buffer) || (!offset)) {
259   - printk(KERN_ERR "udf: udf_get_fileextent() invalidparms\n");
260   - return NULL;
261   - }
262   -
263   - fe = (struct fileEntry *)buffer;
264   -
265   - if (fe->descTag.tagIdent != cpu_to_le16(TAG_IDENT_FE)) {
266   - udf_debug("0x%x != TAG_IDENT_FE\n",
267   - le16_to_cpu(fe->descTag.tagIdent));
268   - return NULL;
269   - }
270   -
271   - ptr = (uint8_t *)(fe->extendedAttr) +
272   - le32_to_cpu(fe->lengthExtendedAttr);
273   -
274   - if ((*offset > 0) && (*offset < le32_to_cpu(fe->lengthAllocDescs)))
275   - ptr += *offset;
276   -
277   - ext = (struct extent_ad *)ptr;
278   -
279   - *offset = *offset + sizeof(struct extent_ad);
280   - return ext;
281   -}
282   -#endif
283 197  
284 198 struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset,
285 199 int inc)
... ... @@ -36,14 +36,10 @@
36 36 ms_info.addr_format = CDROM_LBA;
37 37 i = ioctl_by_bdev(bdev, CDROMMULTISESSION, (unsigned long)&ms_info);
38 38  
39   -#define WE_OBEY_THE_WRITTEN_STANDARDS 1
40   -
41 39 if (i == 0) {
42 40 udf_debug("XA disk: %s, vol_desc_start=%d\n",
43 41 (ms_info.xa_flag ? "yes" : "no"), ms_info.addr.lba);
44   -#if WE_OBEY_THE_WRITTEN_STANDARDS
45 42 if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */
46   -#endif
47 43 vol_desc_start = ms_info.addr.lba;
48 44 } else {
49 45 udf_debug("CDROMMULTISESSION not supported: rc=%d\n", i);