linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1 linux-next] video: fbdev: matrox: use swap() in matroxfb_decode_var()
@ 2015-05-18 17:31 Fabian Frederick
  2015-05-26  8:32 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2015-05-18 17:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Fabian Frederick, Jean-Christophe Plagniol-Villard,
	Tomi Valkeinen, linux-fbdev

Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/video/fbdev/matrox/matroxfb_base.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
index 62539ca..2ba4e54 100644
--- a/drivers/video/fbdev/matrox/matroxfb_base.c
+++ b/drivers/video/fbdev/matrox/matroxfb_base.c
@@ -591,12 +591,8 @@ static int matroxfb_decode_var(const struct matrox_fb_info *minfo,
 			unsigned int max_yres;
 
 			while (m1) {
-				int t;
-
 				while (m2 >= m1) m2 -= m1;
-				t = m1;
-				m1 = m2;
-				m2 = t;
+				swap(m1, m2);
 			}
 			m2 = linelen * PAGE_SIZE / m2;
 			*ydstorg = m2 = 0x400000 % m2;
-- 
2.4.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1 linux-next] video: fbdev: matrox: use swap() in matroxfb_decode_var()
  2015-05-18 17:31 [PATCH 1/1 linux-next] video: fbdev: matrox: use swap() in matroxfb_decode_var() Fabian Frederick
@ 2015-05-26  8:32 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2015-05-26  8:32 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel
  Cc: Jean-Christophe Plagniol-Villard, linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]



On 18/05/15 20:31, Fabian Frederick wrote:
> Use kernel.h macro definition.
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  drivers/video/fbdev/matrox/matroxfb_base.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
> index 62539ca..2ba4e54 100644
> --- a/drivers/video/fbdev/matrox/matroxfb_base.c
> +++ b/drivers/video/fbdev/matrox/matroxfb_base.c
> @@ -591,12 +591,8 @@ static int matroxfb_decode_var(const struct matrox_fb_info *minfo,
>  			unsigned int max_yres;
>  
>  			while (m1) {
> -				int t;
> -
>  				while (m2 >= m1) m2 -= m1;
> -				t = m1;
> -				m1 = m2;
> -				m2 = t;
> +				swap(m1, m2);
>  			}
>  			m2 = linelen * PAGE_SIZE / m2;
>  			*ydstorg = m2 = 0x400000 % m2;
> 

Thanks, I've queued this and the two other swap() patches for 4.2.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-26  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 17:31 [PATCH 1/1 linux-next] video: fbdev: matrox: use swap() in matroxfb_decode_var() Fabian Frederick
2015-05-26  8:32 ` Tomi Valkeinen

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).