* [PATCH -mmotm] scsi: fix the wrong position of the comment @ 2013-03-10 8:09 Akinobu Mita 2013-03-10 8:22 ` James Bottomley 2013-03-11 23:28 ` Valdis.Kletnieks 0 siblings, 2 replies; 7+ messages in thread From: Akinobu Mita @ 2013-03-10 8:09 UTC (permalink / raw) To: linux-kernel, akpm; +Cc: Akinobu Mita, James E.J. Bottomley, Andrew Vasquez 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@gmail.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.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)); qla2x00_free_fcports(vha); -- 1.8.1.4 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -mmotm] scsi: fix the wrong position of the comment 2013-03-10 8:09 [PATCH -mmotm] scsi: fix the wrong position of the comment Akinobu Mita @ 2013-03-10 8:22 ` James Bottomley 2013-03-10 8:57 ` Andrew Morton 2013-03-11 23:28 ` Valdis.Kletnieks 1 sibling, 1 reply; 7+ messages in thread From: James Bottomley @ 2013-03-10 8:22 UTC (permalink / raw) To: Akinobu Mita Cc: linux-kernel, linux-scsi, akpm, Andrew Vasquez, Andrew Vasquez [missing SCSI cc added] On Sun, 2013-03-10 at 17:09 +0900, Akinobu Mita wrote: > 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@gmail.com> > Cc: "James E.J. Bottomley" <JBottomley@parallels.com> > Cc: Andrew Vasquez <andrew.vasquez@qlogic.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); > + } I don't git a toss if it's random or prandom: Andrew: get rid of it; we do not sleep in kernel for random intervals whatever the provocation ... if this is supposed to be a warning or error condition then print something. James ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -mmotm] scsi: fix the wrong position of the comment 2013-03-10 8:22 ` James Bottomley @ 2013-03-10 8:57 ` Andrew Morton 2013-03-10 8:59 ` James Bottomley 0 siblings, 1 reply; 7+ messages in thread From: Andrew Morton @ 2013-03-10 8:57 UTC (permalink / raw) To: James Bottomley; +Cc: Akinobu Mita, linux-kernel, linux-scsi, Andrew Vasquez On Sun, 10 Mar 2013 08:22:47 +0000 James Bottomley <jbottomley@parallels.com> wrote: > [missing SCSI cc added] > On Sun, 2013-03-10 at 17:09 +0900, Akinobu Mita wrote: > > 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@gmail.com> > > Cc: "James E.J. Bottomley" <JBottomley@parallels.com> > > Cc: Andrew Vasquez <andrew.vasquez@qlogic.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); > > + } > > I don't git a toss if it's random or prandom: Andrew: get rid of it; we > do not sleep in kernel for random intervals whatever the provocation ... > if this is supposed to be a warning or error condition then print > something. That msleep was added by commit feafb7b1714cf599a6d0fed45801ab3f66046cbd Author: Arun Easi <arun.easi@qlogic.com> AuthorDate: Fri Sep 3 14:57:00 2010 -0700 Commit: James Bottomley <James.Bottomley@suse.de> CommitDate: Sun Sep 5 15:13:12 2010 -0300 [SCSI] qla2xxx: Fix vport delete issues ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -mmotm] scsi: fix the wrong position of the comment 2013-03-10 8:57 ` Andrew Morton @ 2013-03-10 8:59 ` James Bottomley 2013-03-11 4:10 ` Andrew Vasquez 0 siblings, 1 reply; 7+ messages in thread From: James Bottomley @ 2013-03-10 8:59 UTC (permalink / raw) To: Andrew Morton; +Cc: Akinobu Mita, linux-kernel, linux-scsi, Andrew Vasquez On Sun, 2013-03-10 at 00:57 -0800, Andrew Morton wrote: > On Sun, 10 Mar 2013 08:22:47 +0000 James Bottomley <jbottomley@parallels.com> wrote: > > > [missing SCSI cc added] > > On Sun, 2013-03-10 at 17:09 +0900, Akinobu Mita wrote: > > > 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@gmail.com> > > > Cc: "James E.J. Bottomley" <JBottomley@parallels.com> > > > Cc: Andrew Vasquez <andrew.vasquez@qlogic.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); > > > + } > > > > I don't git a toss if it's random or prandom: Andrew: get rid of it; we > > do not sleep in kernel for random intervals whatever the provocation ... > > if this is supposed to be a warning or error condition then print > > something. > > That msleep was added by > > commit feafb7b1714cf599a6d0fed45801ab3f66046cbd > Author: Arun Easi <arun.easi@qlogic.com> > AuthorDate: Fri Sep 3 14:57:00 2010 -0700 > Commit: James Bottomley <James.Bottomley@suse.de> > CommitDate: Sun Sep 5 15:13:12 2010 -0300 > > [SCSI] qla2xxx: Fix vport delete issues Sorry, I didn't notice multiple Andrews on the cc list. I meant Andrew Vasquez (or other member of the qla team) remove this, please (and preferably do something correct). Thanks, James ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -mmotm] scsi: fix the wrong position of the comment 2013-03-10 8:59 ` James Bottomley @ 2013-03-11 4:10 ` Andrew Vasquez 0 siblings, 0 replies; 7+ messages in thread From: Andrew Vasquez @ 2013-03-11 4:10 UTC (permalink / raw) To: James Bottomley Cc: Andrew Morton, Akinobu Mita, linux-kernel, linux-scsi, Giridhar Malavali, Chad Dupuis, Saurav Kashyap On Sun, 10 Mar 2013, James Bottomley wrote: > On Sun, 2013-03-10 at 00:57 -0800, Andrew Morton wrote: > > On Sun, 10 Mar 2013 08:22:47 +0000 James Bottomley <jbottomley@parallels.com> wrote: > > > > > [missing SCSI cc added] > > > On Sun, 2013-03-10 at 17:09 +0900, Akinobu Mita wrote: > > > > 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@gmail.com> > > > > Cc: "James E.J. Bottomley" <JBottomley@parallels.com> > > > > Cc: Andrew Vasquez <andrew.vasquez@qlogic.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); > > > > + } > > > > > > I don't git a toss if it's random or prandom: Andrew: get rid of it; we > > > do not sleep in kernel for random intervals whatever the provocation ... > > > if this is supposed to be a warning or error condition then print > > > something. > > > > That msleep was added by > > > > commit feafb7b1714cf599a6d0fed45801ab3f66046cbd > > Author: Arun Easi <arun.easi@qlogic.com> > > AuthorDate: Fri Sep 3 14:57:00 2010 -0700 > > Commit: James Bottomley <James.Bottomley@suse.de> > > CommitDate: Sun Sep 5 15:13:12 2010 -0300 > > > > [SCSI] qla2xxx: Fix vport delete issues > > Sorry, I didn't notice multiple Andrews on the cc list. I meant Andrew > Vasquez (or other member of the qla team) remove this, please (and > preferably do something correct). > James, We'll take a look at this, yes. Adding Giri and Co. to the CC. Thanks, AV ________________________________ This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -mmotm] scsi: fix the wrong position of the comment 2013-03-10 8:09 [PATCH -mmotm] scsi: fix the wrong position of the comment Akinobu Mita 2013-03-10 8:22 ` James Bottomley @ 2013-03-11 23:28 ` Valdis.Kletnieks 2013-03-13 12:38 ` Akinobu Mita 1 sibling, 1 reply; 7+ messages in thread From: Valdis.Kletnieks @ 2013-03-11 23:28 UTC (permalink / raw) To: Akinobu Mita; +Cc: linux-kernel, akpm, James E.J. Bottomley, Andrew Vasquez [-- Attachment #1: Type: text/plain, Size: 1649 bytes --] 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@gmail.com> > Cc: "James E.J. Bottomley" <JBottomley@parallels.com> > Cc: Andrew Vasquez <andrew.vasquez@qlogic.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. [-- Attachment #2: Type: application/pgp-signature, Size: 865 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -mmotm] scsi: fix the wrong position of the comment 2013-03-11 23:28 ` Valdis.Kletnieks @ 2013-03-13 12:38 ` Akinobu Mita 0 siblings, 0 replies; 7+ messages in thread From: Akinobu Mita @ 2013-03-13 12:38 UTC (permalink / raw) To: Valdis Kletnieks Cc: LKML, Andrew Morton, James E.J. Bottomley, Andrew Vasquez 2013/3/12 <Valdis.Kletnieks@vt.edu>: > 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@gmail.com> >> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> >> Cc: Andrew Vasquez <andrew.vasquez@qlogic.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. In the original code (quoted below), the comment actually connected to the msleep(), but the word "below" in the comment points to BUG_ON. So the comment should also be updated in this patch... /* No pending activities shall be there on the vha now */ if (ql2xextended_error_logging & ql_dbg_user) msleep(random32()%10); /* Just to see if something falls on * the net we have placed below */ BUG_ON(atomic_read(&vha->vref_count)); ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-13 12:38 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-03-10 8:09 [PATCH -mmotm] scsi: fix the wrong position of the comment Akinobu Mita 2013-03-10 8:22 ` James Bottomley 2013-03-10 8:57 ` Andrew Morton 2013-03-10 8:59 ` James Bottomley 2013-03-11 4:10 ` Andrew Vasquez 2013-03-11 23:28 ` Valdis.Kletnieks 2013-03-13 12:38 ` Akinobu Mita
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®