OSDN Git Service

s390/cio: clarify cssid usage
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Tue, 8 Nov 2016 13:28:03 +0000 (14:28 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Jan 2017 06:27:52 +0000 (07:27 +0100)
commit98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5
tree044e735a994ac3464d1508f1e507bfcc4e52b693
parent57c52ae75774c717eb7cd777b5438244ae6b380c
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>
drivers/s390/cio/chp.c
drivers/s390/cio/chp.h
drivers/s390/cio/css.c
drivers/s390/cio/css.h