linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com,
	miklos@szeredi.hu, linux-kernel@vger.kernel.org,
	dan.carpenter@oracle.com
Subject: Re: [PATCH 1/2] virtiofs, dax: Fix smatch warning about loss of info during shift
Date: Mon, 10 May 2021 14:16:23 -0400	[thread overview]
Message-ID: <20210510181623.GA185367@horse> (raw)
In-Reply-To: <20210506193517.GF388843@casper.infradead.org>

On Thu, May 06, 2021 at 12:35:17PM -0700, Matthew Wilcox wrote:
> On Thu, May 06, 2021 at 08:07:39PM +0100, Dr. David Alan Gilbert wrote:
> > > @@ -186,7 +186,7 @@ static int fuse_setup_one_mapping(struct inode *inode, unsigned long start_idx,
> > >  	struct fuse_conn_dax *fcd = fm->fc->dax;
> > >  	struct fuse_inode *fi = get_fuse_inode(inode);
> > >  	struct fuse_setupmapping_in inarg;
> > > -	loff_t offset = start_idx << FUSE_DAX_SHIFT;
> > > +	loff_t offset = (loff_t)start_idx << FUSE_DAX_SHIFT;
> > 
> > I've not followed the others back, but isn't it easier to change
> > the start_idx parameter to be a loff_t, since the places it's called
> > from are poth loff_t pos?
> 
> But an index isn't a file offset, and shouldn't be typed as such.

Agreed. This is index, so it seems better to not use "loff_t" to
represent it.

Vivek


  reply	other threads:[~2021-05-10 18:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 18:43 [PATCH 0/2] virtiofs, dax: Fix couple of smatch warnings Vivek Goyal
2021-05-06 18:43 ` [PATCH 1/2] virtiofs, dax: Fix smatch warning about loss of info during shift Vivek Goyal
2021-05-06 19:07   ` Dr. David Alan Gilbert
2021-05-06 19:35     ` Matthew Wilcox
2021-05-10 18:16       ` Vivek Goyal [this message]
2021-05-06 18:43 ` [PATCH 2/2] virtiofs, dax: Fixed smatch warning about ret being uninitialized Vivek Goyal

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=20210510181623.GA185367@horse \
    --to=vgoyal@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dgilbert@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=virtio-fs@redhat.com \
    --cc=willy@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).