[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1433954018-24928-1-git-send-email-fabf@skynet.be>
Date: Wed, 10 Jun 2015 18:33:38 +0200
From: Fabian Frederick <fabf@...net.be>
To: linux-kernel@...r.kernel.org
Cc: Julia Lawall <Julia.Lawall@...6.fr>,
Fabian Frederick <fabf@...net.be>,
William Hubbs <w.d.hubbs@...il.com>,
Chris Brannon <chris@...-brannons.com>,
Kirk Reiser <kirk@...sers.ca>,
Samuel Thibault <samuel.thibault@...-lyon.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
speakup@...ux-speakup.org, devel@...verdev.osuosl.org
Subject: [PATCH 1/1 linux-next] staging: speakup: use swap() in get_highlight_color()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
drivers/staging/speakup/main.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index c955976..6c4f9a1 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -1597,7 +1597,7 @@ static int count_highlight_color(struct vc_data *vc)
static int get_highlight_color(struct vc_data *vc)
{
int i, j;
- unsigned int cptr[8], tmp;
+ unsigned int cptr[8];
int vc_num = vc->vc_num;
for (i = 0; i < 8; i++)
@@ -1606,11 +1606,8 @@ static int get_highlight_color(struct vc_data *vc)
for (i = 0; i < 7; i++)
for (j = i + 1; j < 8; j++)
if (speakup_console[vc_num]->ht.bgcount[cptr[i]] >
- speakup_console[vc_num]->ht.bgcount[cptr[j]]) {
- tmp = cptr[i];
- cptr[i] = cptr[j];
- cptr[j] = tmp;
- }
+ speakup_console[vc_num]->ht.bgcount[cptr[j]])
+ swap(cptr[i], cptr[j]);
for (i = 0; i < 8; i++)
if (speakup_console[vc_num]->ht.bgcount[cptr[i]] != 0)
--
2.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists