aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-05MIPS: PCI: RM9000 checkpatch cleanupAndrea Gelmini1-2/+2
arch/mips/pci/ops-titan-ht.c:36: ERROR: "foo * bar" should be "foo *bar" arch/mips/pci/ops-titan-ht.c:68: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Andrea Gelmini <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1277/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: math-emu: Checkpatch cleanupAndrea Gelmini1-2/+1
arch/mips/math-emu/sp_tlong.c:75: ERROR: else should follow close brace '}' Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1276/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: math-emu: Checkpatch cleanupAndrea Gelmini1-2/+1
arch/mips/math-emu/sp_tint.c:76: ERROR: else should follow close brace '}' Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1275/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: math-emu: Checkpatch cleanupAndrea Gelmini1-1/+1
arch/mips/math-emu/sp_modf.c:32: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1273/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: math-emu: Checkpatch cleanupAndrea Gelmini1-2/+1
arch/mips/math-emu/dp_tlong.c:75: ERROR: else should follow close brace '}' Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1272/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: math-emu: Checkpatch cleanupAndrea Gelmini1-2/+1
arch/mips/math-emu/dp_tint.c:73: ERROR: else should follow close brace '}' Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1271/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: math-emu: Checkpatch cleanupAndrea Gelmini1-1/+1
arch/mips/math-emu/dp_modf.c:32: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1269/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: DECstation: Checkpatch cleanupAndrea Gelmini1-2/+1
arch/mips/dec/promcon.c:37: ERROR: that open brace { should be on the previous line Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1270/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: Yosemite: ht-irq.c: Checkpatch cleanupAndrea Gelmini1-7/+6
arch/mips/pmc-sierra/yosemite/ht-irq.c:38: ERROR: code indent should use tabs where possible arch/mips/pmc-sierra/yosemite/ht-irq.c:39: ERROR: code indent should use tabs where possible arch/mips/pmc-sierra/yosemite/ht-irq.c:40: ERROR: code indent should use tabs where possible arch/mips/pmc-sierra/yosemite/ht-irq.c:43: ERROR: code indent should use tabs where possible arch/mips/pmc-sierra/yosemite/ht-irq.c:44: ERROR: code indent should use tabs where possible arch/mips/pmc-sierra/yosemite/ht-irq.c:45: ERROR: code indent should use tabs where possible Signed-off-by: Andrea Gelmini <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1268/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: PowerTV: Correct ASIC device register names and locationsDavid VomLehn5-8/+8
Correct ASIC device register names and addresses for USB devices. Signed-off-by: David VomLehn <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1258/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: PowerTV: Use O(1) algorthm for phys_to_dma/dma_to_physDavid VomLehn6-142/+529
Replace phys_to_dma()/dma_to_phys() looping algorithm with an O(1) algorithm The approach taken is inspired by the sparse memory implementation: take a certain number of high-order bits off the address them, use this as an index into a table containing an offset to the desired address and add it to the original value. There is a table for mapping physical addresses to DMA addresses and another one for the reverse mapping. The table sizes depend on how fine-grained the mappings need to be; Coarser granularity less to smaller tables. On a processor with 32-bit physical and DMA addresses, with 4 MIB granularity, memory usage is two 2048-byte arrays. Each 32-byte cache line thus covers 64 MiB of address space. Also, renames phys_to_bus() to phys_to_dma() and bus_to_phys() to dma_to_phys() to align with kernel usage. [Ralf: Fixed silly build breakage due to stackoverflow warning caused by huge array on stack.] Signed-off-by: David VomLehn <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1257/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: MTX1: Fix build.Ralf Baechle3-3/+12
CC arch/mips/alchemy/mtx-1/board_setup.o {standard input}: Assembler messages: {standard input}:263: Error: opcode not supported on this processor: mips1 (mips1) `sync' {standard input}:274: Error: opcode not supported on this processor: mips1 (mips1) `sync' {standard input}:296: Error: opcode not supported on this processor: mips1 (mips1) `sync' [...] Any .set mipsX statement other than .set mips0 at the end of inline assembler is a big fat bug. Introduced by 9482eabeca315c0276ffb50026b7482481b7097b (linux-mips.org) rsp. 32fd6901a6d8d19f94e4de6be4e4b552ab078620 (kernel.org). While at it, fix the same issue in arch/mips/alchemy/devboards/pb1000/board_setup.c arch/mips/alchemy/xxs1500/board_setup.c as well. Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: BCM47xx: Activate SSB_B43_PCI_BRIDGE by defaultHauke Mehrtens1-0/+1
B43_pci_bridge is needed to use the b43 driver with brcm47xx. Activate it by default if PCI is available. Signed-off-by: Hauke Mehrtens <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1510/ Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: BCM47xx: Really fix 128MB RAM problemHauke Mehrtens1-8/+14
The previous patch 4a86f2d27733f610e642649aca3e82e86fca9e22 (lmo) rsp. 84a6fcb368a080620d12fc4d79e07902dbee7335 (kernel.org) was wrong. The BCM47xx architecture maps the ram into a 128MB address space. It will be spaced there as often as goes into the 128MB. Detection tries to find the position where the same memory is found. When reading beyond 128MB the processor will throw an exception. If 128MB RAM is installed, it will not find a memory alias because it tries to read beyond the 128MB border. Now it just assumes 128MB installed ram if it can not find an alias. Signed-off-by: Hauke Mehrtens <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1508/ Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: Octeon: Workaround link failures with gcc-4.4.x 32-bits toolchainsFlorian Fainelli1-8/+0
When building with a gcc-4.4.x toolchain that is configured to produce 32-bits executables by default, we will produce __lshrti3 in sched_clock() which is never resolved so the kernel fails to link. Unconditionally use the inline assembly version as suggested by David Daney, which works around the issue. Signed-off-by: Florian Fainelli <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1514/ Acked-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: N32: Fix syscall number comments.David Daney1-4/+4
Signed-off-by: David Daney <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1515/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: Don't overflow cevt-r4k.c calculations at high clock rates.David Daney1-3/+2
The 'mult' element of struct clock_event_device must never be wider than 32-bits. If it were, it would get truncated when used by clockevent_delta2ns() when this calls do_div(). We can meet this requirement by using clockevent_set_clock() to set the MULT and SHIFT values. Signed-off-by: David Daney <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1253/ Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: IP27: Don't include <linux/topology.h> into <asm/sn/agent.h>.Ralf Baechle1-1/+0
The include is unecessary and will when building the IP35 result in recursive header inclusion spaghetti. Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05MIPS: TX49xx: Define ARCH_KMALLOC_MINALIGNAtsushi Nemoto1-3/+1
With SLAB, it works without ARCH_KMALLOC_MINALIGN, but with SLOB/SLUB, ARCH_KMALLOC_MINALIGN is required to ensure alignment of kmalloced buffer. Signed-off-by: Atsushi Nemoto <[email protected]> To: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1248/ Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05VIDEO: Correct use of request_region/request_mem_regionJulia Lawall1-2/+2
request_region should be used with release_region, not request_mem_region. Geert Uytterhoeven pointed out that in the case of drivers/video/gbefb.c, the problem is actually the other way around; request_mem_region should be used instead of request_region. The semantic patch that finds/fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ expression start; @@ request_region(start,...) @b1@ expression r1.start; @@ request_mem_region(start,...) @depends on !b1@ expression r1.start; expression E; @@ - release_mem_region + release_region (start,E) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2010-08-05apparmor: depends on NETRandy Dunlap1-1/+1
SECURITY_APPARMOR should depend on NET since AUDIT needs (depends on) NET. Fixes 70-80 errors that occur when CONFIG_NET is not enabled, but APPARMOR selects AUDIT without qualification. E.g.: audit.c:(.text+0x33361): undefined reference to `netlink_unicast' (.text+0x333df): undefined reference to `netlink_unicast' audit.c:(.text+0x3341d): undefined reference to `skb_queue_tail' audit.c:(.text+0x33424): undefined reference to `kfree_skb' audit.c:(.text+0x334cb): undefined reference to `kfree_skb' audit.c:(.text+0x33597): undefined reference to `skb_put' audit.c:(.text+0x3369b): undefined reference to `__alloc_skb' audit.c:(.text+0x336d7): undefined reference to `kfree_skb' (.text+0x3374c): undefined reference to `__alloc_skb' auditfilter.c:(.text+0x35305): undefined reference to `skb_queue_tail' lsm_audit.c:(.text+0x2873): undefined reference to `init_net' lsm_audit.c:(.text+0x2878): undefined reference to `dev_get_by_index' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: John Johansen <[email protected]> Signed-off-by: James Morris <[email protected]>
2010-08-05Merge branch 'topic/misc' into for-linusTakashi Iwai56-612/+991
2010-08-05Merge branch 'topic/asoc' into for-linusTakashi Iwai127-659/+9110
2010-08-05Merge branch 'topic/hda' into for-linusTakashi Iwai13-147/+897
2010-08-05Merge branch 'sched/urgent' into sched/coreIngo Molnar3-17/+1
Conflicts: include/linux/sched.h Merge reason: Add the leftover .35 urgent bits, fix the conflict. Signed-off-by: Ingo Molnar <[email protected]>
2010-08-05Merge branch 'perf/core' of ↵Ingo Molnar4-27/+25
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
2010-08-05Merge branch 'perf/nmi' into perf/coreIngo Molnar16-348/+770
Conflicts: kernel/Makefile Merge reason: Add the now complete topic, fix the conflict. Signed-off-by: Ingo Molnar <[email protected]>
2010-08-05ext4: re-inline ext4_rec_len_(to|from)_disk functionsEric Sandeen2-26/+37
commit 3d0518f4, "ext4: New rec_len encoding for very large blocksizes" made several changes to this path, but from a perf perspective, un-inlining ext4_rec_len_from_disk() seems most significant. This function is called from ext4_check_dir_entry(), which on a file-creation workload is called extremely often. I tested this with bonnie: # bonnie++ -u root -s 0 -f -x 200 -d /mnt/test -n 32 (this does 200 iterations) and got this for the file creations: ext4 stock: Average = 21206.8 files/s ext4 inlined: Average = 22346.7 files/s (+5%) Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2010-08-05virtio_blk: Remove VBID ioctlRyan Harper1-10/+0
With the availablility of a sysfs device attribute for examining disk serial numbers the ioctl is no longer needed. The user-space changes for this aren't upstream yet so we don't have any users to worry about. Signed-off-by: Ryan Harper <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05virtio_blk: Add 'serial' attribute to virtio-blk devices (v2)Ryan Harper1-0/+28
Create a new attribute for virtio-blk devices that will fetch the serial number of the block device. This attribute can be used by udev to create disk/by-id symlinks for devices that don't have a UUID (filesystem) associated with them. ATA_IDENTIFY strings are special in that they can be up to 20 chars long and aren't required to be nul-terminated. The buffer is also zero-padded meaning that if the serial is 19 chars or less that we get a nul-terminated string. When copying this value into a string buffer, we must be careful to copy up to the nul (if it present) and only 20 if it is longer and not to attempt to nul terminate; this isn't needed. Changes since v1: - Added BUILD_BUG_ON() for PAGE_SIZE check - Removed min() since BUILD_BUG_ON() handles the check - Replaced serial_sysfs() by copying id directly to buffer Signed-off-by: Ryan Harper <[email protected]> Signed-off-by: john cooper <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05virtio_blk: support barriers without FLUSH featureChristoph Hellwig1-3/+23
If we want to support barriers with the cache=writethrough mode in qemu we need to tell the block layer that we only need queue drains to implement a barrier. Follow the model set by SCSI and IDE and assume that there is no volatile write cache if the host doesn't advertize it. While this might imply working barriers on old qemu versions or other hypervisors that actually have a volatile write cache this is only a cosmetic issue - these hypervisors don't guarantee any data integrity with or without this patch, but with the patch we at least provide data ordering. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: cleanup comments, remove noinlineRusty Russell1-4/+8
On my (32-bit x86) machine, sys_init_module() uses 124 bytes of stack once load_module() is inlined. This effectively reverts ffb4ba76 which inlined it due to stack pressure. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: group post-relocation functions into post_relocation()Rusty Russell1-24/+32
This simply hoists more code out of load_module; we also put the identification of the extable and dynamic debug table in with the others in find_module_sections(). We move the taint check to the actual add/remove of the dynamic debug info: this is certain (find_module_sections is too early). Signed-off-by: Rusty Russell <[email protected]> Cc: Yehuda Sadeh <[email protected]>
2010-08-05module: move module args strndup_user to just before useRusty Russell1-15/+13
Instead of copying and allocating the args and storing it in load_info, we can just allocate them right before we need them. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: pass load_info into other functionsRusty Russell1-215/+157
Pass the struct load_info into all the other functions in module loading. This neatens things and makes them more consistent. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: fix sysfs cleanup for !CONFIG_SYSFSRusty Russell1-7/+6
Restore the stub module_remove_modinfo_attrs, remove the now-unused !CONFIG_SYSFS module_sysfs_init. Also, rename mod_kobject_remove() to mod_sysfs_teardown() as it is the logical counterpart to mod_sysfs_setup now. Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: sysfs cleanupRusty Russell1-43/+34
We change the sysfs functions to take struct load_info, and call them all in mod_sysfs_setup(). We also clean up the #ifdefs a little. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: layout_and_allocateRusty Russell1-99/+125
layout_and_allocate() does everything up to and including the final struct module placement inside the allocated module memory. We have to store the symbol layout information in our struct load_info though. This avoids the nasty code we had before where 'mod' pointed first to the version inside the temporary allocation containing the entire file, then later was moved to point to the real struct module: now the main code only ever sees the final module address. (Includes fix for the Tony Luck-found Linus-diagnosed failure path error). Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: fix crash in get_ksymbol() when oopsing in module initRusty Russell1-1/+2
Andrew had the sole pleasure of tickling this bug in linux-next; when we set up "info->strtab" it's pointing into the temporary copy of the module. For most uses that is fine, but kallsyms keeps a pointer around during module load (inside mod->strtab). If we oops for some reason inside a module's init function, kallsyms will use the mod->strtab pointer into the now-freed temporary module copy. (Later oopses work fine: after init we overwrite mod->strtab to point to a compacted core-only strtab). Reported-by: Andrew "Grumpy" Morton <[email protected]> Signed-off-by: Rusty "Buggy" Russell <[email protected]> Tested-by: Andrew "Happy" Morton <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: kallsyms functions take struct load_infoRusty Russell1-39/+29
Simple refactor causes us to lift struct definition to top of file. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: refactor out section header rewriting: FIX modversionsRusty Russell1-6/+6
We can't do the find_sec after removing the SHF_ALLOC flags; it won't find the sections. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: refactor out section header rewritingRusty Russell1-25/+45
Put all the "rewrite and check section headers" in one place. This adds another iteration over the sections, but it's far clearer. We iterate once for every find_section() so we already iterate over many times. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: add load_infoLinus Torvalds1-103/+125
Btw, here's a patch that _looks_ large, but it really pretty trivial, and sets things up so that it would be way easier to split off pieces of the module loading. The reason it looks large is that it creates a "module_info" structure that contains all the module state that we're building up while loading, instead of having individual variables for all the indices etc. So the patch ends up being large, because every "symindex" access instead becomes "info.index.sym" etc. That may be a few characters longer, but it then means that we can just pass a pointer to that "info" structure around. and let all the pieces fill it in very naturally. As an example of that, the patch also moves the initialization of all those convenience variables into a "setup_module_info()" function. And at this point it really does become very natural to start to peel off some of the error labels and move them into the helper functions - now the "truncated" case is gone, and is handled inside that setup function instead. So maybe you don't like this approach, and it does make the variable accesses a bit longer, but I don't think unreadably so. And the patch really does look big and scary, but there really should be absolutely no semantic changes - most of it was a trivial and mindless rename. In fact, it was so mindless that I on purpose kept the existing helper functions looking like this: - err = check_modinfo(mod, sechdrs, infoindex, versindex); + err = check_modinfo(mod, info.sechdrs, info.index.info, info.index.vers); rather than changing them to just take the "info" pointer. IOW, a second phase (if you think the approach is ok) would change that calling convention to just do err = check_modinfo(mod, &info); (and same for "layout_sections()", "layout_symtabs()" etc.) Similarly, while right now it makes things _look_ bigger, with things like this: versindex = find_sec(hdr, sechdrs, secstrings, "__versions"); becoming info->index.vers = find_sec(info->hdr, info->sechdrs, info->secstrings, "__versions"); in the new "setup_module_info()" function, that's again just a result of it being a search-and-replace patch. By using the 'info' pointer, we could just change the 'find_sec()' interface so that it ends up being info->index.vers = find_sec(info, "__versions"); instead, and then we'd actually have a shorter and more readable line. So for a lot of those mindless variable name expansions there's would be room for separate cleanups. I didn't move quite everything in there - if we do this to layout_symtabs, for example, we'd want to move the percpu, symoffs, stroffs, *strmap variables to be fields in that module_info structure too. But that's a much smaller patch, I moved just the really core stuff that is currently being set up and used in various parts. But even in this rough form, it removes close to 70 lines from that function (but adds 22 lines overall, of course - the structure definition, the helper function declarations and call-sites etc etc). Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: reduce stack usage for each_symbol()Linus Torvalds1-1/+1
And now that I'm looking at that call-chain (to see if it would make sense to use some other more specific lock - doesn't look like it: all the readers are using RCU and this is the only writer), I also give you this trivial one-liner. It changes each_symbol() to not put that constant array on the stack, resulting in changing movq $C.388.31095, %rsi #, tmp85 subq $376, %rsp #, movq %rdi, %rbx # fn, fn leaq -208(%rbp), %rdi #, tmp84 movq %rbx, %rdx # fn, rep movsl xorl %esi, %esi # leaq -208(%rbp), %rdi #, tmp87 movq %r12, %rcx # data, call each_symbol_in_section.clone.0 # into xorl %esi, %esi # subq $216, %rsp #, movq %rdi, %rbx # fn, fn movq $arr.31078, %rdi #, call each_symbol_in_section.clone.0 # which is not so much about being obviously shorter and simpler because we don't unnecessarily copy that constant array around onto the stack, but also about having a much smaller stack footprint (376 vs 216 bytes - see the update of 'rsp'). Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: refactor load_module part 5Rusty Russell1-76/+106
1) Extract out the relocation loop into apply_relocations 2) Extract license and version checks into check_module_license_and_versions 3) Extract icache flushing into flush_module_icache 4) Move __obsparm warning into find_module_sections 5) Move license setting into check_modinfo. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: refactor load_module part 4Rusty Russell1-17/+15
Allocate references inside module_unload_init(), clean up inside module_unload_free(). This version fixed to do allocation before __this_cpu_write, thanks to bug reports from linux-next from Dave Young <[email protected]> and Stephen Rothwell <[email protected]>. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: refactor load_module part 3Rusty Russell1-47/+75
Extract out the allocation and copying in from userspace, and the first set of modinfo checks. Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: refactor load_module part 2Linus Torvalds1-57/+72
Here's a second one. It's slightly less trivial - since we now have error cases - and equally untested so it may well be totally broken. But it also cleans up a bit more, and avoids one of the goto targets, because the "move_module()" helper now does both allocations or none. Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: refactor load_moduleLinus Torvalds1-61/+69
I'd start from the trivial stuff. There's a fair amount of straight-line code that just makes the function hard to read just because you have to page up and down so far. Some of it is trivial to just create a helper function for. Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-08-05module: module_unload_init() cleanupEric Dumazet1-6/+0
No need to clear mod->refptr in module_unload_init(), since alloc_percpu() already clears allocated chunks. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: Rusty Russell <[email protected]> (removed unused var)