Skip to content

Commit

Permalink
mISDN: remove unused vpm_read_address and cpld_read_reg functions
Browse files Browse the repository at this point in the history
clang with W=1 reports
drivers/isdn/hardware/mISDN/hfcmulti.c:667:1: error: unused function
  'vpm_read_address' [-Werror,-Wunused-function]
vpm_read_address(struct hfc_multi *c)
^

drivers/isdn/hardware/mISDN/hfcmulti.c:643:1: error: unused function
  'cpld_read_reg' [-Werror,-Wunused-function]
cpld_read_reg(struct hfc_multi *hc, unsigned char reg)
^

These functions are not used, so remove them.

Reported-by: Simon Horman <[email protected]>
Signed-off-by: Tom Rix <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Tom Rix authored and kuba-moo committed Mar 25, 2023
1 parent dc0a7b5 commit 2d08f3e
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions drivers/isdn/hardware/mISDN/hfcmulti.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,44 +639,13 @@ cpld_write_reg(struct hfc_multi *hc, unsigned char reg, unsigned char val)
return;
}

static inline unsigned char
cpld_read_reg(struct hfc_multi *hc, unsigned char reg)
{
unsigned char bytein;

cpld_set_reg(hc, reg);

/* Do data pin read low byte */
HFC_outb(hc, R_GPIO_OUT1, reg);

enablepcibridge(hc);
bytein = readpcibridge(hc, 1);
disablepcibridge(hc);

return bytein;
}

static inline void
vpm_write_address(struct hfc_multi *hc, unsigned short addr)
{
cpld_write_reg(hc, 0, 0xff & addr);
cpld_write_reg(hc, 1, 0x01 & (addr >> 8));
}

static inline unsigned short
vpm_read_address(struct hfc_multi *c)
{
unsigned short addr;
unsigned short highbit;

addr = cpld_read_reg(c, 0);
highbit = cpld_read_reg(c, 1);

addr = addr | (highbit << 8);

return addr & 0x1ff;
}

static inline unsigned char
vpm_in(struct hfc_multi *c, int which, unsigned short addr)
{
Expand Down

0 comments on commit 2d08f3e

Please sign in to comment.