From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E05DC4332F for ; Thu, 8 Dec 2022 10:46:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbiLHKqz (ORCPT ); Thu, 8 Dec 2022 05:46:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbiLHKqR (ORCPT ); Thu, 8 Dec 2022 05:46:17 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 193C17F897; Thu, 8 Dec 2022 02:41:48 -0800 (PST) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4NSW095RgPz6H6kN; Thu, 8 Dec 2022 18:40:57 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 8 Dec 2022 10:41:46 +0000 Date: Thu, 8 Dec 2022 10:41:45 +0000 From: Jonathan Cameron To: Dave Jiang CC: , Dan Williams , "Alison Schofield" , Vishal Verma , , Subject: Re: [PATCH] cxl/uapi: Add warning on CXL command enum Message-ID: <20221208104145.000059a8@Huawei.com> In-Reply-To: <4d75c340-0942-44cf-67db-ee52f58ee65e@intel.com> References: <20221208000141.701642-1-ira.weiny@intel.com> <4d75c340-0942-44cf-67db-ee52f58ee65e@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500004.china.huawei.com (7.191.163.9) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Wed, 7 Dec 2022 17:27:18 -0700 Dave Jiang wrote: > On 12/7/2022 5:01 PM, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > The CXL command enum is exported to user space and must maintain > > backwards compatibility. > > > > Add comment that new defines must be added to the end of the list. > > > > Suggested-by: Dan Williams > > Signed-off-by: Ira Weiny > > Reviewed-by: Dave Jiang Good to have. Reviewed-by: Jonathan Cameron > > > --- > > include/uapi/linux/cxl_mem.h | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h > > index c71021a2a9ed..459a3f7f764b 100644 > > --- a/include/uapi/linux/cxl_mem.h > > +++ b/include/uapi/linux/cxl_mem.h > > @@ -19,6 +19,10 @@ > > #define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands) > > #define CXL_MEM_SEND_COMMAND _IOWR(0xCE, 2, struct cxl_send_command) > > > > +/* > > + * NOTE: New defines must be added to the end of the list to preserve > > + * compatibility because this enum is exported to user space. > > + */ > > #define CXL_CMDS \ > > ___C(INVALID, "Invalid Command"), \ > > ___C(IDENTIFY, "Identify Command"), \ > > > > base-commit: acb704099642bc822ef2aed223a0b8db1f7ea76e