From patchwork Fri Nov 11 08:10:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 9422543 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 09BC16047D for ; Fri, 11 Nov 2016 08:13:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE9492995A for ; Fri, 11 Nov 2016 08:13:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFE762996C; Fri, 11 Nov 2016 08:13:50 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C4D622995A for ; Fri, 11 Nov 2016 08:13:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c56wF-0002dE-4l; Fri, 11 Nov 2016 08:11:55 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c56wB-0002ZQ-DP; Fri, 11 Nov 2016 08:11:52 +0000 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP; 11 Nov 2016 00:11:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,620,1473145200"; d="scan'208";a="30049875" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga006.fm.intel.com with ESMTP; 11 Nov 2016 00:11:27 -0800 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1c56wR-000LfE-GE; Fri, 11 Nov 2016 16:12:07 +0800 Date: Fri, 11 Nov 2016 16:10:20 +0800 From: kbuild test robot To: Greg Kroah-Hartman Subject: [PATCH] staging: vc04_services: fix setup_timer.cocci warnings Message-ID: <20161111081020.GA82218@lkp-ib03.lkp.intel.com> References: <201611111652.TBnh32bx%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201611111652.TBnh32bx%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161111_001151_635549_7F89CD81 X-CRM114-Status: UNSURE ( 8.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Daniel Stone , Stephen Warren , Lee Jones , Eric Anholt , Wei Yongjun , kbuild-all@01.org, popcornmix , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1817:2-12: Use setup_timer function for function on line 1818. Use setup_timer function instead of initializing timer with the function and data fields Generated by: scripts/coccinelle/api/setup_timer.cocci Signed-off-by: Fengguang Wu --- Please take the patch only if it's a positive warning. Thanks! vchiq_arm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -1814,9 +1814,8 @@ vchiq_arm_init_state(VCHIQ_STATE_T *stat arm_state->suspend_timer_timeout = SUSPEND_TIMER_TIMEOUT_MS; arm_state->suspend_timer_running = 0; - init_timer(&arm_state->suspend_timer); - arm_state->suspend_timer.data = (unsigned long)(state); - arm_state->suspend_timer.function = suspend_timer_callback; + setup_timer(&arm_state->suspend_timer, suspend_timer_callback, + (unsigned long)(state)); arm_state->first_connect = 0;