Message ID | 1508200182-104605-26-git-send-email-keescook@chromium.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="f2yXAciG"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yGGl04nm8z9sBZ for <patchwork-incoming@ozlabs.org>; Tue, 17 Oct 2017 11:48:12 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933396AbdJQArn (ORCPT <rfc822;patchwork-incoming@ozlabs.org>); Mon, 16 Oct 2017 20:47:43 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:48697 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933383AbdJQArg (ORCPT <rfc822;netdev@vger.kernel.org>); Mon, 16 Oct 2017 20:47:36 -0400 Received: by mail-pg0-f51.google.com with SMTP id v78so75481pgb.5 for <netdev@vger.kernel.org>; Mon, 16 Oct 2017 17:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G1qCLZoiHzePKomZbbx7AZSgEDiYrFrc0hcfTdk+yQs=; b=f2yXAciGFBXjRmSovKZSsAxKwXcTsD/9t0sGNstHMkICxIQKw3U0etI7Db10MsJd5f Nf2YqqL4QNm6cDm+DDL+3lDymb9TcZzFMDRa/n2iQE5syAcGvOiFQKZD0GFeiKYnDa8I 4ATtPjc9MFdxRCwuKbO+VgsvQkHx7lVK/kfXs= 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=G1qCLZoiHzePKomZbbx7AZSgEDiYrFrc0hcfTdk+yQs=; b=m5xIWIzhKAd0RI5WnmQNLeS4wVWNvMqHvjL2NuA0qAPxRzeW9ouOm3H2oowGcGX3tA NJHydDOXC8W6lNIEFltN4eHPYU5jJInoRDrJYgAvHX8b3JHoFKxuPxJ8nz4V6vYcoje/ S6CBWbCI1CR8WMVLZShEXDiN1zvqc1s3eg3pkqEu9t8G10cv8GEIVytuSFd3cA5GomsA XNwEr02Ugvykt32rpKd03bFLRk641SfE5WW1KHJutj/tiScpOuiltGScscK/JRgkgFJC h8zesPw/fEDuUiSpY1yDSYi/bQNOROiSsUGSxkHLe2w+XrfqKLTLTY9iHwlRtYlP7sUt goEQ== X-Gm-Message-State: AMCzsaUdjgqlqjwhPdme6/m5apLNumgatPBWiwo2IDRusfqH8/O6Sjxw 2SXOjBdojl/M/TeoLyRkbJ4tBw== X-Google-Smtp-Source: AOwi7QBZLk9jP+aVJU8rimJnwMQuUJsqEE/9KNPHaorkzej9O6UZfaY/10Ufrj58K3ikioimvsPjkg== X-Received: by 10.98.162.26 with SMTP id m26mr10281277pff.0.1508201255836; Mon, 16 Oct 2017 17:47:35 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id u131sm14015781pgc.89.2017.10.16.17.47.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 17:47:29 -0700 (PDT) From: Kees Cook <keescook@chromium.org> To: "David S. Miller" <davem@davemloft.net> Cc: Kees Cook <keescook@chromium.org>, Eric Dumazet <edumazet@google.com>, Jarod Wilson <jarod@redhat.com>, Philippe Reynes <tremyfr@gmail.com>, netdev@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org Subject: [PATCH 25/58] net: amd8111e: Convert timers to use timer_setup() Date: Mon, 16 Oct 2017 17:29:09 -0700 Message-Id: <1508200182-104605-26-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508200182-104605-1-git-send-email-keescook@chromium.org> References: <1508200182-104605-1-git-send-email-keescook@chromium.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
networking: Convert timers to use timer_setup()
|
expand
|
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c index 7f22af6e37e0..358f7ab77c70 100644 --- a/drivers/net/ethernet/amd/amd8111e.c +++ b/drivers/net/ethernet/amd/amd8111e.c @@ -1669,9 +1669,9 @@ static int amd8111e_resume(struct pci_dev *pci_dev) return 0; } -static void amd8111e_config_ipg(struct net_device *dev) +static void amd8111e_config_ipg(struct timer_list *t) { - struct amd8111e_priv *lp = netdev_priv(dev); + struct amd8111e_priv *lp = from_timer(lp, t, ipg_data.ipg_timer); struct ipg_info *ipg_data = &lp->ipg_data; void __iomem *mmio = lp->mmio; unsigned int prev_col_cnt = ipg_data->col_cnt; @@ -1883,8 +1883,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev, /* Initialize software ipg timer */ if(lp->options & OPTION_DYN_IPG_ENABLE){ - setup_timer(&lp->ipg_data.ipg_timer, - (void *)&amd8111e_config_ipg, (unsigned long)dev); + timer_setup(&lp->ipg_data.ipg_timer, amd8111e_config_ipg, 0); lp->ipg_data.ipg_timer.expires = jiffies + IPG_CONVERGE_JIFFIES; lp->ipg_data.ipg = DEFAULT_IPG;
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jarod Wilson <jarod@redhat.com> Cc: Philippe Reynes <tremyfr@gmail.com> Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> --- drivers/net/ethernet/amd/amd8111e.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)