From patchwork Wed Sep 5 06:40:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1405581 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D1706DF28C for ; Wed, 5 Sep 2012 06:40:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229Ab2IEGko (ORCPT ); Wed, 5 Sep 2012 02:40:44 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:63825 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886Ab2IEGkn (ORCPT ); Wed, 5 Sep 2012 02:40:43 -0400 Received: by qaas11 with SMTP id s11so320220qaa.19 for ; Tue, 04 Sep 2012 23:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=grn15iB1+qvSTeOBuhh+pBtQnGvbEtl5CPKPg+JOA08=; b=mZQ9TTLxCWR4MCUv4sy3nXEMd7W4Am7hz1+MN6KZ933yeke8AG+NBH3Wv9c0P78ACz u+yUjtViQwE9e25SYruYastqqghZEbDYmfZPBubdA+KMN8iCtoHXTUgYFSsCV7xIJqB0 cH26tgzcIZoIPoD82dlJS4tXh6XejNLU7EWwYrzV1UyL+CUdVWVlAbO/FdWVIcKCIe0R +KPXe/CC4+58uUDMeWSPA/TCSktM8tXe0czQQq4rXTcCHJoqRG3I/eNuiNEytuGPNoZy oFYnKkCDpRNGyjb8Rup/t4r50RV4bqfnWC3WceuYGP6y5Xam3+NCI3n+TIALZaonUM+b yhVw== MIME-Version: 1.0 Received: by 10.224.185.15 with SMTP id cm15mr43961914qab.8.1346827243197; Tue, 04 Sep 2012 23:40:43 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Tue, 4 Sep 2012 23:40:43 -0700 (PDT) Date: Wed, 5 Sep 2012 14:40:43 +0800 Message-ID: Subject: [PATCH] vmlfb: use list_move_tail instead of list_del/list_add_tail From: Wei Yongjun To: FlorianSchandinat@gmx.de Cc: yongjun_wei@trendmicro.com.cn, linux-fbdev@vger.kernel.org Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/video/vermilion/vermilion.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index 970e43d..083f0c8 100644 --- a/drivers/video/vermilion/vermilion.c +++ b/drivers/video/vermilion/vermilion.c @@ -1168,8 +1168,7 @@ void vmlfb_unregister_subsys(struct vml_sys *sys) list_for_each_entry_safe(entry, next, &global_has_mode, head) { printk(KERN_DEBUG MODULE_NAME ": subsys disable pipe\n"); vmlfb_disable_pipe(entry); - list_del(&entry->head); - list_add_tail(&entry->head, &global_no_mode); + list_move_tail(&entry->head, &global_no_mode); } mutex_unlock(&vml_mutex); }