Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3122583pxb; Tue, 12 Oct 2021 22:25:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyidHUMvfSW7nf3zDjtQDZdj9PKm4hGso2UyboKmBzMng4g7gTJqY89lJc472wDDPmTTnPp X-Received: by 2002:a17:90b:1d8f:: with SMTP id pf15mr10849704pjb.70.1634102757402; Tue, 12 Oct 2021 22:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634102757; cv=none; d=google.com; s=arc-20160816; b=EBLBpVdVCOpBdt2GjRj6bUIeGT6hq32oG19a1CyYw2YuhlIidOezVQdf9OxIU007vR 3ClGRpjaJqVX41J4Ig0UUsBh2KPEA1OslHt/bZbD8+8wjpFjh5+9zg+1P7KX0J/wg2Zs aJXDT2GNUBEBpplpPWv39v9hCKTx+NWm6mhDgVOy9FG/bv3BdFKF6gCWp8Q0x3Z0CNix 8XV42zV+BNUGCZh3aM3Hd1hLg9TbQZIa0x4/UqBGmWZFzpy9Pfz8VxYHcjco4fQ9InfE VcVx5bDxg5RXp6hjwV+7qgoHGvbl0cjQnfqUmCb5IXj+j0pAfuRsWzkBTEJeCmqc14sQ d/dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=7jJI2GDiw2WAYWKaHBLwhDFnyWFjLPpeqPC7NwM8x7o=; b=1Fd+BWZPEfV3RYtJqcUKprIwAMixmgpmz9G6uhmrW3hOuZZpL60HraREo39wffofBX qbVn0BkOoFO+OCP450vqfmxkUwUeC+MMkTa0i4EJOEmTNzARkER2Z8kP83XeDxsh3bWQ Lzi+poYnXqcedwEoMUpicuT4fnEmoZXjIPRFoTKIbkYhvidPnIB5Bsqni+6K7+vp5abI Clam7doNqsDr+SYV9A3trhtT0Au4iAJDIMnw5lSwThjUQ+gwhzSFphy3yEslXZPdB6l2 /jWdd61YydOwUC//0719VJHCNiqMioORbxcW3mqDyMH6YYb58ymVPQDj5xhQUe5lk5Iu +L5w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si17946539plo.135.2021.10.12.22.25.44; Tue, 12 Oct 2021 22:25:57 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237067AbhJMF0n (ORCPT + 99 others); Wed, 13 Oct 2021 01:26:43 -0400 Received: from mga09.intel.com ([134.134.136.24]:38126 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbhJMF0m (ORCPT ); Wed, 13 Oct 2021 01:26:42 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="227247725" X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="227247725" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 22:24:39 -0700 X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="480649979" Received: from hli101-mobl1.ccr.corp.intel.com (HELO [10.255.28.104]) ([10.255.28.104]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 22:24:36 -0700 Subject: Re: [kbuild-all] Re: [axboe-block:nvme-passthru-wip 10/19] drivers/nvme/host/ioctl.c:47:19: error: cast to pointer from integer of different size To: Jens Axboe , Geert Uytterhoeven , kernel test robot Cc: Kanchan Joshi , kbuild-all@lists.01.org, Linux Kernel Mailing List , Anuj Gupta References: <202110080434.YH6r4WZv-lkp@intel.com> From: "Chen, Rong A" Message-ID: Date: Wed, 13 Oct 2021 13:24:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/8/2021 8:35 PM, Jens Axboe wrote: > On 10/8/21 2:19 AM, Geert Uytterhoeven wrote: >> On Fri, Oct 8, 2021 at 12:12 AM kernel test robot wrote: >>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git nvme-passthru-wip >>> head: 9c18980ac90053bcdb21594eae48935d89bf389c >>> commit: 5cc445dd8df6e06f3482711aa590170450364393 [10/19] nvme: wire-up support for async-passthru on char-device. >>> config: m68k-allmodconfig (attached as .config) >>> compiler: m68k-linux-gcc (GCC) 11.2.0 >>> reproduce (this is a W=1 build): >>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >>> chmod +x ~/bin/make.cross >>> # https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=5cc445dd8df6e06f3482711aa590170450364393 >>> git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git >>> git fetch --no-tags axboe-block nvme-passthru-wip >>> git checkout 5cc445dd8df6e06f3482711aa590170450364393 >>> # save the attached .config to linux build tree >>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k >>> >>> If you fix the issue, kindly add following tag as appropriate >>> Reported-by: kernel test robot >>> >>> All errors (new ones prefixed by >>): >>> >>> drivers/nvme/host/ioctl.c: In function 'nvme_pt_task_cb': >>>>> drivers/nvme/host/ioctl.c:47:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] >>> 47 | ptcmd64 = (void __user *) bcmd->unused2[0]; >>> | ^ >>> drivers/nvme/host/ioctl.c:62:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] >>> 62 | struct nvme_passthru_cmd __user *ptcmd = (void *)bcmd->unused2[0]; >>> | ^ >>> drivers/nvme/host/ioctl.c: In function 'nvme_ns_async_ioctl': >>> drivers/nvme/host/ioctl.c:472:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] >>> 472 | void __user *argp = (void __user *) bcmd->unused2[0]; >>> | ^ >>> cc1: all warnings being treated as errors >>> >>> >>> vim +47 drivers/nvme/host/ioctl.c >>> >>> 39 >>> 40 static void nvme_pt_task_cb(struct io_uring_cmd *ioucmd) >>> 41 { >>> 42 struct uring_cmd_data *ucd; >>> 43 struct nvme_passthru_cmd64 __user *ptcmd64 = NULL; >>> 44 struct block_uring_cmd *bcmd; >>> 45 >>> 46 bcmd = (struct block_uring_cmd *) &ioucmd->pdu; >>> > 47 ptcmd64 = (void __user *) bcmd->unused2[0]; >> >> Casts from u64 to a pointer on 32-bit need an intermediate cast to uintptr_t: >> >> ptcmd64 = (void __user *)(uintptr_t)bcmd->unused2[0]; >> >> Note that you can improve on the naming, as people may be surprised >> discovering "unused2" is actually used ;-) > > There's a reason the branch is called -wip, it's just a hodge podge of > stuff. Not sure why the kernel test robot bothers reporting failures > publicly for that... > Hi Jens, We have changed the rule to not report the wip branches to public: https://github.com/intel/lkp-tests/commit/f5f8d52830e342d51a200d5688b931faa0b786ea Best Regards, Rong Chen