From patchwork Wed Apr 27 19:06:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 615768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qw8b02lZSz9t4Z for ; Thu, 28 Apr 2016 05:06:52 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbcD0TGu (ORCPT ); Wed, 27 Apr 2016 15:06:50 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:31890 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbcD0TGu (ORCPT ); Wed, 27 Apr 2016 15:06:50 -0400 X-IronPort-AV: E=Sophos;i="5.24,542,1454972400"; d="scan'208";a="216096954" Received: from 198.67.28.109.rev.sfr.net (HELO hadrien) ([109.28.67.198]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Apr 2016 21:06:47 +0200 Date: Wed, 27 Apr 2016 21:06:47 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: Corey Minyard , Guenter Roeck , Wolfram Sang cc: kbuild-all@01.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] i2c-mux-pca9541: fix setup_timer.cocci warnings Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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 Signed-off-by: Julia Lawall Acked-by: Peter Rosin --- tree: git://git.code.sf.net/p/openipmi/linux-ipmi v4.5-ipmi head: 671fec027e30fdac67b341f0271841f02db0a027 commit: 4a199ab1bf7b7a2b5f7e0b0eb4162b4e98b9cd7f [25/33] i2c-mux-pca9541: Add support for non-blocking handling i2c-mux-pca9541.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/i2c/muxes/i2c-mux-pca9541.c +++ b/drivers/i2c/muxes/i2c-mux-pca9541.c @@ -547,9 +547,7 @@ static int pca9541_probe(struct i2c_clie data->op_e.smbus.data = &data->op_data; data->op_e.smbus.size = I2C_SMBUS_BYTE_DATA; - init_timer(&data->timer); - data->timer.data = (unsigned long) data; - data->timer.function = pca9541_timeout; + setup_timer(&data->timer, pca9541_timeout, (unsigned long)data); /* * I2C accesses are unprotected here.