aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/css.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2016-11-08 14:28:03 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-01-16 07:27:52 +0100
commit98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5 (patch)
tree044e735a994ac3464d1508f1e507bfcc4e52b693 /drivers/s390/cio/css.h
parents390/zcrypt: get rid of variable length arrays (diff)
downloadlinux-dev-98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5.tar.xz
linux-dev-98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5.zip
s390/cio: clarify cssid usage
Currently the cssid in various structures is used as the id of the respective channel subsystem. Sometimes however we call the index in the channel_subsystems array cssid. In some places the id is even used as the index. Provide a new define MAX_CSS_IDX and use it where appropriate. In addition to that provide a dummy function to find a channel subsystem by its id and a macro to iterate over the channel subsystems. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/css.h')
-rw-r--r--drivers/s390/cio/css.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h
index 2c9107e20251..cd19c08b93b2 100644
--- a/drivers/s390/cio/css.h
+++ b/drivers/s390/cio/css.h
@@ -130,6 +130,16 @@ struct channel_subsystem {
extern struct channel_subsystem *channel_subsystems[];
+/* Dummy helper which needs to change once we support more than one css. */
+static inline struct channel_subsystem *css_by_id(u8 cssid)
+{
+ return channel_subsystems[0];
+}
+
+/* Dummy iterator which needs to change once we support more than one css. */
+#define for_each_css(css) \
+ for ((css) = channel_subsystems[0]; (css); (css) = NULL)
+
/* Helper functions to build lists for the slow path. */
void css_schedule_eval(struct subchannel_id schid);
void css_schedule_eval_all(void);