* [PATCH v2 2/4] Staging: comedi: Fix WARNING issue in s626.c
@ 2016-05-20 6:21 Ravishankar Karkala Mallikarjunayya
0 siblings, 0 replies; 4+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2016-05-20 6:21 UTC (permalink / raw)
To: abbotti, hsweeten, gregkh
Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya
This is a patch to the s626.c file that fixes up a Block comments
issues found by the checkpatch.pl tool.
i.e. Block comments use a trailing */ on a separate line
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
---
Changes since V1:
- No change
---
drivers/staging/comedi/drivers/s626.c | 60 +++++++++++++++++++++++------------
1 file changed, 40 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index 6961550e..723504b 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -76,24 +76,38 @@ struct s626_buffer_dma {
struct s626_private {
u8 ai_cmd_running; /* ai_cmd is running */
- unsigned int ai_sample_timer; /* time between samples in
- * units of the timer */
+ unsigned int ai_sample_timer; /*
+ * time between samples in
+ * units of the timer
+ */
int ai_convert_count; /* conversion counter */
- unsigned int ai_convert_timer; /* time between conversion in
- * units of the timer */
- u16 counter_int_enabs; /* counter interrupt enable mask
- * for MISC2 register */
+ unsigned int ai_convert_timer; /*
+ * time between conversion in
+ * units of the timer
+ */
+ u16 counter_int_enabs; /*
+ * counter interrupt enable mask
+ * for MISC2 register
+ */
u8 adc_items; /* number of items in ADC poll list */
- struct s626_buffer_dma rps_buf; /* DMA buffer used to hold ADC (RPS1)
- * program */
- struct s626_buffer_dma ana_buf; /* DMA buffer used to receive ADC data
- * and hold DAC data */
- u32 *dac_wbuf; /* pointer to logical adrs of DMA buffer
- * used to hold DAC data */
+ struct s626_buffer_dma rps_buf; /*
+ * DMA buffer used to hold ADC (RPS1)
+ * program
+ */
+ struct s626_buffer_dma ana_buf; /*
+ * DMA buffer used to receive ADC data
+ * and hold DAC data
+ */
+ u32 *dac_wbuf; /*
+ * pointer to logical adrs of DMA buffer
+ * used to hold DAC data
+ */
u16 dacpol; /* image of DAC polarity register */
u8 trim_setpoint[12]; /* images of TrimDAC setpoints */
- u32 i2c_adrs; /* I2C device address for onboard EEPROM
- * (board rev dependent) */
+ u32 i2c_adrs; /*
+ * I2C device address for onboard EEPROM
+ * (board rev dependent)
+ */
};
/* Counter overflow/index event flag masks for RDMISC2. */
@@ -571,12 +585,18 @@ static int s626_set_dac(struct comedi_device *dev,
* to a non-existent TrimDac channel) that serves to keep the clock
* running after the packet has been sent to the target DAC.
*/
- val = 0x0F000000; /* Continue clock after target DAC data
- * (write to non-existent trimdac). */
- val |= 0x00004000; /* Address the two main dual-DAC devices
- * (TSL's chip select enables target device). */
- val |= ((uint32_t)(chan & 1) << 15); /* Address the DAC channel
- * within the device. */
+ val = 0x0F000000; /*
+ * Continue clock after target DAC data
+ * (write to non-existent trimdac).
+ */
+ val |= 0x00004000; /*
+ * Address the two main dual-DAC devices
+ * (TSL's chip select enables target device).
+ */
+ val |= ((uint32_t)(chan & 1) << 15); /*
+ * Address the DAC channel
+ * within the device.
+ */
val |= (uint32_t)dacdata; /* Include DAC setpoint data. */
return s626_send_dac(dev, val);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/4] Staging: comedi: Fix WARNING issue in s626.c
2016-05-28 5:26 [PATCH v2 1/4] staging : comedi : fix type issues " Ravishankar Karkala Mallikarjunayya
@ 2016-05-28 5:26 ` Ravishankar Karkala Mallikarjunayya
2016-05-30 14:11 ` Luis de Bethencourt
2016-05-31 10:30 ` Ian Abbott
0 siblings, 2 replies; 4+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2016-05-28 5:26 UTC (permalink / raw)
To: abbotti, hsweeten, gregkh
Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya
This is a patch to the s626.c file that fixes up a Block comments
issues found by the checkpatch.pl tool.
i.e. Block comments use a trailing */ on a separate line
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
---
changes since v1: No change
---
drivers/staging/comedi/drivers/s626.c | 60 +++++++++++++++++++++++------------
1 file changed, 40 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index a399d7b..edcd466 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -76,24 +76,38 @@ struct s626_buffer_dma {
struct s626_private {
u8 ai_cmd_running; /* ai_cmd is running */
- unsigned int ai_sample_timer; /* time between samples in
- * units of the timer */
+ unsigned int ai_sample_timer; /*
+ * time between samples in
+ * units of the timer
+ */
int ai_convert_count; /* conversion counter */
- unsigned int ai_convert_timer; /* time between conversion in
- * units of the timer */
- u16 counter_int_enabs; /* counter interrupt enable mask
- * for MISC2 register */
+ unsigned int ai_convert_timer; /*
+ * time between conversion in
+ * units of the timer
+ */
+ u16 counter_int_enabs; /*
+ * counter interrupt enable mask
+ * for MISC2 register
+ */
u8 adc_items; /* number of items in ADC poll list */
- struct s626_buffer_dma rps_buf; /* DMA buffer used to hold ADC (RPS1)
- * program */
- struct s626_buffer_dma ana_buf; /* DMA buffer used to receive ADC data
- * and hold DAC data */
- u32 *dac_wbuf; /* pointer to logical adrs of DMA buffer
- * used to hold DAC data */
+ struct s626_buffer_dma rps_buf; /*
+ * DMA buffer used to hold ADC (RPS1)
+ * program
+ */
+ struct s626_buffer_dma ana_buf; /*
+ * DMA buffer used to receive ADC data
+ * and hold DAC data
+ */
+ u32 *dac_wbuf; /*
+ * pointer to logical adrs of DMA buffer
+ * used to hold DAC data
+ */
u16 dacpol; /* image of DAC polarity register */
u8 trim_setpoint[12]; /* images of TrimDAC setpoints */
- u32 i2c_adrs; /* I2C device address for onboard EEPROM
- * (board rev dependent) */
+ u32 i2c_adrs; /*
+ * I2C device address for onboard EEPROM
+ * (board rev dependent)
+ */
};
/* Counter overflow/index event flag masks for RDMISC2. */
@@ -571,12 +585,18 @@ static int s626_set_dac(struct comedi_device *dev,
* to a non-existent TrimDac channel) that serves to keep the clock
* running after the packet has been sent to the target DAC.
*/
- val = 0x0F000000; /* Continue clock after target DAC data
- * (write to non-existent trimdac). */
- val |= 0x00004000; /* Address the two main dual-DAC devices
- * (TSL's chip select enables target device). */
- val |= ((u32)(chan & 1) << 15); /* Address the DAC channel
- * within the device. */
+ val = 0x0F000000; /*
+ * Continue clock after target DAC data
+ * (write to non-existent trimdac).
+ */
+ val |= 0x00004000; /*
+ * Address the two main dual-DAC devices
+ * (TSL's chip select enables target device).
+ */
+ val |= ((u32)(chan & 1) << 15); /*
+ * Address the DAC channel
+ * within the device.
+ */
val |= (u32)dacdata; /* Include DAC setpoint data. */
return s626_send_dac(dev, val);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/4] Staging: comedi: Fix WARNING issue in s626.c
2016-05-28 5:26 ` [PATCH v2 2/4] Staging: comedi: Fix WARNING issue " Ravishankar Karkala Mallikarjunayya
@ 2016-05-30 14:11 ` Luis de Bethencourt
2016-05-31 10:30 ` Ian Abbott
1 sibling, 0 replies; 4+ messages in thread
From: Luis de Bethencourt @ 2016-05-30 14:11 UTC (permalink / raw)
To: Ravishankar Karkala Mallikarjunayya, abbotti, hsweeten, gregkh
Cc: devel, linux-kernel
On 28/05/16 06:26, Ravishankar Karkala Mallikarjunayya wrote:
> This is a patch to the s626.c file that fixes up a Block comments
> issues found by the checkpatch.pl tool.
>
> i.e. Block comments use a trailing */ on a separate line
>
> Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
We can see in the diff this is making changes in s626.c :) no need to mention
that in the commit message.
Not sure moving the opening and closing of comments (/* and */) to a new line
makes things more readable. checkpatch is a great tool but it gives suggestions,
not hard rules.
Just a comment since I've seen multiple people follow checkpatch blindly, and
it is best to use your discretion.
Maintainer of this code will probably have a preference.
Thank you for your patches Ravishankar.
Luis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/4] Staging: comedi: Fix WARNING issue in s626.c
2016-05-28 5:26 ` [PATCH v2 2/4] Staging: comedi: Fix WARNING issue " Ravishankar Karkala Mallikarjunayya
2016-05-30 14:11 ` Luis de Bethencourt
@ 2016-05-31 10:30 ` Ian Abbott
1 sibling, 0 replies; 4+ messages in thread
From: Ian Abbott @ 2016-05-31 10:30 UTC (permalink / raw)
To: Ravishankar Karkala Mallikarjunayya, hsweeten, gregkh; +Cc: devel, linux-kernel
On 28/05/16 06:26, Ravishankar Karkala Mallikarjunayya wrote:
> This is a patch to the s626.c file that fixes up a Block comments
> issues found by the checkpatch.pl tool.
>
> i.e. Block comments use a trailing */ on a separate line
>
> Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
> ---
> changes since v1: No change
> ---
> drivers/staging/comedi/drivers/s626.c | 60 +++++++++++++++++++++++------------
> 1 file changed, 40 insertions(+), 20 deletions(-)
>
Thanks!
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-31 10:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 6:21 [PATCH v2 2/4] Staging: comedi: Fix WARNING issue in s626.c Ravishankar Karkala Mallikarjunayya
-- strict thread matches above, loose matches on Subject: below --
2016-05-28 5:26 [PATCH v2 1/4] staging : comedi : fix type issues " Ravishankar Karkala Mallikarjunayya
2016-05-28 5:26 ` [PATCH v2 2/4] Staging: comedi: Fix WARNING issue " Ravishankar Karkala Mallikarjunayya
2016-05-30 14:11 ` Luis de Bethencourt
2016-05-31 10:30 ` Ian Abbott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).