All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Haumer <andreas@xss.co.at>
To: Alan Cox <alan@redhat.com>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: Linux 2.4.21rc1-ac4
Date: Sun, 04 May 2003 18:17:02 +0200	[thread overview]
Message-ID: <3EB53CFE.8090000@xss.co.at> (raw)
In-Reply-To: <200305031744.h43Hijh07694@devserv.devel.redhat.com>

Hi!

Alan Cox wrote:
> Linux 2.4.21rc1-ac4
[...]
> o	Merge some of Greg's ibmphp cleanups		(Greg Kroah-Hartmann)
[...]

There are some problems with this merge...

*) It doesn't compile due to several problems in ibmphp_ebda.c
*) create_file_name() was changed to return -1 on failure
   and 0 success, but it has still some return statements
   inside returning NULL on error condition (having several
   exit points in a single function is bad programming style
   anyway, but here we have the worst case, it seems... )

The following patch makes it at least compile and tries to
fix the return-code mess. But IMHO the whole thing should
be cleaned up, so please re-check...

--- linux-2.4.21-rc1-ac4/drivers/hotplug/ibmphp_ebda.c.orig     Sun May  4 11:30:18 2003
+++ linux-2.4.21-rc1-ac4/drivers/hotplug/ibmphp_ebda.c  Sun May  4 18:05:57 2003
@@ -672,7 +672,7 @@

        if (!slot_cur) {
                err ("Structure passed is empty \n");
-               return NULL;
+               return -1;
        }

        slot_num = slot_cur->number;
@@ -708,7 +708,7 @@
        } else if (rio_table_ptr) {
                if (rio_table_ptr->ver_num == 3) {
                        /* if both NULL and we DO have correct RIO table in BIOS */
-                       return NULL;
+                       return -1;
                }
        }
        if (!flag) {
@@ -754,7 +754,7 @@
        struct ebda_hpc_slot *slot_ptr;
        struct bus_info *bus_info_ptr1, *bus_info_ptr2;
        int rc;
-       struct slot *tmp_slot;
+       struct slot *tmp_slot, *slot_cur;
        struct list_head *list;
        char buf[32];

@@ -992,7 +992,7 @@
                slot_cur = list_entry (list, struct slot, ibm_slot_list);
                if(create_file_name (slot_cur, buf)==0)
                {
-                       snprintf (slot_cur->hotplug_slot->name, 30, "%s", );
+                       snprintf (slot_cur->hotplug_slot->name, 30, "%s", buf);
                        pci_hp_register (slot_cur->hotplug_slot);
                }
        }

Regards,

- andreas

-- 
Andreas Haumer                     | mailto:andreas@xss.co.at
*x Software + Systeme              | http://www.xss.co.at/
Karmarschgasse 51/2/20             | Tel: +43-1-6060114-0
A-1100 Vienna, Austria             | Fax: +43-1-6060114-71


  reply	other threads:[~2003-05-04 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-03 17:44 Linux 2.4.21rc1-ac4 Alan Cox
2003-05-04 16:17 ` Andreas Haumer [this message]
2003-05-04 16:23 ` Andreas Haumer

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=3EB53CFE.8090000@xss.co.at \
    --to=andreas@xss.co.at \
    --cc=alan@redhat.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.