From patchwork Sun Aug 21 15:29:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9292227 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 4CDC1600CB for ; Sun, 21 Aug 2016 15:30:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B0BF289E1 for ; Sun, 21 Aug 2016 15:30:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C5C6289E4; Sun, 21 Aug 2016 15:30:55 +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 B70C0289E1 for ; Sun, 21 Aug 2016 15:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752877AbcHUPay (ORCPT ); Sun, 21 Aug 2016 11:30:54 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36500 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753148AbcHUPax (ORCPT ); Sun, 21 Aug 2016 11:30:53 -0400 Received: by mail-pf0-f194.google.com with SMTP id y134so4704162pfg.3 for ; Sun, 21 Aug 2016 08:30:23 -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=IAX9kHSGyGVLgOfW6IsbF9y5RDhHN8ZbKyTU7jNNpko=; b=BQBeGAAELpqoZ7vRu57ElZp8uG3HvXzyfDyjZfdewx5E43LDjcMbhf7fCD+nfa9OFo qxlpSdtZS491XcfeXabARX3J0SMdIY7NSkxCKdWm4FYZF1btOQcOIPJfJSj0Xfk9hEq1 6Bfy487ArmRyN7vxKoxe6zDbgzNBZ/ivRTNyvj0sgxTZK3Omvg/rDLYJ5e454Cx6wEKc F+g6i3wLGg9h9OzDLRBoaE8AOuuOrFVvLWs+Bzgmei85Gn10w2kP481Je3vL6qZJmM/0 hFwWEj9jxwN8e4T0Xs8nKffhzXX/dsnZMgWw8E0Vm6UChUBacoSkp1tQWLEyVyW3O09O gxew== 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=IAX9kHSGyGVLgOfW6IsbF9y5RDhHN8ZbKyTU7jNNpko=; b=U5vl1Wmo8rU0MSHmh/ho7S1TZkN4Wszl8USKJOwce1l9ry29/eAc7sg2XoWFS+UKR0 2vkSuXTNiIqFVEl9o1cJj6858ygVlaDkfF2ST2Pv1CHD52z05cc466NQUd6/ETlAYg2n ByNSxAiPemz+I3ceYrHavB9sWZYgMTclEdw/srqmZuVRcBvpCCQYHlQ9xNkg9cmXjRWQ lxNoaxE1FmMuPLa9lhzRBqOlAT6ORJrs1BCCuGvOAyu0Q+PkAw5GgLd2tqd6dpJmhM3h 7+coemYGykzt40NHcqvUImsD2faZlPxKXuHmAGo4sZA3tFXTy/Q85IWv7Vk4B1qATWwc IWgg== X-Gm-Message-State: AEkooutxYKOcDH9Kwvg0xihLoGvw10RdnbhmnL0ATN0Sq2tK97bwqGv0VM5my+dJfDqCig== X-Received: by 10.98.36.15 with SMTP id r15mr34410853pfj.1.1471793423215; Sun, 21 Aug 2016 08:30:23 -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 g10sm20789454pfc.57.2016.08.21.08.30.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Aug 2016 08:30:22 -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: Convert list_for_each to entry variant Date: Sun, 21 Aug 2016 15:29:58 +0000 Message-Id: <1471793398-24008-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 convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada --- drivers/hid/intel-ish-hid/ishtp/bus.c | 4 +--- 1 file changed, 1 insertion(+), 3 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/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index 0183eac..8a1bb8c 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c @@ -380,11 +380,9 @@ static struct ishtp_cl_device *ishtp_bus_add_device(struct ishtp_device *dev, struct ishtp_cl_device *device; int status; unsigned long flags; - struct list_head *pos; spin_lock_irqsave(&dev->device_list_lock, flags); - list_for_each(pos, &dev->device_list) { - device = list_entry(pos, struct ishtp_cl_device, device_link); + list_for_each_entry(device, &dev->device_list, device_link) { if (!strcmp(name, dev_name(&device->dev))) { device->fw_client = &dev->fw_clients[ dev->fw_client_presentation_num - 1];