Skip to contentSkip to conversation

UDF: coding style conversion - lindent fixups 2

PATCH In review Cyrill Gorcunov 1 participant 2 messages Jun 5, 2007 1 message not in the archive UDF filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UDF: coding style conversion - lindent fixups 2

This patch fixes sources were converted to kernel coding style by Lindent for first and then by hands. But some messed things were accidentally skipped.

---
Andrew, the patch is incremental over
- udf-coding-style-conversion-lindent.patch
- udf-coding-style-conversion-lindent-fixups.patch

And there is still a bug in UDF system concerned to deadlock on inode being dropped. I'm working on it.

 fs/udf/inode.c    |   14 ++++---
 fs/udf/truncate.c |  109 ++++++++++++++++++-----------------------------------
 2 files changed, 45 insertions(+), 78 deletions(-)
fs/udf/inode.c +8 -6
index 5c8f812..9fcd76c 100644
@@ -1098,7 +1098,8 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
 			make_bad_inode(inode);
 			return;
 		}
-		memcpy(UDF_I_DATA(inode), bh->b_data + sizeof(struct extendedFileEntry), inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry));
+		memcpy(UDF_I_DATA(inode), bh->b_data + sizeof(struct extendedFileEntry),
+		       inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry));
 	} else if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_FE) {
 		UDF_I_EFE(inode) = 0;
 		UDF_I_USE(inode) = 0;
@@ -1800,7 +1801,8 @@ int8_t udf_current_aext(struct inode * inode, struct extent_position * epos,
 		if (!epos->offset)
 			epos->offset = sizeof(struct allocExtDesc);
 		ptr = epos->bh->b_data + epos->offset;
-		alen = sizeof(struct allocExtDesc) + le32_to_cpu(((struct allocExtDesc *)epos->bh->b_data)->lengthAllocDescs);
+		alen = sizeof(struct allocExtDesc) +
+			le32_to_cpu(((struct allocExtDesc *)epos->bh->b_data)->lengthAllocDescs);
 	}
 
 	switch (UDF_I_ALLOCTYPE(inode)) {
@@ -1827,9 +1829,8 @@ int8_t udf_current_aext(struct inode * inode, struct extent_position * epos,
 	return etype;
 }
 
-static int8_t
-udf_insert_aext(struct inode *inode, struct extent_position epos,
-		kernel_lb_addr neloc, uint32_t nelen)
+static int8_t udf_insert_aext(struct inode *inode, struct extent_position epos,
+			      kernel_lb_addr neloc, uint32_t nelen)
 {
 	kernel_lb_addr oeloc;
 	uint32_t oelen;
@@ -1913,7 +1914,8 @@ int8_t udf_delete_aext(struct inode * inode, struct extent_position epos,
 			aed = (struct allocExtDesc *)oepos.bh->b_data;
 			aed->lengthAllocDescs =
 				cpu_to_le32(le32_to_cpu(aed->lengthAllocDescs) - adsize);
-			if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || UDF_SB_UDFREV(inode->i_sb) >= 0x0201)
+			if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) ||
+			    UDF_SB_UDFREV(inode->i_sb) >= 0x0201)
 				udf_update_tag(oepos.bh->b_data, epos.offset - adsize);
 			else
 				udf_update_tag(oepos.bh->b_data, sizeof(struct allocExtDesc));
fs/udf/truncate.c +37 -72

189 lines not on this page · raw message

A message that is not in the archive (sent off-list or not yet received): 1181067646.23941.31.camel@localhost

#2 lore raw

[Joe Perches - Tue, Jun 05, 2007 at 11:20:46AM -0700]

| On Tue, 2007-06-05 at 22:03 +0400, Cyrill Gorcunov wrote:
| > -			    cpu_to_le32(epos.offset -
| > -					sizeof(struct allocExtDesc));
| > -			if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT)
| > -			    || UDF_SB_UDFREV(inode->i_sb) >= 0x0201)
| > +				cpu_to_le32(epos.offset -
| > +					    sizeof(struct allocExtDesc));
| > +			if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) ||
| > +			    UDF_SB_UDFREV(inode->i_sb) >= 0x0201)
| 
| Please do not move logical operators or tests from
| "beginning of next line" to "end of line".
| 
| It's coder taste and there is no style guide consensus for this.
| 
| cheers,
| 
| Joe
| 

Actually a such conversion were made by Lindent - not coder... See for original truncate.c in current Linus's tree

Cyrill