From 43ee1a7c5d3cae0a080bac5ae61925df4c00ac98 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Tue, 20 Oct 2026 16:02:54 +0300 Subject: [PATCH] scst: Put KUnit visibility annotations on separate lines The full SCS scan reports three instances of the same diagnostic: scst/src/scst_lib.c:3007:1: scst/src/scst_sysfs.c:1762:1: scst/src/scst_targ.c:5666:1: error: SCS.1: place SCST_KUNIT_VISIBLE on a line of its own Move the annotations above the declarations of scst_check_reassign_sess, __scst_acg_black_hole_store and scst_mgmt_cmd_init. This satisfies the existing SCS.1 rule without changing visibility or function behavior. --- scst/src/scst_lib.c | 3 ++- scst/src/scst_sysfs.c | 4 ++-- scst/src/scst_targ.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index e496d5f7f..a0a4cdfc0 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -3004,7 +3004,8 @@ void scst_dev_inquiry_data_changed(struct scst_device *dev) EXPORT_SYMBOL(scst_dev_inquiry_data_changed); /* The activity supposed to be suspended and scst_mutex held */ -SCST_KUNIT_VISIBLE void scst_check_reassign_sess(struct scst_session *sess) +SCST_KUNIT_VISIBLE +void scst_check_reassign_sess(struct scst_session *sess) { struct scst_acg *acg, *old_acg; struct scst_acg_dev *acg_dev; diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index f83cc6a16..87573a0ac 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -1759,8 +1759,8 @@ static ssize_t __scst_acg_black_hole_show(struct scst_acg *acg, char *buf) return sysfs_emit(buf, "%d\n", t); } -SCST_KUNIT_VISIBLE ssize_t -__scst_acg_black_hole_store(struct scst_acg *acg, const char *buf, size_t count) +SCST_KUNIT_VISIBLE +ssize_t __scst_acg_black_hole_store(struct scst_acg *acg, const char *buf, size_t count) { int res = 0; int prev, t; diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 83e85d949..0b2fbdf67 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -5663,7 +5663,8 @@ static int scst_clear_task_set(struct scst_mgmt_cmd *mcmd) * Returns 0 if the command processing should be continued, * >0, if it should be requeued, <0 otherwise. */ -SCST_KUNIT_VISIBLE int scst_mgmt_cmd_init(struct scst_mgmt_cmd *mcmd) +SCST_KUNIT_VISIBLE +int scst_mgmt_cmd_init(struct scst_mgmt_cmd *mcmd) { int res = 0, rc, t;