mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Om Narasimhan" <om.turyx@gmail.com>
To: "Yoichi Yuasa" <yoichi_yuasa@tripeaks.co.jp>
Cc: "Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [-mm PATCH] fixed PCMCIA au1000_generic.c
Date: Thu, 5 Oct 2006 23:18:44 -0700	[thread overview]
Message-ID: <6b4e42d10610052318h53102e73h64766a7cb677be1b@mail.gmail.com> (raw)
In-Reply-To: <20061004224406.46a9d05c.yoichi_yuasa@tripeaks.co.jp>

On 10/4/06, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> Hi,
>
Sorry for the late reply.
> pcmcia-au1000_generic-fix.patch has a problem.
> It needs more fix.
> ops->shutdown(skt), skt is out of definition scope.

Is it so?
After applying the patch, the code would look like,
-----

		skt->status = au1x00_pcmcia_skt_state(skt);

		ret = pcmcia_register_socket(&skt->socket);
		if (ret)
			goto out_err;
<snip>

out_err:
	flush_scheduled_work();
	ops->hw_shutdown(skt);
	while (i-- > 0) {
		struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i);
		del_timer_sync(&skt->poll_timer);
		pcmcia_unregister_socket(&skt->socket);
		flush_scheduled_work();
		ops->hw_shutdown(skt);
		i--;
	}
	kfree(sinfo);
-----
The  first call to ops->shutdown(skt) would free the skt (of the
function scope). The internal skt to the loop is a placeholder to call
shutdown().
Or did I miss any point?

Regards,
Om.
>
> Yoichi
>
> Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
>
> diff -pruN -X linux-2.6.18-mm3/Documentation/dontdiff linux-2.6.18-mm3-orig/drivers/pcmcia/au1000_generic.c linux-2.6.18-mm3/drivers/pcmcia/au1000_generic.c
> --- linux-2.6.18-mm3-orig/drivers/pcmcia/au1000_generic.c       2006-10-04 11:24:33.017136250 +0900
> +++ linux-2.6.18-mm3/drivers/pcmcia/au1000_generic.c    2006-10-04 22:32:21.806060500 +0900
> @@ -351,6 +351,7 @@ struct skt_dev_info {
>  int au1x00_pcmcia_socket_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr)
>  {
>         struct skt_dev_info *sinfo;
> +       struct au1000_pcmcia_socket *skt;
>         int ret, i;
>
>         sinfo = kzalloc(sizeof(struct skt_dev_info), GFP_KERNEL);
> @@ -365,7 +366,7 @@ int au1x00_pcmcia_socket_probe(struct de
>          * Initialise the per-socket structure.
>          */
>         for (i = 0; i < nr; i++) {
> -               struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i);
> +               skt = PCMCIA_SOCKET(i);
>                 memset(skt, 0, sizeof(*skt));
>
>                 skt->socket.resource_ops = &pccard_static_ops;
> @@ -442,7 +443,7 @@ out_err:
>         flush_scheduled_work();
>         ops->hw_shutdown(skt);
>         while (i-- > 0) {
> -               struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i);
> +               skt = PCMCIA_SOCKET(i);
>                 del_timer_sync(&skt->poll_timer);
>                 pcmcia_unregister_socket(&skt->socket);
>                 flush_scheduled_work();
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

  reply	other threads:[~2006-10-06  6:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-03  7:11 2.6.18-mm3 Andrew Morton
2006-10-03 14:33 ` 2.6.18-mm3 Michal Piotrowski
2006-10-03 17:37 ` 2.6.18-mm3 Badari Pulavarty
2006-10-03 18:01   ` 2.6.18-mm3 Andrew Morton
2006-10-03 18:16     ` 2.6.18-mm3 Badari Pulavarty
2006-10-03 18:05   ` 2.6.18-mm3 Badari Pulavarty
2006-10-04 13:44 ` [-mm PATCH] fixed PCMCIA au1000_generic.c Yoichi Yuasa
2006-10-06  6:18   ` Om Narasimhan [this message]
2006-10-06  7:31     ` Yoichi Yuasa
2006-10-07 22:31       ` Om Narasimhan
2006-10-04 15:14 ` 2.6.18-mm3 oops in xfrm_register_mode Steve Fox
2006-10-04 16:57   ` Andrew Morton
2006-10-04 21:02     ` Steve Fox
2006-10-05 15:06       ` Badari Pulavarty
2006-10-05  8:37 ` make-bogus-warnings-go-away tree [was: 2.6.18-mm3] Ingo Molnar
2006-10-05 10:05   ` Jeff Garzik
2006-10-05 16:21     ` make-bogus-warnings-go-away tree Roland Dreier
2006-10-05 20:52     ` make-bogus-warnings-go-away tree [was: 2.6.18-mm3] Kyle Moffett
2006-10-05 16:37   ` Adrian Bunk
2006-10-05 16:44     ` Jeff Garzik
2006-10-05 16:51       ` Adrian Bunk

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=6b4e42d10610052318h53102e73h64766a7cb677be1b@mail.gmail.com \
    --to=om.turyx@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yoichi_yuasa@tripeaks.co.jp \
    /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®