WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][3/17] USB virt 2.6 split driver---xenidc buffer

To: harry <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][3/17] USB virt 2.6 split driver---xenidc buffer references
From: Muli Ben-Yehuda <mulix@xxxxxxxxx>
Date: Mon, 21 Nov 2005 22:31:36 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 21 Nov 2005 20:31:38 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1132579128.31295.114.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1132579128.31295.114.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Mon, Nov 21, 2005 at 01:18:48PM +0000, harry wrote:

> +#ifdef MIN
> +#undef MIN
> +#endif
> +
> +#define MIN( X, Y ) ( ( (X) < (Y) ) ? (X) : (Y) )

Linux has a much better definition.

> +             memset(buffer, 0, 64);

s/64/sizeof(buffer)/? (there are arguments either way)

> +xenidc_buffer_type 
> xenidc_local_buffer_reference_register_buffer_concrete_class
> +    (xenidc_buffer_concrete_class * class, void (*copy_in_or_out)
> +      (xenidc_buffer_concrete_class * class,
> +       xenidc_local_buffer_reference * lbr,
> +       void *buffer, xenidc_buffer_byte_count byte_count, int out), void 
> (*zero)
> +      (xenidc_buffer_concrete_class * class,
> +       xenidc_local_buffer_reference * lbr), int (*calculate_rbr_resources)
> +      (xenidc_buffer_concrete_class * class,
> +       xenidc_local_buffer_reference * lbr,
> +       xenidc_address * address,
> +       xenidc_buffer_resource_list * list),
> +     xenidc_buffer_concrete_class ** (*create_rbr)
> +      (xenidc_buffer_concrete_class * class,
> +       xenidc_local_buffer_reference * lbr,
> +       xenidc_address * address,
> +       xenidc_buffer_resource_provider * provider,
> +       xenidc_remote_buffer_reference * rbr,
> +       int access_flags), void (*revoke_rbr)
> +      (xenidc_buffer_concrete_class ** context, xenidc_callback * callback)
> +    ) {

I guess this is one case where typedefs would improve the code ;-)

> +     if (zero == NULL) {
> +             zero = xenidc_local_buffer_reference_default_zero;
> +     }

no braces please

Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>