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; }