linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	bgolaszewski@baylibre.com, linus.walleij@linaro.org
Cc: Kent Gibson <warthog618@gmail.com>
Subject: [PATCH 5/5] gpio: uapi: clarify the meaning of 'empty' char arrays
Date: Mon,  5 Oct 2020 15:03:29 +0800	[thread overview]
Message-ID: <20201005070329.21055-6-warthog618@gmail.com> (raw)
In-Reply-To: <20201005070329.21055-1-warthog618@gmail.com>

Clarify that a char array containing a string is considered 'empty' if
the first character is the null terminator. The remaining characters
are not relevant to this determination.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
---
 include/uapi/linux/gpio.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h
index ad3f56dd87ec..2072c260f5d0 100644
--- a/include/uapi/linux/gpio.h
+++ b/include/uapi/linux/gpio.h
@@ -26,7 +26,7 @@
  * struct gpiochip_info - Information about a certain GPIO chip
  * @name: the Linux kernel name of this GPIO chip
  * @label: a functional name for this GPIO chip, such as a product
- * number, may be empty
+ * number, may be empty (i.e. label[0] == '\0')
  * @lines: number of GPIO lines on this chip
  */
 struct gpiochip_info {
@@ -203,7 +203,7 @@ struct gpio_v2_line_request {
  * struct gpio_v2_line_info - Information about a certain GPIO line
  * @name: the name of this GPIO line, such as the output pin of the line on
  * the chip, a rail or a pin header name on a board, as specified by the
- * GPIO chip, may be empty
+ * GPIO chip, may be empty (i.e. name[0] == '\0')
  * @consumer: a functional name for the consumer of this GPIO line as set
  * by whatever is using it, will be empty if there is no current user but
  * may also be empty if the consumer doesn't set this up
@@ -315,7 +315,7 @@ struct gpio_v2_line_event {
  * @flags: various flags for this line
  * @name: the name of this GPIO line, such as the output pin of the line on the
  * chip, a rail or a pin header name on a board, as specified by the gpio
- * chip, may be empty
+ * chip, may be empty (i.e. name[0] == '\0')
  * @consumer: a functional name for the consumer of this GPIO line as set by
  * whatever is using it, will be empty if there is no current user but may
  * also be empty if the consumer doesn't set this up
-- 
2.28.0


  parent reply	other threads:[~2020-10-05  7:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  7:03 [PATCH 0/5] gpio: uapi: documentation improvements Kent Gibson
2020-10-05  7:03 ` [PATCH 1/5] gpio: uapi: fix kernel-doc warnings Kent Gibson
2020-10-05  7:03 ` [PATCH 2/5] gpio: uapi: comment consistency Kent Gibson
2020-10-05  7:03 ` [PATCH 3/5] gpio: uapi: kernel-doc formatting improvements Kent Gibson
2020-10-05  7:03 ` [PATCH 4/5] gpio: uapi: remove whitespace Kent Gibson
2020-10-05  7:03 ` Kent Gibson [this message]
2020-10-05 11:01   ` [PATCH 5/5] gpio: uapi: clarify the meaning of 'empty' char arrays Andy Shevchenko
2020-10-05 13:06     ` Kent Gibson
2020-10-05 11:02 ` [PATCH 0/5] gpio: uapi: documentation improvements Andy Shevchenko
2020-10-05 11:02   ` Andy Shevchenko
2020-10-08 15:46 ` Bartosz Golaszewski
2020-10-13 13:21   ` Linus Walleij
2020-10-13 13:29     ` Kent Gibson
2020-10-14 17:14       ` Andy Shevchenko
2020-10-14 23:35         ` Kent Gibson
2020-10-19 13:05 ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201005070329.21055-6-warthog618@gmail.com \
    --to=warthog618@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).