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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD3E0FA372A for ; Thu, 17 Oct 2019 08:28:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDA5A20820 for ; Thu, 17 Oct 2019 08:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404038AbfJQI2N (ORCPT ); Thu, 17 Oct 2019 04:28:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57518 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389585AbfJQI2M (ORCPT ); Thu, 17 Oct 2019 04:28:12 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6813018CB90E; Thu, 17 Oct 2019 08:28:11 +0000 (UTC) Received: from [10.72.12.185] (ovpn-12-185.pek2.redhat.com [10.72.12.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6719F60BE1; Thu, 17 Oct 2019 08:27:43 +0000 (UTC) Subject: Re: [PATCH V3 1/7] mdev: class id support To: Parav Pandit , "kvm@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "intel-gfx@lists.freedesktop.org" , "intel-gvt-dev@lists.freedesktop.org" , "kwankhede@nvidia.com" , "alex.williamson@redhat.com" , "mst@redhat.com" , "tiwei.bie@intel.com" Cc: "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "cohuck@redhat.com" , "maxime.coquelin@redhat.com" , "cunming.liang@intel.com" , "zhihong.wang@intel.com" , "rob.miller@broadcom.com" , "xiao.w.wang@intel.com" , "haotian.wang@sifive.com" , "zhenyuw@linux.intel.com" , "zhi.a.wang@intel.com" , "jani.nikula@linux.intel.com" , "joonas.lahtinen@linux.intel.com" , "rodrigo.vivi@intel.com" , "airlied@linux.ie" , "daniel@ffwll.ch" , "farman@linux.ibm.com" , "pasic@linux.ibm.com" , "sebott@linux.ibm.com" , "oberpar@linux.ibm.com" , "heiko.carstens@de.ibm.com" , "gor@linux.ibm.com" , "borntraeger@de.ibm.com" , "akrowiak@linux.ibm.com" , "freude@linux.ibm.com" , "lingshan.zhu@intel.com" , Ido Shamay , "eperezma@redhat.com" , "lulu@redhat.com" , "christophe.de.dinechin@gmail.com" , "kevin.tian@intel.com" References: <20191011081557.28302-1-jasowang@redhat.com> <20191011081557.28302-2-jasowang@redhat.com> From: Jason Wang Message-ID: <67b645a6-1b70-094d-6a12-fc6591e07a13@redhat.com> Date: Thu, 17 Oct 2019 16:27:41 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Thu, 17 Oct 2019 08:28:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/16 下午12:57, Parav Pandit wrote: >> +static struct mdev_class_id id_table[] = { > static const > >> + { MDEV_ID_VFIO }, > I guess you don't need extra braces for each entry. > Since this enum represents MDEV class id, it better to name it as MDEV_CLASS_ID_VFIO. > (Similar to PCI_VENDOR_ID, PCI_DEVICE_ID).. > Gcc start to complain like: warning: missing braces around initializer [-Wmissing-braces]  static const struct mdev_class_id id_table[] = {                                                 ^   MDEV_ID_VFIO, 0,   {           } {  };  } So I will keep this part untouched. Thanks >> + { 0 }, >> +}; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:57518 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389585AbfJQI2M (ORCPT ); Thu, 17 Oct 2019 04:28:12 -0400 Subject: Re: [PATCH V3 1/7] mdev: class id support References: <20191011081557.28302-1-jasowang@redhat.com> <20191011081557.28302-2-jasowang@redhat.com> From: Jason Wang Message-ID: <67b645a6-1b70-094d-6a12-fc6591e07a13@redhat.com> Date: Thu, 17 Oct 2019 16:27:41 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-s390-owner@vger.kernel.org List-ID: To: Parav Pandit , "kvm@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "intel-gfx@lists.freedesktop.org" , "intel-gvt-dev@lists.freedesktop.org" , "kwankhede@nvidia.com" , "alex.williamson@redhat.com" , "mst@redhat.com" , "tiwei.bie@intel.com" Cc: "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "cohuck@redhat.com" , "maxime.coquelin@redhat.com" , "cunming.liang@intel.com" , "zhihong.wang@intel.com" , "rob.miller@broadcom.com" , "xiao.w.wang@intel.com" , "haotian.wang@sifive.com" , "zhenyuw@linux.intel.com" , "zhi.a.wang@intel.com" , "jani.nikula@linux.intel.com" , "joonas.lahtinen@linux.intel.com" , "rodrigo.vivi@intel.com" , "airlied@linux.ie" , "daniel@ffwll.ch" , "farman@linux.ibm.com" , "pasic@linux.ibm.com" , "sebott@linux.ibm.com" , "oberpar@linux.ibm.com" , "heiko.carstens@de.ibm.com" , "gor@linux.ibm.com" , "borntraeger@de.ibm.com" , "akrowiak@linux.ibm.com" , "freude@linux.ibm.com" , "lingshan.zhu@intel.com" , Ido Shamay , "eperezma@redhat.com" , "lulu@redhat.com" , "christophe.de.dinechin@gmail.com" , "kevin.tian@intel.com" On 2019/10/16 下午12:57, Parav Pandit wrote: >> +static struct mdev_class_id id_table[] = { > static const > >> + { MDEV_ID_VFIO }, > I guess you don't need extra braces for each entry. > Since this enum represents MDEV class id, it better to name it as MDEV_CLASS_ID_VFIO. > (Similar to PCI_VENDOR_ID, PCI_DEVICE_ID).. > Gcc start to complain like: warning: missing braces around initializer [-Wmissing-braces]  static const struct mdev_class_id id_table[] = {                                                 ^   MDEV_ID_VFIO, 0,   {           } {  };  } So I will keep this part untouched. Thanks >> + { 0 }, >> +}; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: Re: [PATCH V3 1/7] mdev: class id support Date: Thu, 17 Oct 2019 16:27:41 +0800 Message-ID: <67b645a6-1b70-094d-6a12-fc6591e07a13@redhat.com> References: <20191011081557.28302-1-jasowang@redhat.com> <20191011081557.28302-2-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Parav Pandit , "kvm@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "intel-gfx@lists.freedesktop.org" , "intel-gvt-dev@lists.freedesktop.org" , "kwankhede@nvidia.com" , "alex.williamson@redhat.com" , "mst@redhat.com" , "tiwei.bie@intel.com" Cc: "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "cohuck@redhat.com" , "maxime.coquelin@redhat.com" , "cunming.liang@intel.com" , "zhihong.wang@intel.com" , "rob.miller@broadcom.com" , "xiao.w.wang@intel.com" , "haotian.wang@sifive.com" , "zhenyuw@linux.intel.com" , "zhi.a.wang@intel.com" , "jani.nikula@linux.intel.com" , "joonas.lahtinen@linux.intel.com" , "rodrigo.vivi@intel.com" List-Id: dri-devel@lists.freedesktop.org On 2019/10/16 下午12:57, Parav Pandit wrote: >> +static struct mdev_class_id id_table[] = { > static const > >> + { MDEV_ID_VFIO }, > I guess you don't need extra braces for each entry. > Since this enum represents MDEV class id, it better to name it as MDEV_CLASS_ID_VFIO. > (Similar to PCI_VENDOR_ID, PCI_DEVICE_ID).. > Gcc start to complain like: warning: missing braces around initializer [-Wmissing-braces]  static const struct mdev_class_id id_table[] = {                                                 ^   MDEV_ID_VFIO, 0,   {           } {  };  } So I will keep this part untouched. Thanks >> + { 0 }, >> +};