Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589164 > unrolled thread
| Started by | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| First post | 2017-02-28 05:30 +0100 |
| Last post | 2017-02-28 19:30 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 3/3] spi: allow registering empty spi_board_info lists Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-28 05:30 +0100
Re: [PATCH v2 3/3] spi: allow registering empty spi_board_info lists Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-28 15:10 +0100
Re: [PATCH v2 3/3] spi: allow registering empty spi_board_info lists Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-28 19:30 +0100
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-02-28 05:30 +0100 |
| Subject | [PATCH v2 3/3] spi: allow registering empty spi_board_info lists |
| Message-ID | <tfHAd-7Cn-1@gated-at.bofh.it> |
Many boards form list of spi_board_info entries depending on config,
and it is possible to end up with empty list. Do not report error
in such cases.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/spi/spi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 1b66e0497327..dbc4f00dc2fc 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -683,9 +683,6 @@ int spi_register_board_info(struct spi_board_info const *info, unsigned n)
struct boardinfo *bi;
int i;
- if (!n)
- return -EINVAL;
-
for (i = 0; i < n; i++, info++) {
struct spi_master *master;
--
2.11.0.483.g087da7b7c-goog
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-02-28 15:10 +0100 |
| Message-ID | <tfQDw-5uI-31@gated-at.bofh.it> |
| In reply to | #1589164 |
On Tue, Feb 28, 2017 at 6:18 AM, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote: > Many boards form list of spi_board_info entries depending on config, > and it is possible to end up with empty list. Do not report error > in such cases. If there is an actual case already it would be better to make the patch first in the series with Cc: stable@. FWIW: Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> -- With Best Regards, Andy Shevchenko
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-02-28 19:30 +0100 |
| Message-ID | <tfUH8-8cC-31@gated-at.bofh.it> |
| In reply to | #1589493 |
On Tue, Feb 28, 2017 at 04:01:46PM +0200, Andy Shevchenko wrote: > On Tue, Feb 28, 2017 at 6:18 AM, Dmitry Torokhov > <dmitry.torokhov@gmail.com> wrote: > > Many boards form list of spi_board_info entries depending on config, > > and it is possible to end up with empty list. Do not report error > > in such cases. > > If there is an actual case already it would be better to make the > patch first in the series with Cc: stable@. arch/blackfin/mach-bf533/boards/ezkit.c: you can get config convoluted enough so that you'll end up with empty array. But nobody checks the result of the call, so the failure is not visible. There is no need to cc stable@ for this. > > FWIW: > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Thanks. -- Dmitry
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web