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

Configure Feed

Select the types of activity you want to include in your feed.

char/mwave: remove dead code

In mwave, there is a lot of commented code for a long time. Drop it.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20251119091949.825958-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
3b4d1b22 9906efa5

-118
-29
drivers/char/mwave/3780i.c
··· 140 140 141 141 } 142 142 143 - #if 0 144 - unsigned char dsp3780I_ReadGenCfg(unsigned short usDspBaseIO, 145 - unsigned uIndex) 146 - { 147 - DSP_ISA_SLAVE_CONTROL rSlaveControl; 148 - DSP_ISA_SLAVE_CONTROL rSlaveControl_Save; 149 - unsigned char ucValue; 150 - 151 - 152 - PRINTK_3(TRACE_3780I, 153 - "3780i::dsp3780i_ReadGenCfg entry usDspBaseIO %x uIndex %x\n", 154 - usDspBaseIO, uIndex); 155 - 156 - MKBYTE(rSlaveControl) = InByteDsp(DSP_IsaSlaveControl); 157 - rSlaveControl_Save = rSlaveControl; 158 - rSlaveControl.ConfigMode = true; 159 - OutByteDsp(DSP_IsaSlaveControl, MKBYTE(rSlaveControl)); 160 - OutByteDsp(DSP_ConfigAddress, (unsigned char) uIndex); 161 - ucValue = InByteDsp(DSP_ConfigData); 162 - OutByteDsp(DSP_IsaSlaveControl, MKBYTE(rSlaveControl_Save)); 163 - 164 - PRINTK_2(TRACE_3780I, 165 - "3780i::dsp3780i_ReadGenCfg exit ucValue %x\n", ucValue); 166 - 167 - 168 - return ucValue; 169 - } 170 - #endif /* 0 */ 171 - 172 143 int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings, 173 144 unsigned short *pIrqMap, 174 145 unsigned short *pDmaMap)
-67
drivers/char/mwave/mwavedd.c
··· 492 492 493 493 static struct miscdevice mwave_misc_dev = { MWAVE_MINOR, "mwave", &mwave_fops }; 494 494 495 - #if 0 /* totally b0rked */ 496 - /* 497 - * sysfs support <paulsch@us.ibm.com> 498 - */ 499 - 500 - struct device mwave_device; 501 - 502 - /* Prevent code redundancy, create a macro for mwave_show_* functions. */ 503 - #define mwave_show_function(attr_name, format_string, field) \ 504 - static ssize_t mwave_show_##attr_name(struct device *dev, struct device_attribute *attr, char *buf) \ 505 - { \ 506 - DSP_3780I_CONFIG_SETTINGS *pSettings = \ 507 - &mwave_s_mdd.rBDData.rDspSettings; \ 508 - return sprintf(buf, format_string, pSettings->field); \ 509 - } 510 - 511 - /* All of our attributes are read attributes. */ 512 - #define mwave_dev_rd_attr(attr_name, format_string, field) \ 513 - mwave_show_function(attr_name, format_string, field) \ 514 - static DEVICE_ATTR(attr_name, S_IRUGO, mwave_show_##attr_name, NULL) 515 - 516 - mwave_dev_rd_attr (3780i_dma, "%i\n", usDspDma); 517 - mwave_dev_rd_attr (3780i_irq, "%i\n", usDspIrq); 518 - mwave_dev_rd_attr (3780i_io, "%#.4x\n", usDspBaseIO); 519 - mwave_dev_rd_attr (uart_irq, "%i\n", usUartIrq); 520 - mwave_dev_rd_attr (uart_io, "%#.4x\n", usUartBaseIO); 521 - 522 - static struct device_attribute * const mwave_dev_attrs[] = { 523 - &dev_attr_3780i_dma, 524 - &dev_attr_3780i_irq, 525 - &dev_attr_3780i_io, 526 - &dev_attr_uart_irq, 527 - &dev_attr_uart_io, 528 - }; 529 - #endif 530 - 531 495 /* 532 496 * mwave_init is called on module load 533 497 * ··· 503 539 pMWAVE_DEVICE_DATA pDrvData = &mwave_s_mdd; 504 540 505 541 PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit entry\n"); 506 - 507 - #if 0 508 - for (i = 0; i < pDrvData->nr_registered_attrs; i++) 509 - device_remove_file(&mwave_device, mwave_dev_attrs[i]); 510 - pDrvData->nr_registered_attrs = 0; 511 - 512 - if (pDrvData->device_registered) { 513 - device_unregister(&mwave_device); 514 - pDrvData->device_registered = false; 515 - } 516 - #endif 517 542 518 543 if ( pDrvData->sLine >= 0 ) { 519 544 serial8250_unregister_port(pDrvData->sLine); ··· 619 666 goto cleanup_error; 620 667 } 621 668 /* uart is registered */ 622 - 623 - #if 0 624 - /* sysfs */ 625 - memset(&mwave_device, 0, sizeof (struct device)); 626 - dev_set_name(&mwave_device, "mwave"); 627 - 628 - if (device_register(&mwave_device)) 629 - goto cleanup_error; 630 - pDrvData->device_registered = true; 631 - for (i = 0; i < ARRAY_SIZE(mwave_dev_attrs); i++) { 632 - if(device_create_file(&mwave_device, mwave_dev_attrs[i])) { 633 - PRINTK_ERROR(KERN_ERR_MWAVE 634 - "mwavedd:mwave_init: Error:" 635 - " Failed to create sysfs file %s\n", 636 - mwave_dev_attrs[i]->attr.name); 637 - goto cleanup_error; 638 - } 639 - pDrvData->nr_registered_attrs++; 640 - } 641 - #endif 642 669 643 670 /* SUCCESS! */ 644 671 return 0;
-22
drivers/char/mwave/smapi.c
··· 513 513 return bRC; 514 514 } 515 515 516 - #if 0 517 - static int SmapiQuerySystemID(void) 518 - { 519 - int bRC = -EIO; 520 - unsigned short usAX = 0xffff, usBX = 0xffff, usCX = 0xffff, 521 - usDX = 0xffff, usDI = 0xffff, usSI = 0xffff; 522 - 523 - printk("smapi::SmapiQUerySystemID entry\n"); 524 - bRC = smapi_request(0x0000, 0, 0, 0, 525 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 526 - 527 - if (bRC == 0) { 528 - printk("AX=%x, BX=%x, CX=%x, DX=%x, DI=%x, SI=%x\n", 529 - usAX, usBX, usCX, usDX, usDI, usSI); 530 - } else { 531 - printk("smapi::SmapiQuerySystemID smapi_request error\n"); 532 - } 533 - 534 - return bRC; 535 - } 536 - #endif /* 0 */ 537 - 538 516 int smapi_init(void) 539 517 { 540 518 int retval = -EIO;