Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62b80719 authored by Luis de Bethencourt's avatar Luis de Bethencourt
Browse files

befs: fix style issues in linuxvfs.c



Fix the following type of checkpatch.pl issues:
WARNING: line over 80 characters
+static struct dentry *befs_lookup(struct inode *, struct dentry *, unsigned int);

ERROR: code indent should use tabs where possible
+        if (!bi)$

WARNING: please, no spaces at the start of a line
+        if (!bi)$

WARNING: labels should not be indented
+      unacquire_bh:

WARNING: space prohibited between function name and open parenthesis '('
+                                             sizeof (struct befs_inode_info),

WARNING: braces {} are not necessary for single statement blocks
+       if (!*out) {
+               return -ENOMEM;
+       }

WARNING: Block comments use a trailing */ on a separate line
+        * in special cases */

WARNING: Missing a blank line after declarations
+               int token;
+               if (!*p)

ERROR: do not use assignment in if condition
+       if (!(bh = sb_bread(sb, sb_block))) {

ERROR: space prohibited after that open parenthesis '('
+       if( befs_sb->num_blocks > ~((sector_t)0) ) {

ERROR: space prohibited before that close parenthesis ')'
+       if( befs_sb->num_blocks > ~((sector_t)0) ) {

ERROR: space required before the open parenthesis '('
+       if( befs_sb->num_blocks > ~((sector_t)0) ) {

Signed-off-by: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
parent 1ca7087e
Loading
Loading
Loading
Loading
+26 −23
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ static int befs_readdir(struct file *, struct dir_context *);
static int befs_get_block(struct inode *, sector_t, struct buffer_head *, int);
static int befs_readpage(struct file *file, struct page *page);
static sector_t befs_bmap(struct address_space *mapping, sector_t block);
static struct dentry *befs_lookup(struct inode *, struct dentry *, unsigned int);
static struct dentry *befs_lookup(struct inode *, struct dentry *,
				  unsigned int);
static struct inode *befs_iget(struct super_block *, unsigned long);
static struct inode *befs_alloc_inode(struct super_block *sb);
static void befs_destroy_inode(struct inode *inode);
@@ -518,9 +519,8 @@ befs_utf2nls(struct super_block *sb, const char *in,
	}

	*out = result = kmalloc(maxlen, GFP_NOFS);
	if (!*out) {
	if (!*out)
		return -ENOMEM;
	}

	for (i = o = 0; i < in_len; i += utflen, o += unilen) {

@@ -585,7 +585,8 @@ befs_nls2utf(struct super_block *sb, const char *in,
	/*
	 * There are nls characters that will translate to 3-chars-wide UTF-8
	 * characters, an additional byte is needed to save the final \0
	 * in special cases */
	 * in special cases
	 */
	int maxlen = (3 * in_len) + 1;

	befs_debug(sb, "---> %s\n", __func__);
@@ -664,6 +665,7 @@ parse_options(char *options, struct befs_mount_options *opts)

	while ((p = strsep(&options, ",")) != NULL) {
		int token;

		if (!*p)
			continue;

@@ -789,7 +791,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
		goto unacquire_priv_sbp;
	}

	if (!(bh = sb_bread(sb, sb_block))) {
	bh = sb_bread(sb, sb_block);
	if (!bh) {
		if (!silent)
			befs_error(sb, "unable to read superblock");
		goto unacquire_priv_sbp;
@@ -859,7 +862,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
	}

	return 0;
/*****************/

unacquire_bh:
	brelse(bh);

@@ -954,9 +957,9 @@ exit_befs_fs(void)
}

/*
Macros that typecheck the init and exit functions,
ensures that they are called at init and cleanup,
and eliminates warnings about unused functions.
 * Macros that typecheck the init and exit functions,
 * ensures that they are called at init and cleanup,
 * and eliminates warnings about unused functions.
 */
module_init(init_befs_fs)
module_exit(exit_befs_fs)