All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: Fix loose spelling
@ 2017-10-20  2:57 Andrew Jeffery
  2017-10-20  7:38 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Jeffery @ 2017-10-20  2:57 UTC (permalink / raw)
  To: linux-gpio
  Cc: Andrew Jeffery, linus.walleij, robh+dt, frowand.list, ldewangan,
	ckeepax, linux-kernel, Russell Currey

Literally.

I expect "lose" was meant here, rather than "loose", though you could feasibly
use a somewhat uncommon definition of "loose" to mean what would be meant by
"lose": "Loose the hounds" for instance, as in "Release the hounds".
Substituting in "value" for "hounds" gives "release the value", and makes some
sense, but futher substituting back to loose gives "loose the value" which
overall just seems a bit anachronistic.

Instead, use modern, pragmatic English and save a character.

Cc: Russell Currey <ruscur@russell.cc>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 drivers/gpio/gpiolib-of.c       | 4 ++--
 drivers/gpio/gpiolib.c          | 6 +++---
 drivers/gpio/gpiolib.h          | 2 +-
 include/dt-bindings/gpio/gpio.h | 2 +-
 include/linux/gpio/machine.h    | 2 +-
 include/linux/of_gpio.h         | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index bfcd20699ec8..e0d59e61b52f 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -153,8 +153,8 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
 			*flags |= GPIO_OPEN_SOURCE;
 	}
 
-	if (of_flags & OF_GPIO_SLEEP_MAY_LOOSE_VALUE)
-		*flags |= GPIO_SLEEP_MAY_LOOSE_VALUE;
+	if (of_flags & OF_GPIO_SLEEP_MAY_LOSE_VALUE)
+		*flags |= GPIO_SLEEP_MAY_LOSE_VALUE;
 
 	return desc;
 }
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index eb80dac4e26a..a56b29fd8bb1 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2890,7 +2890,7 @@ bool gpiochip_line_is_persistent(struct gpio_chip *chip, unsigned int offset)
 	if (offset >= chip->ngpio)
 		return false;
 
-	return !test_bit(FLAG_SLEEP_MAY_LOOSE_VALUE,
+	return !test_bit(FLAG_SLEEP_MAY_LOSE_VALUE,
 			 &chip->gpiodev->descs[offset].flags);
 }
 EXPORT_SYMBOL_GPL(gpiochip_line_is_persistent);
@@ -3268,8 +3268,8 @@ int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
 		set_bit(FLAG_OPEN_DRAIN, &desc->flags);
 	if (lflags & GPIO_OPEN_SOURCE)
 		set_bit(FLAG_OPEN_SOURCE, &desc->flags);
-	if (lflags & GPIO_SLEEP_MAY_LOOSE_VALUE)
-		set_bit(FLAG_SLEEP_MAY_LOOSE_VALUE, &desc->flags);
+	if (lflags & GPIO_SLEEP_MAY_LOSE_VALUE)
+		set_bit(FLAG_SLEEP_MAY_LOSE_VALUE, &desc->flags);
 
 	/* No particular flag request, return here... */
 	if (!(dflags & GPIOD_FLAGS_BIT_DIR_SET)) {
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index d003ccb12781..799208fc189a 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -201,7 +201,7 @@ struct gpio_desc {
 #define FLAG_OPEN_SOURCE 8	/* Gpio is open source type */
 #define FLAG_USED_AS_IRQ 9	/* GPIO is connected to an IRQ */
 #define FLAG_IS_HOGGED	11	/* GPIO is hogged */
-#define FLAG_SLEEP_MAY_LOOSE_VALUE 12	/* GPIO may loose value in sleep */
+#define FLAG_SLEEP_MAY_LOSE_VALUE 12	/* GPIO may lose value in sleep */
 
 	/* Connection label */
 	const char		*label;
diff --git a/include/dt-bindings/gpio/gpio.h b/include/dt-bindings/gpio/gpio.h
index c5074584561d..70de5b7a6c9b 100644
--- a/include/dt-bindings/gpio/gpio.h
+++ b/include/dt-bindings/gpio/gpio.h
@@ -30,6 +30,6 @@
 
 /* Bit 3 express GPIO suspend/resume persistence */
 #define GPIO_SLEEP_MAINTAIN_VALUE 0
-#define GPIO_SLEEP_MAY_LOOSE_VALUE 8
+#define GPIO_SLEEP_MAY_LOSE_VALUE 8
 
 #endif
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h
index ba4ccfd900f9..5e9f294c29eb 100644
--- a/include/linux/gpio/machine.h
+++ b/include/linux/gpio/machine.h
@@ -10,7 +10,7 @@ enum gpio_lookup_flags {
 	GPIO_OPEN_DRAIN = (1 << 1),
 	GPIO_OPEN_SOURCE = (1 << 2),
 	GPIO_SLEEP_MAINTAIN_VALUE = (0 << 3),
-	GPIO_SLEEP_MAY_LOOSE_VALUE = (1 << 3),
+	GPIO_SLEEP_MAY_LOSE_VALUE = (1 << 3),
 };
 
 /**
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index ca10f43564de..1fe205582111 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -31,7 +31,7 @@ enum of_gpio_flags {
 	OF_GPIO_ACTIVE_LOW = 0x1,
 	OF_GPIO_SINGLE_ENDED = 0x2,
 	OF_GPIO_OPEN_DRAIN = 0x4,
-	OF_GPIO_SLEEP_MAY_LOOSE_VALUE = 0x8,
+	OF_GPIO_SLEEP_MAY_LOSE_VALUE = 0x8,
 };
 
 #ifdef CONFIG_OF_GPIO
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: Fix loose spelling
  2017-10-20  2:57 [PATCH] gpio: Fix loose spelling Andrew Jeffery
@ 2017-10-20  7:38 ` Linus Walleij
  2017-10-25  8:02   ` Charles Keepax
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2017-10-20  7:38 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: linux-gpio, Rob Herring, Frank Rowand, Laxman Dewangan,
	Charles Keepax, linux-kernel, Russell Currey

On Fri, Oct 20, 2017 at 4:57 AM, Andrew Jeffery <andrew@aj.id.au> wrote:

> Literally.
>
> I expect "lose" was meant here, rather than "loose", though you could feasibly
> use a somewhat uncommon definition of "loose" to mean what would be meant by
> "lose": "Loose the hounds" for instance, as in "Release the hounds".
> Substituting in "value" for "hounds" gives "release the value", and makes some
> sense, but futher substituting back to loose gives "loose the value" which
> overall just seems a bit anachronistic.
>
> Instead, use modern, pragmatic English and save a character.
>
> Cc: Russell Currey <ruscur@russell.cc>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

Patch applied as obviously correct.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: Fix loose spelling
  2017-10-20  7:38 ` Linus Walleij
@ 2017-10-25  8:02   ` Charles Keepax
  0 siblings, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2017-10-25  8:02 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Andrew Jeffery, linux-gpio, Rob Herring, Frank Rowand,
	Laxman Dewangan, Charles Keepax, linux-kernel, Russell Currey

On Fri, Oct 20, 2017 at 09:38:05AM +0200, Linus Walleij wrote:
> On Fri, Oct 20, 2017 at 4:57 AM, Andrew Jeffery <andrew@aj.id.au> wrote:
> 
> > Literally.
> >
> > I expect "lose" was meant here, rather than "loose", though you could feasibly
> > use a somewhat uncommon definition of "loose" to mean what would be meant by
> > "lose": "Loose the hounds" for instance, as in "Release the hounds".
> > Substituting in "value" for "hounds" gives "release the value", and makes some
> > sense, but futher substituting back to loose gives "loose the value" which
> > overall just seems a bit anachronistic.
> >
> > Instead, use modern, pragmatic English and save a character.
> >
> > Cc: Russell Currey <ruscur@russell.cc>
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> 
> Patch applied as obviously correct.
> 

Indeed yes very sorry for that one, for some reason I have always
had a massive blind spot for those two words. You really wouldn't
think English was my first language.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-25  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20  2:57 [PATCH] gpio: Fix loose spelling Andrew Jeffery
2017-10-20  7:38 ` Linus Walleij
2017-10-25  8:02   ` Charles Keepax

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.