public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vicente Feito <vicente.feito@gmail.com>
To: Martin Drohmann <m_droh01@uni-muenster.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Why does printk helps PCMCIA card to initialise?
Date: Sun, 20 Feb 2005 09:25:18 +0000	[thread overview]
Message-ID: <200502200925.19176.vicente.feito@gmail.com> (raw)
In-Reply-To: <42187819.5050808@uni-muenster.de>

Hello

On Sunday 20 February 2005 11:44 am, you wrote:
>  
> diff -u -U 7 /linux-2.6.11-rc4.changed/drivers/pcmcia/rsrc_nonstatic.c 
> ../linux-2.6.11-rc4/drivers/pcmcia/rsrc_nonstatic.c
> --- /linux-2.6.11-rc4.changed/drivers/pcmcia/rsrc_nonstatic.c     
> 2005-02-20 11:37:39.000000000 +0100
> +++ ../linux-2.6.11-rc4/drivers/pcmcia/rsrc_nonstatic.c     2005-02-20 
> 02:16:48.000000000 +0100
> @@ -623,15 +623,14 @@
>         down(&rsrc_sem);
>  #ifdef CONFIG_PCI
>         if (s->cb_dev) {
>                 ret = pci_bus_alloc_resource(s->cb_dev->bus, res, num, 1,
>                                              min, 0, pcmcia_align, &data);
>         } else
>  #endif
> -        printk("This line will never be printed, but it helps!!!");
>                 ret = allocate_resource(&ioport_resource, res, num, min, 
What you're doing is forcing the execution of allocate_resource (&ioport... );
Cause adding the printk you're adding it's changing this:
else 
 ret = allocate_resource(...);
up(...);

by this:

else
 printk(...);
/*This is not executing inside the else clause no more,
 *so doesn't matter if s->cb_dev it's true or not, you're going with this*/
ret = allocate_resource(...); 
up(...);

You're changing the block inside the else clause.
It's not about upsetting the sem afaik.
I could be wrong though, and that'll be a terrible tragedy.
Of course this is as long as CONFIG_PCI it's evaluating true, is it?

Vicente.

  reply	other threads:[~2005-02-20 12:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-20 11:44 Why does printk helps PCMCIA card to initialise? Martin Drohmann
2005-02-20  9:25 ` Vicente Feito [this message]
2005-02-20 12:38 ` Russell King
2005-02-21  9:17   ` Russell King
2005-02-21 10:37     ` Andrew Morton
2005-02-21 20:20     ` Linus Torvalds
     [not found] <3zXLc-3vg-13@gated-at.bofh.it>
     [not found] ` <3zYxA-4dY-13@gated-at.bofh.it>
     [not found]   ` <3AhTz-3pR-15@gated-at.bofh.it>
2005-02-22 10:14     ` Martin Drohmann
  -- strict thread matches above, loose matches on Subject: below --
2005-02-22 22:34 David Hinds

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=200502200925.19176.vicente.feito@gmail.com \
    --to=vicente.feito@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m_droh01@uni-muenster.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