From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbbJBVdt (ORCPT ); Fri, 2 Oct 2015 17:33:49 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:9056 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbbJBVds (ORCPT ); Fri, 2 Oct 2015 17:33:48 -0400 X-IronPort-AV: E=Sophos;i="5.17,624,1437429600"; d="scan'208";a="180765481" Date: Fri, 2 Oct 2015 23:33:46 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: Johan Hovold cc: Julia Lawall , Michal Marek , Gilles Muller , Nicolas Palix , linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Subject: Re: [PATCH] coccinelle: misc: remove "complex return code" warnings In-Reply-To: <20151001174718.GJ4284@localhost> Message-ID: References: <1443652647-23097-1-git-send-email-johan@kernel.org> <20151001174718.GJ4284@localhost> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Do you consider that this function would be better off in two lines? static int mxt_acquire_irq(struct mxt_data *data) { int error; enable_irq(data->irq); error = mxt_process_messages_until_invalid(data); if (error) return error; return 0; } Would simplifying the code at the end of the following function be helpful or not? static int adnp_gpio_setup(struct adnp *adnp, unsigned int num_gpios) { struct gpio_chip *chip = &adnp->gpio; int err; adnp->reg_shift = get_count_order(num_gpios) - 3; chip->direction_input = adnp_gpio_direction_input; chip->direction_output = adnp_gpio_direction_output; chip->get = adnp_gpio_get; chip->set = adnp_gpio_set; chip->can_sleep = true; if (IS_ENABLED(CONFIG_DEBUG_FS)) chip->dbg_show = adnp_gpio_dbg_show; chip->base = -1; chip->ngpio = num_gpios; chip->label = adnp->client->name; chip->dev = &adnp->client->dev; chip->of_node = chip->dev->of_node; chip->owner = THIS_MODULE; err = gpiochip_add(chip); if (err) return err; return 0; } thanks, julia