Skip to contentSkip to conversation

power: supply: bq2415x: Fix spelling mistake "vender" -> "vendor"

PATCH In review Colin Ian King 3 participants 9 messages Mar 15, 2022 – Mar 17, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: supply: bq2415x: Fix spelling mistake "vender" -> "vendor"

There are several spelling mistakes in comments, function names and literal strings. Fix these.

---
 drivers/power/supply/bq2415x_charger.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/power/supply/bq2415x_charger.c +5 -5
index 5724001e66b9..b35700071966 100644
@@ -71,7 +71,7 @@
 #define BQ2415X_BIT_OTG_PL		1
 #define BQ2415X_BIT_OTG_EN		0
 
-/* vender register */
+/* vendor register */
 #define BQ2415X_MASK_VENDER		(BIT(5)|BIT(6)|BIT(7))
 #define BQ2415X_SHIFT_VENDER		5
 #define BQ2415X_MASK_PN			(BIT(3)|BIT(4))
@@ -491,8 +491,8 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
 	return -1;
 }
 
-/* return chip vender code */
-static int bq2415x_get_vender_code(struct bq2415x_device *bq)
+/* return chip vendor code */
+static int bq2415x_get_vendor_code(struct bq2415x_device *bq)
 {
 	int ret;
 
@@ -1501,9 +1501,9 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
 		sprintf(revstr, "1.%d", ret);
 
 	bq->model = kasprintf(GFP_KERNEL,
-				"chip %s, revision %s, vender code %.3d",
+				"chip %s, revision %s, vendor code %.3d",
 				bq2415x_chip_name[chip], revstr,
-				bq2415x_get_vender_code(bq));
+				bq2415x_get_vendor_code(bq));
 	if (!bq->model) {
 		dev_err(bq->dev, "failed to allocate model name\n");
 		return -ENOMEM;
Signature · 1 line
2.35.1
reviewer
#1 lore raw
Quoted 2 lines · On Tuesday 15 March 2022 22:37:00 Colin Ian King wrote:

There are several spelling mistakes in comments, function names and literal strings. Fix these.

I do not think that there are mistakes.

Please look at page 29 of the official bq24150 datasheet:
https://www.ti.com/lit/ds/symlink/bq24150.pdf

Quoted 44 lines
---
 drivers/power/supply/bq2415x_charger.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/power/supply/bq2415x_charger.c +5 -5
index 5724001e66b9..b35700071966 100644
@@ -71,7 +71,7 @@
 #define BQ2415X_BIT_OTG_PL		1
 #define BQ2415X_BIT_OTG_EN		0
 
-/* vender register */
+/* vendor register */
 #define BQ2415X_MASK_VENDER		(BIT(5)|BIT(6)|BIT(7))
 #define BQ2415X_SHIFT_VENDER		5
 #define BQ2415X_MASK_PN			(BIT(3)|BIT(4))
@@ -491,8 +491,8 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
 	return -1;
 }
 
-/* return chip vender code */
-static int bq2415x_get_vender_code(struct bq2415x_device *bq)
+/* return chip vendor code */
+static int bq2415x_get_vendor_code(struct bq2415x_device *bq)
 {
 	int ret;
 
@@ -1501,9 +1501,9 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
 		sprintf(revstr, "1.%d", ret);
 
 	bq->model = kasprintf(GFP_KERNEL,
-				"chip %s, revision %s, vender code %.3d",
+				"chip %s, revision %s, vendor code %.3d",
 				bq2415x_chip_name[chip], revstr,
-				bq2415x_get_vender_code(bq));
+				bq2415x_get_vendor_code(bq));
 	if (!bq->model) {
 		dev_err(bq->dev, "failed to allocate model name\n");
 		return -ENOMEM;
Signature · 1 line
2.35.1
#2 lore raw
Quoted 8 lines · Pali Rohár
Quoted 2 lines · On Tuesday 15 March 2022 22:37:00 Colin Ian King wrote:

There are several spelling mistakes in comments, function names and literal strings. Fix these.

I do not think that there are mistakes.

Please look at page 29 of the official bq24150 datasheet:
https://www.ti.com/lit/ds/symlink/bq24150.pdf

Looks like TI are redefining the spelling in the language :-)

Quoted 45 lines
Quoted 45 lines
---
  drivers/power/supply/bq2415x_charger.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/power/supply/bq2415x_charger.c +5 -5
index 5724001e66b9..b35700071966 100644
@@ -71,7 +71,7 @@
  #define BQ2415X_BIT_OTG_PL		1
  #define BQ2415X_BIT_OTG_EN		0
 
-/* vender register */
+/* vendor register */
  #define BQ2415X_MASK_VENDER		(BIT(5)|BIT(6)|BIT(7))
  #define BQ2415X_SHIFT_VENDER		5
  #define BQ2415X_MASK_PN			(BIT(3)|BIT(4))
@@ -491,8 +491,8 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
  	return -1;
  }
 
-/* return chip vender code */
-static int bq2415x_get_vender_code(struct bq2415x_device *bq)
+/* return chip vendor code */
+static int bq2415x_get_vendor_code(struct bq2415x_device *bq)
  {
  	int ret;
 
@@ -1501,9 +1501,9 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
  		sprintf(revstr, "1.%d", ret);
 
  	bq->model = kasprintf(GFP_KERNEL,
-				"chip %s, revision %s, vender code %.3d",
+				"chip %s, revision %s, vendor code %.3d",
  				bq2415x_chip_name[chip], revstr,
-				bq2415x_get_vender_code(bq));
+				bq2415x_get_vendor_code(bq));
  	if (!bq->model) {
  		dev_err(bq->dev, "failed to allocate model name\n");
  		return -ENOMEM;
Signature · 1 line
2.35.1
reviewer
#3 lore raw
Quoted 11 lines · On Tuesday 15 March 2022 23:00:14 Colin King (gmail) wrote:
Quoted 8 lines · Pali Rohár
Quoted 2 lines · On Tuesday 15 March 2022 22:37:00 Colin Ian King wrote:

There are several spelling mistakes in comments, function names and literal strings. Fix these.

I do not think that there are mistakes.

Please look at page 29 of the official bq24150 datasheet:
https://www.ti.com/lit/ds/symlink/bq24150.pdf

Looks like TI are redefining the spelling in the language :-)

Well, that could be truth, or maybe it just means something different. It is about 10 years ago and I do not remember more details about it. Anyway, in any case register name is vender and kernel code should match official register naming for which driver was written...

Quoted 42 lines
Quoted 41 lines
Quoted 41 lines
---
  drivers/power/supply/bq2415x_charger.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/power/supply/bq2415x_charger.c +5 -5
index 5724001e66b9..b35700071966 100644
@@ -71,7 +71,7 @@
  #define BQ2415X_BIT_OTG_PL		1
  #define BQ2415X_BIT_OTG_EN		0
-/* vender register */
+/* vendor register */
  #define BQ2415X_MASK_VENDER		(BIT(5)|BIT(6)|BIT(7))
  #define BQ2415X_SHIFT_VENDER		5
  #define BQ2415X_MASK_PN			(BIT(3)|BIT(4))
@@ -491,8 +491,8 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
  	return -1;
  }
