Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238630
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] coccinelle: misc: remove "complex return code" warnings |
| Date | 2015-10-02 23:40 +0200 |
| Message-ID | <qfgdB-78j-17@gated-at.bofh.it> (permalink) |
| References | <qeycx-1Kc-13@gated-at.bofh.it> <qeEBj-2Dt-9@gated-at.bofh.it> <qeQ9s-39m-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] coccinelle: misc: remove "complex return code" warnings Johan Hovold <johan@kernel.org> - 2015-10-01 00:40 +0200
Re: [PATCH] coccinelle: misc: remove "complex return code" warnings Julia Lawall <julia.lawall@lip6.fr> - 2015-10-01 07:30 +0200
Re: [PATCH] coccinelle: misc: remove "complex return code" warnings Johan Hovold <johan@kernel.org> - 2015-10-01 19:50 +0200
Re: [PATCH] coccinelle: misc: remove "complex return code" warnings Julia Lawall <julia.lawall@lip6.fr> - 2015-10-02 23:40 +0200
Re: [PATCH] coccinelle: misc: remove "complex return code" warnings Johan Hovold <johan@kernel.org> - 2015-10-04 13:00 +0200
Re: [PATCH] coccinelle: misc: remove "complex return code" warnings Julia Lawall <julia.lawall@lip6.fr> - 2015-10-03 18:30 +0200
Re: [PATCH] coccinelle: misc: remove "complex return code" warnings Johan Hovold <johan@kernel.org> - 2015-10-04 13:00 +0200
Re: [PATCH] coccinelle: misc: remove "complex return code" warnings Julia Lawall <julia.lawall@lip6.fr> - 2015-10-03 18:30 +0200
csiph-web