Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1167416ybx; Thu, 31 Oct 2019 06:41:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgsmy7CKhZN5b9T0QnVS2egcjzZQ/0tpIDNgmhHCBu83FNGAGEyOKhSKKPFFoxZ7Dw3V2+ X-Received: by 2002:a17:906:6b94:: with SMTP id l20mr2274790ejr.238.1572529295071; Thu, 31 Oct 2019 06:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572529295; cv=none; d=google.com; s=arc-20160816; b=N8BEJJ4qifErt0+nHiAXbl0x3PjFRG3CRobz2HnhhTBhaS7lNHkuWhh3IeR4aref5X Uk1VAi4E/gm87T+p2SoyMTIfKOoG/xGJt761gpP9RUYbimabNlM3WTEfv0L+ncfIrfnx L8H90dBi/jr+ruWrD4KQMwldEr+UulOgAUOTZR5MDfWhmxKzgBULkQIyNUXJ7nznbGgG KXXMJTC2KnpJ+c0Fm5ITwni3qRJpGlVlk9s8o3f9ZtbbVlYpe0We+p6CC7OKinryf6aZ tFZGR+nj5Q1pNmT4LmQQQMmB4gK0o3GqiRP2O4ai6pNORDCxNJofbv1fGPky2l3d1RqE sKhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HFmjU4C6KPPmgdm/WHvQ9GohyTPdJ8RpHfK49lrcyLA=; b=Yapxew+6ToJqgtMMnSJpH+Jgyk8TZYCxTlgD7rql+CtV4JFh4J0z4wRRTLmBzikKLe MADvNbkBacO/LM5Bw/7+NFZcxUYjbWVcT5oXFjJRM0XLLw65Bp45aBbiEQbbnTNHV+qO fEcnCuz+niPTlvfigpKnXFHjeNLtBmFG4bLCcJKp/6IoZD3AyIbARBsN1K124lSvnYPD d1Zo3xqg2DBUb+CQZtkGQn/s2vXKXTs3P9ZDQkuEnYNZpBzCFm7Eat7nMu/pMG9/t4Z3 1Od40ypavjqI5iOxn17HQu+v7BC9QiUVivwW5imHlkwcazcXJi151w15O6r4EQyR9aBB uU+Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w25si3292600ejn.391.2019.10.31.06.41.11; Thu, 31 Oct 2019 06:41:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727486AbfJaNjZ (ORCPT + 99 others); Thu, 31 Oct 2019 09:39:25 -0400 Received: from verein.lst.de ([213.95.11.211]:51051 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbfJaNjZ (ORCPT ); Thu, 31 Oct 2019 09:39:25 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 9831E68BE1; Thu, 31 Oct 2019 14:39:21 +0100 (CET) Date: Thu, 31 Oct 2019 14:39:21 +0100 From: Christoph Hellwig To: Charles Machalow Cc: linux-nvme@lists.infradead.org, marta.rybczynska@kalray.eu, Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: change nvme_passthru_cmd64's result field. Message-ID: <20191031133921.GA4763@lst.de> References: <20191031050338.12700-1-csm10495@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031050338.12700-1-csm10495@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 30, 2019 at 10:03:38PM -0700, Charles Machalow wrote: > Changing nvme_passthru_cmd64's result field to be backwards compatible > with the nvme_passthru_cmd/nvme_admin_cmd struct in terms of the result > field. With this change the first 32 bits of result in either case > point to CQE DW0. This allows userspace tools to use the new structure > when using the old ADMIN/IO_CMD ioctls or new ADMIN/IO_CMD64 ioctls. All that casting is a pretty bad idea. please just add an explicit reserved field before the result, and check that it always is zero in the ioctl handler.