<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/pci/hotplug/ibmphp_ebda.c, branch tegra-T30.ER5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>PCI hotplug: check ioremap() return value in ibmphp_ebda.c</title>
<updated>2010-02-23T00:17:19+00:00</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2010-02-02T22:45:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132'/>
<id>ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132</id>
<content type='text'>
check ioremap() return value.

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
check ioremap() return value.

Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI hotplug: ibmphp: read the length of ebda and map entire ebda region</title>
<updated>2010-02-23T00:16:58+00:00</updated>
<author>
<name>Chandru</name>
<email>chandru@in.ibm.com</email>
</author>
<published>2010-01-11T06:19:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b0fc889c4311835ae7d02f433154bc20cad9ee11'/>
<id>b0fc889c4311835ae7d02f433154bc20cad9ee11</id>
<content type='text'>
ibmphp driver currently maps only 1KB of ebda memory area into kernel address
space during driver initialization. This causes kernel oops when the driver is
modprobe'd and it accesses memory beyond 1KB within ebda segment. The first
byte of ebda segment actually stores the length of the ebda region in
Kilobytes. Hence make use of the length parameter and map the entire ebda
region.

Signed-off-by: Chandru Siddalingappa &lt;chandru@linux.vnet.ibm.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ibmphp driver currently maps only 1KB of ebda memory area into kernel address
space during driver initialization. This causes kernel oops when the driver is
modprobe'd and it accesses memory beyond 1KB within ebda segment. The first
byte of ebda segment actually stores the length of the ebda region in
Kilobytes. Hence make use of the length parameter and map the entire ebda
region.

Signed-off-by: Chandru Siddalingappa &lt;chandru@linux.vnet.ibm.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: ibmphp: stop managing hotplug_slot-&gt;name</title>
<updated>2008-10-22T23:42:41+00:00</updated>
<author>
<name>Alex Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2008-10-20T23:41:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a32615a1a661f83661e8a26c3bc7763f716da8f3'/>
<id>a32615a1a661f83661e8a26c3bc7763f716da8f3</id>
<content type='text'>
We no longer need to manage our version of hotplug_slot-&gt;name
since the PCI and hotplug core manage it on our behalf.

Now, we simply advise the PCI core of the name that we would
like, and let the core take care of the rest.

Additionally, slightly rearrange the members of struct slot
so they are naturally aligned to eliminate holes.

Cc: jbarnes@virtuousgeek.org
Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We no longer need to manage our version of hotplug_slot-&gt;name
since the PCI and hotplug core manage it on our behalf.

Now, we simply advise the PCI core of the name that we would
like, and let the core take care of the rest.

Additionally, slightly rearrange the members of struct slot
so they are naturally aligned to eliminate holes.

Cc: jbarnes@virtuousgeek.org
Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI Hotplug core: add 'name' param pci_hp_register interface</title>
<updated>2008-10-22T23:42:37+00:00</updated>
<author>
<name>Alex Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2008-10-20T23:40:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1359f2701b96abd9bb69c1273fb995a093b6409a'/>
<id>1359f2701b96abd9bb69c1273fb995a093b6409a</id>
<content type='text'>
Update pci_hp_register() to take a const char *name parameter.

The motivation for this is to clean up the individual hotplug
drivers so that each one does not have to manage its own name.
The PCI core should be the place where we manage the name.

We update the interface and all callsites first, in a
"no functional change" manner, and clean up the drivers later.

Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update pci_hp_register() to take a const char *name parameter.

The motivation for this is to clean up the individual hotplug
drivers so that each one does not have to manage its own name.
The PCI core should be the place where we manage the name.

We update the interface and all callsites first, in a
"no functional change" manner, and clean up the drivers later.

Cc: kristen.c.accardi@intel.com
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: ibmphp: list_for_each to list_for_each_entry-checkpatch cleanups</title>
<updated>2008-10-20T17:53:45+00:00</updated>
<author>
<name>akpm@linux-foundation.org</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-08-22T20:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2fd39aa7c2f3d696814abb3e8962c759eee484f3'/>
<id>2fd39aa7c2f3d696814abb3e8962c759eee484f3</id>
<content type='text'>
Please run checkpatch prior to sending patches, this one fixes several style
issues with the list_for_each conversion patch.

Cc: Cordelia Sam &lt;cordesam@gmail.com&gt;
Cc: Cordelia Sam &lt;cordsam@linux.vnet.ibm.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Please run checkpatch prior to sending patches, this one fixes several style
issues with the list_for_each conversion patch.

