lkml.org 
[lkml]   [2005]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][3/5] RapidIO support: core enum
On Mon, 6 Jun 2005, Matt Porter wrote:

> +spinlock_t rio_global_list_lock = SPIN_LOCK_UNLOCKED;

spin_lock_init?

> +extern struct rio_route_ops __start_rio_route_ops[];
> +extern struct rio_route_ops __end_rio_route_ops[];

rio.h?

> +static void
> +rio_set_device_id(struct rio_mport *port, u16 destid, u8 hopcount, u16 did)

Shouldn't those be on the same line?

> +static int rio_device_has_destid(struct rio_mport *port, int src_ops,
> + int dst_ops)
> +{
> + if (((src_ops & RIO_SRC_OPS_READ) ||
> + (src_ops & RIO_SRC_OPS_WRITE) ||
> + (src_ops & RIO_SRC_OPS_ATOMIC_TST_SWP) ||
> + (src_ops & RIO_SRC_OPS_ATOMIC_INC) ||
> + (src_ops & RIO_SRC_OPS_ATOMIC_DEC) ||
> + (src_ops & RIO_SRC_OPS_ATOMIC_SET) ||
> + (src_ops & RIO_SRC_OPS_ATOMIC_CLR)) &&
> + ((dst_ops & RIO_DST_OPS_READ) ||
> + (dst_ops & RIO_DST_OPS_WRITE) ||
> + (dst_ops & RIO_DST_OPS_ATOMIC_TST_SWP) ||
> + (dst_ops & RIO_DST_OPS_ATOMIC_INC) ||
> + (dst_ops & RIO_DST_OPS_ATOMIC_DEC) ||
> + (dst_ops & RIO_DST_OPS_ATOMIC_SET) ||
> + (dst_ops & RIO_DST_OPS_ATOMIC_CLR))) {
> + return 1;

Why not just;

mask = (RIO_DST_OPS_READ | RIO_DST_OPS_WRITE....)
return !!((dst_ops & mask) && (src_ops & mask))


> + rdev->dev.dma_mask = (u64 *) 0xffffffff;
> + rdev->dev.coherent_dma_mask = 0xffffffffULL;

Shouldn't that be dma_set_mask?

Zwane

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-07 07:21    [W:0.215 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site