linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/4] dpt_i2o: make adpt_i2o_to_scsi() a void function
Date: Fri, 15 Nov 2019 09:51:28 +0100	[thread overview]
Message-ID: <20191115085128.GB24954@lst.de> (raw)
In-Reply-To: <20191115080555.146710-3-hare@suse.de>

On Fri, Nov 15, 2019 at 09:05:53AM +0100, Hannes Reinecke wrote:
> The return value is never used anywhere, and returning it
> risks a use-after-free crash.

The function is also badly misnamed.  Can you renamed it to
adpt_i2o_complete_cmd or something that actually describes
the function if you touch it?

> -static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
> +static void adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
>  {
>  	adpt_hba* pHba;
>  	u32 hba_status;

And fix the * placement at least in the actual line you touch anyway?

  reply	other threads:[~2019-11-15  8:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15  8:05 [PATCHv2 0/4] scsi: remove legacy cmd_list implementation Hannes Reinecke
2019-11-15  8:05 ` [PATCH 1/4] dpt_i2o: use midlayer tcq implementation Hannes Reinecke
2019-11-15  8:48   ` Christoph Hellwig
2019-11-15 10:29     ` Hannes Reinecke
2019-11-15  8:05 ` [PATCH 2/4] dpt_i2o: make adpt_i2o_to_scsi() a void function Hannes Reinecke
2019-11-15  8:51   ` Christoph Hellwig [this message]
2019-11-15  9:24     ` Hannes Reinecke
2019-11-15  8:05 ` [PATCH 3/4] aacraid: use blk_mq_rq_busy_iter() for traversing outstanding commands Hannes Reinecke
2019-11-15  9:06   ` Christoph Hellwig
2019-11-15  8:05 ` [PATCH 4/4] scsi: Remove cmd_list functionality Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2019-11-01 11:18 [PATCH 0/4] scsi: remove legacy cmd_list implementation Hannes Reinecke
2019-11-01 11:18 ` [PATCH 2/4] dpt_i2o: make adpt_i2o_to_scsi() a void function Hannes Reinecke

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=20191115085128.GB24954@lst.de \
    --to=hch@lst.de \
    --cc=hare@suse.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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;
as well as URLs for NNTP newsgroup(s).