2006-02-28 21:26:22

by Alexey Dobriyan

[permalink] [raw]
Subject: [PATCH] synclink_gt: make ->init_error signed

From: "Darren Jenkins\\" <[email protected]>

Examples of misuse are

3112 info->init_error = -1;

4440 if ((info->init_error = register_test(info)) < 0) {

Signed-off-by: Darren Jenkins <[email protected]>
Signed-off-by: Alexey Dobriyan <[email protected]>
---

drivers/char/synclink_gt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -306,7 +306,7 @@ struct slgt_info {
int tx_active;

unsigned char signals; /* serial signal states */
- unsigned int init_error; /* initialization error */
+ int init_error; /* initialization error */

unsigned char *tx_buf;
int tx_count;


2006-02-28 21:38:46

by Paul Fulghum

[permalink] [raw]
Subject: Re: [PATCH] synclink_gt: make ->init_error signed

Alexey Dobriyan wrote:
> From: "Darren Jenkins\\" <[email protected]>
>
> Examples of misuse are
>
> 3112 info->init_error = -1;
>
> 4440 if ((info->init_error = register_test(info)) < 0) {
>
> Signed-off-by: Darren Jenkins <[email protected]>
> Signed-off-by: Alexey Dobriyan <[email protected]>
> ---
>
> drivers/char/synclink_gt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/char/synclink_gt.c
> +++ b/drivers/char/synclink_gt.c
> @@ -306,7 +306,7 @@ struct slgt_info {
> int tx_active;
>
> unsigned char signals; /* serial signal states */
> - unsigned int init_error; /* initialization error */
> + int init_error; /* initialization error */
>
> unsigned char *tx_buf;
> int tx_count;

Yes, should definately by signed.

Acked-by: Paul Fulghum <[email protected]>

--
Paul Fulghum
Microgate Systems, Ltd.