-/* return chip vender code */
-static int bq2415x_get_vender_code(struct bq2415x_device *bq)
+/* return chip vendor code */
+static int bq2415x_get_vendor_code(struct bq2415x_device *bq)
  {
  	int ret;
@@ -1501,9 +1501,9 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
  		sprintf(revstr, "1.%d", ret);
  	bq->model = kasprintf(GFP_KERNEL,
-				"chip %s, revision %s, vender code %.3d",
+				"chip %s, revision %s, vendor code %.3d",
  				bq2415x_chip_name[chip], revstr,
-				bq2415x_get_vender_code(bq));
+				bq2415x_get_vendor_code(bq));
  	if (!bq->model) {
  		dev_err(bq->dev, "failed to allocate model name\n");
  		return -ENOMEM;
Signature · 1 line
2.35.1
#4 lore raw
Quoted 11 lines · Pali Rohár
Quoted 10 lines · On Tuesday 15 March 2022 23:00:14 Colin King (gmail) wrote:
Quoted 8 lines · Pali Rohár
Quoted 2 lines · On Tuesday 15 March 2022 22:37:00 Colin Ian King wrote:

There are several spelling mistakes in comments, function names and literal strings. Fix these.

I do not think that there are mistakes.

Please look at page 29 of the official bq24150 datasheet:
https://www.ti.com/lit/ds/symlink/bq24150.pdf

Quoted 6 lines
Quoted 1 line

Looks like TI are redefining the spelling in the language :-)

Well, that could be truth, or maybe it just means something different. It is about 10 years ago and I do not remember more details about it. Anyway, in any case register name is vender and kernel code should match official register naming for which driver was written...

I'm fine with that. Apologies for the noise.

Quoted 43 lines
Quoted 43 lines
Quoted 42 lines
Quoted 42 lines
---
   drivers/power/supply/bq2415x_charger.c | 10 +++++-----
   1 file changed, 5 insertions(+), 5 deletions(-)
drivers/power/supply/bq2415x_charger.c +5 -5
index 5724001e66b9..b35700071966 100644
@@ -71,7 +71,7 @@
   #define BQ2415X_BIT_OTG_PL		1
   #define BQ2415X_BIT_OTG_EN		0
-/* vender register */
+/* vendor register */
   #define BQ2415X_MASK_VENDER		(BIT(5)|BIT(6)|BIT(7))
   #define BQ2415X_SHIFT_VENDER		5
   #define BQ2415X_MASK_PN			(BIT(3)|BIT(4))
@@ -491,8 +491,8 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
   	return -1;
   }
-/* return chip vender code */
-static int bq2415x_get_vender_code(struct bq2415x_device *bq)
+/* return chip vendor code */
+static int bq2415x_get_vendor_code(struct bq2415x_device *bq)
   {
   	int ret;
@@ -1501,9 +1501,9 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
   		sprintf(revstr, "1.%d", ret);
   	bq->model = kasprintf(GFP_KERNEL,
-				"chip %s, revision %s, vender code %.3d",
+				"chip %s, revision %s, vendor code %.3d",
   				bq2415x_chip_name[chip], revstr,
-				bq2415x_get_vender_code(bq));
+				bq2415x_get_vendor_code(bq));
   	if (!bq->model) {
   		dev_err(bq->dev, "failed to allocate model name\n");
   		return -ENOMEM;
Signature · 1 line
2.35.1
reviewer
#5 lore raw
Quoted 12 lines · On Tuesday 15 March 2022 23:09:17 Colin King (gmail) wrote:
Quoted 11 lines · Pali Rohár
Quoted 10 lines · On Tuesday 15 March 2022 23:00:14 Colin King (gmail) wrote:
Quoted 8 lines · Pali Rohár
Quoted 2 lines · On Tuesday 15 March 2022 22:37:00 Colin Ian King wrote:

There are several spelling mistakes in comments, function names and literal strings. Fix these.

I do not think that there are mistakes.

Please look at page 29 of the official bq24150 datasheet:
https://www.ti.com/lit/ds/symlink/bq24150.pdf

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Looks like TI are redefining the spelling in the language :-)

Well, that could be truth, or maybe it just means something different. It is about 10 years ago and I do not remember more details about it. Anyway, in any case register name is vender and kernel code should match official register naming for which driver was written...

I'm fine with that. Apologies for the noise.

