From patchwork Thu Jun 11 14:12:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 483176 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 3F90B140285 for ; Fri, 12 Jun 2015 00:20:36 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752846AbbFKOUS (ORCPT ); Thu, 11 Jun 2015 10:20:18 -0400 Received: from www.osadl.org ([62.245.132.105]:44026 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752273AbbFKOUQ (ORCPT ); Thu, 11 Jun 2015 10:20:16 -0400 Received: from debian.hofr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t5BEK2UA009205; Thu, 11 Jun 2015 16:20:02 +0200 From: Nicholas Mc Guire To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] i2c: octeon: remove unused signal handling Date: Thu, 11 Jun 2015 16:12:03 +0200 Message-Id: <1434031923-20914-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KHOP_SC_TOP_CIDR8, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on www.osadl.org Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 'commit 2637e5fd232d ("i2c: octeon: Fix i2c fail problem when a process is terminated by a signal")' removed the wait_event_interruptible_timeout to prevent half/mixed i2c messages from being sent/recievd but forgot to drop the signal handling case in the return handling. This just removes this dead code. While at it the return variable is adjusted to the type expected. Signed-off-by: Nicholas Mc Guire Reviewed-by: Alexander Sverdlin --- V2: Thanks to Wolfram Sang for clarifying the intent (and how I should have found this by properly checking the git log). Patch was compile tested with cavium_octeon_defconfig (implies CONFIG_I2C_OCTEON=y) Patch is against 4.1-rc7 (localversion-next is -next-20150611) drivers/i2c/busses/i2c-octeon.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c index 6e75e01..32914ab 100644 --- a/drivers/i2c/busses/i2c-octeon.c +++ b/drivers/i2c/busses/i2c-octeon.c @@ -200,7 +200,7 @@ static int octeon_i2c_test_iflg(struct octeon_i2c *i2c) */ static int octeon_i2c_wait(struct octeon_i2c *i2c) { - int result; + long result; octeon_i2c_int_enable(i2c); @@ -210,10 +210,7 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c) octeon_i2c_int_disable(i2c); - if (result < 0) { - dev_dbg(i2c->dev, "%s: wait interrupted\n", __func__); - return result; - } else if (result == 0) { + if (result == 0) { dev_dbg(i2c->dev, "%s: timeout\n", __func__); return -ETIMEDOUT; }