Cc: Cordelia Sam &lt;cordesam@gmail.com&gt;
Cc: Cordelia Sam &lt;cordsam@linux.vnet.ibm.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: ibmphp: list_for_each to list_for_each_entry</title>
<updated>2008-10-20T17:53:44+00:00</updated>
<author>
<name>akpm@linux-foundation.org</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-08-22T20:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a8d2dbd38481e0c35c6bdd8196dd38a42ae45d02'/>
<id>a8d2dbd38481e0c35c6bdd8196dd38a42ae45d02</id>
<content type='text'>
Make code more readable with list_for_each_entry().

Signed-off-by: Cordelia Sam &lt;cordesam@gmail.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make code more readable with list_for_each_entry().

Signed-off-by: Cordelia Sam &lt;cordesam@gmail.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86, pci-hotplug, calgary / rio: fix EBDA ioremap()</title>
<updated>2008-09-26T11:25:04+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-09-26T09:40:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=15160716eea5591eb31f40fd4dba56d83bea4209'/>
<id>15160716eea5591eb31f40fd4dba56d83bea4209</id>
<content type='text'>
IO resource and ioremap debugging uncovered this ioremap() done
by drivers/pci/hotplug/ibmphp_ebda.c:

initcall pci_hotplug_init+0x0/0x41 returned 0 after 3 msecs
calling  ibmphp_init+0x0/0x360 @ 1
ibmphpd: IBM Hot Plug PCI Controller Driver version: 0.6
resource map sanity check conflict: 0x9f800 0xaf5e7 0x9f800 0x9ffff reserved
------------[ cut here ]------------
WARNING: at arch/x86/mm/ioremap.c:175 __ioremap_caller+0x5c/0x226()
Pid: 1, comm: swapper Not tainted 2.6.27-rc7-tip-00914-g347b10f-dirty #36038
 [&lt;c013a72d&gt;] warn_on_slowpath+0x41/0x68
 [&lt;c0156f00&gt;] ? __lock_acquire+0x9ba/0xa7f
 [&lt;c012158c&gt;] ? do_flush_tlb_all+0x0/0x59
 [&lt;c015ac31&gt;] ? smp_call_function_mask+0x74/0x17d
 [&lt;c012158c&gt;] ? do_flush_tlb_all+0x0/0x59
 [&lt;c013b228&gt;] ? printk+0x1a/0x1c
 [&lt;c013f302&gt;] ? iomem_map_sanity_check+0x82/0x8c
 [&lt;c0a773e8&gt;] ? _read_unlock+0x22/0x25
 [&lt;c013f302&gt;] ? iomem_map_sanity_check+0x82/0x8c
 [&lt;c0154e17&gt;] ? trace_hardirqs_off+0xb/0xd
 [&lt;c0127731&gt;] __ioremap_caller+0x5c/0x226
 [&lt;c0156158&gt;] ? trace_hardirqs_on+0xb/0xd
 [&lt;c012767d&gt;] ? iounmap+0x9d/0xa5
 [&lt;c01279dd&gt;] ioremap_nocache+0x15/0x17
 [&lt;c0403c42&gt;] ? ioremap+0xd/0xf
 [&lt;c0403c42&gt;] ioremap+0xd/0xf
 [&lt;c0f1928f&gt;] ibmphp_access_ebda+0x60/0xa0e
 [&lt;c0f17f64&gt;] ibmphp_init+0xb5/0x360
 [&lt;c0101057&gt;] do_one_initcall+0x57/0x138
 [&lt;c0f17eaf&gt;] ? ibmphp_init+0x0/0x360
 [&lt;c0156158&gt;] ? trace_hardirqs_on+0xb/0xd
 [&lt;c0148d75&gt;] ? __queue_work+0x2b/0x30
 [&lt;c0f17eaf&gt;] ? ibmphp_init+0x0/0x360
 [&lt;c0f015a0&gt;] kernel_init+0x17b/0x1e2
 [&lt;c0f01425&gt;] ? kernel_init+0x0/0x1e2
 [&lt;c01178b3&gt;] kernel_thread_helper+0x7/0x10
 =======================
---[ end trace a7919e7f17c0a725 ]---
initcall ibmphp_init+0x0/0x360 returned -19 after 144 msecs
calling  zt5550_init+0x0/0x6a @ 1

the problem is this code:

        io_mem = ioremap (ebda_seg&lt;&lt;4, 65000);

it assumes that the EBDA is 65000 bytes. But BIOS EBDA pointers are
at most 1K large.

_if_ the Rio code truly extends upon the customary EBDA size it needs
to iounmap() this memory and ioremap() it larger, once it knows it from
the generic descriptors that a Rio system is around.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IO resource and ioremap debugging uncovered this ioremap() done
by drivers/pci/hotplug/ibmphp_ebda.c:

