public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Salah Triki <salah.triki@gmail.com>
To: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	viro@zeniv.linux.org.uk, salah.triki@acm.org
Subject: Re: [PATCH 3/3] befs: befs: fix style issues in datastream.c
Date: Tue, 16 Aug 2016 08:40:00 +0100	[thread overview]
Message-ID: <20160816074000.GC3889@pc> (raw)
In-Reply-To: <1471108281-27169-3-git-send-email-luisbg@osg.samsung.com>

On Sat, Aug 13, 2016 at 06:11:21PM +0100, Luis de Bethencourt wrote:
> Fixing the following checkpatch.pl errors:
> 
> ERROR: "foo * bar" should be "foo *bar"
> +                            befs_blocknr_t blockno, befs_block_run * run);
> 
> WARNING: Missing a blank line after declarations
> +       struct buffer_head *bh;
> +       befs_debug(sb, "---> %s length: %llu", __func__, len);
> 
> WARNING: Block comments use * on subsequent lines
> +       /*
> +          Double indir block, plus all the indirect blocks it maps.
> 
> (and other instances of these)
> 
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> ---
>  fs/befs/datastream.c | 32 +++++++++++++++++---------------
>  1 file changed, 17 insertions(+), 15 deletions(-)
> 
> diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
> index 5ce85cf..b4c7ba0 100644
> --- a/fs/befs/datastream.c
> +++ b/fs/befs/datastream.c
> @@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
>  
>  static int befs_find_brun_direct(struct super_block *sb,
>  				 const befs_data_stream *data,
> -				 befs_blocknr_t blockno, befs_block_run * run);
> +				 befs_blocknr_t blockno, befs_block_run *run);
>  
>  static int befs_find_brun_indirect(struct super_block *sb,
>  				   const befs_data_stream *data,
>  				   befs_blocknr_t blockno,
> -				   befs_block_run * run);
> +				   befs_block_run *run);
>  
>  static int befs_find_brun_dblindirect(struct super_block *sb,
>  				      const befs_data_stream *data,
>  				      befs_blocknr_t blockno,
> -				      befs_block_run * run);
> +				      befs_block_run *run);
>  
>  /**
>   * befs_read_datastream - get buffer_head containing data, starting from pos.
> @@ -46,7 +46,7 @@ static int befs_find_brun_dblindirect(struct super_block *sb,
>   */
>  struct buffer_head *
>  befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
> -		     befs_off_t pos, uint * off)
> +		     befs_off_t pos, uint *off)
>  {
>  	struct buffer_head *bh;
>  	befs_block_run run;
> @@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
>   */
>  int
>  befs_fblock2brun(struct super_block *sb, const befs_data_stream *data,
> -		 befs_blocknr_t fblock, befs_block_run * run)
> +		 befs_blocknr_t fblock, befs_block_run *run)
>  {
>  	int err;
>  	befs_off_t pos = fblock << BEFS_SB(sb)->block_shift;
> @@ -134,6 +134,7 @@ befs_read_lsymlink(struct super_block *sb, const befs_data_stream *ds,
>  	befs_off_t bytes_read = 0;	/* bytes readed */
>  	u16 plen;
>  	struct buffer_head *bh;
> +
>  	befs_debug(sb, "---> %s length: %llu", __func__, len);
>  
>  	while (bytes_read < len) {
> @@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
>  		metablocks += ds->indirect.len;
>  
>  	/*
> -	   Double indir block, plus all the indirect blocks it maps.
> -	   In the double-indirect range, all block runs of data are
> -	   BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know 
> -	   how many data block runs are in the double-indirect region,
> -	   and from that we know how many indirect blocks it takes to
> -	   map them. We assume that the indirect blocks are also
> -	   BEFS_DBLINDIR_BRUN_LEN blocks long.
> +	 * Double indir block, plus all the indirect blocks it maps.
> +	 * In the double-indirect range, all block runs of data are
> +	 * BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
> +	 * how many data block runs are in the double-indirect region,
> +	 * and from that we know how many indirect blocks it takes to
> +	 * map them. We assume that the indirect blocks are also
> +	 * BEFS_DBLINDIR_BRUN_LEN blocks long.
>  	 */
>  	if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
>  		uint dbl_bytes;
> @@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
>   */
>  static int
>  befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
> -		      befs_blocknr_t blockno, befs_block_run * run)
> +		      befs_blocknr_t blockno, befs_block_run *run)
>  {
>  	int i;
>  	const befs_block_run *array = data->direct;
> @@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
>  	     sum += array[i].len, i++) {
>  		if (blockno >= sum && blockno < sum + (array[i].len)) {
>  			int offset = blockno - sum;
> +
>  			run->allocation_group = array[i].allocation_group;
>  			run->start = array[i].start + offset;
>  			run->len = array[i].len - offset;
> @@ -304,7 +306,7 @@ static int
>  befs_find_brun_indirect(struct super_block *sb,
>  			const befs_data_stream *data,
>  			befs_blocknr_t blockno,
> -			befs_block_run * run)
> +			befs_block_run *run)
>  {
>  	int i, j;
>  	befs_blocknr_t sum = 0;
> @@ -413,7 +415,7 @@ static int
>  befs_find_brun_dblindirect(struct super_block *sb,
>  			   const befs_data_stream *data,
>  			   befs_blocknr_t blockno,
> -			   befs_block_run * run)
> +			   befs_block_run *run)
>  {
>  	int dblindir_indx;
>  	int indir_indx;
> -- 
> 2.5.1
> 

Signed-off-by: Salah Triki <salah.triki@gmail.com>

Thanks,
Salah

  parent reply	other threads:[~2016-08-16  7:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13 17:11 [PATCH 1/3] befs: fix typos in datastream.c Luis de Bethencourt
2016-08-13 17:11 ` [PATCH 2/3] befs: improve documentation " Luis de Bethencourt
2016-08-16  7:34   ` Salah Triki
2016-08-13 17:11 ` [PATCH 3/3] befs: befs: fix style issues " Luis de Bethencourt
2016-08-14 17:48   ` [PATCH v2 3/3] " Luis de Bethencourt
2016-08-16  7:37     ` Salah Triki
2016-08-16  7:40   ` Salah Triki [this message]
2016-08-16  7:28 ` [PATCH 1/3] befs: fix typos " Salah Triki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160816074000.GC3889@pc \
    --to=salah.triki@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luisbg@osg.samsung.com \
    --cc=salah.triki@acm.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox