Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: dgnc: delete all references to 'flipbuf'

This patch deletes all references to 'flipbuf'.Memory is allocated and
freed but never used anywhere in the driver.Also deleted an ununsed
Macro defined in the header file.

Signed-off-by: Gujulan Elango Hari Prasath <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Gujulan Elango, Hari Prasath (H.) and committed by
Greg Kroah-Hartman
79603862 8ad524ff

-12
-9
drivers/staging/dgnc/dgnc_driver.c
··· 355 355 } 356 356 } 357 357 358 - kfree(brd->flipbuf); 359 358 360 359 dgnc_Board[brd->boardnum] = NULL; 361 360 ··· 579 580 kfree(brd->msgbuf_head); 580 581 brd->msgbuf_head = NULL; 581 582 spin_unlock_irqrestore(&dgnc_global_lock, flags); 582 - 583 - /* 584 - * allocate flip buffer for board. 585 - * 586 - * Okay to malloc with GFP_KERNEL, we are not at interrupt 587 - * context, and there are no locks held. 588 - */ 589 - brd->flipbuf = kzalloc(MYFLIPLEN, GFP_KERNEL); 590 583 591 584 wake_up_interruptible(&brd->state_wait); 592 585
-3
drivers/staging/dgnc/dgnc_driver.h
··· 212 212 213 213 uint TtyRefCnt; 214 214 215 - char *flipbuf; /* Our flip buffer, alloced if board is found */ 216 - 217 215 u16 dpatype; /* The board "type", as defined by DPA */ 218 216 u16 dpastatus; /* The board "status", as defined by DPA */ 219 217 ··· 286 288 #define CH_TX_FIFO_LWM 0x0800 /* TX Fifo is below Low Water */ 287 289 #define CH_BREAK_SENDING 0x1000 /* Break is being sent */ 288 290 #define CH_LOOPBACK 0x2000 /* Channel is in lookback mode */ 289 - #define CH_FLIPBUF_IN_USE 0x4000 /* Channel's flipbuf is in use */ 290 291 #define CH_BAUD0 0x08000 /* Used for checking B0 transitions */ 291 292 #define CH_FORCED_STOP 0x20000 /* Output is forcibly stopped */ 292 293 #define CH_FORCED_STOPI 0x40000 /* Input is forcibly stopped */