initcall pci_hotplug_init+0x0/0x41 returned 0 after 3 msecs
calling  ibmphp_init+0x0/0x360 @ 1
ibmphpd: IBM Hot Plug PCI Controller Driver version: 0.6
resource map sanity check conflict: 0x9f800 0xaf5e7 0x9f800 0x9ffff reserved
------------[ cut here ]------------
WARNING: at arch/x86/mm/ioremap.c:175 __ioremap_caller+0x5c/0x226()
Pid: 1, comm: swapper Not tainted 2.6.27-rc7-tip-00914-g347b10f-dirty #36038
 [&lt;c013a72d&gt;] warn_on_slowpath+0x41/0x68
 [&lt;c0156f00&gt;] ? __lock_acquire+0x9ba/0xa7f
 [&lt;c012158c&gt;] ? do_flush_tlb_all+0x0/0x59
 [&lt;c015ac31&gt;] ? smp_call_function_mask+0x74/0x17d
 [&lt;c012158c&gt;] ? do_flush_tlb_all+0x0/0x59
 [&lt;c013b228&gt;] ? printk+0x1a/0x1c
 [&lt;c013f302&gt;] ? iomem_map_sanity_check+0x82/0x8c
 [&lt;c0a773e8&gt;] ? _read_unlock+0x22/0x25
 [&lt;c013f302&gt;] ? iomem_map_sanity_check+0x82/0x8c
 [&lt;c0154e17&gt;] ? trace_hardirqs_off+0xb/0xd
 [&lt;c0127731&gt;] __ioremap_caller+0x5c/0x226
 [&lt;c0156158&gt;] ? trace_hardirqs_on+0xb/0xd
 [&lt;c012767d&gt;] ? iounmap+0x9d/0xa5
 [&lt;c01279dd&gt;] ioremap_nocache+0x15/0x17
 [&lt;c0403c42&gt;] ? ioremap+0xd/0xf
 [&lt;c0403c42&gt;] ioremap+0xd/0xf
 [&lt;c0f1928f&gt;] ibmphp_access_ebda+0x60/0xa0e
 [&lt;c0f17f64&gt;] ibmphp_init+0xb5/0x360
 [&lt;c0101057&gt;] do_one_initcall+0x57/0x138
 [&lt;c0f17eaf&gt;] ? ibmphp_init+0x0/0x360
 [&lt;c0156158&gt;] ? trace_hardirqs_on+0xb/0xd
 [&lt;c0148d75&gt;] ? __queue_work+0x2b/0x30
 [&lt;c0f17eaf&gt;] ? ibmphp_init+0x0/0x360
 [&lt;c0f015a0&gt;] kernel_init+0x17b/0x1e2
 [&lt;c0f01425&gt;] ? kernel_init+0x0/0x1e2
 [&lt;c01178b3&gt;] kernel_thread_helper+0x7/0x10
 =======================
---[ end trace a7919e7f17c0a725 ]---
initcall ibmphp_init+0x0/0x360 returned -19 after 144 msecs
calling  zt5550_init+0x0/0x6a @ 1

the problem is this code:

        io_mem = ioremap (ebda_seg&lt;&lt;4, 65000);

it assumes that the EBDA is 65000 bytes. But BIOS EBDA pointers are
at most 1K large.

_if_ the Rio code truly extends upon the customary EBDA size it needs
to iounmap() this memory and ioremap() it larger, once it knows it from
the generic descriptors that a Rio system is around.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: introduce pci_slot</title>
<updated>2008-06-10T21:37:03+00:00</updated>
<author>
<name>Alex Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2008-06-10T21:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f46753c5e354b857b20ab8e0fe7b2579831dc369'/>
<id>f46753c5e354b857b20ab8e0fe7b2579831dc369</id>
<content type='text'>
Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a
hotplug driver is loaded, but PCI slots have attributes such as address,
speed, width, etc.  that are not related to hotplug at all.

Introduce pci_slot as the primary data structure and kobject model.
Hotplug attributes described in hotplug_slot become a secondary
structure associated with the pci_slot.

This patch only creates the infrastructure that allows the separation of
PCI slot attributes and hotplug attributes.  In this patch, the PCI
hotplug core remains the only user of this infrastructure, and thus,
/sys/bus/pci/slots/ will still only become populated when a hotplug
driver is loaded.

A later patch in this series will add a second user of this new
infrastructure and demonstrate splitting the task of exposing pci_slot
attributes from hotplug_slot attributes.

  - Make pci_slot the primary sysfs entity. hotplug_slot becomes a
    subsidiary structure.
    o pci_create_slot() creates and registers a slot with the PCI core
    o pci_slot_add_hotplug() gives it hotplug capability

  - Change the prototype of pci_hp_register() to take the bus and
    slot number (on parent bus) as parameters.

  - Remove all the -&gt;get_address methods since this functionality is
    now handled by pci_slot directly.

