LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 3.19.0-rc5 02/03] STAGING: Fix pcl818.c coding style issue: line over 80 characters
@ 2015-01-25 9:30 Simon Guo
2015-01-26 11:38 ` Ian Abbott
0 siblings, 1 reply; 4+ messages in thread
From: Simon Guo @ 2015-01-25 9:30 UTC (permalink / raw)
To: Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman
Cc: devel, linux-kernel, wei.guo.simon
Correct one coding style problem(detected by checkpatch.pl) in pcl818.c.
- line over 80 characters
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
---
drivers/staging/comedi/drivers/pcl818.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index 72a700c..0873617 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -304,9 +304,13 @@ static const struct pcl818_board boardtypes[] = {
struct pcl818_private {
struct comedi_isadma *dma;
- unsigned int ns_min; /* manimal allowed delay between samples (in us) for actual card */
+ unsigned int ns_min; /* manimal allowed delay between samples
+ * (in us) for actual card
+ */
int i8253_osc_base; /* 1/frequency of on board oscilator in ns */
- unsigned int act_chanlist[16]; /* MUX setting for actual AI operations */
+ unsigned int act_chanlist[16]; /* MUX setting for actual
+ * AI operations
+ */
unsigned int act_chanlist_len; /* how long is actual MUX list */
unsigned int act_chanlist_pos; /* actual position in MUX list */
unsigned int divisor1;
@@ -648,7 +652,8 @@ static int check_channel_list(struct comedi_device *dev,
break;
nowmustbechan =
(CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan;
- if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continuous :-( */
+ if (nowmustbechan != CR_CHAN(chanlist[i])) {
+ /* channel list isn't continuous :-( */
dev_dbg(dev->class_dev,
"channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n",
i, CR_CHAN(chanlist[i]), nowmustbechan,
@@ -1154,8 +1159,9 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->ns_min = board->ns_min;
if (!board->is_818) {
+ /* extended PCL718 to 100kHz DAC */
if ((it->options[6] == 1) || (it->options[6] == 100))
- devpriv->ns_min = 10000; /* extended PCL718 to 100kHz DAC */
+ devpriv->ns_min = 10000;
}
pcl818_reset(dev);
--
1.8.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3.19.0-rc5 02/03] STAGING: Fix pcl818.c coding style issue: line over 80 characters
2015-01-25 9:30 [PATCH 3.19.0-rc5 02/03] STAGING: Fix pcl818.c coding style issue: line over 80 characters Simon Guo
@ 2015-01-26 11:38 ` Ian Abbott
0 siblings, 0 replies; 4+ messages in thread
From: Ian Abbott @ 2015-01-26 11:38 UTC (permalink / raw)
To: Simon Guo, H Hartley Sweeten, Greg Kroah-Hartman; +Cc: devel, linux-kernel
On 25/01/15 09:30, Simon Guo wrote:
> Correct one coding style problem(detected by checkpatch.pl) in pcl818.c.
> - line over 80 characters
>
> Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
> ---
> drivers/staging/comedi/drivers/pcl818.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
> index 72a700c..0873617 100644
> --- a/drivers/staging/comedi/drivers/pcl818.c
> +++ b/drivers/staging/comedi/drivers/pcl818.c
> @@ -304,9 +304,13 @@ static const struct pcl818_board boardtypes[] = {
>
> struct pcl818_private {
> struct comedi_isadma *dma;
> - unsigned int ns_min; /* manimal allowed delay between samples (in us) for actual card */
> + unsigned int ns_min; /* manimal allowed delay between samples
> + * (in us) for actual card
> + */
I'm not entirely sure what the preferred way of wrapping those comments
is, but in other places in the comedi code we've been moving such
comments to the previous line.
> int i8253_osc_base; /* 1/frequency of on board oscilator in ns */
> - unsigned int act_chanlist[16]; /* MUX setting for actual AI operations */
> + unsigned int act_chanlist[16]; /* MUX setting for actual
> + * AI operations
> + */
> unsigned int act_chanlist_len; /* how long is actual MUX list */
> unsigned int act_chanlist_pos; /* actual position in MUX list */
> unsigned int divisor1;
> @@ -648,7 +652,8 @@ static int check_channel_list(struct comedi_device *dev,
> break;
> nowmustbechan =
> (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan;
> - if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continuous :-( */
> + if (nowmustbechan != CR_CHAN(chanlist[i])) {
> + /* channel list isn't continuous :-( */
> dev_dbg(dev->class_dev,
> "channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n",
> i, CR_CHAN(chanlist[i]), nowmustbechan,
> @@ -1154,8 +1159,9 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
> devpriv->ns_min = board->ns_min;
>
> if (!board->is_818) {
> + /* extended PCL718 to 100kHz DAC */
> if ((it->options[6] == 1) || (it->options[6] == 100))
> - devpriv->ns_min = 10000; /* extended PCL718 to 100kHz DAC */
> + devpriv->ns_min = 10000;
That comment really belongs inside the 'if' like this:
if ((it->options[6] == 1) || (it->options[6] == 100)) {
/* extended PCL718 to 100kHz DAC */
devpriv->ns_min = 10000;
}
> }
>
> pcl818_reset(dev);
>
--
-=( 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
* Re: [PATCH 3.19.0-rc5 02/03] STAGING: Fix pcl818.c coding style issue: line over 80 characters
2015-01-26 13:17 Simon Guo
@ 2015-01-26 14:47 ` Ian Abbott
0 siblings, 0 replies; 4+ messages in thread
From: Ian Abbott @ 2015-01-26 14:47 UTC (permalink / raw)
To: Simon Guo, H Hartley Sweeten, Greg Kroah-Hartman; +Cc: devel, linux-kernel
On 26/01/15 13:17, Simon Guo wrote:
> Correct one coding style problem(detected by checkpatch.pl) in pcl818.c.
> - line over 80 characters
>
> Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
> ---
> drivers/staging/comedi/drivers/pcl818.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
> index 5a005e5..bc8493f 100644
> --- a/drivers/staging/comedi/drivers/pcl818.c
> +++ b/drivers/staging/comedi/drivers/pcl818.c
> @@ -303,9 +303,11 @@ static const struct pcl818_board boardtypes[] = {
>
> struct pcl818_private {
> struct comedi_isadma *dma;
> - unsigned int ns_min; /* manimal allowed delay between samples (in us) for actual card */
> + /* manimal allowed delay between samples (in us) for actual card */
> + unsigned int ns_min;
> int i8253_osc_base; /* 1/frequency of on board oscilator in ns */
> - unsigned int act_chanlist[16]; /* MUX setting for actual AI operations */
> + /* MUX setting for actual AI operations */
> + unsigned int act_chanlist[16];
> unsigned int act_chanlist_len; /* how long is actual MUX list */
> unsigned int act_chanlist_pos; /* actual position in MUX list */
> unsigned int divisor1;
> @@ -647,7 +649,8 @@ static int check_channel_list(struct comedi_device *dev,
> break;
> nowmustbechan =
> (CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan;
> - if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continuous :-( */
> + if (nowmustbechan != CR_CHAN(chanlist[i])) {
> + /* channel list isn't continuous :-( */
> dev_dbg(dev->class_dev,
> "channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n",
> i, CR_CHAN(chanlist[i]), nowmustbechan,
> @@ -1153,8 +1156,10 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
> devpriv->ns_min = board->ns_min;
>
> if (!board->is_818) {
> - if ((it->options[6] == 1) || (it->options[6] == 100))
> - devpriv->ns_min = 10000; /* extended PCL718 to 100kHz DAC */
> + if ((it->options[6] == 1) || (it->options[6] == 100)) {
> + /* extended PCL718 to 100kHz DAC */
> + devpriv->ns_min = 10000;
> + }
> }
>
> pcl818_reset(dev);
>
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
* [PATCH 3.19.0-rc5 02/03] STAGING: Fix pcl818.c coding style issue: line over 80 characters
@ 2015-01-26 13:17 Simon Guo
2015-01-26 14:47 ` Ian Abbott
0 siblings, 1 reply; 4+ messages in thread
From: Simon Guo @ 2015-01-26 13:17 UTC (permalink / raw)
To: Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman
Cc: devel, linux-kernel, wei.guo.simon
Correct one coding style problem(detected by checkpatch.pl) in pcl818.c.
- line over 80 characters
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
---
drivers/staging/comedi/drivers/pcl818.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index 5a005e5..bc8493f 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -303,9 +303,11 @@ static const struct pcl818_board boardtypes[] = {
struct pcl818_private {
struct comedi_isadma *dma;
- unsigned int ns_min; /* manimal allowed delay between samples (in us) for actual card */
+ /* manimal allowed delay between samples (in us) for actual card */
+ unsigned int ns_min;
int i8253_osc_base; /* 1/frequency of on board oscilator in ns */
- unsigned int act_chanlist[16]; /* MUX setting for actual AI operations */
+ /* MUX setting for actual AI operations */
+ unsigned int act_chanlist[16];
unsigned int act_chanlist_len; /* how long is actual MUX list */
unsigned int act_chanlist_pos; /* actual position in MUX list */
unsigned int divisor1;
@@ -647,7 +649,8 @@ static int check_channel_list(struct comedi_device *dev,
break;
nowmustbechan =
(CR_CHAN(chansegment[i - 1]) + 1) % s->n_chan;
- if (nowmustbechan != CR_CHAN(chanlist[i])) { /* channel list isn't continuous :-( */
+ if (nowmustbechan != CR_CHAN(chanlist[i])) {
+ /* channel list isn't continuous :-( */
dev_dbg(dev->class_dev,
"channel list must be continuous! chanlist[%i]=%d but must be %d or %d!\n",
i, CR_CHAN(chanlist[i]), nowmustbechan,
@@ -1153,8 +1156,10 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->ns_min = board->ns_min;
if (!board->is_818) {
- if ((it->options[6] == 1) || (it->options[6] == 100))
- devpriv->ns_min = 10000; /* extended PCL718 to 100kHz DAC */
+ if ((it->options[6] == 1) || (it->options[6] == 100)) {
+ /* extended PCL718 to 100kHz DAC */
+ devpriv->ns_min = 10000;
+ }
}
pcl818_reset(dev);
--
1.8.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-26 14:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-25 9:30 [PATCH 3.19.0-rc5 02/03] STAGING: Fix pcl818.c coding style issue: line over 80 characters Simon Guo
2015-01-26 11:38 ` Ian Abbott
2015-01-26 13:17 Simon Guo
2015-01-26 14:47 ` 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).