Skip to content

Commit 4c576b3

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
6pack: remove sixpack::rbuff
It's unused (except allocation and free). Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de> Cc: David S. Miller <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://lore.kernel.org/r/20240808103549.429349-8-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent be9a284 commit 4c576b3

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

drivers/net/hamradio/6pack.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ struct sixpack {
8888
struct net_device *dev; /* easy for intr handling */
8989

9090
/* These are pointers to the malloc()ed frame buffers. */
91-
unsigned char *rbuff; /* receiver buffer */
9291
int rcount; /* received chars counter */
9392
unsigned char *xbuff; /* transmitter buffer */
9493
unsigned char *xhead; /* next byte to XMIT */
@@ -544,7 +543,7 @@ static inline int tnc_init(struct sixpack *sp)
544543
*/
545544
static int sixpack_open(struct tty_struct *tty)
546545
{
547-
char *rbuff = NULL, *xbuff = NULL;
546+
char *xbuff = NULL;
548547
struct net_device *dev;
549548
struct sixpack *sp;
550549
unsigned long len;
@@ -574,10 +573,8 @@ static int sixpack_open(struct tty_struct *tty)
574573

575574
len = dev->mtu * 2;
576575

577-
rbuff = kmalloc(len + 4, GFP_KERNEL);
578576
xbuff = kmalloc(len + 4, GFP_KERNEL);
579-
580-
if (rbuff == NULL || xbuff == NULL) {
577+
if (xbuff == NULL) {
581578
err = -ENOBUFS;
582579
goto out_free;
583580
}
@@ -586,7 +583,6 @@ static int sixpack_open(struct tty_struct *tty)
586583

587584
sp->tty = tty;
588585

589-
sp->rbuff = rbuff;
590586
sp->xbuff = xbuff;
591587

592588
sp->mtu = AX25_MTU + 73;
@@ -631,7 +627,6 @@ static int sixpack_open(struct tty_struct *tty)
631627

632628
out_free:
633629
kfree(xbuff);
634-
kfree(rbuff);
635630

636631
free_netdev(dev);
637632

@@ -676,7 +671,6 @@ static void sixpack_close(struct tty_struct *tty)
676671
del_timer_sync(&sp->resync_t);
677672

678673
/* Free all 6pack frame buffers after unreg. */
679-
kfree(sp->rbuff);
680674
kfree(sp->xbuff);
681675

682676
free_netdev(sp->dev);

0 commit comments

Comments
 (0)