[achiang@hp.com: rpaphp-correctly-pci_hp_register-for-empty-pci-slots]
Tested-by: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: make headers_check happy]
[akpm@linux-foundation.org: nuther build fix]
[akpm@linux-foundation.org: fix typo in #include]
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew@wil.cx&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, /sys/bus/pci/slots/ only exposes hotplug attributes when a
hotplug driver is loaded, but PCI slots have attributes such as address,
speed, width, etc.  that are not related to hotplug at all.

Introduce pci_slot as the primary data structure and kobject model.
Hotplug attributes described in hotplug_slot become a secondary
structure associated with the pci_slot.

This patch only creates the infrastructure that allows the separation of
PCI slot attributes and hotplug attributes.  In this patch, the PCI
hotplug core remains the only user of this infrastructure, and thus,
/sys/bus/pci/slots/ will still only become populated when a hotplug
driver is loaded.

A later patch in this series will add a second user of this new
infrastructure and demonstrate splitting the task of exposing pci_slot
attributes from hotplug_slot attributes.

  - Make pci_slot the primary sysfs entity. hotplug_slot becomes a
    subsidiary structure.
    o pci_create_slot() creates and registers a slot with the PCI core
    o pci_slot_add_hotplug() gives it hotplug capability

  - Change the prototype of pci_hp_register() to take the bus and
    slot number (on parent bus) as parameters.

  - Remove all the -&gt;get_address methods since this functionality is
    now handled by pci_slot directly.

[achiang@hp.com: rpaphp-correctly-pci_hp_register-for-empty-pci-slots]
Tested-by: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: make headers_check happy]
[akpm@linux-foundation.org: nuther build fix]
[akpm@linux-foundation.org: fix typo in #include]
Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Matthew Wilcox &lt;matthew@wil.cx&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kristen Carlson Accardi &lt;kristen.c.accardi@intel.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Acked-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: replace remaining __FUNCTION__ occurrences</title>
<updated>2008-04-21T04:47:09+00:00</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-03-04T03:09:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66bef8c059015ba2b36bb5759080336feb01e680'/>
<id>66bef8c059015ba2b36bb5759080336feb01e680</id>
<content type='text'>
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>PCI Hotplug: Fix small mem leak in IBM Hot Plug Controller Driver</title>
<updated>2008-03-10T23:38:02+00:00</updated>
<author>
<name>Jesper Juhl</name>
<email>jesper.juhl@gmail.com</email>
</author>
<published>2008-03-08T01:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b91aac29bb9b7cab34b0297449bd2a16944b83d9'/>
<id>b91aac29bb9b7cab34b0297449bd2a16944b83d9</id>
<content type='text'>
In drivers/pci/hotplug/ibmphp_ebda.c::ebda_rsrc_controller(), storage is
allocated with kzalloc() and assigned to 'tmp_slot'.  Then lots of
stuff, like -&gt;flag, -&gt;supported_speed etc is set in tmp_slot.  A bit
further down there's then this test :

  if (!bus_info_ptr1) {
    rc = -ENODEV;
    goto error;
  }

At this point, tmp_slot has not been assigned to anything, so when
erroring-out we want to free it, but nothing at the 'error:' label
free's 'tmp_slot' - and we can't really free 'tmp_slot' at 'error:'
since we may jump to that label later when 'tmp_slot' *has* been used
and we do not want it freed. So, the only sane option left seems to be
to kfree(tmp_slot) just before jumping to the 'error:' label in the one
place where this is what actually makes sense. The following patch does
just that and thus kills off a tiny potential memory leak.


Signed-off-by: Jesper Juhl &lt;jesper.juhl@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In drivers/pci/hotplug/ibmphp_ebda.c::ebda_rsrc_controller(), storage is
allocated with kzalloc() and assigned to 'tmp_slot'.  Then lots of
stuff, like -&gt;flag, -&gt;supported_speed etc is set in tmp_slot.  A bit
further down there's then this test :

  if (!bus_info_ptr1) {
    rc = -ENODEV;
    goto error;
  }

At this point, tmp_slot has not been assigned to anything, so when
erroring-out we want to free it, but nothing at the 'error:' label
free's 'tmp_slot' - and we can't really free 'tmp_slot' at 'error:'
since we may jump to that label later when 'tmp_slot' *has* been used
and we do not want it freed. So, the only sane option left seems to be
to kfree(tmp_slot) just before jumping to the 'error:' label in the one
place where this is what actually makes sense. The following patch does
just that and thus kills off a tiny potential memory leak.


Signed-off-by: Jesper Juhl &lt;jesper.juhl@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
