* [Qemu-devel] [PATCH 1/2] tests: missing ; in if 0
[not found] <cover.1254376223.git.mst@redhat.com>
@ 2009-10-01 5:51 ` Michael S. Tsirkin
2009-10-01 5:51 ` [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} " Michael S. Tsirkin
1 sibling, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2009-10-01 5:51 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
Fix missing ; in commented out code
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/sha1.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/sha1.c b/tests/sha1.c
index 2557344..3a76555 100644
--- a/tests/sha1.c
+++ b/tests/sha1.c
@@ -190,7 +190,7 @@ unsigned char c;
int j;
for (j = 0; j < 4; t >>= 8, j++)
- *--fcp = (unsigned char) t
+ *--fcp = (unsigned char) t;
}
#else
for (i = 0; i < 8; i++) {
--
1.6.5.rc2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} in if 0
[not found] <cover.1254376223.git.mst@redhat.com>
2009-10-01 5:51 ` [Qemu-devel] [PATCH 1/2] tests: missing ; in if 0 Michael S. Tsirkin
@ 2009-10-01 5:51 ` Michael S. Tsirkin
2009-10-01 13:05 ` Markus Armbruster
1 sibling, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2009-10-01 5:51 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
MULTI_REQ is never defined, so it doesn't matter much, but since we have
an if statement there, let's add {} to clarify what it should do if it's
uncommented.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/omap_dma.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/omap_dma.c b/hw/omap_dma.c
index 205d010..ab5e925 100644
--- a/hw/omap_dma.c
+++ b/hw/omap_dma.c
@@ -588,7 +588,7 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
#ifdef MULTI_REQ
/* TODO: should all of this only be done if dma->update, and otherwise
* inside omap_dma_transfer_generic below - check what's faster. */
- if (dma->update)
+ if (dma->update) {
#endif
/* If the channel is element synchronized, deactivate it */
@@ -670,6 +670,8 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
* bits on it. */
#ifndef MULTI_REQ
}
+#else
+ }
#endif
omap_dma_interrupts_update(s);
--
1.6.5.rc2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} in if 0
2009-10-01 5:51 ` [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} " Michael S. Tsirkin
@ 2009-10-01 13:05 ` Markus Armbruster
2009-10-01 13:10 ` Michael S. Tsirkin
0 siblings, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2009-10-01 13:05 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Blue Swirl, qemu-devel
"Michael S. Tsirkin" <mst@redhat.com> writes:
> MULTI_REQ is never defined, so it doesn't matter much, but since we have
> an if statement there, let's add {} to clarify what it should do if it's
> uncommented.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/omap_dma.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/hw/omap_dma.c b/hw/omap_dma.c
> index 205d010..ab5e925 100644
> --- a/hw/omap_dma.c
> +++ b/hw/omap_dma.c
> @@ -588,7 +588,7 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
> #ifdef MULTI_REQ
> /* TODO: should all of this only be done if dma->update, and otherwise
> * inside omap_dma_transfer_generic below - check what's faster. */
> - if (dma->update)
> + if (dma->update) {
> #endif
>
> /* If the channel is element synchronized, deactivate it */
> @@ -670,6 +670,8 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
> * bits on it. */
> #ifndef MULTI_REQ
> }
> +#else
> + }
> #endif
>
> omap_dma_interrupts_update(s);
Doesn't this look silly? Just close the brace :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} in if 0
2009-10-01 13:05 ` Markus Armbruster
@ 2009-10-01 13:10 ` Michael S. Tsirkin
2009-10-01 14:05 ` Markus Armbruster
0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2009-10-01 13:10 UTC (permalink / raw)
To: Markus Armbruster; +Cc: Blue Swirl, qemu-devel
On Thu, Oct 01, 2009 at 03:05:49PM +0200, Markus Armbruster wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
>
> > MULTI_REQ is never defined, so it doesn't matter much, but since we have
> > an if statement there, let's add {} to clarify what it should do if it's
> > uncommented.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > hw/omap_dma.c | 4 +++-
> > 1 files changed, 3 insertions(+), 1 deletions(-)
> >
> > diff --git a/hw/omap_dma.c b/hw/omap_dma.c
> > index 205d010..ab5e925 100644
> > --- a/hw/omap_dma.c
> > +++ b/hw/omap_dma.c
> > @@ -588,7 +588,7 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
> > #ifdef MULTI_REQ
> > /* TODO: should all of this only be done if dma->update, and otherwise
> > * inside omap_dma_transfer_generic below - check what's faster. */
> > - if (dma->update)
> > + if (dma->update) {
> > #endif
> >
> > /* If the channel is element synchronized, deactivate it */
> > @@ -670,6 +670,8 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
> > * bits on it. */
> > #ifndef MULTI_REQ
> > }
> > +#else
> > + }
> > #endif
> >
> > omap_dma_interrupts_update(s);
>
> Doesn't this look silly? Just close the brace :)
This way we get more {'s than }'s, which is even more ugly.
We probably should indent the text within if (dma->update) though.
--
MST
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} in if 0
2009-10-01 13:10 ` Michael S. Tsirkin
@ 2009-10-01 14:05 ` Markus Armbruster
0 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2009-10-01 14:05 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Blue Swirl, qemu-devel
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Thu, Oct 01, 2009 at 03:05:49PM +0200, Markus Armbruster wrote:
>> "Michael S. Tsirkin" <mst@redhat.com> writes:
>>
>> > MULTI_REQ is never defined, so it doesn't matter much, but since we have
>> > an if statement there, let's add {} to clarify what it should do if it's
>> > uncommented.
>> >
>> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> > ---
>> > hw/omap_dma.c | 4 +++-
>> > 1 files changed, 3 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/hw/omap_dma.c b/hw/omap_dma.c
>> > index 205d010..ab5e925 100644
>> > --- a/hw/omap_dma.c
>> > +++ b/hw/omap_dma.c
>> > @@ -588,7 +588,7 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
>> > #ifdef MULTI_REQ
>> > /* TODO: should all of this only be done if dma->update, and otherwise
>> > * inside omap_dma_transfer_generic below - check what's faster. */
>> > - if (dma->update)
>> > + if (dma->update) {
>> > #endif
>> >
>> > /* If the channel is element synchronized, deactivate it */
>> > @@ -670,6 +670,8 @@ static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma)
>> > * bits on it. */
>> > #ifndef MULTI_REQ
>> > }
>> > +#else
>> > + }
>> > #endif
>> >
>> > omap_dma_interrupts_update(s);
>>
>> Doesn't this look silly? Just close the brace :)
>
> This way we get more {'s than }'s, which is even more ugly.
> We probably should indent the text within if (dma->update) though.
I'd just kill the dead code, keep only the TODO comment.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-01 14:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1254376223.git.mst@redhat.com>
2009-10-01 5:51 ` [Qemu-devel] [PATCH 1/2] tests: missing ; in if 0 Michael S. Tsirkin
2009-10-01 5:51 ` [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} " Michael S. Tsirkin
2009-10-01 13:05 ` Markus Armbruster
2009-10-01 13:10 ` Michael S. Tsirkin
2009-10-01 14:05 ` Markus Armbruster
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.