From patchwork Thu Jan 9 08:03:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3457701 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4545C9F2E9 for ; Thu, 9 Jan 2014 08:04:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3327120144 for ; Thu, 9 Jan 2014 08:04:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30C9820103 for ; Thu, 9 Jan 2014 08:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754511AbaAIIEM (ORCPT ); Thu, 9 Jan 2014 03:04:12 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:34217 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbaAIIEJ (ORCPT ); Thu, 9 Jan 2014 03:04:09 -0500 Received: by mail-pb0-f41.google.com with SMTP id jt11so2722094pbb.0 for ; Thu, 09 Jan 2014 00:04:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=r46QLHvO+4Q2OiouF5Ai7Ie8ha8TJo1MhRM7wFiSIOI=; b=QdQHLwZkxc8L1vDCPZMydXeQ66R/A5GC6gllJmMXx5ZLxoIT7A6Y4YJKI+O/nlGR0W Cgy31SbuOsmceG9uXBUj2uat8yopDOTj+vVCeWMCj3LV/LOZKs70Bh4phDoZfdxwNH0y JRK5/XsLu1qFNnZeiK6x3UAdJZylZ/bze8LULPoFbrWVj74DnjtktE0HnDgfhfVOsAEj LLUm3mMlsbqmKmNwoiqvX0/ls4KtQAIp8+NLxeB7bIwFsEiadLuISzd9YAurSb/1H0Un h6ondb+5hg3TDPz8eY88n0MPLK2/MqyWdnp+ZpuoTszn1uDBew8WhSPPzHrLVuc4RiYw xjVw== X-Gm-Message-State: ALoCoQn99Quwqc133A21dU5vShbSwTo6HP9RTP15eZlmKXROoHLXP6xy6AK4j2UJRdVNfEo+/ycT X-Received: by 10.66.227.200 with SMTP id sc8mr2079622pac.35.1389254649338; Thu, 09 Jan 2014 00:04:09 -0800 (PST) Received: from [192.168.1.102] (111-240-64-237.dynamic.hinet.net. [111.240.64.237]) by mx.google.com with ESMTPSA id zc6sm9928801pab.0.2014.01.09.00.04.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Jan 2014 00:04:08 -0800 (PST) Message-ID: <1389254638.31143.1.camel@phoenix> Subject: [PATCH] spi: core: Use list_first_entry to extract head of queue From: Axel Lin To: Mark Brown Cc: linux-spi@vger.kernel.org Date: Thu, 09 Jan 2014 16:03:58 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 For slightly better readability. Signed-off-by: Axel Lin --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index f360525e..eccf5a7 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -685,7 +685,7 @@ static void spi_pump_messages(struct kthread_work *work) } /* Extract head of queue */ master->cur_msg = - list_entry(master->queue.next, struct spi_message, queue); + list_first_entry(&master->queue, struct spi_message, queue); list_del_init(&master->cur_msg->queue); if (master->busy)