aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/idset.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/idset.c')
-rw-r--r--drivers/s390/cio/idset.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/s390/cio/idset.c b/drivers/s390/cio/idset.c
index 5c88faf5b897..4d10981c7cc1 100644
--- a/drivers/s390/cio/idset.c
+++ b/drivers/s390/cio/idset.c
@@ -120,3 +120,13 @@ int idset_is_empty(struct idset *set)
120 return 1; 120 return 1;
121 return 0; 121 return 0;
122} 122}
123
124void idset_add_set(struct idset *to, struct idset *from)
125{
126 unsigned long i, len;
127
128 len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
129 __BITOPS_WORDS(from->num_ssid * from->num_id));
130 for (i = 0; i < len ; i++)
131 to->bitmap[i] |= from->bitmap[i];
132}