* [PATCH RFC] staging: comedi: fix coding style issues
@ 2021-02-04 12:13 Ayush
2021-02-04 12:38 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Ayush @ 2021-02-04 12:13 UTC (permalink / raw)
To: gregkh, abbotti, hsweeten, grandmaster; +Cc: devel
fix IF_0 and IF_1 warnings by checkpatch.pl
Signed-off-by: Ayush <ayush@disroot.org>
---
compile tested only.
drivers/staging/comedi/drivers/dt2801.c | 29 -------------------------
1 file changed, 29 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
index 0d571d817b4e..bb01416084e4 100644
--- a/drivers/staging/comedi/drivers/dt2801.c
+++ b/drivers/staging/comedi/drivers/dt2801.c
@@ -87,17 +87,6 @@
#define DT2801_STATUS 1
#define DT2801_CMD 1
-#if 0
-/* ignore 'defined but not used' warning */
-static const struct comedi_lrange range_dt2801_ai_pgh_bipolar = {
- 4, {
- BIP_RANGE(10),
- BIP_RANGE(5),
- BIP_RANGE(2.5),
- BIP_RANGE(1.25)
- }
-};
-#endif
static const struct comedi_lrange range_dt2801_ai_pgl_bipolar = {
4, {
BIP_RANGE(10),
@@ -107,17 +96,6 @@ static const struct comedi_lrange range_dt2801_ai_pgl_bipolar = {
}
};
-#if 0
-/* ignore 'defined but not used' warning */
-static const struct comedi_lrange range_dt2801_ai_pgh_unipolar = {
- 4, {
- UNI_RANGE(10),
- UNI_RANGE(5),
- UNI_RANGE(2.5),
- UNI_RANGE(1.25)
- }
-};
-#endif
static const struct comedi_lrange range_dt2801_ai_pgl_unipolar = {
4, {
UNI_RANGE(10),
@@ -580,14 +558,7 @@ static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* ai subdevice */
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
-#if 1
s->n_chan = n_ai_chans;
-#else
- if (it->options[2])
- s->n_chan = board->ad_chan;
- else
- s->n_chan = board->ad_chan / 2;
-#endif
s->maxdata = (1 << board->adbits) - 1;
s->range_table = ai_range_lkup(board->adrangetype, it->options[3]);
s->insn_read = dt2801_ai_insn_read;
--
2.30.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RFC] staging: comedi: fix coding style issues
2021-02-04 12:13 [PATCH RFC] staging: comedi: fix coding style issues Ayush
@ 2021-02-04 12:38 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-02-04 12:38 UTC (permalink / raw)
To: Ayush; +Cc: devel, abbotti, grandmaster
On Thu, Feb 04, 2021 at 05:43:37PM +0530, Ayush wrote:
> fix IF_0 and IF_1 warnings by checkpatch.pl
What is that?
> Signed-off-by: Ayush <ayush@disroot.org>
> ---
> compile tested only.
When you send something with "RFC" that means you do not think it is
good enough to be merged, and so I will just delete it. Also, you did
not ask a question that you want to be answered, so why is this RFC?
>
> drivers/staging/comedi/drivers/dt2801.c | 29 -------------------------
> 1 file changed, 29 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
> index 0d571d817b4e..bb01416084e4 100644
> --- a/drivers/staging/comedi/drivers/dt2801.c
> +++ b/drivers/staging/comedi/drivers/dt2801.c
> @@ -87,17 +87,6 @@
> #define DT2801_STATUS 1
> #define DT2801_CMD 1
>
> -#if 0
> -/* ignore 'defined but not used' warning */
> -static const struct comedi_lrange range_dt2801_ai_pgh_bipolar = {
> - 4, {
> - BIP_RANGE(10),
> - BIP_RANGE(5),
> - BIP_RANGE(2.5),
> - BIP_RANGE(1.25)
> - }
> -};
> -#endif
Please leave these alone, it's good documentation.
thanks,
greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-04 12:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 12:13 [PATCH RFC] staging: comedi: fix coding style issues Ayush
2021-02-04 12:38 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.