2015-05-25 17:55:55

by Shailendra Verma

[permalink] [raw]
Subject: [PATCH] net:wireless - Change 1 to true for bool type variable.

The variable translate is bool type.So assigning true instead of 1.

Signed-off-by: Shailendra Verma <[email protected]>
---
drivers/net/wireless/ray_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 477f863..0881ba8 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -143,7 +143,7 @@ static int psm;
static char *essid;

/* Default to encapsulation unless translation requested */
-static bool translate = 1;
+static bool translate = true;

static int country = USA;

--
1.7.9.5



2015-05-25 18:06:11

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] net:wireless - Change 1 to true for bool type variable.

On 05/25/2015 12:55 PM, Shailendra Verma wrote:
> The variable translate is bool type.So assigning true instead of 1.
>
> Signed-off-by: Shailendra Verma <[email protected]>

When you submit a patch for a particular driver in the drivers/net/wireless/
tree, it is preferred that the subject start with the driver name, not with
net:wireless. Accordingly, your subject should be "ray_cs: Change 1 to true for
bool type variable". In fact, you can probably choose a better wording for the
rest of the title, but I do not insist.

Among other advantages, this choice of subject allows easy searches for patches
for a given driver using 'git log'.

Larry

> ---
> drivers/net/wireless/ray_cs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
> index 477f863..0881ba8 100644
> --- a/drivers/net/wireless/ray_cs.c
> +++ b/drivers/net/wireless/ray_cs.c
> @@ -143,7 +143,7 @@ static int psm;
> static char *essid;
>
> /* Default to encapsulation unless translation requested */
> -static bool translate = 1;
> +static bool translate = true;
>
> static int country = USA;
>
>


2015-05-25 18:11:20

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] net:wireless - Change 1 to true for bool type variable.

On Mon, 2015-05-25 at 23:25 +0530, Shailendra Verma wrote:
> The variable translate is bool type.So assigning true instead of 1.

There are a lot these in the kernel.

$ git grep -P "^[ \t]*(?:static[ \t]+)?(?:const\s+)?bool\s+\w+\s*=\s*[01]\s*;" * | wc -l
161

Are you going to submit patches for all of them one at a time?

I suggest sending maybe 10 to 12 patches, one for each subsystem,
and cc the trivial maintainer Jiri Kosina <[email protected]>