Skip to content

Commit

Permalink
net/hamradio/6pack: remove redundant variable channel
Browse files Browse the repository at this point in the history
Variable channel is being assigned but is never used hence it is
redundant and can be removed.

Cleans up two clang warnings:
warning: variable 'channel' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Jul 5, 2018
1 parent b67030b commit 827ad90
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/hamradio/6pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,10 +878,8 @@ static void decode_data(struct sixpack *sp, unsigned char inbyte)

static void decode_prio_command(struct sixpack *sp, unsigned char cmd)
{
unsigned char channel;
int actual;

channel = cmd & SIXP_CHN_MASK;
if ((cmd & SIXP_PRIO_DATA_MASK) != 0) { /* idle ? */

/* RX and DCD flags can only be set in the same prio command,
Expand Down Expand Up @@ -933,10 +931,9 @@ static void decode_prio_command(struct sixpack *sp, unsigned char cmd)

static void decode_std_command(struct sixpack *sp, unsigned char cmd)
{
unsigned char checksum = 0, rest = 0, channel;
unsigned char checksum = 0, rest = 0;
short i;

channel = cmd & SIXP_CHN_MASK;
switch (cmd & SIXP_CMD_MASK) { /* normal command */
case SIXP_SEOF:
if ((sp->rx_count == 0) && (sp->rx_count_cooked == 0)) {
Expand Down

0 comments on commit 827ad90

Please sign in to comment.