I looked into dictionaries and word vender exists in Cambridge Dictionary:
https://dictionary.cambridge.org/dictionary/english/vender

Also some details about this word are available in Wiktionary:
https://en.wiktionary.org/wiki/vender#English

And looking at more internet resources and discussions, it looks like that word vender is just older spelling in American English.

But I really do not know, I'm not native speaker.

Quoted 44 lines
Quoted 43 lines
Quoted 43 lines
Quoted 42 lines
Quoted 42 lines
---
   drivers/power/supply/bq2415x_charger.c | 10 +++++-----
   1 file changed, 5 insertions(+), 5 deletions(-)
drivers/power/supply/bq2415x_charger.c +5 -5
index 5724001e66b9..b35700071966 100644
@@ -71,7 +71,7 @@
   #define BQ2415X_BIT_OTG_PL		1
   #define BQ2415X_BIT_OTG_EN		0
-/* vender register */
+/* vendor register */
   #define BQ2415X_MASK_VENDER		(BIT(5)|BIT(6)|BIT(7))
   #define BQ2415X_SHIFT_VENDER		5
   #define BQ2415X_MASK_PN			(BIT(3)|BIT(4))
@@ -491,8 +491,8 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
   	return -1;
   }
-/* return chip vender code */
-static int bq2415x_get_vender_code(struct bq2415x_device *bq)
+/* return chip vendor code */
+static int bq2415x_get_vendor_code(struct bq2415x_device *bq)
   {
   	int ret;
@@ -1501,9 +1501,9 @@ static int bq2415x_power_supply_init(struct bq2415x_device *bq)
   		sprintf(revstr, "1.%d", ret);
   	bq->model = kasprintf(GFP_KERNEL,
-				"chip %s, revision %s, vender code %.3d",
+				"chip %s, revision %s, vendor code %.3d",
   				bq2415x_chip_name[chip], revstr,
-				bq2415x_get_vender_code(bq));
+				bq2415x_get_vendor_code(bq));
   	if (!bq->model) {
   		dev_err(bq->dev, "failed to allocate model name\n");
   		return -ENOMEM;
Signature · 1 line
2.35.1
#6 lore raw

This is like "referer links".

https://en.wikipedia.org/wiki/HTTP_referer

Everyone except the New Yorker considers it a spelling mistake. New Yorker spells it "vender" as well but they're alone in that. Everyone else says "vender is an obsolete American spelling of vendor". New Yorker is crazy with their diaeresis and hyphens.

regards,
dan carpenter

#7 lore raw
In reply to Pali Rohár
Quoted 9 lines · Pali Rohár
Quoted 2 lines · On Tuesday 15 March 2022 22:37:00 Colin Ian King wrote:

There are several spelling mistakes in comments, function names and literal strings. Fix these.

I do not think that there are mistakes.

Please look at page 29 of the official bq24150 datasheet:
https://www.ti.com/lit/ds/symlink/bq24150.pdf

"Table 8. Vender/Part/Revision Register (Read only)"

Just because they spelled it wrong in the hardware spec doesn't mean we have to spell it wrong here.

regards,
dan carpenter

#8 lore raw
Quoted 7 lines · Dan Carpenter
Quoted 6 lines · Pali Rohár
Quoted 2 lines · On Tuesday 15 March 2022 22:37:00 Colin Ian King wrote:

There are several spelling mistakes in comments, function names and literal strings. Fix these.

I do not think that there are mistakes.

Quoted 8 lines
Quoted 3 lines

Please look at page 29 of the official bq24150 datasheet:
https://www.ti.com/lit/ds/symlink/bq24150.pdf

"Table 8. Vender/Part/Revision Register (Read only)"

Just because they spelled it wrong in the hardware spec doesn't mean we have to spell it wrong here.

Of course, there are times where spelling mistakes do have to be preserved forever. I forget the examples. But here I think it's fine to correct them.

regards,
dan carpenter