2008-08-01 21:03:37

by Tim Bird

[permalink] [raw]
Subject: [PATCH] embedded: fix vc_translate operator precedence

This fixes a bug in operator precedence in the newly introduced vc_translate
macro. Without this fix, the translation of some characters on the
kernel console is garbled.

This patch was copied to the e-mail list previously for testing. Now,
all reports confirm that it works, so this is an official post for
application.

Signed-off-by: Tim Bird <[email protected]>
---
vt_kern.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 14c0e91..8c8119f 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);

#define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
- (vc)->vc_toggle_meta ? 0x80 : 0])
+ ((vc)->vc_toggle_meta ? 0x80 : 0)])
#else
#define con_set_trans_old(arg) (0)
#define con_get_trans_old(arg) (-EINVAL)


2008-08-04 08:30:18

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] embedded: fix vc_translate operator precedence

Hi Tim,

On Fri, 1 Aug 2008, Tim Bird wrote:
> This patch was copied to the e-mail list previously for testing. Now,
> all reports confirm that it works, so this is an official post for
> application.

The above paragraph is not part of the patch description and should not end up
in the git history, so it should be below the first `---' and above the
diffstat, i.e.

> Signed-off-by: Tim Bird <[email protected]>
> ---

---> here

> vt_kern.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: [email protected]
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis 293-0376800-10 GEBA-BE-BB

2008-08-04 08:31:40

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH] embedded: fix vc_translate operator precedence

On Mon, 2008-08-04 at 10:29 +0200, Geert Uytterhoeven wrote:
> The above paragraph is not part of the patch description and should
> not end up in the git history, so it should be below the first `---'
> and above the diffstat, i.e.

Since it reports successful testing, I figured I might as well keep it.

--
dwmw2

2008-08-04 08:33:54

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH] embedded: fix vc_translate operator precedence

On Mon, 4 Aug 2008, David Woodhouse wrote:
> On Mon, 2008-08-04 at 10:29 +0200, Geert Uytterhoeven wrote:
> > The above paragraph is not part of the patch description and should
> > not end up in the git history, so it should be below the first `---'
> > and above the diffstat, i.e.
>
> Since it reports successful testing, I figured I might as well keep it.

... unlike all other patches you take? ;-)

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: [email protected]
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis 293-0376800-10 GEBA-BE-BB

2008-08-04 18:19:39

by Tim Bird

[permalink] [raw]
Subject: Re: [PATCH] embedded: fix vc_translate operator precedence

Geert Uytterhoeven wrote:
> Hi Tim,
>
> On Fri, 1 Aug 2008, Tim Bird wrote:
>> This patch was copied to the e-mail list previously for testing. Now,
>> all reports confirm that it works, so this is an official post for
>> application.
>
> The above paragraph is not part of the patch description and should not end up
> in the git history, so it should be below the first `---' and above the
> diffstat, i.e.

Noted for future patch submissions.

Thanks,
-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================