packer.c (2fc2991175bf77395e6b15fe6b2304d3bf72da40) packer.c (8c65b4a60450590e79a28e9717ceffa9e4debb3f)
1/*
2 * Copyright (c) 2004 Topspin Corporation. All rights reserved.
3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
4 *
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the

--- 19 unchanged lines hidden (view full) ---

28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 * SOFTWARE.
32 *
33 * $Id: packer.c 1349 2004-12-16 21:09:43Z roland $
34 */
35
1/*
2 * Copyright (c) 2004 Topspin Corporation. All rights reserved.
3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
4 *
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the

--- 19 unchanged lines hidden (view full) ---

28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 * SOFTWARE.
32 *
33 * $Id: packer.c 1349 2004-12-16 21:09:43Z roland $
34 */
35
36#include <linux/string.h>
37
36#include <rdma/ib_pack.h>
37
38static u64 value_read(int offset, int size, void *structure)
39{
40 switch (size) {
41 case 1: return *(u8 *) (structure + offset);
42 case 2: return be16_to_cpup((__be16 *) (structure + offset));
43 case 4: return be32_to_cpup((__be32 *) (structure + offset));

--- 159 unchanged lines hidden ---
38#include <rdma/ib_pack.h>
39
40static u64 value_read(int offset, int size, void *structure)
41{
42 switch (size) {
43 case 1: return *(u8 *) (structure + offset);
44 case 2: return be16_to_cpup((__be16 *) (structure + offset));
45 case 4: return be32_to_cpup((__be32 *) (structure + offset));

--- 159 unchanged lines hidden ---