* [PATCH V2] staging: comedi: dt2801: remove old unused code
@ 2020-03-10 18:14 Deepak R Varma
2020-03-10 18:22 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Deepak R Varma @ 2020-03-10 18:14 UTC (permalink / raw)
To: outreachy-kernel; +Cc: abbotti, hsweeten, gregkh, daniel.baluta
patch V2 revision is for updating the patch description only.
There are two #if 0 blocks that have no recent history of any change. We
can remove those code blocks for improved readability of the code.
Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
---
drivers/staging/comedi/drivers/dt2801.c | 22 ------------------
drivers/staging/comedi/drivers/dt282x.c | 30 +------------------------
2 files changed, 1 insertion(+), 51 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
index a29880981d81..aad02faa2f83 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),
diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c
index e15e33ed94ae..89dc84d3c803 100644
--- a/drivers/staging/comedi/drivers/dt282x.c
+++ b/drivers/staging/comedi/drivers/dt282x.c
@@ -484,14 +484,7 @@ static void dt282x_ai_dma_interrupt(struct comedi_device *dev,
s->async->events |= COMEDI_CB_EOA;
return;
}
-#if 0
- /* clear the dual dma flag, making this the last dma segment */
- /* XXX probably wrong */
- if (!devpriv->ntrig) {
- devpriv->supcsr &= ~DT2821_SUPCSR_DDMA;
- outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR_REG);
- }
-#endif
+
/* restart the channel */
dt282x_prep_ai_dma(dev, dma->cur_dma, 0);
@@ -534,28 +527,7 @@ static irqreturn_t dt282x_interrupt(int irq, void *d)
s_ao->async->events |= COMEDI_CB_ERROR;
handled = 1;
}
-#if 0
- if (adcsr & DT2821_ADCSR_ADDONE) {
- unsigned short data;
-
- data = inw(dev->iobase + DT2821_ADDAT_REG);
- data &= s->maxdata;
- if (devpriv->ad_2scomp)
- data = comedi_offset_munge(s, data);
- comedi_buf_write_samples(s, &data, 1);
-
- devpriv->nread--;
- if (!devpriv->nread) {
- s->async->events |= COMEDI_CB_EOA;
- } else {
- if (supcsr & DT2821_SUPCSR_SCDN)
- outw(devpriv->supcsr | DT2821_SUPCSR_STRIG,
- dev->iobase + DT2821_SUPCSR_REG);
- }
- handled = 1;
- }
-#endif
comedi_handle_events(dev, s);
if (s_ao)
comedi_handle_events(dev, s_ao);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH V2] staging: comedi: dt2801: remove old unused code
2020-03-10 18:14 [PATCH V2] staging: comedi: dt2801: remove old unused code Deepak R Varma
@ 2020-03-10 18:22 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2020-03-10 18:22 UTC (permalink / raw)
To: Deepak R Varma; +Cc: outreachy-kernel, abbotti, hsweeten, gregkh, daniel.baluta
On Tue, 10 Mar 2020, Deepak R Varma wrote:
> patch V2 revision is for updating the patch description only.
This is not the correct way to present the v2 of a patch.
The discussion of the difference as compared to the previous version
should go below the ---. The text above the --- will go in the git
history. The git history doesn't contain the v1, so the discussion about
how the current patch is different from the v1 is not relevant at that
point.
Please search for "Versioning one patch revision" in the tutorial:
https://kernelnewbies.org/FirstKernelPatch
> There are two #if 0 blocks that have no recent history of any change. We
> can remove those code blocks for improved readability of the code.
The log message should be written in the imperative.
Please look at some patches submitted by others to get a feel for how they
should be presented. You can look at the patches on this mailing list and
on lkml.org.
julia
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-10 18:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-10 18:14 [PATCH V2] staging: comedi: dt2801: remove old unused code Deepak R Varma
2020-03-10 18:22 ` [Outreachy kernel] " Julia Lawall
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.