mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lin Tan <tammy000@gmail.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Kai.Makisara@kolumbus.fi, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH git latest] drivers/scsi: fixing wrong comment before new_buffer_tape()
Date: Fri, 26 Sep 2008 12:06:24 -0500	[thread overview]
Message-ID: <20080926170624.GA19223@carmen.cs.uiuc.edu> (raw)
In-Reply-To: <1222446056.3971.19.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

> > > > Looks true to me for the current versions of the code. In fact it is only
> > > > ever called from the initialisation function that I can see so chunks of
> > > > the code could simply go away as well as bits of the comment. Ditto the
> > > > one in drivers/scsi/st.c
> > > >
> > > > Acked-by: Alan Cox <alan@redhat.com>
> > > >
> > > 
> > > I am sorry I didn't quite understand. You mean it is true that caller
> > > must hold os_scsi_tapes_lock?
> > 
> > Sorry - I mean what you claim is true - that the comment is incorrect.
> 
> So, I think I'm missing a piece of this:  There's no patch in this
> thread (I presume it's lurking somewhere on lkml).  Could someone repost
> the proposed patch and copy the tape maintainer: Kai Makisara
> <Kai.Makisara@kolumbus.fi> to get his input?
> 
> Thanks,
> 
> James
> 
>

The patch was in the orginal message. I am resending it now with Makisara CC-ed.

Lin 

[-- Attachment #2: new_tape_buffer.readytosend --]
[-- Type: text/plain, Size: 845 bytes --]

Removing the wrong comment.
The lock is needed before calling new_tape_buffer(), at least in some cases.
So the comment above new_tape_buffer() is inconsistent with the code and
may mislead developers.

I simply removed the wrong comment, as I am not sure if the lock is required
in all situations. If so, we should add "Caller must hold os_scsi_tapes_lock".

Signed-off-by: Lin Tan <tammy000@gmail.com>

---

--- a/drivers/scsi/osst.c	2008-09-25 11:53:09.000000000 -0500
+++ b/drivers/scsi/osst.c	2008-09-25 11:59:46.000000000 -0500
@@ -5209,7 +5209,7 @@
 \f
 /* Memory handling routines */
 
-/* Try to allocate a new tape buffer skeleton. Caller must not hold os_scsi_tapes_lock */
+/* Try to allocate a new tape buffer skeleton. */
 static struct osst_buffer * new_tape_buffer( int from_initialization, int need_dma, int max_sg )
 {
 	int i;

  reply	other threads:[~2008-09-26 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-25 17:49 Lin Tan
2008-09-26 10:13 ` Alan Cox
2008-09-26 16:05   ` Tammy
2008-09-26 16:09     ` Alan Cox
2008-09-26 16:20       ` James Bottomley
2008-09-26 17:06         ` Lin Tan [this message]
2008-09-26 19:55           ` Kai Makisara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080926170624.GA19223@carmen.cs.uiuc.edu \
    --to=tammy000@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®