[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbhh9CcqMw1Wp0-JsMRGt=koZJ_FCi67gCyFHSxVf-sxQ@mail.gmail.com>
Date: Wed, 29 Nov 2017 13:55:06 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc: linux-gpio@...r.kernel.org,
Sebastian Reichel <sebastian.reichel@...labora.co.uk>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/3] pinctrl: mcp23s08: Use common error handling code in mcp23s08_dbg_show()
On Mon, Oct 30, 2017 at 4:47 PM, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
> + if (t)
> + goto report_failure;
>
> for (t = 0, mask = BIT(0); t < chip->ngpio; t++, mask <<= 1) {
> const char *label;
> @@ -758,8 +753,13 @@ static void mcp23s08_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> /* NOTE: ignoring the irq-related registers */
> seq_puts(s, "\n");
> }
> -done:
> +unlock:
> mutex_unlock(&mcp->lock);
> + return;
> +
> +report_failure:
> + seq_puts(s, " I/O Error\n");
> + goto unlock;
> }
This is spaghetti coding. Not applied.
https://en.wikipedia.org/wiki/Spaghetti_code
Yours,
Linus Walleij
Powered by blists - more mailing lists