On Thu, Oct 13, 2005 at 04:16:04PM -0700, Andrew Vasquez wrote: > Signed-off-by: Andrew Vasquez <andrew.vasquez@xxxxxxxxxx> I don't like this at all. Even the first variant with the indirect function call seems better than this. > +#define QLA_QUEUE_COMMAND(isp) \ > +static int \ > +isp##_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) \ > +{ \ > + scsi_qla_host_t *ha = to_qla_host(cmd->device->host); \ > + fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; \ > + srb_t *sp; \ > + int rval; \ > + if (!fcport) { \ > + cmd->result = DID_NO_CONNECT << 16; \ > + goto fail_command; \ > + } \ While we're at it, I don't think cmd->device->hostdata could ever be NULL. - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html