From patchwork Mon May 18 17:43:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 6431041 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7CE8AC0432 for ; Mon, 18 May 2015 17:43:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48A592037F for ; Mon, 18 May 2015 17:43:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A05620379 for ; Mon, 18 May 2015 17:43:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753982AbbERRn2 (ORCPT ); Mon, 18 May 2015 13:43:28 -0400 Received: from mailrelay116.isp.belgacom.be ([195.238.20.143]:3155 "EHLO mailrelay116.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753096AbbERRn2 (ORCPT ); Mon, 18 May 2015 13:43:28 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=Ax9Kd9og7W2htzcJF9odWb+87PP6pPoG1t8Q07ebhfo= c=1 sm=2 a=KKuzyJ9LtBEtZBvl4yEA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CgDgBxI1pV/4FIiNlcgxCBMrJqCwUBgQSYToE3PRABAQEBAQEBgQpBA4QMLyOBGjeIMAHZEoYWiUVkHYQXBZ1fjQWKByNhZgELNxyBVDwxgkYBAQE Received: from 129.72-136-217.adsl-dyn.isp.belgacom.be (HELO localhost.home.) ([217.136.72.129]) by relay.skynet.be with ESMTP; 18 May 2015 19:43:27 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org Subject: [PATCH 1/1 linux-next] video/console: use swap() in newport_bmove() Date: Mon, 18 May 2015 19:43:21 +0200 Message-Id: <1431971001-18967-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.4.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use kernel.h macro definition. Signed-off-by: Fabian Frederick --- drivers/video/console/newport_con.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index a6ab929..bb4e962 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -687,7 +687,7 @@ static int newport_scroll(struct vc_data *vc, int t, int b, int dir, static void newport_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, int h, int w) { - short xs, ys, xe, ye, xoffs, yoffs, tmp; + short xs, ys, xe, ye, xoffs, yoffs; xs = sx << 3; xe = ((sx + w) << 3) - 1; @@ -701,9 +701,7 @@ static void newport_bmove(struct vc_data *vc, int sy, int sx, int dy, yoffs = (dy - sy) << 4; if (xoffs > 0) { /* move to the right, exchange starting points */ - tmp = xe; - xe = xs; - xs = tmp; + swap(xe, xs); } newport_wait(npregs); npregs->set.drawmode0 = (NPORT_DMODE0_S2S | NPORT_DMODE0_BLOCK |