diff mbox series

Changes blacklist to quirklist in ecode.c file

Message ID 20200714152104.406151-1-paul@mawsonlakes.org (mailing list archive)
State Superseded
Headers show
Series Changes blacklist to quirklist in ecode.c file | expand

Commit Message

Paul Schulz July 14, 2020, 3:21 p.m. UTC
From: Paul Schulz <paul@mawsonlakes.org>

This is a functionally trivial patch which removes the word
'blacklist' (and variations) from this code and replaces it
with 'quirklist'

It has no other effect.

Signed-off-by: Paul Schulz <paul@mawsonlakes.org>
---
 arch/arm/mach-rpc/ecard.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Comments

Andrew Lunn July 14, 2020, 4:55 p.m. UTC | #1
On Wed, Jul 15, 2020 at 12:51:04AM +0930, paul@mawsonlakes.org wrote:
> From: Paul Schulz <paul@mawsonlakes.org>
> 
> This is a functionally trivial patch which removes the word
> 'blacklist' (and variations) from this code and replaces it
> with 'quirklist'
> 
> It has no other effect.
> 
> Signed-off-by: Paul Schulz <paul@mawsonlakes.org>
> ---
>  arch/arm/mach-rpc/ecard.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
> index 75cfad2cb143..d5129ab504b1 100644
> --- a/arch/arm/mach-rpc/ecard.c
> +++ b/arch/arm/mach-rpc/ecard.c
> @@ -63,7 +63,7 @@ struct ecard_request {
>  	struct completion *complete;
>  };
>  
> -struct expcard_blacklist {
> +struct expcard_quirklist {
>  	unsigned short	 manufacturer;
>  	unsigned short	 product;
>  	const char	*type;
> @@ -79,7 +79,7 @@ static void atomwide_3p_quirk(ecard_t *ec);
>  /* List of descriptions of cards which don't have an extended
>   * identification, or chunk directories containing a description.
>   */
> -static struct expcard_blacklist __initdata blacklist[] = {
> +static struct expcard_quirklist __initdata quirklist[] = {
>  	{ MANU_ACORN, PROD_ACORN_ETHER1, "Acorn Ether1" },
>  	{ MANU_ATOMWIDE, PROD_ATOMWIDE_3PSERIAL, NULL, atomwide_3p_quirk },
>  };
> @@ -867,7 +867,7 @@ void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
>  	start += offset;
>  	if (maxsize && end - start > maxsize)
>  		end = start + maxsize;
> -	
> +

Hi Paul

No whitespace changes please. You probably want to submit a patch
which fixes just that, separate to the rename you are trying to
perform here.

>  /*
> @@ -935,15 +935,15 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
>  		ec->fiqmask = 4;
>  	}
>  
> -	for (i = 0; i < ARRAY_SIZE(blacklist); i++)
> -		if (blacklist[i].manufacturer == ec->cid.manufacturer &&
> -		    blacklist[i].product == ec->cid.product) {
> -		    	if (blacklist[i].type)
> -				ec->card_desc = blacklist[i].type;
> -			if (blacklist[i].init)
> -				blacklist[i].init(ec);
> -			break;
> -		}
> +	for (i = 0; i < ARRAY_SIZE(quirklist); i++)
> +	    if (quirklist[i].manufacturer == ec->cid.manufacturer &&
> +            quirklist[i].product == ec->cid.product) {
> +            if (quirklist[i].type)
> +                ec->card_desc = quirklist[i].type;
> +            if (quirklist[i].init)
> +                quirklist[i].init(ec);
> +	    break;
> +	}

Here your indentation is wrong. You seem to of replaced a tab with 4
spaces. checkpatch should of complained about that.

	Andrew
Paul Schulz July 15, 2020, 2:14 a.m. UTC | #2
Thank you  Andrew,

I created the patch again, using search and replace to only change the strings..

Before I submit it again, if I run "perl scripts/checkpatch.pl
--fix-inplace <file>', I get the following change (before/after)
which reorders the terms in the declaration.
Is this an issue?

28c35
< +static struct expcard_quirklist __initdata quirklist[] = {
---
> +static struct expcard_quirklist quirklist[] __initdata = {

Paul

On Wed, 15 Jul 2020 at 02:26, Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Jul 15, 2020 at 12:51:04AM +0930, paul@mawsonlakes.org wrote:
> > From: Paul Schulz <paul@mawsonlakes.org>
> >
> > This is a functionally trivial patch which removes the word
> > 'blacklist' (and variations) from this code and replaces it
> > with 'quirklist'
> >
> > It has no other effect.
> >
> > Signed-off-by: Paul Schulz <paul@mawsonlakes.org>
> > ---
> >  arch/arm/mach-rpc/ecard.c | 26 +++++++++++++-------------
> >  1 file changed, 13 insertions(+), 13 deletions(-)
> >
> > diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
> > index 75cfad2cb143..d5129ab504b1 100644
> > --- a/arch/arm/mach-rpc/ecard.c
> > +++ b/arch/arm/mach-rpc/ecard.c
> > @@ -63,7 +63,7 @@ struct ecard_request {
> >       struct completion *complete;
> >  };
> >
> > -struct expcard_blacklist {
> > +struct expcard_quirklist {
> >       unsigned short   manufacturer;
> >       unsigned short   product;
> >       const char      *type;
> > @@ -79,7 +79,7 @@ static void atomwide_3p_quirk(ecard_t *ec);
> >  /* List of descriptions of cards which don't have an extended
> >   * identification, or chunk directories containing a description.
> >   */
> > -static struct expcard_blacklist __initdata blacklist[] = {
> > +static struct expcard_quirklist __initdata quirklist[] = {
> >       { MANU_ACORN, PROD_ACORN_ETHER1, "Acorn Ether1" },
> >       { MANU_ATOMWIDE, PROD_ATOMWIDE_3PSERIAL, NULL, atomwide_3p_quirk },
> >  };
> > @@ -867,7 +867,7 @@ void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
> >       start += offset;
> >       if (maxsize && end - start > maxsize)
> >               end = start + maxsize;
> > -
> > +
>
> Hi Paul
>
> No whitespace changes please. You probably want to submit a patch
> which fixes just that, separate to the rename you are trying to
> perform here.
>
> >  /*
> > @@ -935,15 +935,15 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
> >               ec->fiqmask = 4;
> >       }
> >
> > -     for (i = 0; i < ARRAY_SIZE(blacklist); i++)
> > -             if (blacklist[i].manufacturer == ec->cid.manufacturer &&
> > -                 blacklist[i].product == ec->cid.product) {
> > -                     if (blacklist[i].type)
> > -                             ec->card_desc = blacklist[i].type;
> > -                     if (blacklist[i].init)
> > -                             blacklist[i].init(ec);
> > -                     break;
> > -             }
> > +     for (i = 0; i < ARRAY_SIZE(quirklist); i++)
> > +         if (quirklist[i].manufacturer == ec->cid.manufacturer &&
> > +            quirklist[i].product == ec->cid.product) {
> > +            if (quirklist[i].type)
> > +                ec->card_desc = quirklist[i].type;
> > +            if (quirklist[i].init)
> > +                quirklist[i].init(ec);
> > +         break;
> > +     }
>
> Here your indentation is wrong. You seem to of replaced a tab with 4
> spaces. checkpatch should of complained about that.
>
>         Andrew
Andrew Lunn July 15, 2020, 1:09 p.m. UTC | #3
On Wed, Jul 15, 2020 at 11:44:49AM +0930, Paul Schulz wrote:
> Thank you  Andrew,
> 
> I created the patch again, using search and replace to only change the strings..

Then it could be your mail system is corrupting emails.

> Before I submit it again, if I run "perl scripts/checkpatch.pl
> --fix-inplace <file>', I get the following change (before/after)
> which reorders the terms in the declaration.

> Is this an issue?

You could submit that as a separate patch.

A patch should do a single logical thing. So the blocklist is one
logical change. Remove trailing white space is one logical change, and
moving the __initdata is a logical change.

	Andrew
diff mbox series

Patch

diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index 75cfad2cb143..d5129ab504b1 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -63,7 +63,7 @@  struct ecard_request {
 	struct completion *complete;
 };
 
-struct expcard_blacklist {
+struct expcard_quirklist {
 	unsigned short	 manufacturer;
 	unsigned short	 product;
 	const char	*type;
@@ -79,7 +79,7 @@  static void atomwide_3p_quirk(ecard_t *ec);
 /* List of descriptions of cards which don't have an extended
  * identification, or chunk directories containing a description.
  */
-static struct expcard_blacklist __initdata blacklist[] = {
+static struct expcard_quirklist __initdata quirklist[] = {
 	{ MANU_ACORN, PROD_ACORN_ETHER1, "Acorn Ether1" },
 	{ MANU_ATOMWIDE, PROD_ATOMWIDE_3PSERIAL, NULL, atomwide_3p_quirk },
 };
@@ -867,7 +867,7 @@  void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
 	start += offset;
 	if (maxsize && end - start > maxsize)
 		end = start + maxsize;
-	
+
 	return devm_ioremap(&ec->dev, start, end - start);
 }
 EXPORT_SYMBOL(ecardm_iomap);
@@ -879,7 +879,7 @@  static void atomwide_3p_quirk(ecard_t *ec)
 
 	/* Disable interrupts on each port */
 	for (i = 0x2000; i <= 0x2800; i += 0x0400)
-		writeb(0, addr + i + 4);	
+		writeb(0, addr + i + 4);
 }
 
 /*
@@ -935,15 +935,15 @@  static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
 		ec->fiqmask = 4;
 	}
 
-	for (i = 0; i < ARRAY_SIZE(blacklist); i++)
-		if (blacklist[i].manufacturer == ec->cid.manufacturer &&
-		    blacklist[i].product == ec->cid.product) {
-		    	if (blacklist[i].type)
-				ec->card_desc = blacklist[i].type;
-			if (blacklist[i].init)
-				blacklist[i].init(ec);
-			break;
-		}
+	for (i = 0; i < ARRAY_SIZE(quirklist); i++)
+	    if (quirklist[i].manufacturer == ec->cid.manufacturer &&
+            quirklist[i].product == ec->cid.product) {
+            if (quirklist[i].type)
+                ec->card_desc = quirklist[i].type;
+            if (quirklist[i].init)
+                quirklist[i].init(ec);
+	    break;
+	}
 
 	ec->irq = irq;