From 7541c03b4ccbd7e357bc1b80f8920f224927c5c6 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Wed, 15 Oct 2014 21:47:32 -0400 Subject: [PATCH 1/2] Mark all instances where atomic operations are used but their return value is unnecessary --- ompi/mca/coll/sm/coll_sm.h | 4 +-- ompi/mca/coll/sm/coll_sm_barrier.c | 4 +-- ompi/mca/coll/sm/coll_sm_module.c | 4 +-- ompi/mca/osc/portals4/osc_portals4_comm.c | 31 ++++++++++--------- .../portals4/osc_portals4_passive_target.c | 9 ++++-- ompi/mca/osc/sm/osc_sm_active_target.c | 7 +++-- opal/class/opal_list.c | 8 ++--- opal/mca/btl/openib/btl_openib_endpoint.c | 10 +++--- .../connect/btl_openib_connect_rdmacm.c | 5 ++- opal/mca/btl/sm/btl_sm.c | 4 +-- opal/mca/btl/smcuda/btl_smcuda.c | 4 +-- opal/mca/btl/vader/btl_vader_xpmem.c | 7 +++-- test/asm/atomic_math.c | 8 ++--- test/threads/opal_thread.c | 7 +++-- 14 files changed, 65 insertions(+), 47 deletions(-) diff --git a/ompi/mca/coll/sm/coll_sm.h b/ompi/mca/coll/sm/coll_sm.h index d086f73244..70bc61601a 100644 --- a/ompi/mca/coll/sm/coll_sm.h +++ b/ompi/mca/coll/sm/coll_sm.h @@ -2,7 +2,7 @@ * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -356,7 +356,7 @@ extern uint32_t mca_coll_sm_one; * Macro to release an in-use flag from this process */ #define FLAG_RELEASE(flag) \ - opal_atomic_add(&(flag)->mcsiuf_num_procs_using, -1) + (void)opal_atomic_add(&(flag)->mcsiuf_num_procs_using, -1) /** * Macro to copy a single segment in from a user buffer to a shared diff --git a/ompi/mca/coll/sm/coll_sm_barrier.c b/ompi/mca/coll/sm/coll_sm_barrier.c index 5b1464b458..21d07da3f3 100644 --- a/ompi/mca/coll/sm/coll_sm_barrier.c +++ b/ompi/mca/coll/sm/coll_sm_barrier.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -101,7 +101,7 @@ int mca_coll_sm_barrier_intra(struct ompi_communicator_t *comm, if (0 != rank) { /* Get parent *in* buffer */ parent = &data->mcb_barrier_control_parent[buffer_set]; - opal_atomic_add(parent, 1); + (void)opal_atomic_add(parent, 1); SPIN_CONDITION(0 != *me_out, exit_label2); *me_out = 0; diff --git a/ompi/mca/coll/sm/coll_sm_module.c b/ompi/mca/coll/sm/coll_sm_module.c index 94fea2f56f..488df66ba6 100644 --- a/ompi/mca/coll/sm/coll_sm_module.c +++ b/ompi/mca/coll/sm/coll_sm_module.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -463,7 +463,7 @@ int ompi_coll_sm_lazy_enable(mca_coll_base_module_t *module, OBJ_RETAIN(sm_module->previous_reduce_module); /* Indicate that we have successfully attached and setup */ - opal_atomic_add(&(data->sm_bootstrap_meta->module_seg->seg_inited), 1); + (void)opal_atomic_add(&(data->sm_bootstrap_meta->module_seg->seg_inited), 1); /* Wait for everyone in this communicator to attach and setup */ opal_output_verbose(10, ompi_coll_base_framework.framework_output, diff --git a/ompi/mca/osc/portals4/osc_portals4_comm.c b/ompi/mca/osc/portals4/osc_portals4_comm.c index c97f480180..5bacfea7b4 100644 --- a/ompi/mca/osc/portals4/osc_portals4_comm.c +++ b/ompi/mca/osc/portals4/osc_portals4_comm.c @@ -1,5 +1,8 @@ /* * Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -217,7 +220,7 @@ ompi_osc_portals4_rput(void *origin_addr, "MPI_Rput: transfer of non-contiguous memory is not currently supported.\n"); return OMPI_ERR_NOT_SUPPORTED; } else { - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); request->ops_expected = 1; ret = ompi_datatype_type_size(origin_dt, &length); if (OMPI_SUCCESS != ret) { @@ -287,7 +290,7 @@ ompi_osc_portals4_rget(void *origin_addr, "MPI_Rget: transfer of non-contiguous memory is not currently supported.\n"); return OMPI_ERR_NOT_SUPPORTED; } else { - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); request->ops_expected = 1; ret = ompi_datatype_type_size(origin_dt, &length); if (OMPI_SUCCESS != ret) { @@ -374,7 +377,7 @@ ompi_osc_portals4_raccumulate(void *origin_addr, do { size_t msg_length = MIN(module->atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); request->ops_expected++; if (MPI_REPLACE == op) { @@ -491,7 +494,7 @@ ompi_osc_portals4_rget_accumulate(void *origin_addr, do { size_t msg_length = MIN(module->fetch_atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); request->ops_expected++; ret = PtlSwap(result_md_h, @@ -528,7 +531,7 @@ ompi_osc_portals4_rget_accumulate(void *origin_addr, do { size_t msg_length = MIN(module->fetch_atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); request->ops_expected++; ret = PtlGet(md_h, @@ -567,7 +570,7 @@ ompi_osc_portals4_rget_accumulate(void *origin_addr, do { size_t msg_length = MIN(module->fetch_atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); request->ops_expected++; ret = PtlFetchAtomic(result_md_h, @@ -630,7 +633,7 @@ ompi_osc_portals4_put(void *origin_addr, "MPI_Put: transfer of non-contiguous memory is not currently supported.\n"); return OMPI_ERR_NOT_SUPPORTED; } else { - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ret = ompi_datatype_type_size(origin_dt, &length); if (OMPI_SUCCESS != ret) { return ret; @@ -690,7 +693,7 @@ ompi_osc_portals4_get(void *origin_addr, "MPI_Get: transfer of non-contiguous memory is not currently supported.\n"); return OMPI_ERR_NOT_SUPPORTED; } else { - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ret = ompi_datatype_type_size(origin_dt, &length); if (OMPI_SUCCESS != ret) { return ret; @@ -766,7 +769,7 @@ ompi_osc_portals4_accumulate(void *origin_addr, do { size_t msg_length = MIN(module->atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); if (MPI_REPLACE == op) { ret = PtlPut(md_h, @@ -873,7 +876,7 @@ ompi_osc_portals4_get_accumulate(void *origin_addr, do { size_t msg_length = MIN(module->fetch_atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ret = PtlSwap(result_md_h, result_md_offset + sent, @@ -908,7 +911,7 @@ ompi_osc_portals4_get_accumulate(void *origin_addr, do { size_t msg_length = MIN(module->fetch_atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ret = PtlGet(md_h, md_offset + sent, @@ -946,7 +949,7 @@ ompi_osc_portals4_get_accumulate(void *origin_addr, do { size_t msg_length = MIN(module->fetch_atomic_max, length - sent); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ret = PtlFetchAtomic(result_md_h, result_md_offset + sent, @@ -1016,7 +1019,7 @@ ompi_osc_portals4_compare_and_swap(void *origin_addr, ompi_osc_portals4_get_md(origin_addr, module->md_h, &origin_md_h, &origin_md_base); origin_md_offset = ((char*) origin_addr - (char*) origin_md_base); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ret = PtlSwap(result_md_h, result_md_offset, @@ -1076,7 +1079,7 @@ ompi_osc_portals4_fetch_and_op(void *origin_addr, assert(length < module->fetch_atomic_max); - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); if (MPI_REPLACE == op) { ptl_handle_md_t result_md_h, origin_md_h; diff --git a/ompi/mca/osc/portals4/osc_portals4_passive_target.c b/ompi/mca/osc/portals4/osc_portals4_passive_target.c index 3621c4b331..e867d273e6 100644 --- a/ompi/mca/osc/portals4/osc_portals4_passive_target.c +++ b/ompi/mca/osc/portals4/osc_portals4_passive_target.c @@ -1,5 +1,8 @@ /* * Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -44,7 +47,7 @@ lk_cas64(ompi_osc_portals4_module_t *module, ptl_handle_md_t result_md_h, write_md_h; void *result_base, *write_base; - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ompi_osc_portals4_get_md(result_val, module->md_h, &result_md_h, &result_base); ompi_osc_portals4_get_md(&write_val, module->md_h, &write_md_h, &write_base); @@ -82,7 +85,7 @@ lk_write64(ompi_osc_portals4_module_t *module, ptl_handle_md_t md_h; void *base; - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ompi_osc_portals4_get_md(&write_val, module->md_h, &md_h, &base); @@ -116,7 +119,7 @@ lk_add64(ompi_osc_portals4_module_t *module, ptl_handle_md_t result_md_h, write_md_h; void *result_base, *write_base; - opal_atomic_add_64(&module->opcount, 1); + (void)opal_atomic_add_64(&module->opcount, 1); ompi_osc_portals4_get_md(result_val, module->md_h, &result_md_h, &result_base); ompi_osc_portals4_get_md(&write_val, module->md_h, &write_md_h, &write_base); diff --git a/ompi/mca/osc/sm/osc_sm_active_target.c b/ompi/mca/osc/sm/osc_sm_active_target.c index 7e50d853e5..95df572d61 100644 --- a/ompi/mca/osc/sm/osc_sm_active_target.c +++ b/ompi/mca/osc/sm/osc_sm_active_target.c @@ -3,6 +3,9 @@ * Copyright (c) 2012 Sandia National Laboratories. All rights reserved. * Copyright (c) 2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -100,7 +103,7 @@ ompi_osc_sm_complete(struct ompi_win_t *win) for (int j = 0 ; j < csize ; ++j) { if (ompi_group_peer_lookup(module->start_group, i) == ompi_comm_peer_lookup(module->comm, j)) { - opal_atomic_add_32(&module->node_states[j].complete_count, 1); + (void)opal_atomic_add_32(&module->node_states[j].complete_count, 1); } } } @@ -136,7 +139,7 @@ ompi_osc_sm_post(struct ompi_group_t *group, for (int j = 0 ; j < csize ; ++j) { if (ompi_group_peer_lookup(module->post_group, i) == ompi_comm_peer_lookup(module->comm, j)) { - opal_atomic_add_32(&module->node_states[j].post_count, 1); + (void)opal_atomic_add_32(&module->node_states[j].post_count, 1); } } } diff --git a/opal/class/opal_list.c b/opal/class/opal_list.c index 461d94efac..e40aa5abe2 100644 --- a/opal/class/opal_list.c +++ b/opal/class/opal_list.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2006 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, @@ -144,13 +144,13 @@ bool opal_list_insert(opal_list_t *list, opal_list_item_t *item, long long idx) /* Spot check: ensure this item is only on the list that we just insertted it into */ - opal_atomic_add( &(item->opal_list_item_refcount), 1 ); + (void)opal_atomic_add( &(item->opal_list_item_refcount), 1 ); assert(1 == item->opal_list_item_refcount); item->opal_list_item_belong_to = list; #endif } - - list->opal_list_length++; + + list->opal_list_length++; return true; } diff --git a/opal/mca/btl/openib/btl_openib_endpoint.c b/opal/mca/btl/openib/btl_openib_endpoint.c index e0e43ef286..4c519fac32 100644 --- a/opal/mca/btl/openib/btl_openib_endpoint.c +++ b/opal/mca/btl/openib/btl_openib_endpoint.c @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2007 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -994,8 +994,8 @@ void mca_btl_openib_endpoint_connect_eager_rdma( endpoint->eager_rdma_local.rd_win?endpoint->eager_rdma_local.rd_win:1; /* set local rdma pointer to real value */ - opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, (void*)1, - buf); + (void)opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, + (void*)1, buf); if(mca_btl_openib_endpoint_send_eager_rdma(endpoint) == OPAL_SUCCESS) { mca_btl_openib_device_t *device = endpoint->endpoint_btl->device; @@ -1018,8 +1018,8 @@ free_headers_buf: free(headers_buf); unlock_rdma_local: /* set local rdma pointer back to zero. Will retry later */ - opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, - endpoint->eager_rdma_local.base.pval, NULL); + (void)opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, + endpoint->eager_rdma_local.base.pval, NULL); endpoint->eager_rdma_local.frags = NULL; } diff --git a/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c b/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c index 4f69531d60..278c6cc5b0 100644 --- a/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c +++ b/opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c @@ -7,6 +7,9 @@ * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * * $COPYRIGHT$ * @@ -1193,7 +1196,7 @@ static void *call_disconnect_callback(void *v) OBJ_RELEASE(context); /* Tell the main thread that we're done */ - opal_atomic_add(&disconnect_callbacks, 1); + (void)opal_atomic_add(&disconnect_callbacks, 1); OPAL_OUTPUT((-1, "SERVICE Service thread disconnect on ID %p done; count=%d", (void*) tmp, disconnect_callbacks)); return NULL; diff --git a/opal/mca/btl/sm/btl_sm.c b/opal/mca/btl/sm/btl_sm.c index f518431c79..1f61028a3e 100644 --- a/opal/mca/btl/sm/btl_sm.c +++ b/opal/mca/btl/sm/btl_sm.c @@ -3,7 +3,7 @@ * Copyright (c) 2004-2011 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, @@ -569,7 +569,7 @@ int mca_btl_sm_add_procs( /* Sync with other local procs. Force the FIFO initialization to always * happens before the readers access it. */ - opal_atomic_add_32(&mca_btl_sm_component.sm_seg->module_seg->seg_inited, 1); + (void)opal_atomic_add_32(&mca_btl_sm_component.sm_seg->module_seg->seg_inited, 1); while( n_local_procs > mca_btl_sm_component.sm_seg->module_seg->seg_inited) { opal_progress(); diff --git a/opal/mca/btl/smcuda/btl_smcuda.c b/opal/mca/btl/smcuda/btl_smcuda.c index 454974158c..bad782cfc1 100644 --- a/opal/mca/btl/smcuda/btl_smcuda.c +++ b/opal/mca/btl/smcuda/btl_smcuda.c @@ -3,7 +3,7 @@ * Copyright (c) 2004-2011 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, @@ -589,7 +589,7 @@ int mca_btl_smcuda_add_procs( /* Sync with other local procs. Force the FIFO initialization to always * happens before the readers access it. */ - opal_atomic_add_32(&mca_btl_smcuda_component.sm_seg->module_seg->seg_inited, 1); + (void)opal_atomic_add_32(&mca_btl_smcuda_component.sm_seg->module_seg->seg_inited, 1); while( n_local_procs > mca_btl_smcuda_component.sm_seg->module_seg->seg_inited) { opal_progress(); diff --git a/opal/mca/btl/vader/btl_vader_xpmem.c b/opal/mca/btl/vader/btl_vader_xpmem.c index bbeb1a2118..45ae791841 100644 --- a/opal/mca/btl/vader/btl_vader_xpmem.c +++ b/opal/mca/btl/vader/btl_vader_xpmem.c @@ -2,6 +2,9 @@ /* * Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -45,7 +48,7 @@ mca_mpool_base_registration_t *vader_get_registation (struct mca_btl_base_endpoi rc = rcache->rcache_find_all (rcache, (void *) base, bound - base, regs, 10); for (i = 0 ; i < rc ; ++i) { if (bound <= (uintptr_t)regs[i]->bound && base >= (uintptr_t)regs[i]->base) { - opal_atomic_add (®s[i]->ref_count, 1); + (void)opal_atomic_add (®s[i]->ref_count, 1); reg = regs[i]; goto reg_found; } @@ -65,7 +68,7 @@ mca_mpool_base_registration_t *vader_get_registation (struct mca_btl_base_endpoi /* start the new segment from the lower of the two bases */ base = (uintptr_t) regs[i]->base < base ? (uintptr_t) regs[i]->base : base; - opal_atomic_add (®s[i]->ref_count, -1); + (void)opal_atomic_add (®s[i]->ref_count, -1); if (OPAL_LIKELY(0 == regs[i]->ref_count)) { /* this pointer is not in use */ diff --git a/test/asm/atomic_math.c b/test/asm/atomic_math.c index 6505ad174c..6bede9ac7b 100644 --- a/test/asm/atomic_math.c +++ b/test/asm/atomic_math.c @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -42,11 +42,11 @@ static void* atomic_math_test(void* arg) int i; for (i = 0 ; i < count ; ++i) { - opal_atomic_add_32(&val32, 5); + (void)opal_atomic_add_32(&val32, 5); #if OPAL_HAVE_ATOMIC_MATH_64 - opal_atomic_add_64(&val64, 6); + (void)opal_atomic_add_64(&val64, 6); #endif - opal_atomic_add(&valint, 4); + (void)opal_atomic_add(&valint, 4); } return NULL; diff --git a/test/threads/opal_thread.c b/test/threads/opal_thread.c index 42e27cb70c..19eefec107 100644 --- a/test/threads/opal_thread.c +++ b/test/threads/opal_thread.c @@ -1,5 +1,8 @@ /* * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. * $COPYRIGHT$ */ @@ -33,13 +36,13 @@ static volatile int count = 0; static void* thr1_run(opal_object_t* obj) { - opal_atomic_add(&count, 1); + (void)opal_atomic_add(&count, 1); return NULL; } static void* thr2_run(opal_object_t* obj) { - opal_atomic_add(&count, 2); + (void)opal_atomic_add(&count, 2); return NULL; } From 63ba754f3fa1450efef2836f7d3fc37426426d77 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Wed, 15 Oct 2014 21:49:32 -0400 Subject: [PATCH 2/2] Remove unnecessary includes from the datatype --- opal/datatype/opal_convertor.h | 13 +------------ opal/datatype/opal_convertor_internal.h | 6 +----- opal/datatype/opal_datatype.h | 3 --- opal/datatype/opal_datatype_internal.h | 6 ------ opal/datatype/opal_datatype_pack.h | 3 --- opal/datatype/opal_datatype_unpack.h | 8 -------- 6 files changed, 2 insertions(+), 37 deletions(-) diff --git a/opal/datatype/opal_convertor.h b/opal/datatype/opal_convertor.h index dd3e560daa..ea1546393a 100644 --- a/opal/datatype/opal_convertor.h +++ b/opal/datatype/opal_convertor.h @@ -3,7 +3,7 @@ * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2009 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, @@ -23,20 +23,9 @@ #include "opal_config.h" -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif #ifdef HAVE_SYS_UIO_H #include #endif -#ifdef HAVE_NET_UIO_H -#include -#endif -#if HAVE_STRING_H -#include -#endif #include "opal/constants.h" #include "opal/datatype/opal_datatype.h" diff --git a/opal/datatype/opal_convertor_internal.h b/opal/datatype/opal_convertor_internal.h index b219c5f2c9..8c7f9f05da 100644 --- a/opal/datatype/opal_convertor_internal.h +++ b/opal/datatype/opal_convertor_internal.h @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* - * Copyright (c) 2004-2006 The University of Tennessee and The University + * Copyright (c) 2004-2014 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. @@ -16,10 +16,6 @@ #include "opal_config.h" -#include - -#include "opal/constants.h" -#include "opal/datatype/opal_datatype.h" #include "opal/datatype/opal_convertor.h" BEGIN_C_DECLS diff --git a/opal/datatype/opal_datatype.h b/opal/datatype/opal_datatype.h index 40425ae4c9..56fb672c5f 100644 --- a/opal/datatype/opal_datatype.h +++ b/opal/datatype/opal_datatype.h @@ -35,9 +35,6 @@ #include "opal_config.h" #include -#ifdef HAVE_STDINT_H -#include -#endif #include "opal/class/opal_object.h" diff --git a/opal/datatype/opal_datatype_internal.h b/opal/datatype/opal_datatype_internal.h index 7a52d92322..01d173a21c 100644 --- a/opal/datatype/opal_datatype_internal.h +++ b/opal/datatype/opal_datatype_internal.h @@ -26,15 +26,9 @@ #include "opal_config.h" -#include -#include - #ifdef HAVE_STRING_H #include #endif -#ifdef HAVE_STDINT_H -#include -#endif #if defined(VERBOSE) #include "opal/util/output.h" diff --git a/opal/datatype/opal_datatype_pack.h b/opal/datatype/opal_datatype_pack.h index 1de7ddef33..3ebed1a204 100644 --- a/opal/datatype/opal_datatype_pack.h +++ b/opal/datatype/opal_datatype_pack.h @@ -18,9 +18,6 @@ #include "opal_config.h" #include -#ifdef HAVE_STDINT_H -#include -#endif #if !defined(CHECKSUM) && OPAL_CUDA_SUPPORT /* Make use of existing macro to do CUDA style memcpy */ diff --git a/opal/datatype/opal_datatype_unpack.h b/opal/datatype/opal_datatype_unpack.h index 972f53b172..b41c7300fe 100644 --- a/opal/datatype/opal_datatype_unpack.h +++ b/opal/datatype/opal_datatype_unpack.h @@ -17,11 +17,6 @@ #include "opal_config.h" -#include -#ifdef HAVE_STDINT_H -#include -#endif - #if !defined(CHECKSUM) && OPAL_CUDA_SUPPORT /* Make use of existing macro to do CUDA style memcpy */ #undef MEMCPY_CSUM @@ -29,9 +24,6 @@ CONVERTOR->cbmemcpy( (DST), (SRC), (BLENGTH), (CONVERTOR) ) #endif -#include "opal/datatype/opal_convertor.h" - - static inline void unpack_predefined_data( opal_convertor_t* CONVERTOR, /* the convertor */ dt_elem_desc_t* ELEM, /* the element description */ uint32_t* COUNT, /* the number of elements */