From patchwork Fri Sep 22 10:58:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 817431 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nhMIiwQM"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xz9St5htCz9ryk for ; Fri, 22 Sep 2017 20:58:38 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752043AbdIVK6h (ORCPT ); Fri, 22 Sep 2017 06:58:37 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34843 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903AbdIVK6d (ORCPT ); Fri, 22 Sep 2017 06:58:33 -0400 Received: by mail-pg0-f65.google.com with SMTP id j16so441010pga.2 for ; Fri, 22 Sep 2017 03:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CPMBjfi+JhV5qjE/gEDTUcwnW+glMpK4iMIpXz5KuIs=; b=nhMIiwQM2B6/Abf24ewNEGmb9k2cSgXmDGDhl7Ai1/4c6lGNRImwgkLlb5uK9jJ7a5 XsfS1ycY0/razkP6XzxAEr8tl1/BsKQlbiNXefz/4FMdIquhmrWqXJi/eCTHkPWnOCF9 8VIyGNreav99IIKNn1et6XZUrFfhHuKgqtkmSuq2lK7zguYmlmDByCqn5hfF5P6Wguph aZraP7ZAXmDtWO4V0e07eV6E1q5icXyVjJM/kyUBhlNezKc8kYVVQ4sPySVUGuCBAfbD 6zvjKl94nqHN1Is4TWHzvShiE7fmne8AnVJRY4098UVwwEOQ2yX++sa6vJ5+lPdRD+e1 6l0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CPMBjfi+JhV5qjE/gEDTUcwnW+glMpK4iMIpXz5KuIs=; b=VPu4RXMUHcsnZLlC4OSCew4rovWPNIQoWOAj6tWLqt2eZcBDsF36K+phpvhEbn105w r2+P5hymrToidT4yUMHmgjyiRbBf0PUxqyukSe2jzDgaf0DYqlzHVNeV1Iz0fmWczGGb kC//DXgpTlx2VfEUsEAVjUSqbzevB90SJ32QGlVNBqZsl/DZBNSbJEfpxPvbvZ/0eTGp RzpFtyLVWo+olZOcCMHd4uq3lPw3/cpRyqfIxwXxZGIUu1yniM+qpj60lw7LMPCqoayF xRoDVi7uvElnqLpcfx4WefW+8kHqEoP9XBmDiSg9dcJRHDQ2tGOB7/0y8NbgZpo0wtsQ pSgQ== X-Gm-Message-State: AHPjjUiOA7A2tyk498zM4ynLuKEalROPLCsvC+mGHIduqEHuHXDHV6S+ m4MHEtNKlx21Jn/XHLFbeeLFYGis X-Google-Smtp-Source: AOwi7QDILnW6N1FAFZNYjK1ZYDw1cZE0m0iExdHkf6w49jFWcSh8tnyQ3lkyfk1ikWztTalFmiGBcg== X-Received: by 10.99.151.81 with SMTP id d17mr4715990pgo.13.1506077912601; Fri, 22 Sep 2017 03:58:32 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id s17sm6283035pgq.25.2017.09.22.03.58.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:58:31 -0700 (PDT) From: Allen Pais To: netdev@vger.kernel.org Cc: davem@davemloft.net, sameo@linux.intel.com, Allen Pais Subject: [PATCH 1/5] net: nfc: hci: use setup_timer() helper. Date: Fri, 22 Sep 2017 16:28:18 +0530 Message-Id: <1506077902-1796-2-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> References: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/hci/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index b740fef..a8a6e78 100644 --- a/net/nfc/hci/core.c +++ b/net/nfc/hci/core.c @@ -1004,9 +1004,8 @@ int nfc_hci_register_device(struct nfc_hci_dev *hdev) INIT_WORK(&hdev->msg_tx_work, nfc_hci_msg_tx_work); - init_timer(&hdev->cmd_timer); - hdev->cmd_timer.data = (unsigned long)hdev; - hdev->cmd_timer.function = nfc_hci_cmd_timeout; + setup_timer(&hdev->cmd_timer, nfc_hci_cmd_timeout, + (unsigned long)hdev); skb_queue_head_init(&hdev->rx_hcp_frags); From patchwork Fri Sep 22 10:58:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 817432 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sWpZZmuE"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xz9Sz4ht3z9ryk for ; Fri, 22 Sep 2017 20:58:43 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752069AbdIVK6m (ORCPT ); Fri, 22 Sep 2017 06:58:42 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35883 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751992AbdIVK6g (ORCPT ); Fri, 22 Sep 2017 06:58:36 -0400 Received: by mail-pf0-f193.google.com with SMTP id f84so320690pfj.3 for ; Fri, 22 Sep 2017 03:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5mMy4BCGfWjKJkTgV4LCny9g1+91+pdguFdMr7GUKVI=; b=sWpZZmuEvgub21RgXVpvrvKuTYseQCUbeDynTUscwkD26pLZpleOJfIUxTqXNHAB4r NKi8R2hdJXVk7Irihy4w6L5KtXa0Eny3BrZFS1GoxV4lUhAd/kN17s6XXBk+FdkqB48N f1hLIbHmy5Z0UyiG6pewaczKGGjj3RQ+h3cAwv677Q7YNFaxU+9lGlWDY1wuYVLWowy2 oC058rMBpWdXgKFPg+JEgmHeGvUN19XBolqoIL9hKiUzekzKrO/3hFusrIv9mWxiUnzo Nf3tJaTnMizm40Kki5TUV33lre55gMswF2SKM/mLDt/UphKAQiKTwvpM5mnHJSSSyPcl 15Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5mMy4BCGfWjKJkTgV4LCny9g1+91+pdguFdMr7GUKVI=; b=YNVRTlzUOVHGOFPkJE2JcJlCoGfZuc7B8ZShd+w/jBEdiLSntkX63TFQR2K/ovxz4k PZ2QCrPHOyT30XReceXyStMfSSzOZ3wuFGw80dDU8fbURytoKP0gSW0lg6BPsq564gIo EpHIm6OpADfWwY3mtMmpqu2DjxfvKdnhYk82JsELX/kavJDI+8q/dpGQhKfSRFQrzpD/ gQkKGb9YZr77duoEvbz8Wmtr7u8Xw7pY9pq3YyEVhEbAfiKGxOTeiQWUMWE1TS4PqCI+ CZQMhHx+tSbiJ1cPPJrfBOtFl/TEzASXZ6NTVNlqKpLKEK18ozzuX3fnUqoEInv1GnFP j8bA== X-Gm-Message-State: AHPjjUgVhI0c5NcseOXaywuHRNSSraC10dWLmkvrSAb25kEzvs/S9VNZ PB3MVYNgSwFbZ1/fLtlizysOhGky X-Google-Smtp-Source: AOwi7QC1SRIkicnOu12JvxXfat1hWLOd5Gdj7C+nTalrKT2KNcX8AxfbMbZ8HL39u1UpJvCND+6MdA== X-Received: by 10.98.36.132 with SMTP id k4mr9034311pfk.148.1506077915297; Fri, 22 Sep 2017 03:58:35 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id s17sm6283035pgq.25.2017.09.22.03.58.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:58:34 -0700 (PDT) From: Allen Pais To: netdev@vger.kernel.org Cc: davem@davemloft.net, sameo@linux.intel.com, Allen Pais Subject: [PATCH 2/5] net: nfc: hci: llc_shdlc: use setup_timer() helper. Date: Fri, 22 Sep 2017 16:28:19 +0530 Message-Id: <1506077902-1796-3-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> References: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/hci/llc_shdlc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c index 17e59a0..58df37e 100644 --- a/net/nfc/hci/llc_shdlc.c +++ b/net/nfc/hci/llc_shdlc.c @@ -763,17 +763,14 @@ static void *llc_shdlc_init(struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, mutex_init(&shdlc->state_mutex); shdlc->state = SHDLC_DISCONNECTED; - init_timer(&shdlc->connect_timer); - shdlc->connect_timer.data = (unsigned long)shdlc; - shdlc->connect_timer.function = llc_shdlc_connect_timeout; + setup_timer(&shdlc->connect_timer, llc_shdlc_connect_timeout, + (unsigned long)shdlc); - init_timer(&shdlc->t1_timer); - shdlc->t1_timer.data = (unsigned long)shdlc; - shdlc->t1_timer.function = llc_shdlc_t1_timeout; + setup_timer(&shdlc->t1_timer, llc_shdlc_t1_timeout, + (unsigned long)shdlc); - init_timer(&shdlc->t2_timer); - shdlc->t2_timer.data = (unsigned long)shdlc; - shdlc->t2_timer.function = llc_shdlc_t2_timeout; + setup_timer(&shdlc->t2_timer, llc_shdlc_t2_timeout, + (unsigned long)shdlc); shdlc->w = SHDLC_MAX_WINDOW; shdlc->srej_support = SHDLC_SREJ_SUPPORT; From patchwork Fri Sep 22 10:58:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 817435 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qPyghPT3"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xz9TG6DrJz9sP1 for ; Fri, 22 Sep 2017 20:58:58 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752061AbdIVK6l (ORCPT ); Fri, 22 Sep 2017 06:58:41 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36727 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903AbdIVK6i (ORCPT ); Fri, 22 Sep 2017 06:58:38 -0400 Received: by mail-pg0-f68.google.com with SMTP id d8so438668pgt.3 for ; Fri, 22 Sep 2017 03:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pXUnDk8uGEZ0ICph0oLkLgepZReBxxl8SA28lBH0NTU=; b=qPyghPT3s09fsFhKaADwaRaVh4czkukeT0jBRC9syYtWPoeIYKLQBMTlRn8U3/eNoi uarEWWJJeQmz8/8tkvLM5AYz3FoQCLZuVPtv6ungXfR6dPpJNOOn6twJy0UFUcdjBRG1 LOwBJyDqKRA8he8SCp9Bu52L6FQHWZvzBBRcP8FGMkzGcCw8Vh6+brNbXfbbu0NggbYt KEE8Fadb3CNgk4pQZV6z9zOg/apO/KT9EbvPtJGvJ5L2u/8KWxS1f/O+06z+De4N2yTK wAPUui30ndZxN69KUXnTCK6iiwmKeISRbpsd32TlCf2AxF2E+IffJ70opS9QSN31i8bk Oc2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pXUnDk8uGEZ0ICph0oLkLgepZReBxxl8SA28lBH0NTU=; b=ECfvK0OwKxF5PVsw5/iiopMTBfV+YM6f4U/cHbLnPu3K7fTL27a+oNgOSnci12L6Ft 8tOO/laMkDmYkCkxRrU9VkZt7xtJBI8Cc7chUIYKLb/0g1QZakPCVaAW+TkS2bT4W73+ TpMs5v0FVo57jPF4Hqbgn5UzCwx0Gm79UaKwEwXra5qzukzD2DgNY2s2ghepDDCxKKO/ IANUwD3X1ZBmXiXoBpzrtM85HonfMo8Nr/6KD8RHqiyk+hvkLXBi7CVAQlRhjPgJvSxd qkIPwyt3JmS7zkfFEUeFeLc+cVg8dHlDlacg+egoDJEJDisGn5EBtnOXREWsLhBFDBKp 0ZtQ== X-Gm-Message-State: AHPjjUjvB3GUO1hsvZiY5s4KfUl7lU8ienOBThuTdKLLVhtzMj0xWOeX zrZQMWTpRVjjuo3sOLPUGXA3zIka X-Google-Smtp-Source: AOwi7QCEKXCShh4KgDTqmHQWBEDWD4ryFZu/km1wCBEcS3MHI8FaWEMoYcmhTJ2bJhYdvRV9lYEnhQ== X-Received: by 10.101.68.65 with SMTP id e1mr9161176pgq.134.1506077918024; Fri, 22 Sep 2017 03:58:38 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id s17sm6283035pgq.25.2017.09.22.03.58.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:58:37 -0700 (PDT) From: Allen Pais To: netdev@vger.kernel.org Cc: davem@davemloft.net, sameo@linux.intel.com, Allen Pais Subject: [PATCH 3/5] net: af_packet: use setup_timer() helper. Date: Fri, 22 Sep 2017 16:28:20 +0530 Message-Id: <1506077902-1796-4-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> References: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/packet/af_packet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index c261729..1d3e3ce 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -544,9 +544,7 @@ static void prb_init_blk_timer(struct packet_sock *po, struct tpacket_kbdq_core *pkc, void (*func) (unsigned long)) { - init_timer(&pkc->retire_blk_timer); - pkc->retire_blk_timer.data = (long)po; - pkc->retire_blk_timer.function = func; + setup_timer(&pkc->retire_blk_timer, func, (long)po); pkc->retire_blk_timer.expires = jiffies; } From patchwork Fri Sep 22 10:58:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 817433 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fh9GFqd9"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xz9T34FMQz9ryk for ; Fri, 22 Sep 2017 20:58:47 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752075AbdIVK6o (ORCPT ); Fri, 22 Sep 2017 06:58:44 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:38750 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752062AbdIVK6l (ORCPT ); Fri, 22 Sep 2017 06:58:41 -0400 Received: by mail-pf0-f194.google.com with SMTP id a7so316294pfj.5 for ; Fri, 22 Sep 2017 03:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ia85lPgeBUtIsx//oraYd9TDBHMc6Hj3gzGkJB2J8P4=; b=fh9GFqd9jhdjKIaMiJxcvqXtPPkyGT2AZtZzrMdowTHuKY/ZpKJqJhic2nfifBHDg6 WXjJ9ZLyjmRzbD/onW19samhZnGQa8XUIgDPqebaSb+yZIi6pfCwEkIX4FARW+Qp6W4J eCNKO2Xz5xGd3c9zNnoTJDKAmuMYQK0C6bn5fwyD8g8bgRclO5RK1W3xdDAD85QM8nYN sI2rJcAc7ug89p3cej1sgJlszbAt0cdXQqPFJap3nrXxZ+qDCDucKHsiM2AammTWToqk sMmSc3lOE2Dlvebnhq7oASV39Xhph8f0wZ/ua1GS9IASH32Ky7CkOpO/aDfzMFOHC3CO DNWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ia85lPgeBUtIsx//oraYd9TDBHMc6Hj3gzGkJB2J8P4=; b=EQuNbAMcN7DdzXUUSyfGMO7tp/RtcExwP3bDCyI/idxs0Z5h3v5YKJXt+OOnh9ejif rjve9269gtrCCemTmGeeEwr7oYb7LjYBcc/tO6DkL5J0wIc/vJOlHAk8B7QCgPnQGi7K wYva7UlbIAhXuMdwoG0mUelV3VKeiNeSYWl3pJN1Ihz+1rKPI2dSxl1McQCeJtSh5fBT yFvRNOIkcNqaG3HlFstFmY3/81FllmKLbnzEmtRT1LB/8Hn/RgDQo2LsMUNKIEINmCJb LQRSezZdl/mX83s+q4HicFCrLoe3yJY81PuRIA34cpnylkNl63taBtuD32EARSFXdh7C nX2w== X-Gm-Message-State: AHPjjUjyMjWf6Ujm397JQryylko7xQ4+nGGXP4yDYNc4xygsqriRTrFt EG65qhM3MvjAIjY/fG75Y54VFMA7 X-Google-Smtp-Source: AOwi7QDg2QwFKVu3pP0YN7DhQpQDD41ek7Kn+YpOpB89IKo8aC3eEGpVGfEl4d5nVodNcJpIWrsbVg== X-Received: by 10.101.78.201 with SMTP id w9mr9161102pgq.24.1506077921180; Fri, 22 Sep 2017 03:58:41 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id s17sm6283035pgq.25.2017.09.22.03.58.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:58:39 -0700 (PDT) From: Allen Pais To: netdev@vger.kernel.org Cc: davem@davemloft.net, sameo@linux.intel.com, Allen Pais Subject: [PATCH 4/5] net: nfc: core: use setup_timer() helper. Date: Fri, 22 Sep 2017 16:28:21 +0530 Message-Id: <1506077902-1796-5-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> References: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/nfc/core.c b/net/nfc/core.c index 5cf33df..e5e23c2 100644 --- a/net/nfc/core.c +++ b/net/nfc/core.c @@ -1094,9 +1094,8 @@ struct nfc_dev *nfc_allocate_device(struct nfc_ops *ops, dev->targets_generation = 1; if (ops->check_presence) { - init_timer(&dev->check_pres_timer); - dev->check_pres_timer.data = (unsigned long)dev; - dev->check_pres_timer.function = nfc_check_pres_timeout; + setup_timer(&dev->check_pres_timer, nfc_check_pres_timeout, + (unsigned long)dev); INIT_WORK(&dev->check_pres_work, nfc_check_pres_work); } From patchwork Fri Sep 22 10:58:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 817434 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pdrMPfu4"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xz9T42jZJz9sP1 for ; Fri, 22 Sep 2017 20:58:48 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752097AbdIVK6r (ORCPT ); Fri, 22 Sep 2017 06:58:47 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33724 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752072AbdIVK6o (ORCPT ); Fri, 22 Sep 2017 06:58:44 -0400 Received: by mail-pg0-f65.google.com with SMTP id i130so447865pgc.0 for ; Fri, 22 Sep 2017 03:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wPPFXFdth4AKZF0OkIbp9LPOTMR4IhxIp+LNKzOK3Nw=; b=pdrMPfu4GJmFIzLHi5MTQY4FCyIdEyY9p0Hu+Nuuxzka08EUCMb2pjbqae/PYMnmWB I0eiXehGQHwJY9zVmXJ7qWyxCVBEneoLiznRM51CNpHE4bJrSKTXRKczJ98dDR62JWtR AwoKKPf/vvZTtbxmzAMY9IWwqJPOKtWNso+a9ikMb9jreAvreWlyA+JObR7pyLHopt4c 7Acd/ah2ONBTvt5WPhHhgeqzgmneTFDpN18p4GS/u1oBIH2xgrTvGhL163pTO/DSYLj8 Gv8TFC8NQJ7Jyo326XIa5u8tj4waGhp0LO672WK5Vu9pMFDLQfh9aSYn4Mfc+carcREi sfoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wPPFXFdth4AKZF0OkIbp9LPOTMR4IhxIp+LNKzOK3Nw=; b=H5SqgE+3U0GKzPFeYbV6Y9MUH5DVm/EXq2/b6yQ/C8VunH16ILsjhd9nMoHE5bm+FD jIFwizQCtMI5ECdihJTpGz1o+5Akr2/IOEvNjIjGwiE6jy/c2FXC0s/uLCMp0BUBVcw+ IGRQUzJVwhe79A8qoUpYLeuzZm8g/NtmLSXvZgdizhOEZRASzqpiIa6jRyLFECEHRAZZ KDQf6OeVNDw2PCflMTI78JyWasw+Sr/fM3LScEbBLKCM4wbPOXGd9x8iQNyK6KiXN3/G CHD8Mzldai2cgZH+OsamWd9pJNckzHb9QK5K62LEJYuO+VDcvkZNh2zEm7FcoaYqjJJK y1EQ== X-Gm-Message-State: AHPjjUi8z006vLvXgAKlCUXZ5WyNQ4iOHHAgpCO+kEXg+IQkB0Cfhm3E mhFnV5fKYSb0yFCOacG2SLXB90KO X-Google-Smtp-Source: AOwi7QD4GCR6j4cR+pERy4MyGtC5+ztsa1jqlNYGC9M/ZKWJsFuT+lBqJt047iWydsOesj+rKje/+w== X-Received: by 10.98.20.19 with SMTP id 19mr8753264pfu.167.1506077924098; Fri, 22 Sep 2017 03:58:44 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id s17sm6283035pgq.25.2017.09.22.03.58.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:58:43 -0700 (PDT) From: Allen Pais To: netdev@vger.kernel.org Cc: davem@davemloft.net, sameo@linux.intel.com, Allen Pais Subject: [PATCH 5/5] net: nfc: llcp_core: use setup_timer() helper. Date: Fri, 22 Sep 2017 16:28:22 +0530 Message-Id: <1506077902-1796-6-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> References: <1506077902-1796-1-git-send-email-allen.lkml@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- net/nfc/llcp_core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index 02eef5c..7988185 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c @@ -1573,9 +1573,8 @@ int nfc_llcp_register_device(struct nfc_dev *ndev) INIT_LIST_HEAD(&local->list); kref_init(&local->ref); mutex_init(&local->sdp_lock); - init_timer(&local->link_timer); - local->link_timer.data = (unsigned long) local; - local->link_timer.function = nfc_llcp_symm_timer; + setup_timer(&local->link_timer, nfc_llcp_symm_timer, + (unsigned long)local); skb_queue_head_init(&local->tx_queue); INIT_WORK(&local->tx_work, nfc_llcp_tx_work); @@ -1601,9 +1600,8 @@ int nfc_llcp_register_device(struct nfc_dev *ndev) mutex_init(&local->sdreq_lock); INIT_HLIST_HEAD(&local->pending_sdreqs); - init_timer(&local->sdreq_timer); - local->sdreq_timer.data = (unsigned long) local; - local->sdreq_timer.function = nfc_llcp_sdreq_timer; + setup_timer(&local->sdreq_timer, nfc_llcp_sdreq_timer, + (unsigned long)local); INIT_WORK(&local->sdreq_timeout_work, nfc_llcp_sdreq_timeout_work); list_add(&local->list, &llcp_devices);