tests: missing ; in if 0
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 tests: missing ; in if 0
Fix missing ; in commented out code
--- tests/sha1.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tests/sha1.c +1 -1
@@ -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++) {
Signature · 1 line
1.6.5.rc2
PATCH 2/2 hw/omap_dma: add matching {} in if 0
In reply to a message not in the archiveMULTI_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.
--- hw/omap_dma.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
hw/omap_dma.c +3 -1
@@ -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);
Signature · 1 line
1.6.5.rc2
Re: [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} in if 0
Quoted 23 lines · Michael S. Tsirkin
MULTI_REQis 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 <[email protected]>--- hw/omap_dma.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)hw/omap_dma.c +1
-1@@ -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 */
hw/omap_dma.c static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma) · line 677
Quoted 8 lines
hw/omap_dma.c +2
-0@@ -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 :)
Re: [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} in if 0
Quoted 32 lines · Markus Armbruster
Quoted 30 lines · Michael S. Tsirkin
MULTI_REQis 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 <[email protected]>--- hw/omap_dma.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)hw/omap_dma.c +3
-1@@ -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
Quoted 3 lines
hw/omap_dma.c static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma) · line 677
Quoted 1 line
hw/omap_dma.c +0
-0omap_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.
Signature · 1 line
MST
Re: [Qemu-devel] [PATCH 2/2] hw/omap_dma: add matching {} in if 0
Quoted 33 lines · Michael S. Tsirkin
Quoted 32 lines · Markus Armbruster
Quoted 30 lines · Michael S. Tsirkin
MULTI_REQis 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 <[email protected]>--- hw/omap_dma.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)hw/omap_dma.c +3
-1@@ -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
Quoted 6 lines
Quoted 3 lines
hw/omap_dma.c static void omap_dma_transfer_setup(struct soc_dma_ch_s *dma) · line 677
Quoted 1 line
hw/omap_dma.c +0
-0omap_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.