Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965682AbbFJQeT (ORCPT ); Wed, 10 Jun 2015 12:34:19 -0400 Received: from mailrelay110.isp.belgacom.be ([195.238.20.137]:7620 "EHLO mailrelay110.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933968AbbFJQdv (ORCPT ); Wed, 10 Jun 2015 12:33:51 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=eWtaKQUTUbzTvYESxgzcVvJXO5dQmjbJ/tTWSlQWV0k= c=1 sm=2 a=uQwdiEl9F_QzdSRlrAMA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2C5HgBcZnhV/5QztFtcgxABgTKrcwUBAQEBAQEFAYEEAZJchgmBOj0QAQEBAQEBAYEKQQOEOyOBGjceiBQB0g+GGYowHYQXBZ8AjUaKNSRiZgELNhyBVDwxgkcBAQE From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Julia Lawall , Fabian Frederick , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 1/1 linux-next] [media] btcx-risc: use swap() in btcx_sort_clips() Date: Wed, 10 Jun 2015 18:33:45 +0200 Message-Id: <1433954026-24981-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.4.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1259 Lines: 40 Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick --- drivers/media/pci/bt8xx/btcx-risc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/pci/bt8xx/btcx-risc.c b/drivers/media/pci/bt8xx/btcx-risc.c index 00f0880..57c7f58 100644 --- a/drivers/media/pci/bt8xx/btcx-risc.c +++ b/drivers/media/pci/bt8xx/btcx-risc.c @@ -160,7 +160,6 @@ btcx_align(struct v4l2_rect *win, struct v4l2_clip *clips, unsigned int n, int m void btcx_sort_clips(struct v4l2_clip *clips, unsigned int nclips) { - struct v4l2_clip swap; int i,j,n; if (nclips < 2) @@ -168,9 +167,7 @@ btcx_sort_clips(struct v4l2_clip *clips, unsigned int nclips) for (i = nclips-2; i >= 0; i--) { for (n = 0, j = 0; j <= i; j++) { if (clips[j].c.left > clips[j+1].c.left) { - swap = clips[j]; - clips[j] = clips[j+1]; - clips[j+1] = swap; + swap(clips[j], clips[j + 1]); n++; } } -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/