Skip to content

Commit

Permalink
s390/cio: idset.c: remove some unused functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rickard Strandqvist authored and Martin Schwidefsky committed Jan 8, 2015
1 parent e0a5054 commit 8ebd51a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
20 changes: 0 additions & 20 deletions drivers/s390/cio/idset.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ void idset_free(struct idset *set)
vfree(set);
}

void idset_clear(struct idset *set)
{
memset(set->bitmap, 0, bitmap_size(set->num_ssid, set->num_id));
}

void idset_fill(struct idset *set)
{
memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id));
Expand Down Expand Up @@ -103,21 +98,6 @@ int idset_sch_contains(struct idset *set, struct subchannel_id schid)
return idset_contains(set, schid.ssid, schid.sch_no);
}

int idset_sch_get_first(struct idset *set, struct subchannel_id *schid)
{
int ssid = 0;
int id = 0;
int rc;

rc = idset_get_first(set, &ssid, &id);
if (rc) {
init_subchannel_id(schid);
schid->ssid = ssid;
schid->sch_no = id;
}
return rc;
}

int idset_is_empty(struct idset *set)
{
return bitmap_empty(set->bitmap, set->num_ssid * set->num_id);
Expand Down
2 changes: 0 additions & 2 deletions drivers/s390/cio/idset.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
struct idset;

void idset_free(struct idset *set);
void idset_clear(struct idset *set);
void idset_fill(struct idset *set);

struct idset *idset_sch_new(void);
void idset_sch_add(struct idset *set, struct subchannel_id id);
void idset_sch_del(struct idset *set, struct subchannel_id id);
void idset_sch_del_subseq(struct idset *set, struct subchannel_id schid);
int idset_sch_contains(struct idset *set, struct subchannel_id id);
int idset_sch_get_first(struct idset *set, struct subchannel_id *id);
int idset_is_empty(struct idset *set);
void idset_add_set(struct idset *to, struct idset *from);

Expand Down

0 comments on commit 8ebd51a

Please sign in to comment.