LOAN
Brauchen Sie einen Kredit? Wir bieten Darlehen in 2% gelten heute Kontakt mit uns auf: legacyassetgro...@hotmail.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[GIT PULL] Staging driver fixes for 4.6-rc3
The following changes since commit f55532a0c0b8bb6148f4e07853b876ef73bc69ca: Linux 4.6-rc1 (2016-03-26 16:03:24 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-4.6-rc3 for you to fetch changes up to 53c43c5ca13328ac8f415aa2251791b441a12b51: Revert "Staging: olpc_dcon: Remove obsolete driver" (2016-04-04 13:52:35 -0700) Staging / IIO driver fixes for 4.6-rc3 Here are some IIO driver fixes, along with two staging driver fixes for 4.6-rc3. One staging driver patch reverts the deletion of a driver that happened in 4.6-rc1. We thought that laptop.org was dead, but it's still alive and kicking, and has users that were mad we broke their hardware by deleting a driver for their machines. So that driver is added back and everyone is happy again. All of these have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman Arnd Bergmann (1): iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE Greg Kroah-Hartman (3): Merge tag 'iio-fixes-for-4.6a' of git://git.kernel.org/.../jic23/iio into usb-linus Merge tag 'iio-fixes-for-4.6b' of git://git.kernel.org/.../jic23/iio into staging-linus Revert "Staging: olpc_dcon: Remove obsolete driver" Irina Tirdea (4): iio: fix config watermark initial value iio: accel: bmc150: fix endianness when reading axes iio: gyro: bmg160: fix endianness when reading axes iio: gyro: bmg160: fix buffer read values Krzysztof Kozlowski (1): iio: adc: Fix build error of missing devm_ioremap_resource on UM Markus Böhme (1): staging/rdma/hfi1: select CRC32 Matt Ranostay (2): iio: light: apds9960: correct FIFO check condition iio: health: max30100: correct FIFO check condition Richard Weinberger (1): iio: imu: Fix inv_mpu6050 dependencies Stefan Eichenberger (2): iio: adc: max1363: add missing adc to max1363_id iio: adc: max1363: correct reference voltage MAINTAINERS | 8 + drivers/iio/accel/bmc150-accel-core.c| 7 +- drivers/iio/adc/Kconfig | 1 + drivers/iio/adc/max1363.c| 12 +- drivers/iio/gyro/bmg160_core.c | 9 +- drivers/iio/health/max30100.c| 3 +- drivers/iio/imu/inv_mpu6050/Kconfig | 3 +- drivers/iio/industrialio-buffer.c| 1 + drivers/iio/light/apds9960.c | 3 +- drivers/iio/magnetometer/st_magn.h | 1 + drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/olpc_dcon/Kconfig| 35 ++ drivers/staging/olpc_dcon/Makefile | 6 + drivers/staging/olpc_dcon/TODO | 9 + drivers/staging/olpc_dcon/olpc_dcon.c| 813 +++ drivers/staging/olpc_dcon/olpc_dcon.h| 111 drivers/staging/olpc_dcon/olpc_dcon_xo_1.c | 205 +++ drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 161 ++ drivers/staging/rdma/hfi1/Kconfig| 1 + 20 files changed, 1377 insertions(+), 15 deletions(-) create mode 100644 drivers/staging/olpc_dcon/Kconfig create mode 100644 drivers/staging/olpc_dcon/Makefile create mode 100644 drivers/staging/olpc_dcon/TODO create mode 100644 drivers/staging/olpc_dcon/olpc_dcon.c create mode 100644 drivers/staging/olpc_dcon/olpc_dcon.h create mode 100644 drivers/staging/olpc_dcon/olpc_dcon_xo_1.c create mode 100644 drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: fsl-mc: remove an unnescessary cast on a void pointer
Remove an unnecessary cast on a void pointer in dprc-driver.c Signed-off-by: Ben Marsh --- drivers/staging/fsl-mc/bus/dprc-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c index 9380ebc..31488a7 100644 --- a/drivers/staging/fsl-mc/bus/dprc-driver.c +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c @@ -407,7 +407,7 @@ static irqreturn_t dprc_irq0_handler_thread(int irq_num, void *arg) { int error; u32 status; - struct device *dev = (struct device *)arg; + struct device *dev = arg; struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev); struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev); struct fsl_mc_io *mc_io = mc_dev->mc_io; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: fsl-mc: get rid of mutex_locked variables
Remove mutex_locked variables which are used to determine whether mutex is locked, instead add another label to unlock mutex on premature exits due to an error. This patch also addresses the folowing warnings reported by coccinelle: drivers/staging/fsl-mc/bus/mc-allocator.c:237:1-7: preceding lock on line 204 drivers/staging/fsl-mc/bus/mc-allocator.c:89:1-7: preceding lock on line 57 drivers/staging/fsl-mc/bus/mc-allocator.c:157:1-7: preceding lock on line 124 Signed-off-by: Cihangir Akturk --- drivers/staging/fsl-mc/bus/mc-allocator.c | 61 --- 1 file changed, 24 insertions(+), 37 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c index 86f8543..bdb4b0e 100644 --- a/drivers/staging/fsl-mc/bus/mc-allocator.c +++ b/drivers/staging/fsl-mc/bus/mc-allocator.c @@ -39,7 +39,6 @@ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus struct fsl_mc_resource *resource; struct fsl_mc_device *mc_bus_dev = &mc_bus->mc_dev; int error = -EINVAL; - bool mutex_locked = false; if (WARN_ON(pool_type < 0 || pool_type >= FSL_MC_NUM_POOL_TYPES)) goto out; @@ -55,13 +54,12 @@ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus goto out; mutex_lock(&res_pool->mutex); - mutex_locked = true; if (WARN_ON(res_pool->max_count < 0)) - goto out; + goto out_unlock; if (WARN_ON(res_pool->free_count < 0 || res_pool->free_count > res_pool->max_count)) - goto out; + goto out_unlock; resource = devm_kzalloc(&mc_bus_dev->dev, sizeof(*resource), GFP_KERNEL); @@ -69,7 +67,7 @@ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus error = -ENOMEM; dev_err(&mc_bus_dev->dev, "Failed to allocate memory for fsl_mc_resource\n"); - goto out; + goto out_unlock; } resource->type = pool_type; @@ -82,10 +80,9 @@ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus res_pool->free_count++; res_pool->max_count++; error = 0; +out_unlock: + mutex_unlock(&res_pool->mutex); out: - if (mutex_locked) - mutex_unlock(&res_pool->mutex); - return error; } @@ -106,7 +103,6 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device struct fsl_mc_resource_pool *res_pool; struct fsl_mc_resource *resource; int error = -EINVAL; - bool mutex_locked = false; if (WARN_ON(!FSL_MC_IS_ALLOCATABLE(mc_dev->obj_desc.type))) goto out; @@ -122,13 +118,12 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device goto out; mutex_lock(&res_pool->mutex); - mutex_locked = true; if (WARN_ON(res_pool->max_count <= 0)) - goto out; + goto out_unlock; if (WARN_ON(res_pool->free_count <= 0 || res_pool->free_count > res_pool->max_count)) - goto out; + goto out_unlock; /* * If the device is currently allocated, its resource is not @@ -139,7 +134,7 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device dev_err(&mc_bus_dev->dev, "Device %s cannot be removed from resource pool\n", dev_name(&mc_dev->dev)); - goto out; + goto out_unlock; } list_del(&resource->node); @@ -150,10 +145,9 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device devm_kfree(&mc_bus_dev->dev, resource); mc_dev->resource = NULL; error = 0; +out_unlock: + mutex_unlock(&res_pool->mutex); out: - if (mutex_locked) - mutex_unlock(&res_pool->mutex); - return error; } @@ -188,21 +182,19 @@ int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus, struct fsl_mc_resource *resource; struct fsl_mc_device *mc_bus_dev = &mc_bus->mc_dev; int error = -EINVAL; - bool mutex_locked = false; BUILD_BUG_ON(ARRAY_SIZE(fsl_mc_pool_type_strings) != FSL_MC_NUM_POOL_TYPES); *new_resource = NULL; if (WARN_ON(pool_type < 0 || pool_type >= FSL_MC_NUM_POOL_TYPES)) - goto error; + goto out; res_pool = &mc_bus->resource_pools[pool_type]; if (WARN_ON(res_pool->mc_bus != mc_bus)) - goto error; + goto out; mutex_lock(&res_pool->mutex); - mutex_locked = true; resource = list_first_entry_or_null(&res_pool->free_list,
[PATCH] staging: lustre: split error handling code into multiple labels
Instead of using a switch-case statement to find out what kind of error has just happened, split error handling logic into multiple labels and jump right into the appropriate label to do the error handling. This way it is easier to follow different code paths. It also looks easy on the eyes. Additionally silences the following coccinelle warning: drivers/staging/lustre/lustre/obdecho/echo_client.c:762:22-27: ERROR: ed is NULL but dereferenced. Signed-off-by: Cihangir Akturk --- .../staging/lustre/lustre/obdecho/echo_client.c| 54 -- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index a752bb4..f143f7a 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -668,8 +668,7 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, struct obd_device *obd = NULL; /* to keep compiler happy */ struct obd_device *tgt; const char *tgt_type_name; - int rc; - int cleanup = 0; + int rc, err; ed = kzalloc(sizeof(*ed), GFP_NOFS); if (!ed) { @@ -677,16 +676,14 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, goto out; } - cleanup = 1; cd = &ed->ed_cl; rc = cl_device_init(cd, t); if (rc) - goto out; + goto out_free; cd->cd_lu_dev.ld_ops = &echo_device_lu_ops; cd->cd_ops = &echo_device_cl_ops; - cleanup = 2; obd = class_name2obd(lustre_cfg_string(cfg, 0)); LASSERT(obd); LASSERT(env); @@ -696,28 +693,25 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, CERROR("Can not find tgt device %s\n", lustre_cfg_string(cfg, 1)); rc = -ENODEV; - goto out; + goto out_device_fini; } next = tgt->obd_lu_dev; if (!strcmp(tgt->obd_type->typ_name, LUSTRE_MDT_NAME)) { CERROR("echo MDT client must be run on server\n"); rc = -EOPNOTSUPP; - goto out; + goto out_device_fini; } rc = echo_site_init(env, ed); if (rc) - goto out; - - cleanup = 3; + goto out_device_fini; rc = echo_client_setup(env, obd, cfg); if (rc) - goto out; + goto out_site_fini; ed->ed_ec = &obd->u.echo_client; - cleanup = 4; /* if echo client is to be stacked upon ost device, the next is * NULL since ost is not a clio device so far @@ -729,7 +723,7 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, if (next) { if (next->ld_site) { rc = -EBUSY; - goto out; + goto out_cleanup; } next->ld_site = &ed->ed_site->cs_lu; @@ -737,7 +731,7 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, next->ld_type->ldt_name, NULL); if (rc) - goto out; + goto out_cleanup; } else { LASSERT(strcmp(tgt_type_name, LUSTRE_OST_NAME) == 0); @@ -745,27 +739,19 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, ed->ed_next = next; return &cd->cd_lu_dev; -out: - switch (cleanup) { - case 4: { - int rc2; - - rc2 = echo_client_cleanup(obd); - if (rc2) - CERROR("Cleanup obd device %s error(%d)\n", - obd->obd_name, rc2); - } - case 3: - echo_site_fini(env, ed); - case 2: - cl_device_fini(&ed->ed_cl); - case 1: - kfree(ed); - case 0: - default: - break; - } +out_cleanup: + err = echo_client_cleanup(obd); + if (err) + CERROR("Cleanup obd device %s error(%d)\n", + obd->obd_name, err); +out_site_fini: + echo_site_fini(env, ed); +out_device_fini: + cl_device_fini(&ed->ed_cl); +out_free: + kfree(ed); +out: return ERR_PTR(rc); } -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wilc1000: rework comments in wilc_sdio.c
From: Mohammed Billoo Remove unnecessary comments (highlighting sections of functions), make multiline comments into single line comments, and ensure that multiline comments adhere to coding style. --- drivers/staging/wilc1000/wilc_sdio.c | 136 --- 1 file changed, 31 insertions(+), 105 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index a839a79..a082e12 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -1,11 +1,7 @@ -/* // */ -/* */ -/* Copyright (c) Atmel Corporation. All rights reserved. */ -/* */ -/* Module Name: wilc_sdio.c */ -/* */ -/* */ -/* */ +/* Copyright (c) Atmel Corporation. All rights reserved. + * + * Module Name: wilc_sdio.c + */ #include #include "wilc_wlan_if.h" @@ -257,11 +253,6 @@ static void wilc_sdio_disable_interrupt(struct wilc *dev) dev_info(&func->dev, "wilc_sdio_disable_interrupt OUT\n"); } -/ - * - * Function 0 - * - / static int sdio_set_func0_csa_address(struct wilc *wilc, u32 adr) { @@ -269,9 +260,7 @@ static int sdio_set_func0_csa_address(struct wilc *wilc, u32 adr) struct sdio_cmd52 cmd; int ret; - /** -* Review: BIG ENDIAN -**/ + /* Review: BIG ENDIAN */ cmd.read_write = 1; cmd.function = 0; cmd.raw = 0; @@ -334,11 +323,6 @@ _fail_: return 0; } -/ - * - * Function 1 - * - / static int sdio_set_func1_block_size(struct wilc *wilc, u32 block_size) { @@ -369,11 +353,7 @@ _fail_: return 0; } -/ - * - * Sdio interfaces - * - / + static int sdio_write_reg(struct wilc *wilc, u32 addr, u32 data) { struct sdio_func *func = dev_to_sdio_func(wilc->dev); @@ -398,9 +378,7 @@ static int sdio_write_reg(struct wilc *wilc, u32 addr, u32 data) } else { struct sdio_cmd53 cmd; - /** -* set the AHB address -**/ + /* set the AHB address */ if (!sdio_set_func0_csa_address(wilc, addr)) goto _fail_; @@ -436,31 +414,23 @@ static int sdio_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size) cmd.read_write = 1; if (addr > 0) { - /** -* has to be word aligned... -**/ + /* has to be word aligned... */ if (size & 0x3) { size += 4; size &= ~0x3; } - /** -* func 0 access -**/ + /* func 0 access */ cmd.function = 0; cmd.address = 0x10f; } else { - /** -* has to be word aligned... -**/ + /* has to be word aligned... */ if (size & 0x3) { size += 4; size &= ~0x3; } - /** -* func 1 access -**/ + /* func 1 access */ cmd.function = 1; cmd.address = 0; } @@ -576,31 +546,23 @@ static int sdio_read(struct wilc *wilc, u32 addr, u8 *buf, u32 size) cmd.read_write = 0; if (addr > 0) { - /** -* has to be word aligned... -**/ + /* has to be word aligned... */ if (size & 0x3) { size += 4; size &= ~0x3; } - /** -* func 0 access -**/ + /* func 0 access */ cmd.function = 0; cmd.address = 0x10f; } else { - /** -* has to be word aligned... -**/ + /* has to be word aligned... */ if (size & 0x3) { size += 4; size &= ~0x3; } - /** -* func 1 access -**/ + /* func 1 access */ cmd.function = 1; cmd.address = 0; } @@ -627,7 +589,7 @@ static int sdio_read(struct wilc *wilc, u32 addr, u8 *buf, u32 size) if (addr > 0) addr += nblk * block_size; buf += nblk * block_size; - } /* if (nblk > 0) */ + } if
自落式拌和机
你的老朋友邀你来Q群:343257759 抢红包 抢秒杀 抢vip 什么都要抢。太刺激了。不靠手气只拼手速 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel