From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Thomas Meyer <thomas@m3y3r.de>
Cc: hare@suse.de, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] [SCSI] aic7xxx: use kstrdup()
Date: Sat, 06 Aug 2011 12:23:42 -0500 [thread overview]
Message-ID: <1312651422.11515.37.camel@mulgrave> (raw)
In-Reply-To: <1312622577.5589.63.camel@localhost.localdomain>
On Sat, 2011-08-06 at 11:22 +0200, Thomas Meyer wrote:
> From: Thomas Meyer <thomas@m3y3r.de>
>
> Use kstrdup rather than duplicating its implementation
>
> The semantic patch that makes this output is available
> in scripts/coccinelle/api/kstrdup.cocci.
>
> More information about semantic patching is available at
> http://coccinelle.lip6.fr/
>
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
>
> diff -u -p a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
> --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2010-09-13 07:01:17.520528007 +0200
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2011-08-01 21:15:58.925094946 +0200
> @@ -178,10 +178,9 @@ ahd_linux_pci_dev_probe(struct pci_dev *
> ahd_get_pci_bus(pci),
> ahd_get_pci_slot(pci),
> ahd_get_pci_function(pci));
> - name = kmalloc(strlen(buf) + 1, GFP_ATOMIC);
> + name = kstrdup(buf, GFP_ATOMIC);
> if (name == NULL)
> return (-ENOMEM);
> - strcpy(name, buf);
All adaptec drivers are in deep maintenance mode because the hardware
isn't being produced any longer. The only things we really apply to
them now is essential bug fixes, which this isn't.
James
next prev parent reply other threads:[~2011-08-06 17:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 9:22 [PATCH] [SCSI] aic7xxx: use kstrdup() Thomas Meyer
2011-08-06 17:23 ` James Bottomley [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-06 15:32 Thomas Meyer
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=1312651422.11515.37.camel@mulgrave \
--to=james.bottomley@hansenpartnership.com \
--cc=hare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=thomas@m3y3r.de \
/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