Skip to content

Commit

Permalink
providers/irdma: Remove enum irdma_status_code
Browse files Browse the repository at this point in the history
- Replaces the use of custom irdma status codes with linux error codes.

- Removes enum irdma_status_code and header file in which
  it was defined.

- Removes the excess 'ret' variables in some functions.
  As irdma_status_code is replaced with an int, there is no need for
  two variables to hold error codes.

- Removes redundant initializations which are no longer needed.

Signed-off-by: Krzysztof Czurylo <[email protected]>
Signed-off-by: Tatyana Nikolova <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
  • Loading branch information
krzycz authored and rleon committed Sep 18, 2023
1 parent d4d124c commit a659e81
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 226 deletions.
11 changes: 5 additions & 6 deletions providers/irdma/defs.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB */
/* Copyright (c) 2015 - 2021 Intel Corporation */
/* Copyright (c) 2015 - 2023 Intel Corporation */
#ifndef IRDMA_DEFS_H
#define IRDMA_DEFS_H

#include "osdep.h"


#define IRDMA_QP_TYPE_IWARP 1
#define IRDMA_QP_TYPE_UDA 2
#define IRDMA_QP_TYPE_ROCE_RC 3
Expand Down Expand Up @@ -175,7 +174,7 @@
(_ring).head = ((_ring).head + 1) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = IRDMA_ERR_RING_FULL; \
(_retcode) = ENOMEM; \
} \
}
#define IRDMA_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \
Expand All @@ -186,7 +185,7 @@
(_ring).head = ((_ring).head + (_count)) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = IRDMA_ERR_RING_FULL; \
(_retcode) = ENOMEM; \
} \
}
#define IRDMA_SQ_RING_MOVE_HEAD(_ring, _retcode) \
Expand All @@ -197,7 +196,7 @@
(_ring).head = ((_ring).head + 1) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = IRDMA_ERR_RING_FULL; \
(_retcode) = ENOMEM; \
} \
}
#define IRDMA_SQ_RING_MOVE_HEAD_BY_COUNT(_ring, _count, _retcode) \
Expand All @@ -208,7 +207,7 @@
(_ring).head = ((_ring).head + (_count)) % size; \
(_retcode) = 0; \
} else { \
(_retcode) = IRDMA_ERR_RING_FULL; \
(_retcode) = ENOMEM; \
} \
}
#define IRDMA_RING_MOVE_HEAD_BY_COUNT_NOCHECK(_ring, _count) \
Expand Down
72 changes: 0 additions & 72 deletions providers/irdma/status.h

This file was deleted.

0 comments on commit a659e81

Please sign in to comment.