diff mbox series

hw/display/cirrus_vga: Fix code mis-indentation

Message ID 20200529165436.23573-1-f4bug@amsat.org
State New
Headers show
Series hw/display/cirrus_vga: Fix code mis-indentation | expand

Commit Message

Philippe Mathieu-Daudé May 29, 2020, 4:54 p.m. UTC
While replacing fprintf() by qemu_log_mask() in commit
2b55f4d3504, we incorrectly used a 'tab = 4 spaces'
alignment, leading to misindented new code. Fix now.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/display/cirrus_vga.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Thomas Huth May 30, 2020, 5:41 p.m. UTC | #1
On 29/05/2020 18.54, Philippe Mathieu-Daudé wrote:
> While replacing fprintf() by qemu_log_mask() in commit
> 2b55f4d3504, we incorrectly used a 'tab = 4 spaces'
> alignment, leading to misindented new code. Fix now.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/display/cirrus_vga.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
> index 92c197cdde..212d6f5e61 100644
> --- a/hw/display/cirrus_vga.c
> +++ b/hw/display/cirrus_vga.c
> @@ -1032,9 +1032,9 @@ static void cirrus_bitblt_start(CirrusVGAState * s)
>          } else {
>  	    if (s->cirrus_blt_mode & CIRRUS_BLTMODE_TRANSPARENTCOMP) {
>  		if (s->cirrus_blt_pixelwidth > 2) {
> -            qemu_log_mask(LOG_GUEST_ERROR,
> -                          "cirrus: src transparent without colorexpand "
> -                          "must be 8bpp or 16bpp\n");
> +                    qemu_log_mask(LOG_GUEST_ERROR,
> +                                  "cirrus: src transparent without colorexpand "
> +                                  "must be 8bpp or 16bpp\n");
>  		    goto bitblt_ignore;
>  		}
>  		if (s->cirrus_blt_mode & CIRRUS_BLTMODE_BACKWARDS) {
> 

I think it would be better to fix the TABs in the whole surounding area,
too. Or maybe even in the whole file. Otherwise this problem will happen
soon again...

 Thomas
Philippe Mathieu-Daudé June 3, 2020, 6:13 a.m. UTC | #2
On 5/30/20 7:41 PM, Thomas Huth wrote:
> On 29/05/2020 18.54, Philippe Mathieu-Daudé wrote:
>> While replacing fprintf() by qemu_log_mask() in commit
>> 2b55f4d3504, we incorrectly used a 'tab = 4 spaces'
>> alignment, leading to misindented new code. Fix now.
>>
>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>  hw/display/cirrus_vga.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
>> index 92c197cdde..212d6f5e61 100644
>> --- a/hw/display/cirrus_vga.c
>> +++ b/hw/display/cirrus_vga.c
>> @@ -1032,9 +1032,9 @@ static void cirrus_bitblt_start(CirrusVGAState * s)
>>          } else {
>>  	    if (s->cirrus_blt_mode & CIRRUS_BLTMODE_TRANSPARENTCOMP) {
>>  		if (s->cirrus_blt_pixelwidth > 2) {
>> -            qemu_log_mask(LOG_GUEST_ERROR,
>> -                          "cirrus: src transparent without colorexpand "
>> -                          "must be 8bpp or 16bpp\n");
>> +                    qemu_log_mask(LOG_GUEST_ERROR,
>> +                                  "cirrus: src transparent without colorexpand "
>> +                                  "must be 8bpp or 16bpp\n");
>>  		    goto bitblt_ignore;
>>  		}
>>  		if (s->cirrus_blt_mode & CIRRUS_BLTMODE_BACKWARDS) {
>>
> 
> I think it would be better to fix the TABs in the whole surounding area,
> too. Or maybe even in the whole file. Otherwise this problem will happen
> soon again...

Well, this is a small step to unbreak alignment mistake from latest pull
request because my editor was using a 1tab=4spaces configuration, and
QEMU style expects 1tab=8spaces:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg707941.html

Fixing the whole area is a different task IMO :)

Can this go via qemu-trivial?

> 
>  Thomas
> 
>
Gerd Hoffmann June 5, 2020, 7:17 a.m. UTC | #3
On Fri, May 29, 2020 at 06:54:36PM +0200, Philippe Mathieu-Daudé wrote:
> While replacing fprintf() by qemu_log_mask() in commit
> 2b55f4d3504, we incorrectly used a 'tab = 4 spaces'
> alignment, leading to misindented new code. Fix now.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Added to vga queue.

thanks,
  Gerd
diff mbox series

Patch

diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 92c197cdde..212d6f5e61 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -1032,9 +1032,9 @@  static void cirrus_bitblt_start(CirrusVGAState * s)
         } else {
 	    if (s->cirrus_blt_mode & CIRRUS_BLTMODE_TRANSPARENTCOMP) {
 		if (s->cirrus_blt_pixelwidth > 2) {
-            qemu_log_mask(LOG_GUEST_ERROR,
-                          "cirrus: src transparent without colorexpand "
-                          "must be 8bpp or 16bpp\n");
+                    qemu_log_mask(LOG_GUEST_ERROR,
+                                  "cirrus: src transparent without colorexpand "
+                                  "must be 8bpp or 16bpp\n");
 		    goto bitblt_ignore;
 		}
 		if (s->cirrus_blt_mode & CIRRUS_BLTMODE_BACKWARDS) {