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 MWAVE_FUTZ_WITH_OTHER_DEVICES ifdeffery

In mwave, a lot of code depends on the MWAVE_FUTZ_WITH_OTHER_DEVICES
macro. That can be defined in Makefile to compile this in.

1) The code is completely unreadable.
2) Recompiling the kernel to have this untested code compiled in is not
a good idea.

Drop all this.

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

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
48e77862 3b4d1b22

-111
-3
drivers/char/mwave/Makefile
··· 9 9 10 10 mwave-y := mwavedd.o smapi.o tp3780i.o 3780i.o 11 11 12 - # To have the mwave driver disable other uarts if necessary 13 - # ccflags-y := -DMWAVE_FUTZ_WITH_OTHER_DEVICES 14 - 15 12 # To compile in lots (~20 KiB) of run-time enablable printk()s for debugging: 16 13 ccflags-y += -DMW_TRACE
-108
drivers/char/mwave/smapi.c
··· 279 279 if (usBX & 0x0100) { /* serial port A is present */ 280 280 if (usCX & 1) { /* serial port is enabled */ 281 281 if ((usSI & 0xFF) == mwave_uart_irq) { 282 - #ifndef MWAVE_FUTZ_WITH_OTHER_DEVICES 283 282 PRINTK_ERROR(KERN_ERR_MWAVE 284 283 "smapi::smapi_set_DSP_cfg: Serial port A irq %x conflicts with mwave_uart_irq %x\n", usSI & 0xFF, mwave_uart_irq); 285 - #else 286 - PRINTK_3(TRACE_SMAPI, 287 - "smapi::smapi_set_DSP_cfg: Serial port A irq %x conflicts with mwave_uart_irq %x\n", usSI & 0xFF, mwave_uart_irq); 288 - #endif 289 - #ifdef MWAVE_FUTZ_WITH_OTHER_DEVICES 290 - PRINTK_1(TRACE_SMAPI, 291 - "smapi::smapi_set_DSP_cfg Disabling conflicting serial port\n"); 292 - bRC = smapi_request(0x1403, 0x0100, 0, usSI, 293 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 294 - if (bRC) goto exit_smapi_request_error; 295 - bRC = smapi_request(0x1402, 0x0000, 0, 0, 296 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 297 - if (bRC) goto exit_smapi_request_error; 298 - #else 299 284 goto exit_conflict; 300 - #endif 301 285 } else { 302 286 if ((usSI >> 8) == uartio_index) { 303 - #ifndef MWAVE_FUTZ_WITH_OTHER_DEVICES 304 287 PRINTK_ERROR(KERN_ERR_MWAVE 305 288 "smapi::smapi_set_DSP_cfg: Serial port A base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio_index]); 306 - #else 307 - PRINTK_3(TRACE_SMAPI, 308 - "smapi::smapi_set_DSP_cfg: Serial port A base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio_index]); 309 - #endif 310 - #ifdef MWAVE_FUTZ_WITH_OTHER_DEVICES 311 - PRINTK_1(TRACE_SMAPI, 312 - "smapi::smapi_set_DSP_cfg Disabling conflicting serial port A\n"); 313 - bRC = smapi_request (0x1403, 0x0100, 0, usSI, 314 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 315 - if (bRC) goto exit_smapi_request_error; 316 - bRC = smapi_request (0x1402, 0x0000, 0, 0, 317 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 318 - if (bRC) goto exit_smapi_request_error; 319 - #else 320 289 goto exit_conflict; 321 - #endif 322 290 } 323 291 } 324 292 } ··· 300 332 if (usBX & 0x0100) { /* serial port B is present */ 301 333 if (usCX & 1) { /* serial port is enabled */ 302 334 if ((usSI & 0xFF) == mwave_uart_irq) { 303 - #ifndef MWAVE_FUTZ_WITH_OTHER_DEVICES 304 335 PRINTK_ERROR(KERN_ERR_MWAVE 305 336 "smapi::smapi_set_DSP_cfg: Serial port B irq %x conflicts with mwave_uart_irq %x\n", usSI & 0xFF, mwave_uart_irq); 306 - #else 307 - PRINTK_3(TRACE_SMAPI, 308 - "smapi::smapi_set_DSP_cfg: Serial port B irq %x conflicts with mwave_uart_irq %x\n", usSI & 0xFF, mwave_uart_irq); 309 - #endif 310 - #ifdef MWAVE_FUTZ_WITH_OTHER_DEVICES 311 - PRINTK_1(TRACE_SMAPI, 312 - "smapi::smapi_set_DSP_cfg Disabling conflicting serial port B\n"); 313 - bRC = smapi_request(0x1405, 0x0100, 0, usSI, 314 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 315 - if (bRC) goto exit_smapi_request_error; 316 - bRC = smapi_request(0x1404, 0x0000, 0, 0, 317 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 318 - if (bRC) goto exit_smapi_request_error; 319 - #else 320 337 goto exit_conflict; 321 - #endif 322 338 } else { 323 339 if ((usSI >> 8) == uartio_index) { 324 - #ifndef MWAVE_FUTZ_WITH_OTHER_DEVICES 325 340 PRINTK_ERROR(KERN_ERR_MWAVE 326 341 "smapi::smapi_set_DSP_cfg: Serial port B base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio_index]); 327 - #else 328 - PRINTK_3(TRACE_SMAPI, 329 - "smapi::smapi_set_DSP_cfg: Serial port B base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI >> 8], ausUartBases[uartio_index]); 330 - #endif 331 - #ifdef MWAVE_FUTZ_WITH_OTHER_DEVICES 332 - PRINTK_1 (TRACE_SMAPI, 333 - "smapi::smapi_set_DSP_cfg Disabling conflicting serial port B\n"); 334 - bRC = smapi_request (0x1405, 0x0100, 0, usSI, 335 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 336 - if (bRC) goto exit_smapi_request_error; 337 - bRC = smapi_request (0x1404, 0x0000, 0, 0, 338 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 339 - if (bRC) goto exit_smapi_request_error; 340 - #else 341 342 goto exit_conflict; 342 - #endif 343 343 } 344 344 } 345 345 } ··· 323 387 /* bRC == 0 */ 324 388 if ((usCX & 0xff) != 0xff) { /* IR port not disabled */ 325 389 if ((usCX & 0xff) == mwave_uart_irq) { 326 - #ifndef MWAVE_FUTZ_WITH_OTHER_DEVICES 327 390 PRINTK_ERROR(KERN_ERR_MWAVE 328 391 "smapi::smapi_set_DSP_cfg: IR port irq %x conflicts with mwave_uart_irq %x\n", usCX & 0xff, mwave_uart_irq); 329 - #else 330 - PRINTK_3(TRACE_SMAPI, 331 - "smapi::smapi_set_DSP_cfg: IR port irq %x conflicts with mwave_uart_irq %x\n", usCX & 0xff, mwave_uart_irq); 332 - #endif 333 - #ifdef MWAVE_FUTZ_WITH_OTHER_DEVICES 334 - PRINTK_1(TRACE_SMAPI, 335 - "smapi::smapi_set_DSP_cfg Disabling conflicting IR port\n"); 336 - bRC = smapi_request(0x1701, 0x0100, 0, 0, 337 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 338 - if (bRC) goto exit_smapi_request_error; 339 - bRC = smapi_request(0x1700, 0, 0, 0, 340 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 341 - if (bRC) goto exit_smapi_request_error; 342 - bRC = smapi_request(0x1705, 0x01ff, 0, usSI, 343 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 344 - if (bRC) goto exit_smapi_request_error; 345 - bRC = smapi_request(0x1704, 0x0000, 0, 0, 346 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 347 - if (bRC) goto exit_smapi_request_error; 348 - #else 349 392 goto exit_conflict; 350 - #endif 351 393 } else { 352 394 if ((usSI & 0xff) == uartio_index) { 353 - #ifndef MWAVE_FUTZ_WITH_OTHER_DEVICES 354 395 PRINTK_ERROR(KERN_ERR_MWAVE 355 396 "smapi::smapi_set_DSP_cfg: IR port base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI & 0xff], ausUartBases[uartio_index]); 356 - #else 357 - PRINTK_3(TRACE_SMAPI, 358 - "smapi::smapi_set_DSP_cfg: IR port base I/O address %x conflicts with mwave uart I/O %x\n", ausUartBases[usSI & 0xff], ausUartBases[uartio_index]); 359 - #endif 360 - #ifdef MWAVE_FUTZ_WITH_OTHER_DEVICES 361 - PRINTK_1(TRACE_SMAPI, 362 - "smapi::smapi_set_DSP_cfg Disabling conflicting IR port\n"); 363 - bRC = smapi_request(0x1701, 0x0100, 0, 0, 364 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 365 - if (bRC) goto exit_smapi_request_error; 366 - bRC = smapi_request(0x1700, 0, 0, 0, 367 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 368 - if (bRC) goto exit_smapi_request_error; 369 - bRC = smapi_request(0x1705, 0x01ff, 0, usSI, 370 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 371 - if (bRC) goto exit_smapi_request_error; 372 - bRC = smapi_request(0x1704, 0x0000, 0, 0, 373 - &usAX, &usBX, &usCX, &usDX, &usDI, &usSI); 374 - if (bRC) goto exit_smapi_request_error; 375 - #else 376 397 goto exit_conflict; 377 - #endif 378 398 } 379 399 } 380 400 }