Skip to content

Commit 5ca4e4b

Browse files
Pekka Enbergjankara
authored andcommitted
Remove struct typedefs from fs/udf/ecma_167.h et al.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent 833bb30 commit 5ca4e4b

15 files changed

Lines changed: 444 additions & 442 deletions

File tree

‎fs/udf/balloc.c‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int read_block_bitmap(struct super_block *sb,
8787
{
8888
struct buffer_head *bh = NULL;
8989
int retval = 0;
90-
kernel_lb_addr loc;
90+
struct kernel_lb_addr loc;
9191

9292
loc.logicalBlockNum = bitmap->s_extPosition;
9393
loc.partitionReferenceNum = UDF_SB(sb)->s_partition;
@@ -156,7 +156,7 @@ static bool udf_add_free_space(struct udf_sb_info *sbi,
156156
static void udf_bitmap_free_blocks(struct super_block *sb,
157157
struct inode *inode,
158158
struct udf_bitmap *bitmap,
159-
kernel_lb_addr bloc, uint32_t offset,
159+
struct kernel_lb_addr bloc, uint32_t offset,
160160
uint32_t count)
161161
{
162162
struct udf_sb_info *sbi = UDF_SB(sb);
@@ -425,13 +425,13 @@ static int udf_bitmap_new_block(struct super_block *sb,
425425
static void udf_table_free_blocks(struct super_block *sb,
426426
struct inode *inode,
427427
struct inode *table,
428-
kernel_lb_addr bloc, uint32_t offset,
428+
struct kernel_lb_addr bloc, uint32_t offset,
429429
uint32_t count)
430430
{
431431
struct udf_sb_info *sbi = UDF_SB(sb);
432432
uint32_t start, end;
433433
uint32_t elen;
434-
kernel_lb_addr eloc;
434+
struct kernel_lb_addr eloc;
435435
struct extent_position oepos, epos;
436436
int8_t etype;
437437
int i;
@@ -532,18 +532,18 @@ static void udf_table_free_blocks(struct super_block *sb,
532532
*/
533533

534534
int adsize;
535-
short_ad *sad = NULL;
536-
long_ad *lad = NULL;
535+
struct short_ad *sad = NULL;
536+
struct long_ad *lad = NULL;
537537
struct allocExtDesc *aed;
538538

539539
eloc.logicalBlockNum = start;
540540
elen = EXT_RECORDED_ALLOCATED |
541541
(count << sb->s_blocksize_bits);
542542

543543
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
544-
adsize = sizeof(short_ad);
544+
adsize = sizeof(struct short_ad);
545545
else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
546-
adsize = sizeof(long_ad);
546+
adsize = sizeof(struct long_ad);
547547
else {
548548
brelse(oepos.bh);
549549
brelse(epos.bh);
@@ -601,23 +601,23 @@ static void udf_table_free_blocks(struct super_block *sb,
601601
if (sbi->s_udfrev >= 0x0200)
602602
udf_new_tag(epos.bh->b_data, TAG_IDENT_AED,
603603
3, 1, epos.block.logicalBlockNum,
604-
sizeof(tag));
604+
sizeof(struct tag));
605605
else
606606
udf_new_tag(epos.bh->b_data, TAG_IDENT_AED,
607607
2, 1, epos.block.logicalBlockNum,
608-
sizeof(tag));
608+
sizeof(struct tag));
609609

610610
switch (iinfo->i_alloc_type) {
611611
case ICBTAG_FLAG_AD_SHORT:
612-
sad = (short_ad *)sptr;
612+
sad = (struct short_ad *)sptr;
613613
sad->extLength = cpu_to_le32(
614614
EXT_NEXT_EXTENT_ALLOCDECS |
615615
sb->s_blocksize);
616616
sad->extPosition =
617617
cpu_to_le32(epos.block.logicalBlockNum);
618618
break;
619619
case ICBTAG_FLAG_AD_LONG:
620-
lad = (long_ad *)sptr;
620+
lad = (struct long_ad *)sptr;
621621
lad->extLength = cpu_to_le32(
622622
EXT_NEXT_EXTENT_ALLOCDECS |
623623
sb->s_blocksize);
@@ -666,7 +666,7 @@ static int udf_table_prealloc_blocks(struct super_block *sb,
666666
struct udf_sb_info *sbi = UDF_SB(sb);
667667
int alloc_count = 0;
668668
uint32_t elen, adsize;
669-
kernel_lb_addr eloc;
669+
struct kernel_lb_addr eloc;
670670
struct extent_position epos;
671671
int8_t etype = -1;
672672
struct udf_inode_info *iinfo;
@@ -677,9 +677,9 @@ static int udf_table_prealloc_blocks(struct super_block *sb,
677677

678678
iinfo = UDF_I(table);
679679
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
680-
adsize = sizeof(short_ad);
680+
adsize = sizeof(struct short_ad);
681681
else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
682-
adsize = sizeof(long_ad);
682+
adsize = sizeof(struct long_ad);
683683
else
684684
return 0;
685685

@@ -735,17 +735,17 @@ static int udf_table_new_block(struct super_block *sb,
735735
uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF;
736736
uint32_t newblock = 0, adsize;
737737
uint32_t elen, goal_elen = 0;
738-
kernel_lb_addr eloc, uninitialized_var(goal_eloc);
738+
struct kernel_lb_addr eloc, uninitialized_var(goal_eloc);
739739
struct extent_position epos, goal_epos;
740740
int8_t etype;
741741
struct udf_inode_info *iinfo = UDF_I(table);
742742

743743
*err = -ENOSPC;
744744

745745
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
746-
adsize = sizeof(short_ad);
746+
adsize = sizeof(struct short_ad);
747747
else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG)
748-
adsize = sizeof(long_ad);
748+
adsize = sizeof(struct long_ad);
749749
else
750750
return newblock;
751751

@@ -830,7 +830,7 @@ static int udf_table_new_block(struct super_block *sb,
830830

831831
inline void udf_free_blocks(struct super_block *sb,
832832
struct inode *inode,
833-
kernel_lb_addr bloc, uint32_t offset,
833+
struct kernel_lb_addr bloc, uint32_t offset,
834834
uint32_t count)
835835
{
836836
uint16_t partition = bloc.partitionReferenceNum;

‎fs/udf/dir.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static int do_udf_readdir(struct inode *dir, struct file *filp,
5151
uint8_t lfi;
5252
loff_t size = udf_ext0_offset(dir) + dir->i_size;
5353
struct buffer_head *tmp, *bha[16];
54-
kernel_lb_addr eloc;
54+
struct kernel_lb_addr eloc;
5555
uint32_t elen;
5656
sector_t offset;
5757
int i, num, ret = 0;
@@ -83,10 +83,10 @@ static int do_udf_readdir(struct inode *dir, struct file *filp,
8383
block = udf_get_lb_pblock(dir->i_sb, eloc, offset);
8484
if ((++offset << dir->i_sb->s_blocksize_bits) < elen) {
8585
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT)
86-
epos.offset -= sizeof(short_ad);
86+
epos.offset -= sizeof(struct short_ad);
8787
else if (iinfo->i_alloc_type ==
8888
ICBTAG_FLAG_AD_LONG)
89-
epos.offset -= sizeof(long_ad);
89+
epos.offset -= sizeof(struct long_ad);
9090
} else {
9191
offset = 0;
9292
}
@@ -161,7 +161,7 @@ static int do_udf_readdir(struct inode *dir, struct file *filp,
161161
memcpy(fname, "..", flen);
162162
dt_type = DT_DIR;
163163
} else {
164-
kernel_lb_addr tloc = lelb_to_cpu(cfi.icb.extLocation);
164+
struct kernel_lb_addr tloc = lelb_to_cpu(cfi.icb.extLocation);
165165

166166
iblock = udf_get_lb_pblock(dir->i_sb, tloc, 0);
167167
flen = udf_get_filename(dir->i_sb, nameptr, fname, lfi);

‎fs/udf/directory.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#if 0
2222
static uint8_t *udf_filead_read(struct inode *dir, uint8_t *tmpad,
23-
uint8_t ad_size, kernel_lb_addr fe_loc,
23+
uint8_t ad_size, struct kernel_lb_addr fe_loc,
2424
int *pos, int *offset, struct buffer_head **bh,
2525
int *error)
2626
{
@@ -75,7 +75,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos,
7575
struct udf_fileident_bh *fibh,
7676
struct fileIdentDesc *cfi,
7777
struct extent_position *epos,
78-
kernel_lb_addr *eloc, uint32_t *elen,
78+
struct kernel_lb_addr *eloc, uint32_t *elen,
7979
sector_t *offset)
8080
{
8181
struct fileIdentDesc *fi;
@@ -249,9 +249,9 @@ struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, int *offset)
249249
}
250250

251251
#if 0
252-
static extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset)
252+
static struct extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset)
253253
{
254-
extent_ad *ext;
254+
struct extent_ad *ext;
255255
struct fileEntry *fe;
256256
uint8_t *ptr;
257257

@@ -274,54 +274,54 @@ static extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset)
274274
if ((*offset > 0) && (*offset < le32_to_cpu(fe->lengthAllocDescs)))
275275
ptr += *offset;
276276

277-
ext = (extent_ad *)ptr;
277+
ext = (struct extent_ad *)ptr;
278278

279-
*offset = *offset + sizeof(extent_ad);
279+
*offset = *offset + sizeof(struct extent_ad);
280280
return ext;
281281
}
282282
#endif
283283

284-
short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset,
284+
struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset,
285285
int inc)
286286
{
287-
short_ad *sa;
287+
struct short_ad *sa;
288288

289289
if ((!ptr) || (!offset)) {
290290
printk(KERN_ERR "udf: udf_get_fileshortad() invalidparms\n");
291291
return NULL;
292292
}
293293

294-
if ((*offset + sizeof(short_ad)) > maxoffset)
294+
if ((*offset + sizeof(struct short_ad)) > maxoffset)
295295
return NULL;
296296
else {
297-
sa = (short_ad *)ptr;
297+
sa = (struct short_ad *)ptr;
298298
if (sa->extLength == 0)
299299
return NULL;
300300
}
301301

302302
if (inc)
303-
*offset += sizeof(short_ad);
303+
*offset += sizeof(struct short_ad);
304304
return sa;
305305
}
306306

307-
long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, uint32_t *offset, int inc)
307+
struct long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, uint32_t *offset, int inc)
308308
{
309-
long_ad *la;
309+
struct long_ad *la;
310310

311311
if ((!ptr) || (!offset)) {
312312
printk(KERN_ERR "udf: udf_get_filelongad() invalidparms\n");
313313
return NULL;
314314
}
315315

316-
if ((*offset + sizeof(long_ad)) > maxoffset)
316+
if ((*offset + sizeof(struct long_ad)) > maxoffset)
317317
return NULL;
318318
else {
319-
la = (long_ad *)ptr;
319+
la = (struct long_ad *)ptr;
320320
if (la->extLength == 0)
321321
return NULL;
322322
}
323323

324324
if (inc)
325-
*offset += sizeof(long_ad);
325+
*offset += sizeof(struct long_ad);
326326
return la;
327327
}

0 commit comments

Comments
 (0)