Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10789421ybi; Thu, 11 Jul 2019 11:01:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJsf4ROqWm9opRx37faOL+E4eqToZ+63NAUDu7D7EPpF95G34PadPQ4iZIOA9M/SdLiY+N X-Received: by 2002:a17:90a:28e4:: with SMTP id f91mr6082036pjd.99.1562868118335; Thu, 11 Jul 2019 11:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562868118; cv=none; d=google.com; s=arc-20160816; b=Hy2lVSM7evfLAafq1qow/i60RwC0PHggNr2Si/J0TPQhA+ZMgkv4Z3exVelFYojSUi F8E7ri/cKI/6d8dYzJsRGDmAWRp0pfdA1WU5F8Saa9ILzVJX0MLC/J0XNshMRpNahaee sZsbyA0hz6oLuizQrpAPoUY72hPcwgKVBs9HNaPS7OJ088IHswyUrr42ICN2xpg2XKIe TzvM5OPEMpRIvI8TuNpo3ohzAk6dZRecih3CC/QMd2wB+g1vZpnuiqrc7wxx6eEGHSH/ K0qWkcdvxYKJqT5HYl4IIkxzWPd9bpgYDfa5rcgX012hGi9RfBrBYKAxhGUGKohT46c7 naTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=++uHwLEx1ipn7VhSHCQ32SjIiASzB3p3YrdjwLx3eq8=; b=FKZSiFPXZWMZH82QoqJ4gM9vHhw9i6Ec1OIR9UlPPIEFsH7g0vSDzeIP+hqBo27M/d jj4v41wknsaLyhTlHpeozrLgXfqSyUy9WcbOO9CzI4KXns9DNvDsM9wKJFlS4CzG56oI L7s3LmL4ZxZV72fioKjTN1Ez2kavC9o5vmMlrkLcG2WvhQXDAy1PoGmP15CoJ6moTJhu rM+ItA1XDXaBCkdpeOhq1QL9BH7c8kHT6T1r8dRb+S7f0yLnNPZvQlnmfNDut3clxb45 DhOlITgT2QXuF8OANyztdXCsXPmigVh5lkZvDSuYFpCQCDj02Kd+bJGCVjUEVuQcmcsc HVHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r140si5865251pfc.27.2019.07.11.11.01.42; Thu, 11 Jul 2019 11:01:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728833AbfGKRrU (ORCPT + 99 others); Thu, 11 Jul 2019 13:47:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60658 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728479AbfGKRrU (ORCPT ); Thu, 11 Jul 2019 13:47:20 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2DD630C2533; Thu, 11 Jul 2019 17:47:19 +0000 (UTC) Received: from redhat.com (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by smtp.corp.redhat.com (Postfix) with SMTP id 20E4760600; Thu, 11 Jul 2019 17:47:09 +0000 (UTC) Date: Thu, 11 Jul 2019 13:47:08 -0400 From: "Michael S. Tsirkin" To: Pankaj Gupta Cc: virtualization@lists.linux-foundation.org, dan.j.williams@intel.com, yuval.shaia@oracle.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, cohuck@redhat.com, lcapitulino@redhat.com Subject: Re: [PATCH v2] virtio_pmem: fix sparse warning Message-ID: <20190711134648-mutt-send-email-mst@kernel.org> References: <20190710175832.17252-1-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190710175832.17252-1-pagupta@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 11 Jul 2019 17:47:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 10, 2019 at 11:28:32PM +0530, Pankaj Gupta wrote: > This patch fixes below sparse warning related to __virtio > type in virtio pmem driver. This is reported by Intel test > bot on linux-next tree. > > nd_virtio.c:56:28: warning: incorrect type in assignment > (different base types) > nd_virtio.c:56:28: expected unsigned int [unsigned] [usertype] type > nd_virtio.c:56:28: got restricted __virtio32 > nd_virtio.c:93:59: warning: incorrect type in argument 2 > (different base types) > nd_virtio.c:93:59: expected restricted __virtio32 [usertype] val > nd_virtio.c:93:59: got unsigned int [unsigned] [usertype] ret > > Reported-by: kbuild test robot > Signed-off-by: Pankaj Gupta > --- > > This fixes a warning, so submitting it as a separate > patch on top of virtio pmem series. > > include/uapi/linux/virtio_pmem.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/uapi/linux/virtio_pmem.h b/include/uapi/linux/virtio_pmem.h > index efcd72f2d20d..7a7435281362 100644 > --- a/include/uapi/linux/virtio_pmem.h > +++ b/include/uapi/linux/virtio_pmem.h > @@ -10,7 +10,7 @@ > #ifndef _UAPI_LINUX_VIRTIO_PMEM_H > #define _UAPI_LINUX_VIRTIO_PMEM_H > > -#include > +#include > #include > #include > > @@ -23,12 +23,12 @@ struct virtio_pmem_config { > > struct virtio_pmem_resp { > /* Host return status corresponding to flush request */ > - __u32 ret; > + __virtio32 ret; > }; > > struct virtio_pmem_req { > /* command type */ > - __u32 type; > + __virtio32 type; > }; > > #endif Same comment as previously: pls use __le and fix accessors. > -- > 2.20.1