From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754096AbdK2NR3 (ORCPT ); Wed, 29 Nov 2017 08:17:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58592 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754026AbdK2NR2 (ORCPT ); Wed, 29 Nov 2017 08:17:28 -0500 Subject: Re: [PATCH resend v2 2/3] virt: Add vboxguest VMMDEV communication code To: Larry Finger , Arnd Bergmann , Greg Kroah-Hartman Cc: Michael Thayer , "Knut St . Osmundsen" , Christoph Hellwig , linux-kernel@vger.kernel.org References: <20171126151221.26410-1-hdegoede@redhat.com> <20171126151221.26410-3-hdegoede@redhat.com> <31f56fac-b607-c129-8fc5-8fa938ea2974@lwfinger.net> From: Hans de Goede Message-ID: <504eda6e-98b2-0ec4-5293-7998595fe9d3@redhat.com> Date: Wed, 29 Nov 2017 14:17:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <31f56fac-b607-c129-8fc5-8fa938ea2974@lwfinger.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 29 Nov 2017 13:17:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 27-11-17 20:46, Larry Finger wrote: > On 11/26/2017 09:12 AM, Hans de Goede wrote: >> This commits adds a header describing the hardware interface for the >> Virtual Box Guest PCI device used in Virtual Box virtual machines and >> utility functions for talking to the Virtual Box hypervisor over this >> interface. >> >> These utility functions will used both by the vboxguest driver for the >> PCI device which offers the /dev/vboxguest ioctl API and by the vboxfs >> driver which offers folder sharing support. >> >> Signed-off-by: Hans de Goede > > Reviewed-by: Larry Finger > > This patch has only minor defects. Please see the inline comments. > >> --- >> Changes in v2: >> -Change all uapi headers to kernel coding style: Drop struct and enum typedefs >>   make type and struct-member names all lowercase, enum values all uppercase. >> -Remove unused struct type declarations from some headers (shaving of another >>   1000 lines) >> -Remove or fixup doxygen style comments >> -Get rid of CHECK macros, use a function taking in_ and out_size args instead >> -Some other small codyingstyle fixes >> -Split into multiple patches >> + >> +/** >> + * Translates linear address types to page list direction flags. >> + * >> + * Return: page list flags. >> + * @type:  The type. >> + */ >> +static u32 hgcm_call_linear_addr_type_to_pagelist_flags( >> +    enum vmmdev_hgcm_function_parameter_type type) >> +{ >> +    switch (type) { >> +    default: >> +        WARN_ON(1); > > Do you intend a fall through here? If so, please add a comment to that effect. Yes, comment added for v3. >> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR: >> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_KERNEL: >> +        return VMMDEV_HGCM_F_PARM_DIRECTION_BOTH; >> + >> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_IN: >> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_KERNEL_IN: >> +        return VMMDEV_HGCM_F_PARM_DIRECTION_TO_HOST; >> + >> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_OUT: >> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_KERNEL_OUT: >> +        return VMMDEV_HGCM_F_PARM_DIRECTION_FROM_HOST; >> +    } >> +} Regards, Hans