[ofw] [PATCH] Cleanup MTHCA atomic_set function

Leonid Keller leonid at mellanox.co.il
Sun Jul 13 03:16:51 PDT 2008


Applied in 1377. Thank you. 

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Fab Tillier
> Sent: Friday, July 11, 2008 7:33 PM
> To: ofw at lists.openfabrics.org
> Subject: [ofw] [PATCH] Cleanup MTHCA atomic_set function
> 
> This patch cleans up the atomic_set function in the HCA drivers.
> 
> Signed-off-by: Fab Tillier <ftillier at microsoft.com>
> 
> diff -up -r -X trunk\docs\dontdiff.txt -I \$Id: 
> old\hw\mthca\kernel\mt_atomic.h 
> \dev\ofw\ftillier\openib\hw\mthca\kernel\mt_atomic.h
> --- old\hw\mthca\kernel\mt_atomic.h     Thu Jun 26 20:35:14 2008
> +++ \dev\ofw\ftillier\openib\hw\mthca\kernel\mt_atomic.h      
>   Tue Jul 08 16:46:22 2008
> @@ -1,3 +1,35 @@
> +/*
> + * Copyright (c) 2004-2005 Mellanox Technologies, Inc. All 
> rights reserved.
> + * Portions Copyright (c) 2008 Microsoft Corporation.  All 
> rights reserved.
> + *
> + * This software is available to you under the OpenIB.org BSD license
> + * below:
> + *
> + *     Redistribution and use in source and binary forms, with or
> + *     without modification, are permitted provided that the 
> following
> + *     conditions are met:
> + *
> + *      - Redistributions of source code must retain the above
> + *        copyright notice, this list of conditions and the following
> + *        disclaimer.
> + *
> + *      - Redistributions in binary form must reproduce the above
> + *        copyright notice, this list of conditions and the following
> + *        disclaimer in the documentation and/or other materials
> + *        provided with the distribution.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
> COPYRIGHT HOLDERS
> + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> + * SOFTWARE.
> + *
> + * $Id:$
> + */
> +
>  #ifndef MT_ATOMIC_H
>  #define MT_ATOMIC_H
> 
> @@ -15,7 +47,7 @@ static inline atomic_t atomic_read(atomi
> 
>  static inline void atomic_set(atomic_t *pval, long val)  {
> -       *pval = *(atomic_t *)&val; //to avoid C4197
> +       *pval = val;
>  }
> 
>  /**
> 



More information about the ofw mailing list