mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 06:02:33 +00:00
scst: Use conventional declaration qualifiers
Place static before const in option tables. Keep the conftest-selected const qualifier beside the RDMA WR type, and use __maybe_unused for the architecture-dependent page variable. Both conftest alternatives retain their pointer types; storage duration and option values are unchanged. Checkpatch reports STATIC_CONST: Move const after static - use 'static const struct option' Checkpatch reports PREFER_DEFINED_ATTRIBUTE_MACRO: __always_unused or __maybe_unused is preferred over __attribute__((__unused__))
This commit is contained in:
@@ -75,7 +75,7 @@ int isert_post_recv(struct isert_conn *isert_conn,
|
||||
int num_wr)
|
||||
{
|
||||
struct ib_recv_wr *first_ib_wr = &first_wr->recv_wr;
|
||||
BAD_WR_MODIFIER struct ib_recv_wr *bad_wr;
|
||||
struct ib_recv_wr BAD_WR_MODIFIER *bad_wr;
|
||||
int num_posted;
|
||||
int err;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ enum iscsi_adm_op {
|
||||
|
||||
static const char program_name[] = "iscsi-scst-adm";
|
||||
|
||||
static struct option const long_options[] = {
|
||||
static const struct option long_options[] = {
|
||||
{"op", required_argument, NULL, 'o'},
|
||||
{"tid", required_argument, NULL, 't'},
|
||||
{"sid", required_argument, NULL, 's'},
|
||||
|
||||
@@ -54,7 +54,7 @@ struct iscsi_init_params iscsi_init_params;
|
||||
|
||||
static const char program_name[] = "iscsi-scstd";
|
||||
|
||||
static struct option const long_options[] = {
|
||||
static const struct option long_options[] = {
|
||||
{"config", required_argument, 0, 'c'},
|
||||
{"foreground", no_argument, 0, 'f'},
|
||||
{"debug", required_argument, 0, 'd'},
|
||||
|
||||
@@ -768,7 +768,7 @@ static void dev_user_flush_dcache(struct scst_user_cmd *ucmd)
|
||||
*/
|
||||
|
||||
for (i = 0; (bufflen > 0) && (i < buf_ucmd->num_data_pages); i++) {
|
||||
struct page *page __attribute__((unused));
|
||||
struct page *page __maybe_unused;
|
||||
|
||||
page = buf_ucmd->data_pages[i];
|
||||
#ifdef ARCH_HAS_FLUSH_ANON_PAGE
|
||||
|
||||
+1
-1
@@ -943,7 +943,7 @@ static int srpt_post_recv(struct srpt_device *sdev, struct srpt_rdma_ch *ch,
|
||||
{
|
||||
struct ib_sge list;
|
||||
struct ib_recv_wr wr;
|
||||
BAD_WR_MODIFIER struct ib_recv_wr *bad_wr;
|
||||
struct ib_recv_wr BAD_WR_MODIFIER *bad_wr;
|
||||
|
||||
BUG_ON(!sdev);
|
||||
wr.wr_id = encode_wr_id(SRPT_RECV, ioctx->ioctx.index);
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ bool log_daemon; /* needed for the tracing infrastructure */
|
||||
unsigned long trace_flag = DEFAULT_LOG_FLAGS;
|
||||
#endif /* defined(DEBUG) || defined(TRACING) */
|
||||
|
||||
static struct option const long_options[] = {
|
||||
static const struct option long_options[] = {
|
||||
{"allowed_event", required_argument, 0, 'e'},
|
||||
{"allowed_issuer", required_argument, 0, 'i'},
|
||||
{"non_blocking", no_argument, 0, 'n'},
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ bool use_multi = true;
|
||||
|
||||
static void *(*alloc_fn)(size_t size) = align_alloc;
|
||||
|
||||
static struct option const long_options[] =
|
||||
static const struct option long_options[] =
|
||||
{
|
||||
{"block", required_argument, 0, 'b'},
|
||||
{"threads", required_argument, 0, 'e'},
|
||||
|
||||
@@ -56,7 +56,7 @@ unsigned long trace_flag = DEFAULT_LOG_FLAGS;
|
||||
bool log_daemon = true;
|
||||
int transition_timeout = DEFAULT_TRANSITION_TIME;
|
||||
|
||||
static struct option const long_options[] = {
|
||||
static const struct option long_options[] = {
|
||||
{"path", required_argument, 0, 'p'},
|
||||
{"timeout", required_argument, 0, 't'},
|
||||
{"foreground", no_argument, 0, 'f'},
|
||||
|
||||
Reference in New Issue
Block a user