* [PATCH] ioat: fail self-test if wait_for_completion times out
@ 2014-12-28 10:37 Nicholas Mc Guire
2015-01-02 11:47 ` Prarit Bhargava
2015-01-05 16:51 ` Jiang, Dave
0 siblings, 2 replies; 8+ messages in thread
From: Nicholas Mc Guire @ 2014-12-28 10:37 UTC (permalink / raw)
To: Vinod Koul
Cc: Dan Williams, Prarit Bhargava, Josh Triplett, Rashika, Dave Jiang,
dmaengine, linux-kernel, Nicholas Mc Guire
wait_for_completion_timeout reaching timeout was being ignored,
fail the self-test if timeout condition occurs.
Not sure about the indentations used (CodingStyle:Chapter 2)
this was only compile tested with
x86_64_defconfig + CONFIG_DMA_ENGINE=y + CONFIG_INTEL_IOATDMA=y
patch is against linux-next 3.19.0-rc1 -next-20141226
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
drivers/dma/ioat/dma_v3.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index be307182..0659215 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1311,7 +1311,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
- if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
+ if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
+ != DMA_COMPLETE) {
dev_err(dev, "Self-test xor timed out\n");
err = -ENODEV;
goto dma_unmap;
@@ -1377,7 +1378,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
- if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
+ if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
+ != DMA_COMPLETE) {
dev_err(dev, "Self-test validate timed out\n");
err = -ENODEV;
goto dma_unmap;
@@ -1429,7 +1431,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
- if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
+ if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
+ != DMA_COMPLETE) {
dev_err(dev, "Self-test 2nd validate timed out\n");
err = -ENODEV;
goto dma_unmap;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ioat: fail self-test if wait_for_completion times out
2014-12-28 10:37 [PATCH] ioat: fail self-test if wait_for_completion times out Nicholas Mc Guire
@ 2015-01-02 11:47 ` Prarit Bhargava
2015-01-05 16:51 ` Jiang, Dave
1 sibling, 0 replies; 8+ messages in thread
From: Prarit Bhargava @ 2015-01-02 11:47 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Vinod Koul, Dan Williams, Josh Triplett, Rashika, Dave Jiang,
dmaengine, linux-kernel
On 12/28/2014 05:37 AM, Nicholas Mc Guire wrote:
> wait_for_completion_timeout reaching timeout was being ignored,
> fail the self-test if timeout condition occurs.
>
> Not sure about the indentations used (CodingStyle:Chapter 2)
>
> this was only compile tested with
> x86_64_defconfig + CONFIG_DMA_ENGINE=y + CONFIG_INTEL_IOATDMA=y
>
> patch is against linux-next 3.19.0-rc1 -next-20141226
>
Seems straightforward to me, although I don't think I've ever seen a failure in
this code.
Acked-by: Prarit Bhargava <prarit@redhat.com>
P.
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> ---
> drivers/dma/ioat/dma_v3.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
> index be307182..0659215 100644
> --- a/drivers/dma/ioat/dma_v3.c
> +++ b/drivers/dma/ioat/dma_v3.c
> @@ -1311,7 +1311,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
>
> tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
>
> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> + != DMA_COMPLETE) {
> dev_err(dev, "Self-test xor timed out\n");
> err = -ENODEV;
> goto dma_unmap;
> @@ -1377,7 +1378,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
>
> tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
>
> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> + != DMA_COMPLETE) {
> dev_err(dev, "Self-test validate timed out\n");
> err = -ENODEV;
> goto dma_unmap;
> @@ -1429,7 +1431,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
>
> tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
>
> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> + != DMA_COMPLETE) {
> dev_err(dev, "Self-test 2nd validate timed out\n");
> err = -ENODEV;
> goto dma_unmap;
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ioat: fail self-test if wait_for_completion times out
2014-12-28 10:37 [PATCH] ioat: fail self-test if wait_for_completion times out Nicholas Mc Guire
2015-01-02 11:47 ` Prarit Bhargava
@ 2015-01-05 16:51 ` Jiang, Dave
2015-01-06 0:42 ` Nicholas Mc Guire
1 sibling, 1 reply; 8+ messages in thread
From: Jiang, Dave @ 2015-01-05 16:51 UTC (permalink / raw)
To: der.herr@hofr.at
Cc: Williams, Dan J, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, rashika.kheria@gmail.com,
Koul, Vinod, prarit@redhat.com, josh@joshtriplett.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2377 bytes --]
On Sun, 2014-12-28 at 10:37 +0000, Nicholas Mc Guire wrote:
> wait_for_completion_timeout reaching timeout was being ignored,
> fail the self-test if timeout condition occurs.
>
> Not sure about the indentations used (CodingStyle:Chapter 2)
>
> this was only compile tested with
> x86_64_defconfig + CONFIG_DMA_ENGINE=y + CONFIG_INTEL_IOATDMA=y
>
> patch is against linux-next 3.19.0-rc1 -next-20141226
>
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> ---
> drivers/dma/ioat/dma_v3.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
> index be307182..0659215 100644
> --- a/drivers/dma/ioat/dma_v3.c
> +++ b/drivers/dma/ioat/dma_v3.c
> @@ -1311,7 +1311,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
>
> tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
>
> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> + != DMA_COMPLETE) {
> dev_err(dev, "Self-test xor timed out\n");
> err = -ENODEV;
> goto dma_unmap;
> @@ -1377,7 +1378,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
>
> tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
>
> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> + != DMA_COMPLETE) {
Can you please do:
+ if (tmo == 0 ||
+ dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
Otherwise it looks good. Although I've never hit that error condition either.
> dev_err(dev, "Self-test validate timed out\n");
> err = -ENODEV;
> goto dma_unmap;
> @@ -1429,7 +1431,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
>
> tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
>
> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> + != DMA_COMPLETE) {
> dev_err(dev, "Self-test 2nd validate timed out\n");
> err = -ENODEV;
> goto dma_unmap;
> --
> 1.7.10.4
>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ioat: fail self-test if wait_for_completion times out
2015-01-05 16:51 ` Jiang, Dave
@ 2015-01-06 0:42 ` Nicholas Mc Guire
2015-01-06 15:38 ` Jiang, Dave
0 siblings, 1 reply; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-01-06 0:42 UTC (permalink / raw)
To: Jiang, Dave
Cc: Williams, Dan J, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, rashika.kheria@gmail.com,
Koul, Vinod, prarit@redhat.com, josh@joshtriplett.org
On Mon, 05 Jan 2015, Jiang, Dave wrote:
>
>
>
> On Sun, 2014-12-28 at 10:37 +0000, Nicholas Mc Guire wrote:
> > wait_for_completion_timeout reaching timeout was being ignored,
> > fail the self-test if timeout condition occurs.
> >
> > Not sure about the indentations used (CodingStyle:Chapter 2)
> >
> > this was only compile tested with
> > x86_64_defconfig + CONFIG_DMA_ENGINE=y + CONFIG_INTEL_IOATDMA=y
> >
> > patch is against linux-next 3.19.0-rc1 -next-20141226
> >
> > Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> > ---
> > drivers/dma/ioat/dma_v3.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
> > index be307182..0659215 100644
> > --- a/drivers/dma/ioat/dma_v3.c
> > +++ b/drivers/dma/ioat/dma_v3.c
> > @@ -1311,7 +1311,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
> >
> > tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
> >
> > - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > + != DMA_COMPLETE) {
> > dev_err(dev, "Self-test xor timed out\n");
> > err = -ENODEV;
> > goto dma_unmap;
> > @@ -1377,7 +1378,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
> >
> > tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
> >
> > - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > + != DMA_COMPLETE) {
>
> Can you please do:
> + if (tmo == 0 ||
> + dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
Documentation/CodingStyle:Chapter 2
"Statements longer than 80 columns will be broken into sensible chunks, unless
exceeding 80 columns significantly increases readability and does not hide
information. Descendants are always substantially shorter than the parent and
are placed substantially to the right. The same applies to function headers..."
am I misreading the CodingStyle here ?
>
> Otherwise it looks good. Although I've never hit that error condition either.
>
> > dev_err(dev, "Self-test validate timed out\n");
> > err = -ENODEV;
> > goto dma_unmap;
> > @@ -1429,7 +1431,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
> >
> > tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
> >
> > - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > + != DMA_COMPLETE) {
> > dev_err(dev, "Self-test 2nd validate timed out\n");
> > err = -ENODEV;
> > goto dma_unmap;
> > --
> > 1.7.10.4
> >
thx!
hofrat
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ioat: fail self-test if wait_for_completion times out
2015-01-06 0:42 ` Nicholas Mc Guire
@ 2015-01-06 15:38 ` Jiang, Dave
2015-01-07 12:46 ` Prarit Bhargava
0 siblings, 1 reply; 8+ messages in thread
From: Jiang, Dave @ 2015-01-06 15:38 UTC (permalink / raw)
To: der.herr@hofr.at
Cc: Williams, Dan J, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, rashika.kheria@gmail.com,
Koul, Vinod, prarit@redhat.com, josh@joshtriplett.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3556 bytes --]
On Tue, 2015-01-06 at 00:42 +0000, Nicholas Mc Guire wrote:
> On Mon, 05 Jan 2015, Jiang, Dave wrote:
>
> >
> >
> >
> > On Sun, 2014-12-28 at 10:37 +0000, Nicholas Mc Guire wrote:
> > > wait_for_completion_timeout reaching timeout was being ignored,
> > > fail the self-test if timeout condition occurs.
> > >
> > > Not sure about the indentations used (CodingStyle:Chapter 2)
> > >
> > > this was only compile tested with
> > > x86_64_defconfig + CONFIG_DMA_ENGINE=y + CONFIG_INTEL_IOATDMA=y
> > >
> > > patch is against linux-next 3.19.0-rc1 -next-20141226
> > >
> > > Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> > > ---
> > > drivers/dma/ioat/dma_v3.c | 9 ++++++---
> > > 1 file changed, 6 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
> > > index be307182..0659215 100644
> > > --- a/drivers/dma/ioat/dma_v3.c
> > > +++ b/drivers/dma/ioat/dma_v3.c
> > > @@ -1311,7 +1311,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
> > >
> > > tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
> > >
> > > - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > > + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > > + != DMA_COMPLETE) {
> > > dev_err(dev, "Self-test xor timed out\n");
> > > err = -ENODEV;
> > > goto dma_unmap;
> > > @@ -1377,7 +1378,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
> > >
> > > tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
> > >
> > > - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > > + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > > + != DMA_COMPLETE) {
> >
> > Can you please do:
> > + if (tmo == 0 ||
> > + dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
>
> Documentation/CodingStyle:Chapter 2
>
> "Statements longer than 80 columns will be broken into sensible chunks, unless
> exceeding 80 columns significantly increases readability and does not hide
> information. Descendants are always substantially shorter than the parent and
> are placed substantially to the right. The same applies to function headers..."
>
> am I misreading the CodingStyle here ?
I'm not sure what the issue is here.... What I proposed is still the
same length as the original code. And what I suggested complies with the
existing coding style that's already there.
>
> >
> > Otherwise it looks good. Although I've never hit that error condition either.
> >
> > > dev_err(dev, "Self-test validate timed out\n");
> > > err = -ENODEV;
> > > goto dma_unmap;
> > > @@ -1429,7 +1431,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)
> > >
> > > tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000));
> > >
> > > - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > > + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > > + != DMA_COMPLETE) {
> > > dev_err(dev, "Self-test 2nd validate timed out\n");
> > > err = -ENODEV;
> > > goto dma_unmap;
> > > --
> > > 1.7.10.4
> > >
>
> thx!
> hofrat
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ioat: fail self-test if wait_for_completion times out
2015-01-06 15:38 ` Jiang, Dave
@ 2015-01-07 12:46 ` Prarit Bhargava
2015-01-07 13:09 ` Nicholas Mc Guire
0 siblings, 1 reply; 8+ messages in thread
From: Prarit Bhargava @ 2015-01-07 12:46 UTC (permalink / raw)
To: Jiang, Dave
Cc: der.herr@hofr.at, Williams, Dan J, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, rashika.kheria@gmail.com,
Koul, Vinod, josh@joshtriplett.org
On 01/06/2015 10:38 AM, Jiang, Dave wrote:
>>>> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
>>>> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
>>>> + != DMA_COMPLETE) {
>>>
>>> Can you please do:
>>> + if (tmo == 0 ||
>>> + dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
>>
>> Documentation/CodingStyle:Chapter 2
>>
>> "Statements longer than 80 columns will be broken into sensible chunks, unless
>> exceeding 80 columns significantly increases readability and does not hide
>> information. Descendants are always substantially shorter than the parent and
>> are placed substantially to the right. The same applies to function headers..."
>>
>> am I misreading the CodingStyle here ?
>
> I'm not sure what the issue is here.... What I proposed is still the
> same length as the original code. And what I suggested complies with the
> existing coding style that's already there.
Ugh ... I missed this obvious CodingStyle error.
What Dave is trying to say is that he (and I'm pretty sure everyone else
for that matter) disagree with you style change because you have not broken
the columns into "sensible chunks".
IOW ... this,
if (tmo == 0 ||
dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
is much easier to comprehend than this,
if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
!= DMA_COMPLETE) {
P.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ioat: fail self-test if wait_for_completion times out
2015-01-07 12:46 ` Prarit Bhargava
@ 2015-01-07 13:09 ` Nicholas Mc Guire
2015-01-07 16:22 ` Jiang, Dave
0 siblings, 1 reply; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-01-07 13:09 UTC (permalink / raw)
To: Prarit Bhargava
Cc: Jiang, Dave, Williams, Dan J, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, rashika.kheria@gmail.com,
Koul, Vinod, josh@joshtriplett.org
On Wed, 07 Jan 2015, Prarit Bhargava wrote:
>
>
> On 01/06/2015 10:38 AM, Jiang, Dave wrote:
> >>>> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> >>>> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> >>>> + != DMA_COMPLETE) {
> >>>
> >>> Can you please do:
> >>> + if (tmo == 0 ||
> >>> + dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> >>
> >> Documentation/CodingStyle:Chapter 2
> >>
> >> "Statements longer than 80 columns will be broken into sensible chunks, unless
> >> exceeding 80 columns significantly increases readability and does not hide
> >> information. Descendants are always substantially shorter than the parent and
> >> are placed substantially to the right. The same applies to function headers..."
> >>
> >> am I misreading the CodingStyle here ?
> >
> > I'm not sure what the issue is here.... What I proposed is still the
> > same length as the original code. And what I suggested complies with the
> > existing coding style that's already there.
>
> Ugh ... I missed this obvious CodingStyle error.
>
> What Dave is trying to say is that he (and I'm pretty sure everyone else
> for that matter) disagree with you style change because you have not broken
> the columns into "sensible chunks".
>
> IOW ... this,
>
> if (tmo == 0 ||
> dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
>
> is much easier to comprehend than this,
>
> if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> != DMA_COMPLETE) {
>
agreed - it was just not clear to me how strict things should
be applied - e.g. the indentation with spaces - will cleanup and
resend.
thx!
hofrat
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ioat: fail self-test if wait_for_completion times out
2015-01-07 13:09 ` Nicholas Mc Guire
@ 2015-01-07 16:22 ` Jiang, Dave
0 siblings, 0 replies; 8+ messages in thread
From: Jiang, Dave @ 2015-01-07 16:22 UTC (permalink / raw)
To: der.herr@hofr.at
Cc: Williams, Dan J, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, rashika.kheria@gmail.com,
prarit@redhat.com, Koul, Vinod, josh@joshtriplett.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2184 bytes --]
On Wed, 2015-01-07 at 13:09 +0000, Nicholas Mc Guire wrote:
> On Wed, 07 Jan 2015, Prarit Bhargava wrote:
>
> >
> >
> > On 01/06/2015 10:38 AM, Jiang, Dave wrote:
> > >>>> - if (dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > >>>> + if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > >>>> + != DMA_COMPLETE) {
> > >>>
> > >>> Can you please do:
> > >>> + if (tmo == 0 ||
> > >>> + dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> > >>
> > >> Documentation/CodingStyle:Chapter 2
> > >>
> > >> "Statements longer than 80 columns will be broken into sensible chunks, unless
> > >> exceeding 80 columns significantly increases readability and does not hide
> > >> information. Descendants are always substantially shorter than the parent and
> > >> are placed substantially to the right. The same applies to function headers..."
> > >>
> > >> am I misreading the CodingStyle here ?
> > >
> > > I'm not sure what the issue is here.... What I proposed is still the
> > > same length as the original code. And what I suggested complies with the
> > > existing coding style that's already there.
> >
> > Ugh ... I missed this obvious CodingStyle error.
> >
> > What Dave is trying to say is that he (and I'm pretty sure everyone else
> > for that matter) disagree with you style change because you have not broken
> > the columns into "sensible chunks".
> >
> > IOW ... this,
> >
> > if (tmo == 0 ||
> > dma->device_tx_status(dma_chan, cookie, NULL) != DMA_COMPLETE) {
> >
> > is much easier to comprehend than this,
> >
> > if (tmo == 0 || dma->device_tx_status(dma_chan, cookie, NULL)
> > != DMA_COMPLETE) {
> >
> agreed - it was just not clear to me how strict things should
> be applied - e.g. the indentation with spaces - will cleanup and
> resend.
Thank you. In general as a rule of thumb, apply coding style that's
consistent with the code that's already there. That makes it easy for
readability because it does not deviate from the whole.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-01-07 16:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-28 10:37 [PATCH] ioat: fail self-test if wait_for_completion times out Nicholas Mc Guire
2015-01-02 11:47 ` Prarit Bhargava
2015-01-05 16:51 ` Jiang, Dave
2015-01-06 0:42 ` Nicholas Mc Guire
2015-01-06 15:38 ` Jiang, Dave
2015-01-07 12:46 ` Prarit Bhargava
2015-01-07 13:09 ` Nicholas Mc Guire
2015-01-07 16:22 ` Jiang, Dave
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).