lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 10 Mar 2023 21:19:00 +0530
From:   Deepak R Varma <drv@...lo.com>
To:     Sumitra Sharma <sumitraartsy@...il.com>
Cc:     abbotti@....co.uk, hsweeten@...ionengravers.com,
        outreachy@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] comedi: drivers: ni_pcimio: Remove the code enclosed by
 #if 0 and its #endif

On Fri, Mar 10, 2023 at 06:01:19AM -0800, Sumitra Sharma wrote:
> Reported by checkpatch.pl:
> 
> WARNING: Consider removing the code enclosd by this #if 0 and its #endif
> at line 482, 501, 570.
> 
> Signed-off-by: Sumitra Sharma <sumitraartsy@...il.com>
> ---
>  drivers/comedi/drivers/ni_pcimio.c | 48 ------------------------------
>  1 file changed, 48 deletions(-)

Hi Sumitra,
Nice first attempt. However, you should be working in the drivers/staging
directory for now.

Also, specific to the following change, the device definitions may be useful to
people who have those devices and can be added to the driver by simply removing
the #if 0 condition. Hence, these commented blocks are likely retained due to
same reason.

Thank you,
Deepak.

> 
> diff --git a/drivers/comedi/drivers/ni_pcimio.c b/drivers/comedi/drivers/ni_pcimio.c
> index 0b055321023d..1603095f2ed9 100644
> --- a/drivers/comedi/drivers/ni_pcimio.c
> +++ b/drivers/comedi/drivers/ni_pcimio.c
> @@ -479,43 +479,6 @@ static const struct ni_board_struct ni_boards[] = {
>  		.ao_speed	= 250,
>  		.caldac		= { ad8804, ad8804 },
>  	},
> -#if 0
> -	/* The 6115 boards probably need their own driver */
> -	[BOARD_PCI6115] = {	/* .device_id = 0x2ed0, */
> -		.name		= "pci-6115",
> -		.n_adchan	= 4,
> -		.ai_maxdata	= 0x0fff,
> -		.ai_fifo_depth	= 8192,
> -		.gainlkup	= ai_gain_611x,
> -		.ai_speed	= 100,
> -		.n_aochan	= 2,
> -		.ao_maxdata	= 0xffff,
> -		.ao_671x	= 1,
> -		.ao_fifo_depth	= 2048,
> -		.ao_speed	= 250,
> -		.reg_611x	= 1,
> -		/* XXX */
> -		.caldac		= { ad8804_debug, ad8804_debug, ad8804_debug },
> -	},
> -#endif
> -#if 0
> -	[BOARD_PXI6115] = {	/* .device_id = ????, */
> -		.name		= "pxi-6115",
> -		.n_adchan	= 4,
> -		.ai_maxdata	= 0x0fff,
> -		.ai_fifo_depth	= 8192,
> -		.gainlkup	= ai_gain_611x,
> -		.ai_speed	= 100,
> -		.n_aochan	= 2,
> -		.ao_maxdata	= 0xffff,
> -		.ao_671x	= 1,
> -		.ao_fifo_depth	= 2048,
> -		.ao_speed	= 250,
> -		.reg_611x	= 1,
> -		/* XXX */
> -		.caldac		= { ad8804_debug, ad8804_debug, ad8804_debug },
> -	},
> -#endif
>  	[BOARD_PCI6711] = {
>  		.name = "pci-6711",
>  		.n_aochan	= 4,
> @@ -567,17 +530,6 @@ static const struct ni_board_struct ni_boards[] = {
>  		.reg_type	= ni_reg_6711,
>  		.caldac		= { ad8804_debug },
>  	},
> -#if 0
> -	[BOARD_PXI6731] = {	/* .device_id = ????, */
> -		.name		= "pxi-6731",
> -		.n_aochan	= 4,
> -		.ao_maxdata	= 0xffff,
> -		.ao_fifo_depth	= 8192,
> -		.ao_range_table	= &range_bipolar10,
> -		.reg_type	= ni_reg_6711,
> -		.caldac		= { ad8804_debug },
> -	},
> -#endif
>  	[BOARD_PCI6733] = {
>  		.name		= "pci-6733",
>  		.n_aochan	= 8,
> -- 
> 2.25.1
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