diff mbox series

iio: ad5755: fix spelling mistake "to" -> "too"

Message ID 20200122235839.2830850-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show
Series iio: ad5755: fix spelling mistake "to" -> "too" | expand

Commit Message

Colin King Jan. 22, 2020, 11:58 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

There is a spelling mistake in a dev_err message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/iio/dac/ad5755.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandru Ardelean Jan. 23, 2020, 7:03 a.m. UTC | #1
On Wed, 2020-01-22 at 23:58 +0000, Colin King wrote:
> [External]
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> There is a spelling mistake in a dev_err message. Fix it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/iio/dac/ad5755.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
> index b9175fb4c8ab..dad0b26228a2 100644
> --- a/drivers/iio/dac/ad5755.c
> +++ b/drivers/iio/dac/ad5755.c
> @@ -655,7 +655,7 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct
> device *dev)
>  	for_each_child_of_node(np, pp) {
>  		if (devnr >= AD5755_NUM_CHANNELS) {
>  			dev_err(dev,
> -				"There is to many channels defined in DT\n");
> +				"There is too many channels defined in DT\n");

If going for the spelling stuff, maybe also change "is" to "are":
'There are too many channels defined in DT\n'


>  			goto error_out;
>  		}
>
David Laight Jan. 23, 2020, 2:55 p.m. UTC | #2
From Ardelean, Alexandru
> Sent: 23 January 2020 07:03
> 
> On Wed, 2020-01-22 at 23:58 +0000, Colin King wrote:
> > [External]
> >
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > There is a spelling mistake in a dev_err message. Fix it.
> >
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> >  drivers/iio/dac/ad5755.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
> > index b9175fb4c8ab..dad0b26228a2 100644
> > --- a/drivers/iio/dac/ad5755.c
> > +++ b/drivers/iio/dac/ad5755.c
> > @@ -655,7 +655,7 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct
> > device *dev)
> >  	for_each_child_of_node(np, pp) {
> >  		if (devnr >= AD5755_NUM_CHANNELS) {
> >  			dev_err(dev,
> > -				"There is to many channels defined in DT\n");
> > +				"There is too many channels defined in DT\n");
> 
> If going for the spelling stuff, maybe also change "is" to "are":
> 'There are too many channels defined in DT\n'

Probably better still: "The DT defines too many channels\n"

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Joe Perches Jan. 24, 2020, 8:22 p.m. UTC | #3
On Thu, 2020-01-23 at 14:55 +0000, David Laight wrote:
> From Ardelean, Alexandru
> > Sent: 23 January 2020 07:03
> > 
> > On Wed, 2020-01-22 at 23:58 +0000, Colin King wrote:
> > > [External]
> > > 
> > > From: Colin Ian King <colin.king@canonical.com>
> > > 
> > > There is a spelling mistake in a dev_err message. Fix it.
> > > 
> > > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > > ---
> > >  drivers/iio/dac/ad5755.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
> > > index b9175fb4c8ab..dad0b26228a2 100644
> > > --- a/drivers/iio/dac/ad5755.c
> > > +++ b/drivers/iio/dac/ad5755.c
> > > @@ -655,7 +655,7 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct
> > > device *dev)
> > >  	for_each_child_of_node(np, pp) {
> > >  		if (devnr >= AD5755_NUM_CHANNELS) {
> > >  			dev_err(dev,
> > > -				"There is to many channels defined in DT\n");
> > > +				"There is too many channels defined in DT\n");
> > 
> > If going for the spelling stuff, maybe also change "is" to "are":
> > 'There are too many channels defined in DT\n'
> 
> Probably better still: "The DT defines too many channels\n"

bikeshedding:

How about fixing:

o missing newlines
o odd indentation
o unnecessary braces
o message grammar

at the same time?
---
 drivers/iio/dac/ad5755.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index b9175f..f6e4cf92 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -631,10 +631,9 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
 			}
 		}
 
-		if (i == ARRAY_SIZE(ad5755_dcdc_freq_table)) {
+		if (i == ARRAY_SIZE(ad5755_dcdc_freq_table))
 			dev_err(dev,
-				"adi,dc-dc-freq out of range selecting 410kHz");
-		}
+				"adi,dc-dc-freq out of range selecting 410kHz\n");
 	}
 
 	pdata->dc_dc_maxv = AD5755_DC_DC_MAXV_23V;
@@ -645,17 +644,15 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
 				break;
 			}
 		}
-		if (i == ARRAY_SIZE(ad5755_dcdc_maxv_table)) {
-				dev_err(dev,
-					"adi,dc-dc-maxv out of range selecting 23V");
-		}
+		if (i == ARRAY_SIZE(ad5755_dcdc_maxv_table))
+			dev_err(dev,
+				"adi,dc-dc-maxv out of range selecting 23V\n");
 	}
 
 	devnr = 0;
 	for_each_child_of_node(np, pp) {
 		if (devnr >= AD5755_NUM_CHANNELS) {
-			dev_err(dev,
-				"There is to many channels defined in DT\n");
+			dev_err(dev, "Too many channels defined in DT\n");
 			goto error_out;
 		}
 
@@ -681,11 +678,10 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
 					break;
 				}
 			}
-			if (i == ARRAY_SIZE(ad5755_slew_rate_table)) {
+			if (i == ARRAY_SIZE(ad5755_slew_rate_table))
 				dev_err(dev,
-					"channel %d slew rate out of range selecting 64kHz",
+					"channel %d slew rate out of range selecting 64kHz\n",
 					devnr);
-			}
 
 			pdata->dac[devnr].slew.step_size = AD5755_SLEW_STEP_SIZE_1;
 			for (i = 0; i < ARRAY_SIZE(ad5755_slew_step_table); i++) {
@@ -695,11 +691,10 @@ static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
 					break;
 				}
 			}
-			if (i == ARRAY_SIZE(ad5755_slew_step_table)) {
+			if (i == ARRAY_SIZE(ad5755_slew_step_table))
 				dev_err(dev,
-					"channel %d slew step size out of range selecting 1 LSB",
+					"channel %d slew step size out of range selecting 1 LSB\n",
 					devnr);
-			}
 		} else {
 			pdata->dac[devnr].slew.enable = false;
 			pdata->dac[devnr].slew.rate = AD5755_SLEW_RATE_64k;
diff mbox series

Patch

diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index b9175fb4c8ab..dad0b26228a2 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -655,7 +655,7 @@  static struct ad5755_platform_data *ad5755_parse_dt(struct device *dev)
 	for_each_child_of_node(np, pp) {
 		if (devnr >= AD5755_NUM_CHANNELS) {
 			dev_err(dev,
-				"There is to many channels defined in DT\n");
+				"There is too many channels defined in DT\n");
 			goto error_out;
 		}