Skip to content

Commit

Permalink
net: hamradio: remove unused hweight*() defines
Browse files Browse the repository at this point in the history
This file does not use hweight*() at all, and the definition is
surrounded by #if 0 ... #endif.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Masahiro Yamada authored and David S. Miller committed Feb 18, 2019
1 parent 8bbed40 commit ed95799
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions drivers/net/hamradio/baycom_ser_fdx.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,32 +203,6 @@ static inline void ser12_set_divisor(struct net_device *dev,
*/
}

/* --------------------------------------------------------------------- */

#if 0
static inline unsigned int hweight16(unsigned int w)
__attribute__ ((unused));
static inline unsigned int hweight8(unsigned int w)
__attribute__ ((unused));

static inline unsigned int hweight16(unsigned int w)
{
unsigned short res = (w & 0x5555) + ((w >> 1) & 0x5555);
res = (res & 0x3333) + ((res >> 2) & 0x3333);
res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F);
return (res & 0x00FF) + ((res >> 8) & 0x00FF);
}

static inline unsigned int hweight8(unsigned int w)
{
unsigned short res = (w & 0x55) + ((w >> 1) & 0x55);
res = (res & 0x33) + ((res >> 2) & 0x33);
return (res & 0x0F) + ((res >> 4) & 0x0F);
}
#endif

/* --------------------------------------------------------------------- */

static __inline__ void ser12_rx(struct net_device *dev, struct baycom_state *bc, struct timespec64 *ts, unsigned char curs)
{
int timediff;
Expand Down

0 comments on commit ed95799

Please sign in to comment.