From patchwork Thu Oct 5 00:51:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9986245 X-Patchwork-Delegate: kvalo@adurom.com 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 003E3605A8 for ; Thu, 5 Oct 2017 01:04:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5D9028C04 for ; Thu, 5 Oct 2017 01:04:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D99A228C2A; Thu, 5 Oct 2017 01:04:38 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable 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 6B52C28C04 for ; Thu, 5 Oct 2017 01:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752486AbdJEAvH (ORCPT ); Wed, 4 Oct 2017 20:51:07 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:52793 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbdJEAvE (ORCPT ); Wed, 4 Oct 2017 20:51:04 -0400 Received: by mail-pf0-f173.google.com with SMTP id a1so3897928pfj.9 for ; Wed, 04 Oct 2017 17:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=CU3OINddVxTzdcTHcEhSuXnwll61sfQxL4/k1QXLQCI=; b=U8WTvjs5axGRwmjWARFBBhE5f2Icrz/uUlDsGEEnngRkTTgieQ1/Nl1PL4M8OX0jwi akPLG0zgKwCFUENL1N+o5ittglsb0I1VQflFz40ajbawhb3gHNqrI/eAv/bbhQEIRPVv NaMF97kFInpzv2ir/BKggMruMHGP4619292Oc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=CU3OINddVxTzdcTHcEhSuXnwll61sfQxL4/k1QXLQCI=; b=MFfV/IGGHpP2+fCVOG8ml9hMhr7KldstH5X5PygsNphOqD81hlAgnnDeLYVyGifIAd JpX1VaYzvjDQQGtNz8YNQQi/o7xZbcuQI5Ff+v9jxzye20YpyUCFd2d8fk1ATMGeOPLo 93d8P6mJSeXw1XR4KJwH7ciCjJZmruFpUxc4vhr/NTjwLT+eO8RDNPE0t4yw/Qkkn3dj hg6AATS/L/W1NPIvHdR01YebVApuAzvvAEPztoKgT/Oq+K4Cu7xzmdUbfA8oM8t6Sxnj eYZC+ngaKGmAVsG62cC9wN9xOxbcnUCEOIa+S9NyoU22VSjEDuyeZN5XgfbsNECeczEX nMrA== X-Gm-Message-State: AMCzsaWDBvGtCV7iLwPKhQkkezE4HmoQfrpHcuRsHDq9lOqu4bBTDZSa hey4gUvU/i9tE4mIDv1a+kXXwA== X-Google-Smtp-Source: AOwi7QCf1nErdiXS65kFOFLc1tu/YnOcKcNBr/DoXReSuEifOKLFxQMjB67S1pCAPeV13GcAkzzuvQ== X-Received: by 10.101.74.206 with SMTP id c14mr3466319pgu.190.1507164663738; Wed, 04 Oct 2017 17:51:03 -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 q13sm33310098pfi.110.2017.10.04.17.51.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 17:51:02 -0700 (PDT) Date: Wed, 4 Oct 2017 17:51:01 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Solomon Peachy , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Thomas Gleixner Subject: [PATCH] net/cw1200: Convert timers to use timer_setup() Message-ID: <20171005005101.GA23346@beast> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Solomon Peachy Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/wireless/st/cw1200/pm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/st/cw1200/pm.c b/drivers/net/wireless/st/cw1200/pm.c index d2202ae92bdd..ded23df1ac1d 100644 --- a/drivers/net/wireless/st/cw1200/pm.c +++ b/drivers/net/wireless/st/cw1200/pm.c @@ -91,7 +91,7 @@ struct cw1200_suspend_state { u8 prev_ps_mode; }; -static void cw1200_pm_stay_awake_tmo(unsigned long arg) +static void cw1200_pm_stay_awake_tmo(struct timer_list *unused) { /* XXX what's the point of this ? */ } @@ -101,8 +101,7 @@ int cw1200_pm_init(struct cw1200_pm_state *pm, { spin_lock_init(&pm->lock); - setup_timer(&pm->stay_awake, cw1200_pm_stay_awake_tmo, - (unsigned long)pm); + timer_setup(&pm->stay_awake, cw1200_pm_stay_awake_tmo, 0); return 0; }