Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/cio: idset.c: remove some unused functions

Removes some functions that are not used anywhere:
idset_clear() idset_sch_get_first()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Rickard Strandqvist and committed by
Martin Schwidefsky
8ebd51a7 e0a50545

-22
-20
drivers/s390/cio/idset.c
··· 38 38 vfree(set); 39 39 } 40 40 41 - void idset_clear(struct idset *set) 42 - { 43 - memset(set->bitmap, 0, bitmap_size(set->num_ssid, set->num_id)); 44 - } 45 - 46 41 void idset_fill(struct idset *set) 47 42 { 48 43 memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id)); ··· 96 101 int idset_sch_contains(struct idset *set, struct subchannel_id schid) 97 102 { 98 103 return idset_contains(set, schid.ssid, schid.sch_no); 99 - } 100 - 101 - int idset_sch_get_first(struct idset *set, struct subchannel_id *schid) 102 - { 103 - int ssid = 0; 104 - int id = 0; 105 - int rc; 106 - 107 - rc = idset_get_first(set, &ssid, &id); 108 - if (rc) { 109 - init_subchannel_id(schid); 110 - schid->ssid = ssid; 111 - schid->sch_no = id; 112 - } 113 - return rc; 114 104 } 115 105 116 106 int idset_is_empty(struct idset *set)
-2
drivers/s390/cio/idset.h
··· 11 11 struct idset; 12 12 13 13 void idset_free(struct idset *set); 14 - void idset_clear(struct idset *set); 15 14 void idset_fill(struct idset *set); 16 15 17 16 struct idset *idset_sch_new(void); ··· 18 19 void idset_sch_del(struct idset *set, struct subchannel_id id); 19 20 void idset_sch_del_subseq(struct idset *set, struct subchannel_id schid); 20 21 int idset_sch_contains(struct idset *set, struct subchannel_id id); 21 - int idset_sch_get_first(struct idset *set, struct subchannel_id *id); 22 22 int idset_is_empty(struct idset *set); 23 23 void idset_add_set(struct idset *to, struct idset *from); 24 24