From 2895b11b73fcff788b58e53514b8448841cc9818 Mon Sep 17 00:00:00 2001 From: Chuck Fossen Date: Wed, 6 Sep 2017 08:18:36 -0500 Subject: [PATCH] LU-10185 gnilnd: Change gnc_tx_bits to unsigned long gnc_tx_bits declared as __u8. Change to unsigned long. The goal is to align gnc_tx_bits[] to a 32 bit boundary. The initial declaration I believe was not a good choice. The use of the gnc_tx_bits makes more sense as a long than as a 8 bit value. It is used by: static inline int test_and_clear_bit(int nr, unsigned long *addr); unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size, unsigned long offset); static inline int test_and_set_bit(int nr, unsigned long *addr); all of which takes a unsigned long pointer. Test-parameters: trivial Signed-off-by: Chris Horn Change-Id: I559e2a356182f253716d30f69bf675c485fe1b72 Reviewed-on: https://review.whamcloud.com/29897 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin --- lnet/klnds/gnilnd/gnilnd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/klnds/gnilnd/gnilnd.h b/lnet/klnds/gnilnd/gnilnd.h index 6cf451c..2ec071d 100644 --- a/lnet/klnds/gnilnd/gnilnd.h +++ b/lnet/klnds/gnilnd/gnilnd.h @@ -763,7 +763,7 @@ typedef struct kgn_conn { kgn_fma_memblock_t *gnc_fma_blk; /* pointer to fma block for our mailbox */ gni_smsg_attr_t gnpr_smsg_attr; /* my short msg. attributes */ spinlock_t gnc_tx_lock; /* protect tx alloc/free */ - __u8 gnc_tx_bits[GNILND_MAX_MSG_ID/8]; /* bit table for tx id */ + unsigned long gnc_tx_bits[(GNILND_MAX_MSG_ID/8)/sizeof(unsigned long)]; /* bit table for tx id */ int gnc_next_tx; /* next tx to use in tx_ref_table */ kgn_tx_t **gnc_tx_ref_table; /* table of TX descriptors for this conn */ int gnc_mbox_id; /* id of mbox in fma_blk */ -- 1.8.3.1