aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-12mfd: Add WM8321 supportMark Brown1-0/+14
The WM8321 is a PMIC for low power, high performance applications. From a software point of view the device is identical to the WM8320, all the differences between the two devices are visible only in hardware. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Add stmpe auto sleep featureSundar R Iyer3-0/+81
Some STMPE devices support entering sleep mode automatically on a specified timeout of inactivity on the I2C bus with the host system. Acked-by: Linus Walleij <[email protected]> Acked-by: Rabin Vincent <[email protected]> Signed-off-by: Sundar R Iyer <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12touchscreen: Fix sign bugKulikov Vasiliy1-1/+1
platform_get_irq_byname() can return negative results, it is not seen to unsigned ts_irq. Make it signed. Signed-off-by: Kulikov Vasiliy <[email protected]> Acked-By: Luotao Fu <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Add support for TWL6030 PWMHemanth V3-0/+173
TWL6030 supports PWM (Pulse Width Modulator) which is used to control charging LED. PWM allows for controlling brightness. This patch implements the APIs required by leds-pwm driver. Signed-off-by: Hemanth V <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Add additional WM8994 GPIO functionsMark Brown1-0/+4
Later revisions of the WM8994 add some more GPIO functions, define them in the header file. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Add JZ4740 ADC driverLars-Peter Clausen4-0/+425
This patch adds a MFD driver for the JZ4740 ADC unit. The driver is used to demultiplex IRQs and synchronize access to shared registers between the battery, hwmon and (future) touchscreen driver. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12gpiolib: Implement set_debounce for WM831x GPIOsMark Brown1-0/+32
The debounce times are approximate, they can be selected using the two input functions. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12input: STMPE touch controller supportLuotao Fu3-0/+408
This one adds a driver for STMPE touchscreen controllers. This driver depends on the stmpexxx mfd core driver. Signed-off-by: Luotao Fu <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12input: Add STMPE keypad driverRabin Vincent3-0/+397
Add an input driver for the keypad on STMPE I/O expanders. This driver uses the common support provided by the STMPE MFD driver. Acked-by: Dmitry Torokhov <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12gpio: Add STMPE GPIO driverRabin Vincent3-0/+407
Add support for the GPIOs on STMPE I/O Expanders. [[email protected]: fix set direction input] [[email protected]: set GPIO alternate function while requesting] Acked-by: Luotao Fu <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Add STMPE I/O Expander supportRabin Vincent5-0/+1312
Add support for the STMPE family of I/O Expanders from STMicroelectronics. These devices include upto 24 gpios and a varying selection of blocks, including PWM, keypad, and touchscreen controllers. This patch adds the MFD core. [[email protected]: fix stmpe811 enable hook] [[email protected]: add touchscreen platform data] Acked-by: Luotao Fu <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Properly free t7l66xb clk32k clock sourceAxel Lin1-1/+2
This patch includes below fixes to properly free clk32k clock source: 1. remove a redundant clk_put in t7l66xb_probe error path 2. add missing clk_disable(t7l66xb->clk32k) and clk_put(t7l66xb->clk32k) to properly free the clock source. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: More verbose MFD Kconfig entrySamuel Ortiz1-1/+10
For people to be able to intellingibly decide if they want to enable MFD drivers or not, we have to give them a much better description of what they are.
2010-08-12mfd: Staticise ab3550 register access functionsMark Brown1-11/+12
These are now exported via an ops table rather than referenced directly and so should be staticised. Signed-off-by: Mark Brown <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Fix davinci memory leakJulia Lawall1-2/+4
Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: properly handle platform_device_add_resources fail in mfd_add_deviceAxel Lin1-1/+3
platform_device_add_resources may fail, thus add error checking for it. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: kzalloc doesn't return ERR_PTRJulia Lawall1-1/+1
Use !x rather than IS_ERR(x) to test the result of kzalloc. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,E; @@ x = \(kmalloc\|kzalloc\|kcalloc\)(...) ... when != x = E - IS_ERR(x) + !x // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: AB8500 mask off irrelevant bits from the SPI messageLinus Walleij1-1/+6
The registers on the AB8500 are only 8 bits wide, so the content of the remaining bits is undefined. Let's mask off the undefined stuff when returning a register in an SPI read. Acked-by: Rabin Vincent <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Fix 88pm860x uninitialized variable and clean upDan Carpenter1-40/+32
The original code had a compile warning: drivers/mfd/88pm860x-core.c:431: warning: ‘ret’ may be used uninitialized in this function It seems like the warning is valid if either pdata or pdata->touch is NULL. This patch checks pdata and pdata->touch at the beginning of the function. That means everything can be pulled in one indent level. Now all the statements fit within the 80 character limit. Also at that point the "use_gpadc" variable isn't needed and removing it simplifies the logic. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Fix memory leak in ab3100_otp_probeAxel Lin1-8/+8
In current implementation, there is a memory leak if ab3100_otp_read fail. And in the case of ab3100_otp_init_debugfs fail, it does not properly remove sysfs entries. This patch properly handle above failure cases. Signed-off-by: Axel Lin <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Fix led resource in 88pm860xHaojian Zhuang1-6/+6
Fix typo error in LED resource of 88pm860x. Signed-off-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12mfd: Enable onkey on max8925Haojian Zhuang1-0/+27
Enable onkey feature in max8925 driver. Signed-off-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2010-08-12kconfig: fix tristate choice with minimal configSam Ravnborg1-35/+67
If a minimal config did not specify the value of all choice values, the resulting configuration could have wrong values. Consider following example: config M def_bool y option modules choice prompt "choice list" config A tristate "a" config B tristate "b" endchoice With a defconfig like this: CONFIG_M=y CONFIG_A=y The resulting configuration would have CONFIG_A=m which was unexpected. The problem was not not all choice values were set and thus kconfig calculated a wrong value. The fix is to set all choice values when we read a defconfig files. conf_set_all_new_symbols() is refactored such that random choice values are now handled by a dedicated function. And new choice values are set by set_all_choice_values(). This was not the minimal fix, but the fix that resulted in the most readable code. Signed-off-by: Sam Ravnborg <[email protected]> Reported-by: Arve Hjønnevåg <[email protected]> Tested-by: Arve Hjønnevåg <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-08-12kconfig: fix savedefconfig for tristate choicesSam Ravnborg1-4/+3
savedefconfig failed to save choice symbols equal to 'y' for tristate choices. This resulted in this value being lost. In particular is fixes an issue where make ARCH=avr32 atngw100_defconfig make ARCH=avr32 savedefconfig cp defconfig arch/avr32/configs/atngw100_defconfig make ARCH=avr32 atngw100_defconfig diff -u .config .config.old failed to produce an identical .config. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-08-12sound: oss: sh_dac_audio.c removed duplicated #includeAndrea Gelmini1-1/+0
Signed-off-by: Andrea Gelmini <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-08-11phylib: available for any speed ethernetRandy Dunlap2-2/+2
Several gigabit network drivers (SB1250_MAC, TIGON3, FSL, GIANFAR, UCC_GETH, MV643XX_ETH, XILINX_LL_TEMAC, S6GMAC, STMMAC_ETH, PASEMI_MAC, and OCTEON_ETHERNET) select PHYLIB. These drivers are not under NET_ETHERNET (10/100 mbit), so this warning is generated (long, irrelevant parts are omitted): warning: (NET_DSA && NET && EXPERIMENTAL && NET_ETHERNET && !S390 || ... || SB1250_MAC && NETDEVICES && NETDEV_1000 && SIBYTE_SB1xxx_SOC || TIGON3 && NETDEVICES && NETDEV_1000 && PCI || FSL_PQ_MDIO && NETDEVICES && NETDEV_1000 && FSL_SOC || GIANFAR && NETDEVICES && NETDEV_1000 && FSL_SOC || UCC_GETH && NETDEVICES && NETDEV_1000 && QUICC_ENGINE || MV643XX_ETH && NETDEVICES && NETDEV_1000 && (MV64X60 || PPC32 || PLAT_ORION) || XILINX_LL_TEMAC && NETDEVICES && NETDEV_1000 && (PPC || MICROBLAZE) || S6GMAC && NETDEVICES && NETDEV_1000 && XTENSA_VARIANT_S6000 || STMMAC_ETH && NETDEV_1000 && NETDEVICES && CPU_SUBTYPE_ST40 || PASEMI_MAC && NETDEVICES && NETDEV_10000 && PPC_PASEMI && PCI || OCTEON_ETHERNET && STAGING && !STAGING_EXCLUDE_BUILD && CPU_CAVIUM_OCTEON) selects PHYLIB which has unmet direct dependencies (!S390 && NET_ETHERNET) PHYLIB is used by non-10/100 mbit ethernet drivers, so change the dependencies to be NETDEVICES instead of NET_ETHERNET. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-08-11x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleanerLuca Barbieri1-108/+128
The old code didn't work on binutils 2.12 because setting a symbol to a register apparently requires a fairly recent version. This commit refactors the code to use the C preprocessor instead, and in the process makes the whole code a bit easier to understand. The object code produced is unchanged as expected. This fixes kernel bugzilla 16506. Reported-by: Dieter Stussy <[email protected]> Signed-off-by: Luca Barbieri <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]> Cc: <[email protected]> 2.6.35 LKML-Reference: <tip-*@git.kernel.org>
2010-08-12dm mpath: support discardMike Snitzer1-0/+10
Enable discard support in the DM multipath target. This discard support depends on a few discard-specific fixes to the block layer's request stacking driver methods. Discard requests are optional so don't allow a failed discard to trigger path failures. If there is a real problem with a given path the barriers associated with the discard (either before or after the discard) will cause path failure. That said, unconditionally passing discard failures up the stack is not ideal. This must be fixed once DM has more information about the nature of the underlying storage failure. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]> Cc: Kiyoshi Ueda <[email protected]>
2010-08-12dm stripe: support discardsMikulas Patocka1-0/+39
The DM core will submit a discard bio to the stripe target for each stripe in a striped DM device. The stripe target will determine stripe-specific portions of the supplied bio to be remapped into individual (at most 'num_discard_requests' extents). If a given stripe-specific discard bio doesn't touch a particular stripe the bio will be dropped. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: split discard requests on target boundariesMike Snitzer1-24/+23
Update __clone_and_map_discard to loop across all targets in a DM device's table when it processes a discard bio. If a discard crosses a target boundary it must be split accordingly. Update __issue_target_requests and __issue_target_request to allow a cloned discard bio to have a custom start sector and size. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm stripe: optimize sector divisionMikulas Patocka1-5/+18
Optimize sector division: If the number of stripes is a power of two, we can do shift and mask instead of division. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm stripe: move sector translation to a functionMikulas Patocka1-7/+14
Move sector to stripe translation into a function. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: error return error for discardsMike Snitzer1-0/+5
Have the error target respond to a discard request with a hard -EIO rather than fail the request with -EOPNOTSUPP. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm delay: support discardMike Snitzer1-0/+1
Enable discard support for the delay target. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: zero silently drop discardsMike Snitzer1-0/+5
Have the zero target silently drop a discard rather than fail the request with -EOPNOTSUPP. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: use dm_target_offset macroAlasdair G Kergon5-8/+7
Use new dm_target_offset() macro to avoid most references to ti->begin in dm targets. Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: factor out max_io_len_target_boundaryMike Snitzer2-8/+24
Split max_io_len_target_boundary out of max_io_len so that the discard support can make use of it without duplicating max_io_len code. Avoiding max_io_len's split_io logic enables DM's discard support to submit the entire discard request to a target. But discards must still be split on target boundaries. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: use common __issue_target_request for flush and discard supportMike Snitzer1-8/+22
Rename __flush_target to __issue_target_request now that it is used to issue both flush and discard requests. Introduce __issue_target_requests as a convenient wrapper to __issue_target_request 'num_flush_requests' or 'num_discard_requests' times per target. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: linear support discardMike Snitzer5-12/+105
Allow discards to be passed through to linear mappings if at least one underlying device supports it. Discards will be forwarded only to devices that support them. A target that supports discards should set num_discard_requests to indicate how many times each discard request must be submitted to it. Verify table's underlying devices support discards prior to setting the associated DM device as capable of discards (via QUEUE_FLAG_DISCARD). Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]> Reviewed-by: Joe Thornber <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm crypt: simplify crypt_ctrMilan Broz1-81/+104
Allocate cipher strings indpendently of struct crypt_config and move cipher parsing and allocation into a separate function to prepare for supporting the cryptoapi format e.g. "xts(aes)". No functional change in this patch. Signed-off-by: Milan Broz <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm crypt: simplify crypt_config destruction logicMilan Broz1-87/+93
Use just one label and reuse common destructor for crypt target. Parse remaining argv arguments in logic order. Also do not ignore error values from IV init and set key functions. No functional change in this patch except changed return codes based on above. Signed-off-by: Milan Broz <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: allow autoloading of dm modPeter Rajnoha4-2/+8
Add devname:mapper/control and MAPPER_CTRL_MINOR module alias to support dm-mod module autoloading. Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: Peter Rajnoha <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: rename map_info flush_request to target_request_nrMike Snitzer4-14/+16
'target_request_nr' is a more generic name that reflects the fact that it will be used for both flush and discard support. Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm ioctl: refactor dm_table_completeWill Drewry3-38/+52
This change unifies the various checks and finalization that occurs on a table prior to use. By doing so, it allows table construction without traversing the dm-ioctl interface. Signed-off-by: Will Drewry <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm snapshot: implement mergeMikulas Patocka1-0/+16
Implement merge method for the snapshot origin to improve read performance. Without merge method, dm asks the upper layers to submit smallest possible bios --- one page. Submitting such small bios impacts performance negatively when reading or writing the origin device. Without this patch, CPU consumption when reading the origin on lvm on md-raid0 was 6 to 12%, with this patch, it drops to 1 to 4%. Note: in my testing, it actually degraded performance in some settings, I traced it to Maxtor disks having problems with > 512-sector requests. Reducing the number of sectors to /sys/block/sd*/queue/max_sectors_kb to 256 fixed the read performance. I think we don't have to care about weird disks that actually degrade performance because of large requests being sent to them. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm: do not initialise full request queue when bio basedMike Snitzer3-26/+79
Change bio-based mapped devices no longer to have a fully initialized request_queue (request_fn, elevator, etc). This means bio-based DM devices no longer register elevator sysfs attributes ('iosched/' tree or 'scheduler' other than "none"). In contrast, a request-based DM device will continue to have a full request_queue and will register elevator sysfs attributes. Therefore a user can determine a DM device's type by checking if elevator sysfs attributes exist. First allocate a minimalist request_queue structure for a DM device (needed for both bio and request-based DM). Initialization of a full request_queue is deferred until it is known that the DM device is request-based, at the end of the table load sequence. Factor DM device's request_queue initialization: - common to both request-based and bio-based into dm_init_md_queue(). - specific to request-based into dm_init_request_based_queue(). The md->type_lock mutex is used to protect md->queue, in addition to md->type, during table_load(). A DM device's first table_load will establish the immutable md->type. But md->queue initialization, based on md->type, may fail at that time (because blk_init_allocated_queue cannot allocate memory). Therefore any subsequent table_load must (re)try dm_setup_md_queue independently of establishing md->type. Signed-off-by: Mike Snitzer <[email protected]> Acked-by: Kiyoshi Ueda <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm ioctl: make bio or request based device type immutableMike Snitzer4-9/+52
Determine whether a mapped device is bio-based or request-based when loading its first (inactive) table and don't allow that to be changed later. This patch performs different device initialisation in each of the two cases. (We don't think it's necessary to add code to support changing between the two types.) Allowed md->type transitions: DM_TYPE_NONE to DM_TYPE_BIO_BASED DM_TYPE_NONE to DM_TYPE_REQUEST_BASED We now prevent table_load from replacing the inactive table with a conflicting type of table even after an explicit table_clear. Introduce 'type_lock' into the struct mapped_device to protect md->type and to prepare for the next patch that will change the queue initialization and allocate memory while md->type_lock is held. Signed-off-by: Mike Snitzer <[email protected]> Acked-by: Kiyoshi Ueda <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]> drivers/md/dm-ioctl.c | 15 +++++++++++++++ drivers/md/dm.c | 37 ++++++++++++++++++++++++++++++------- drivers/md/dm.h | 5 +++++ include/linux/dm-ioctl.h | 4 ++-- 4 files changed, 52 insertions(+), 9 deletions(-)
2010-08-12dm: skip second flush on bio unsupported errorMikulas Patocka1-2/+13
When processing barriers, skip the second flush if processing the bio failed with -EOPNOTSUPP. This can happen with discard+barrier requests. If the device doesn't support discard, there would be two useless SYNCHRONIZE CACHE commands. The first dm_flush cannot be so easily optimized out, so we leave it there. Previously, -EOPNOTSUPP could be received in dec_pending only with empty barriers and we ignored that error, assuming the device not supporting cache flushes has cache always consistent. With the addition of discard barriers, this -EOPNOTSUPP can also be generated by discards and we must record it in md->barrier_error for process_barrier. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm snapshot: persistent use define for disk header chunk sizeTomohiro Kusumi1-3/+3
This patch fixes hard-coded value for the size of a chunk that includes disk header for persistent snapshot. It should be changed to existing macro NUM_SNAPSHOT_HDR_CHUNKS instead of using hard-coded value 1. Signed-off-by: Tomohiro Kusumi <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
2010-08-12dm crypt: use kstrdupJulia Lawall1-2/+1
Use kstrdup when the goal of an allocation is copy a string into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to; expression flag,E1,E2; statement S; @@ - to = kmalloc(strlen(from) + 1,flag); + to = kstrdup(from, flag); ... when != \(from = E1 \| to = E1 \) if (to==NULL || ...) S ... when != \(from = E2 \| to = E2 \) - strcpy(to, from); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>