This patch is to remove the typedef sctp_arg_t, and
replace with union sctp_arg in the places where it's
using this typedef.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
*/
#define SCTP_MAX_NUM_COMMANDS 20
*/
#define SCTP_MAX_NUM_COMMANDS 20
void *zero_all; /* Set to NULL to clear the entire union */
__s32 i32;
__u32 u32;
void *zero_all; /* Set to NULL to clear the entire union */
__s32 i32;
__u32 u32;
struct sctp_packet *packet;
struct sctp_sackhdr *sackh;
struct sctp_datamsg *msg;
struct sctp_packet *packet;
struct sctp_sackhdr *sackh;
struct sctp_datamsg *msg;
/* We are simulating ML type constructors here.
*
* SCTP_ARG_CONSTRUCTOR(NAME, TYPE, ELT) builds a function called
* SCTP_NAME() which takes an argument of type TYPE and returns an
/* We are simulating ML type constructors here.
*
* SCTP_ARG_CONSTRUCTOR(NAME, TYPE, ELT) builds a function called
* SCTP_NAME() which takes an argument of type TYPE and returns an
- * sctp_arg_t. It does this by inserting the sole argument into the
- * ELT union element of a local sctp_arg_t.
+ * union sctp_arg. It does this by inserting the sole argument into
+ * the ELT union element of a local union sctp_arg.
*
* E.g., SCTP_ARG_CONSTRUCTOR(I32, __s32, i32) builds SCTP_I32(arg),
*
* E.g., SCTP_ARG_CONSTRUCTOR(I32, __s32, i32) builds SCTP_I32(arg),
- * which takes an __s32 and returns a sctp_arg_t containing the
+ * which takes an __s32 and returns a union sctp_arg containing the
* __s32. So, after foo = SCTP_I32(arg), foo.i32 == arg.
*/
#define SCTP_ARG_CONSTRUCTOR(name, type, elt) \
* __s32. So, after foo = SCTP_I32(arg), foo.i32 == arg.
*/
#define SCTP_ARG_CONSTRUCTOR(name, type, elt) \
-static inline sctp_arg_t \
+static inline union sctp_arg \
SCTP_## name (type arg) \
SCTP_## name (type arg) \
+{ union sctp_arg retval;\
retval.zero_all = NULL;\
retval.elt = arg;\
return retval;\
retval.zero_all = NULL;\
retval.elt = arg;\
return retval;\
SCTP_ARG_CONSTRUCTOR(SACKH, struct sctp_sackhdr *, sackh)
SCTP_ARG_CONSTRUCTOR(DATAMSG, struct sctp_datamsg *, msg)
SCTP_ARG_CONSTRUCTOR(SACKH, struct sctp_sackhdr *, sackh)
SCTP_ARG_CONSTRUCTOR(DATAMSG, struct sctp_datamsg *, msg)
-static inline sctp_arg_t SCTP_FORCE(void)
+static inline union sctp_arg SCTP_FORCE(void)
-static inline sctp_arg_t SCTP_NOFORCE(void)
+static inline union sctp_arg SCTP_NOFORCE(void)
-static inline sctp_arg_t SCTP_NULL(void)
+static inline union sctp_arg SCTP_NULL(void)
retval.zero_all = NULL;
return retval;
}
struct sctp_cmd {
retval.zero_all = NULL;
return retval;
}
struct sctp_cmd {
* to wrap data which goes in the obj argument.
*/
static inline void sctp_add_cmd_sf(struct sctp_cmd_seq *seq, sctp_verb_t verb,
* to wrap data which goes in the obj argument.
*/
static inline void sctp_add_cmd_sf(struct sctp_cmd_seq *seq, sctp_verb_t verb,
{
struct sctp_cmd *cmd = seq->last_used_slot - 1;
{
struct sctp_cmd *cmd = seq->last_used_slot - 1;
void *arg,
struct sctp_cmd_seq *commands)
{
void *arg,
struct sctp_cmd_seq *commands)
{
+ union sctp_arg force = SCTP_NOFORCE();
struct sctp_chunk *chunk = arg;
struct sctp_chunk *chunk = arg;
- sctp_arg_t force = SCTP_NOFORCE();
int error;
if (!sctp_vtag_verify(chunk, asoc)) {
int error;
if (!sctp_vtag_verify(chunk, asoc)) {