All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matias Bjørling" <matias@cnexlabs.com>
To: Arnd Bergmann <arnd@arndb.de>, Matias Bjorling <mb@lightnvm.io>
Cc: "Javier González" <jg@lightnvm.io>, "Jens Axboe" <axboe@fb.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lightnvm: assume 64-bit lba numbers
Date: Wed, 19 Apr 2017 20:04:13 +0200	[thread overview]
Message-ID: <0c7f0894-4817-09c4-93b9-8158bbc6a562@cnexlabs.com> (raw)
In-Reply-To: <20170419173931.3902058-1-arnd@arndb.de>

On 04/19/2017 07:39 PM, Arnd Bergmann wrote:
> The driver uses both u64 and sector_t to refer to offsets, and assigns between the
> two. This causes one harmless warning when sector_t is 32-bit:
>
> drivers/lightnvm/pblk-rb.c: In function 'pblk_rb_write_entry_gc':
> include/linux/lightnvm.h:215:20: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
> drivers/lightnvm/pblk-rb.c:324:22: note: in expansion of macro 'ADDR_EMPTY'
>
> As the driver is already doing this inconsistently, changing the type
> won't make it worse and is an easy way to avoid the warning.
>
> Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/lightnvm/pblk.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
> index c82120ce3be5..11ed7d83f572 100644
> --- a/drivers/lightnvm/pblk.h
> +++ b/drivers/lightnvm/pblk.h
> @@ -119,7 +119,7 @@ struct pblk_w_ctx {
>  	struct bio_list bios;		/* Original bios - used for completion
>  					 * in REQ_FUA, REQ_FLUSH case
>  					 */
> -	sector_t lba;			/* Logic addr. associated with entry */
> +	u64 lba;			/* Logic addr. associated with entry */
>  	struct ppa_addr ppa;		/* Physic addr. associated with entry */
>  	int flags;			/* Write context flags */
>  };
>

Thanks Arnd. Jens, could you pick this up? Thank you

  reply	other threads:[~2017-04-19 18:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 17:39 [PATCH] lightnvm: assume 64-bit lba numbers Arnd Bergmann
2017-04-19 18:04 ` Matias Bjørling [this message]
2017-04-19 18:08   ` Jens Axboe
2017-04-19 18:08     ` Jens Axboe

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=0c7f0894-4817-09c4-93b9-8158bbc6a562@cnexlabs.com \
    --to=matias@cnexlabs.com \
    --cc=arnd@arndb.de \
    --cc=axboe@fb.com \
    --cc=jg@lightnvm.io \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@lightnvm.io \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.