Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1679374pxy; Thu, 6 May 2021 13:06:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfPneGD3pB/kMdDPdEqDpKg0ABKh1pvttbQLW57mAmv0pvuj8H6WdcFGWvwLHDBBYvxzCk X-Received: by 2002:a17:906:11cc:: with SMTP id o12mr6393176eja.85.1620331572358; Thu, 06 May 2021 13:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620331572; cv=none; d=google.com; s=arc-20160816; b=No4rNCGdYSIQy1APDjn0JNqSRxUQDHytuu1xIFD5ulMonKhmqnDV0CrykfXOkcuOna 9HPFHg1NMIVt6ohf4Y3eiJhWlCpi6ogqmSJBqlJDpfgpcJOnI02cNU0TNSqoJt+BKJXx UW4CgqtmjWCWjQ7JYMI1hUIxExjmHt1Om0vDwwkRXy2Te3EtzAATepOyheJHVgeEMvkM T2u4Fe+ChR8WRm/euwqTApcnLDu5ngebHFnOxbfRjSVvBd73ttzdS3uv22DGlMItK2my K/uHgv9zCz9K2FzsrrR5vJbgyD42uz9oSAXQ9+TCnXa5yOJhq6ugcrmXwpfon/mcag1+ ypgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WwyTS8f7LxDaulW6rkzWRyAKkCW92/fyupXmJhT339M=; b=zR2ByW75m2ErRGu7gwrSq7a3vEAS18Mwthuc5qcmJ2leWZjwkCkxGtnjUKIAiAsjYY qkvYuTw2iUo8Gru6iBOOydoemHTZ8URlV0NsDQIoBWjvntjGwmfbvQltwAsgFJlKEAZT EaLc2j4E1BSK5rs0GmLqh+oshbKw+k/oxSOFFFK55I9tMT+8bOpFI8O+VBtRqdvRqnX6 7o72jsYui/XXES0Pp7bF1IaDSiEeteciEr+/h3EmBiFJouA8Zh86Vltbn5brto3ybYkT 6ApotGCCYVNUnh6mLi8DM6+Zjr+kT51+88ud9lSHTxP1eMj7wrMShFX43DuKZGwPfcOz qB9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="CzQY/lp8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo2si3389182ejb.202.2021.05.06.13.05.44; Thu, 06 May 2021 13:06:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="CzQY/lp8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235429AbhEFTgg (ORCPT + 99 others); Thu, 6 May 2021 15:36:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235390AbhEFTgf (ORCPT ); Thu, 6 May 2021 15:36:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E387CC061574; Thu, 6 May 2021 12:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WwyTS8f7LxDaulW6rkzWRyAKkCW92/fyupXmJhT339M=; b=CzQY/lp8TtUNWtubgal/819krU FA41ge5VfnD1bhDpucKUyGqOx8w8uUHRrRXrFUzqaNtG3xvd7A2vnRauzlgeHz596GOXDAV9sp1aF m960BV4oeTsw2VIvoq+MPU1XLT3kzip8KrH4TOnzCYsgPe4yHF0uhc4I7kUTr7Ty+w1Yez4EsEmEh F9q5dwgKNdz25NeJCKY7+oH6BGR8oTEqLflxQ0SM8mugN0Cj0vbXw27ciSBe/ACP0zgviakBvZ64v Lr9Z4vYyaaLznN8HSqDOasTaRbPk+iJvYYXTY5vtpNWTSxeREpwGbSDKBmnY0pnehlr/xBR6MVGUj wnzgjk/g==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lejmH-0029u3-KK; Thu, 06 May 2021 19:35:23 +0000 Date: Thu, 6 May 2021 20:35:17 +0100 From: Matthew Wilcox To: "Dr. David Alan Gilbert" Cc: Vivek Goyal , 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 Message-ID: <20210506193517.GF388843@casper.infradead.org> References: <20210506184304.321645-1-vgoyal@redhat.com> <20210506184304.321645-2-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.