From patchwork Sun Aug 21 15:27:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9292223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B569C600CB for ; Sun, 21 Aug 2016 15:27:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E459289BE for ; Sun, 21 Aug 2016 15:27:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B929289CB; Sun, 21 Aug 2016 15:27:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7D72289BE for ; Sun, 21 Aug 2016 15:27:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbcHUP1z (ORCPT ); Sun, 21 Aug 2016 11:27:55 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35686 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877AbcHUP1z (ORCPT ); Sun, 21 Aug 2016 11:27:55 -0400 Received: by mail-pa0-f66.google.com with SMTP id cf3so6496070pad.2 for ; Sun, 21 Aug 2016 08:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O0qPWnp22hqRl0MLgbTL7u2agt9J00jspBF5tgb5KKM=; b=Fw5Zd0lFCxdx7YaNC7megVCe1PWMB3UlvD2Ftz9o3in0llA3twT06d4tf03IP/ib66 G8TfuBUsCNl3CICN2W9hZDGD999Wp1clerAWwon9Tu3tbfThqzdrX+ShNgSPIHuIrNw8 6E2ALsBIDiKfixbpeQVpvCaQ3AkhqPtldUL/ZX5tUnyt+W/r8v/snY2nhPI8RCrAUrqF ZoY0vFDEZL0UxeWfcSUjOxs+kFyD0zi9+ucZuxudtyZPvI2OOVMk3/mtHhpnsAwvcEAQ QG8B0wSgdTcF5uczQd0jXKdBw0Xuc96GF/aoipdgamVlC4nZvDxvFgVQChxzVH1yMLpJ vHiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O0qPWnp22hqRl0MLgbTL7u2agt9J00jspBF5tgb5KKM=; b=UZUkCnY11hgFAovvo7SUCxcdQU4DQ68qufHW47ujqMtXFwfohNU1qWuEhu1xYkIiOO MGmyGKGZe42i67r7ko7158Im0NAkrouD8mcxYG/V7EpfoC77NfkZA7q1LO14BXhsFvpM 3uneUYUtEOwR226/VcMNE6Xm9IDaV7oimOgnMWHgPg9z7bHnrb7gncvV6VKIrOLpLxL/ EWvJ12blCpuiq0uW6g4DWZ8hLc3fMU9p4dxX5oDAR3tsudzl4fKKxC7maepavAUlItcX Ao/vcAIFFIpW7fywVdw2aR/RH8NhyDwnqee3fmx+PwCqOYWOzW7I7phbhEvlqdUfPi9P KTag== X-Gm-Message-State: AEkoouvcKSjlXk//LBFJxQ5uzfBccKR/uGorm40p0CoKVCe3wuMzcPSo/kE140ocG3VLog== X-Received: by 10.66.216.130 with SMTP id oq2mr33703269pac.89.1471793274355; Sun, 21 Aug 2016 08:27:54 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id a20sm20804830pfa.27.2016.08.21.08.27.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Aug 2016 08:27:53 -0700 (PDT) From: Wei Yongjun To: Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires Cc: Wei Yongjun , linux-input@vger.kernel.org Subject: [PATCH -next] HID: intel-ish-hid: use list_move_tail instead of list_del/list_add_tail Date: Sun, 21 Aug 2016 15:27:29 +0000 Message-Id: <1471793249-23714-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada --- drivers/hid/intel-ish-hid/ipc/ipc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" 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/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c index 851029b..e2517c1 100644 --- a/drivers/hid/intel-ish-hid/ipc/ipc.c +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c @@ -448,8 +448,7 @@ static int ish_fw_reset_handler(struct ishtp_device *dev) spin_lock_irqsave(&dev->wr_processing_spinlock, flags); list_for_each_entry_safe(processing, next, &dev->wr_processing_list_head.link, link) { - list_del(&processing->link); - list_add_tail(&processing->link, &dev->wr_free_list_head.link); + list_move_tail(&processing->link, &dev->wr_free_list_head.link); } spin_unlock_irqrestore(&dev->wr_processing_spinlock, flags);