From: Christoph Hellwig <hch@infradead.org>
To: Mark Haverkamp <markh@osdl.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
Mark Salyzyn <mark_salyzyn@adaptec.com>
Subject: Re: [PATCH] aacraid 2.6: add scsi synchronize cache support.
Date: Thu, 20 Jan 2005 11:31:32 +0000 [thread overview]
Message-ID: <20050120113132.GA391@infradead.org> (raw)
In-Reply-To: <1106172102.11875.18.camel@markh1.pdx.osdl.net>
> +static void synchronize_callback(void *context, struct fib * fibptr)
> +{
> + struct aac_synchronize_reply * synchronizereply;
> + struct scsi_cmnd * scsicmd;
Superflous whitespaces before the *. Also the canonical name for
scsi_cmnds seems to be cmd - that makes easiert to read code.
> +
> + scsicmd = (struct scsi_cmnd *) context;
No need to cast. You could also move the assigment into the declaration.
> +
> + dprintk((KERN_DEBUG "synchronize_callback[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies));
please linewrrap after 80 chars
> + if (fibptr == NULL)
> + BUG();
BUG_ON()
> + synchronizereply = (struct aac_synchronize_reply *) fib_data(fibptr);
fib_data return void *, no cast needed.
>
> + if (le32_to_cpu(synchronizereply->status) == CT_OK) {
> + scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD;
linelength again.
>
> + } else {
> + struct scsi_device * device = scsicmd->device;
Canonical name is sdev, superflous space again.
> + set_sense((u8 *) &dev->fsa_dev[cid].sense_data,
sense_data is u8 already.
> + memcpy(scsicmd->sense_buffer, &dev->fsa_dev[cid].sense_data,
> + (sizeof(dev->fsa_dev[cid].sense_data) > sizeof(scsicmd->sense_buffer))
> + ? sizeof(scsicmd->sense_buffer)
> + : sizeof(dev->fsa_dev[cid].sense_data));
Use max here?
> + if ((cmd != scsicmd) && (cmd->serial_number != 0)) {
superflous braces.
> +/* XXX */printk(KERN_DEBUG "aac_synchronize[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies);
> +/* XXX dprintk((KERN_DEBUG "aac_synchronize[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies)); */
take this out?
next prev parent reply other threads:[~2005-01-20 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-19 22:01 [PATCH] aacraid 2.6: add scsi synchronize cache support Mark Haverkamp
2005-01-20 11:31 ` Christoph Hellwig [this message]
2005-01-20 17:03 ` [PATCH] aacraid 2.6: add scsi synchronize cache support. (Update) Mark Haverkamp
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=20050120113132.GA391@infradead.org \
--to=hch@infradead.org \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mark_salyzyn@adaptec.com \
--cc=markh@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.