[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230724090902.679ea56d@xps-13>
Date: Mon, 24 Jul 2023 09:09:02 +0200
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Andy Shevchenko <andy@...nel.org>
Cc: nikita.shubin@...uefel.me,
Hartley Sweeten <hsweeten@...ionengravers.com>,
Lennert Buytenhek <kernel@...tstofly.org>,
Alexander Sverdlin <alexander.sverdlin@...il.com>,
Russell King <linux@...linux.org.uk>,
Lukasz Majewski <lukma@...x.de>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>,
Sebastian Reichel <sre@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Mark Brown <broonie@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Vinod Koul <vkoul@...nel.org>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Damien Le Moal <dlemoal@...nel.org>,
Sergey Shtylyov <s.shtylyov@....ru>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
soc@...nel.org, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Michael Peters <mpeters@...eddedts.com>,
Kris Bahnsen <kris@...eddedts.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
linux-clk@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-watchdog@...r.kernel.org, linux-pm@...r.kernel.org,
linux-pwm@...r.kernel.org, linux-spi@...r.kernel.org,
netdev@...r.kernel.org, dmaengine@...r.kernel.org,
linux-mtd@...ts.infradead.org, linux-ide@...r.kernel.org,
linux-input@...r.kernel.org, alsa-devel@...a-project.org
Subject: Re: [PATCH v3 24/42] mtd: nand: add support for ts72xx
Hi Andy,
> > +static int ts72xx_nand_attach_chip(struct nand_chip *chip)
> > +{
> > + switch (chip->ecc.engine_type) {
> > + case NAND_ECC_ENGINE_TYPE_SOFT:
> > + if (chip->ecc.algo == NAND_ECC_ALGO_UNKNOWN)
> > + chip->ecc.algo = NAND_ECC_ALGO_HAMMING;
> > + break;
> > + case NAND_ECC_ENGINE_TYPE_ON_HOST:
> > + return -EINVAL;
> > + default:
>
> > + break;
>
> Here it will return 0, is it a problem?
Seems ok, there are two other situations: on-die ECC engine and no ECC
engine, both do not require any specific handling on the controller
side.
>
> > + }
> > +
> > + return 0;
> > +}
>
> ...
>
> > +static void ts72xx_nand_remove(struct platform_device *pdev)
> > +{
> > + struct ts72xx_nand_data *data = platform_get_drvdata(pdev);
> > + struct nand_chip *chip = &data->chip;
> > + int ret;
> > +
> > + ret = mtd_device_unregister(nand_to_mtd(chip));
>
> > + WARN_ON(ret);
>
> Why?! Is it like this in other MTD drivers?
Yes, we did not yet change the internal machinery to return void, and
we don't want people to think getting errors there is normal.
> > + nand_cleanup(chip);
> > +}
>
Thanks,
Miquèl
Powered by blists - more mailing lists