[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36693.1363044515@turing-police.cc.vt.edu>
Date: Mon, 11 Mar 2013 19:28:35 -0400
From: Valdis.Kletnieks@...edu
To: Akinobu Mita <akinobu.mita@...il.com>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
"James E.J. Bottomley" <JBottomley@...allels.com>,
Andrew Vasquez <andrew.vasquez@...gic.com>
Subject: Re: [PATCH -mmotm] scsi: fix the wrong position of the comment
On Sun, 10 Mar 2013 17:09:50 +0900, Akinobu Mita said:
> This fixes the wrong position of the comment introduced by
> scsi-rename-random32-to-prandom_u32.patch in the -mm tree.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
> Cc: "James E.J. Bottomley" <JBottomley@...allels.com>
> Cc: Andrew Vasquez <andrew.vasquez@...gic.com>
> ---
> drivers/scsi/qla2xxx/qla_attr.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index 04bf7b8..e44d47e 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -1939,13 +1939,13 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
> }
>
> /* No pending activities shall be there on the vha now */
> - if (ql2xextended_error_logging & ql_dbg_user)
> - msleep(prandom_u32() % 10);
> + if (ql2xextended_error_logging & ql_dbg_user) {
> /*
> * Just to see if something falls on the net we have placed
> * below
> */
> -
> + msleep(prandom_u32() % 10);
> + }
> BUG_ON(atomic_read(&vha->vref_count));
As others have noted, the msleep is potentially a crock. However,
this particular patch is also incorrect - the *real* problem is
that the 4 line comment connected to the BUG_ON is mis-indented.
The patch *should* make it look like this:
/* No pending activities shall be there on the vha now */
if (ql2xextended_error_logging & ql_dbg_user)
msleep(prandom_u32() % 10);
/*
* Just to see if something falls on the net we have placed
* below
*/
BUG_ON(atomic_read(&vha->vref_count));
And a different patch should fix the msleep issue.
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists