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>
This commit is contained in:

committed by
Martin Schwidefsky

parent
57c52ae757
commit
98cc43ab6b
@@ -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);
|
||||
|
Reference in New Issue
Block a user