Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751899AbaKKQcE (ORCPT ); Tue, 11 Nov 2014 11:32:04 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:46815 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345AbaKKQcB (ORCPT ); Tue, 11 Nov 2014 11:32:01 -0500 MIME-Version: 1.0 In-Reply-To: References: <1415708457-18798-1-git-send-email-octavian.purdila@intel.com> <1415708457-18798-2-git-send-email-octavian.purdila@intel.com> Date: Tue, 11 Nov 2014 18:32:00 +0200 Message-ID: Subject: Re: [PATCH 1/2] mfd: dln2: fix _dln2_transfer return code From: Octavian Purdila To: Julia Lawall Cc: Lee Jones , Laurentiu Palcu , Johan Hovold , Wolfram Sang , linux-i2c , lkml Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 11, 2014 at 6:18 PM, Julia Lawall wrote: > On Tue, 11 Nov 2014, Octavian Purdila wrote: > >> If wait_for_completion_interruptible_timeout returns a positive value >> it may be propagated as the return value of _dln2_transfer. This >> contradicts the documentation of the function and exposes unnecessary >> internals to the callers. >> >> This patch makes sure to set the return value to 0 in that case. > > I didn't keep around the code or the address of the git tree, but I wonder > if this makes a later assignment of ret to 0 unnecessary? > Yes, you are right, we can skip setting it when ibuf is NULL. I will send v2 that fixes this and the coding style issue. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/