mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Deepak R Varma <drv@mailo.com>
To: Sumitra Sharma <sumitraartsy@gmail.com>
Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com,
	outreachy@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] comedi: drivers: ni_pcimio: Remove the code enclosed by #if 0 and its #endif
Date: Fri, 10 Mar 2023 21:19:00 +0530	[thread overview]
Message-ID: <ZAtRbDYxNbFxQdI9@ubun2204.myguest.virtualbox.org> (raw)
In-Reply-To: <20230310140119.GA12544@ubuntu>

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@gmail.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
> 
> 



      reply	other threads:[~2023-03-10 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 14:01 Sumitra Sharma
2023-03-10 15:49 ` Deepak R Varma [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAtRbDYxNbFxQdI9@ubun2204.myguest.virtualbox.org \
    --to=drv@mailo.com \
    --cc=abbotti@mev.co.uk \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=outreachy@lists.linux.dev \
    --cc=sumitraartsy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®