Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1231920
| From | Olliver Schinagl <oliver+list@schinagl.nl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | gpios search behaviour for gpio from _DSD |
| Date | 2015-09-24 09:30 +0200 |
| Message-ID | <qc98D-4Fk-21@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hey list, Mika,
With commit 0d9a693cc86 the following snippet of code was added:
+ /* Try first from _DSD */
+ for (i = 0; i < ARRAY_SIZE(suffixes); i++) {
+ if (con_id && strcmp(con_id, "gpios")) {
+ snprintf(propname, sizeof(propname), "%s-%s",
+ con_id, suffixes[i]);
and I was wondering why the gpios suffix is singled out. Are we not
allowed to check for all the strings in the suffixes array? Is gpios
special or is gpio simply not allowed. If that strcmp check would be
removed, would bad things happen?
Also, just to educate myself, isn't relying on left to right parsing
complier specifc? E.g. if con_id is null, we end up passing NULL to
strcmp and atleast for libc can cause segfaults iirc.
Thanks,
Olliver
--
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 — Next in thread | Find similar | Unroll thread
gpios search behaviour for gpio from _DSD Olliver Schinagl <oliver+list@schinagl.nl> - 2015-09-24 09:30 +0200
Re: gpios search behaviour for gpio from _DSD Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-09-24 10:50 +0200
Re: gpios search behaviour for gpio from _DSD Olliver Schinagl <oliver+list@schinagl.nl> - 2015-09-26 21:40 +0200
Re: gpios search behaviour for gpio from _DSD Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-09-28 09:40 +0200
csiph-web