Re: [PATCH v2 0/3] staging: comedi: dt282x: minor cleanup
On 23/03/16 19:24, H Hartley Sweeten wrote: Refactor dt282x_ns_to_timer() to remove the magic numbers used to calculate the divisor needed to generate the pacer clock ns timing. Remove some unnecessary/redundant cruft from the driver. v2: Ian Abbott prefered to keep the comedi_check_trigger_arg_max() check of the convert_arg (patch 1). H Hartley Sweeten (3): staging: comedi: dt282x: refactor dt282x_ns_to_timer() staging: comedi: dt282x: remove redundant comedi_check_trigger_arg_min() staging: comedi: dt282x: remove unnecessary comment drivers/staging/comedi/drivers/dt282x.c | 54 +++-- 1 file changed, 24 insertions(+), 30 deletions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] devicetree: Add ANX7814 bridge binding.
The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter designed for portable devices. Signed-off-by: Enric Balletbo i Serra --- .../devicetree/bindings/video/bridge/anx7814.txt | 41 ++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/bridge/anx7814.txt diff --git a/Documentation/devicetree/bindings/video/bridge/anx7814.txt b/Documentation/devicetree/bindings/video/bridge/anx7814.txt new file mode 100644 index 000..5a47a42 --- /dev/null +++ b/Documentation/devicetree/bindings/video/bridge/anx7814.txt @@ -0,0 +1,41 @@ +Analogix ANX7814 SlimPort (Full-HD Transmitter) +--- + +The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter +designed for portable devices. + +Required properties: + + - compatible : "analogix,anx7814" + - reg : I2C address of the device + - interrupt-parent: Should be the phandle of the interrupt controller + that services interrupts for this device + - interrupts : Should contain the INTP interrupt + - cable-det-gpios : Which GPIO to use for cable detection + - pd-gpios: Which GPIO to use for power down + - reset-gpios : Which GPIO to use for reset + +Optional properties: + + - v10-gpios : Which GPIO to use for V10 control. + - Video port for HDMI output, using the DT bindings defined in [1]. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + + anx7814: anx7814@38 { + compatible = "analogix,anx7814"; + reg = <0x38>; + interrupt-parent = <&gpio0>; + interrupts = <99 IRQ_TYPE_LEVEL_LOW>; /* INTP */ + cable-det-gpios = <&pio 36 GPIO_ACTIVE_HIGH>; + pd-gpios = <&pio 33 GPIO_ACTIVE_HIGH>; + reset-gpios = <&pio 98 GPIO_ACTIVE_HIGH>; + v10-gpios = <&pio 35 GPIO_ACTIVE_HIGH>; + port { + anx7814_in: endpoint { + remote-endpoint = <&hdmi0_out>; + }; + }; + }; -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/3] Add ANX7814 I2C bridge driver
Hi all, This patch set to introduces the anx7814 slimport transmitter driver. These new series will replace the old series that can be found here [1]. The reason why I introduce these new series is because the driver changed significantly. The old approach used a polled state machine ans was not really well using the kernel mode setting API. With this new driver I tried to use better the drm API and use an interrupt driven model. Wating for your comments... [1] https://lwn.net/Articles/666885/ Enric Balletbo i Serra (3): of: Add vendor prefix for Analogix Semiconductor devicetree: Add ANX7814 SlimPort transmitter binding. drm: bridge: anx78xx: Add anx78xx driver support. .../devicetree/bindings/vendor-prefixes.txt|1 + .../devicetree/bindings/video/bridge/anx7814.txt | 41 + drivers/gpu/drm/bridge/Kconfig |8 + drivers/gpu/drm/bridge/Makefile|1 + drivers/gpu/drm/bridge/anx78xx.c | 1433 drivers/gpu/drm/bridge/anx78xx.h | 719 ++ 6 files changed, 2203 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/bridge/anx7814.txt create mode 100644 drivers/gpu/drm/bridge/anx78xx.c create mode 100644 drivers/gpu/drm/bridge/anx78xx.h -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] of: Add vendor prefix for Analogix Semiconductor
Analogix Semiconductor Inc. develops analog and mixed-signal devices for digital media and communications interconnect applications. Signed-off-by: Enric Balletbo i Serra --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 72e2c5a..c6eac94 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -21,6 +21,7 @@ amlogic Amlogic, Inc. ampire Ampire Co., Ltd. amsAMS AG amstaosAMS-Taos Inc. +analogix Analogix Semiconductor, Inc. apmApplied Micro Circuits Corporation (APM) aptina Aptina Imaging arasan Arasan Chip Systems -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] drm: bridge: anx78xx: Add anx78xx bridge driver support.
Although there are other chips from the same family that can reuse this driver, at the moment we only tested ANX7814 chip. The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter designed for portable devices. This driver adds initial support for HDMI to DP pass-through mode. Signed-off-by: Enric Balletbo i Serra --- drivers/gpu/drm/bridge/Kconfig |8 + drivers/gpu/drm/bridge/Makefile |1 + drivers/gpu/drm/bridge/anx78xx.c | 1433 ++ drivers/gpu/drm/bridge/anx78xx.h | 719 +++ 4 files changed, 2161 insertions(+) create mode 100644 drivers/gpu/drm/bridge/anx78xx.c create mode 100644 drivers/gpu/drm/bridge/anx78xx.h diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 27e2022..0f595ae 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -40,4 +40,12 @@ config DRM_PARADE_PS8622 ---help--- Parade eDP-LVDS bridge chip driver. +config DRM_ANX78XX + tristate "Analogix ANX78XX bridge" + select DRM_KMS_HELPER + select REGMAP_I2C + ---help--- + ANX78XX is a HD video transmitter chip over micro-USB connector + for smartphone device. + endmenu diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index f13c33d..8f0d69e 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -4,3 +4,4 @@ obj-$(CONFIG_DRM_DW_HDMI) += dw-hdmi.o obj-$(CONFIG_DRM_DW_HDMI_AHB_AUDIO) += dw-hdmi-ahb-audio.o obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o +obj-$(CONFIG_DRM_ANX78XX) += anx78xx.o diff --git a/drivers/gpu/drm/bridge/anx78xx.c b/drivers/gpu/drm/bridge/anx78xx.c new file mode 100644 index 000..25d2d1c --- /dev/null +++ b/drivers/gpu/drm/bridge/anx78xx.c @@ -0,0 +1,1433 @@ +/* + * Copyright(c) 2016, Analogix Semiconductor. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Based on anx7808 driver obtained from chromeos with copyright: + * Copyright(c) 2013, Google Inc. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "anx78xx.h" + +#define I2C_NUM_ADDRESSES 5 +#define I2C_IDX_TX_P0 0 +#define I2C_IDX_TX_P1 1 +#define I2C_IDX_TX_P2 2 +#define I2C_IDX_RX_P0 3 +#define I2C_IDX_RX_P1 4 + +#define XTAL_CLK 270 /* 27M */ +#define AUX_CH_BUFFER_SIZE 16 +#define AUX_WAIT_TIMEOUT_MS15 +#define AUX_WAIT_INTERVAL_MS 1 + +/* + * _wait_for - magic (register) wait macro + * + * Does the right thing for modeset paths when run under kdgb or similar atomic + * contexts. Note that it's important that we check the condition again after + * having timed out, since the timeout could be due to preemption or similar and + * we've never had a chance to check the condition before the timeout. + */ +#define _wait_for(COND, TO_MS, INTVL_MS) ({ \ + unsigned long timeout__ = jiffies + msecs_to_jiffies(TO_MS) + 1;\ + int ret__ = 0; \ + while (!(COND)) { \ + if (time_after(jiffies, timeout__)) { \ + if (!(COND))\ + ret__ = -ETIMEDOUT; \ + break; \ + } \ + if (drm_can_sleep()) { \ + usleep_range(INTVL_MS * 1000, \ + (INTVL_MS + 1) * 1000); \ + } else {\ + cpu_relax();\ + } \ + } \ + ret__; \ +}) + +#define wait_for(COND, TO_MS, INTVL_MS) _wait_for(COND, TO_MS, INTVL_MS) + +static const u8 anx78xx_i2c_addresses[] = { + [I2C_IDX_TX_P0] = TX_P0, + [I2C_IDX_TX_P1] = TX_P1, + [I2C_IDX_TX_P2] = TX_P2, + [I2C_IDX_RX_P0] = RX_P0, + [I2C_IDX
Re: [PATCH 3/3] drm: bridge: anx78xx: Add anx78xx bridge driver support.
On Thu, Mar 24, 2016 at 11:41:46AM +0100, Enric Balletbo i Serra wrote: > + /* Map slave addresses of ANX7814 */ > + for (i = 0; i < I2C_NUM_ADDRESSES; i++) { > + anx78xx->i2c_dummy[i] = i2c_new_dummy(client->adapter, > + anx78xx_i2c_addresses[i] >> 1); > + if (!anx78xx->i2c_dummy[i]) { > + DRM_ERROR("Failed to reserve i2c bus %02x.\n", > + anx78xx_i2c_addresses[i]); Missing error code here. > + goto err_i2c; > + } I'm, of course, not a fan of the naming. The name should be based on what the goto location does... In this case it turns it off. Which is slightly weird because we have not turned it on yet... I always say that you should have multiple error labels and you only undo things which have been done. Having a common exit path for the other functions where it was "goto out" makes sense. But again in those cases I would prefer a meaningful label name like "goto unlock;". In the kernel "goto out;" is meaningless, it could do anything or everything or nothing. A lot of people like it of course, but out: label code tends to be buggier than using a meaningful name. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] drm: bridge: anx78xx: fix ptr_ret.cocci warnings
drivers/gpu/drm/bridge/anx78xx.c:632:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci CC: Enric Balletbo i Serra Signed-off-by: Fengguang Wu --- anx78xx.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/gpu/drm/bridge/anx78xx.c +++ b/drivers/gpu/drm/bridge/anx78xx.c @@ -629,10 +629,7 @@ static int anx78xx_init_gpio(struct anx7 /* GPIO for V10 power control */ pdata->gpiod_v10 = devm_gpiod_get_optional(dev, "v10", GPIOD_OUT_LOW); - if (IS_ERR(pdata->gpiod_v10)) - return PTR_ERR(pdata->gpiod_v10); - - return 0; + return PTR_ERR_OR_ZERO(pdata->gpiod_v10); } static int anx78xx_dp_link_training(struct anx78xx *anx78xx) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/3] drm: bridge: anx78xx: Add anx78xx bridge driver support.
Hi Enric, [auto build test WARNING on drm/drm-next] [also build test WARNING on v4.5 next-20160324] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Enric-Balletbo-i-Serra/Add-ANX7814-I2C-bridge-driver/20160324-184430 base: git://people.freedesktop.org/~airlied/linux.git drm-next coccinelle warnings: (new ones prefixed by >>) >> drivers/gpu/drm/bridge/anx78xx.c:632:1-3: WARNING: PTR_ERR_OR_ZERO can be >> used Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] staging: unisys: remove double negative comparisons
Remove the double negative condition ( x != 0). Erik Arfvidson (2): staging: unisys: remove channel.h double negative comparison staging: unisys: remove visorinput.c double negative comparison drivers/staging/unisys/include/channel.h | 6 +++--- drivers/staging/unisys/visorinput/visorinput.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: unisys: remove channel.h double negative comparison
From: Erik Arfvidson This patch removes the double negative comparisons for function readb. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner --- drivers/staging/unisys/include/channel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h index 3829d4b..db4e6b2 100644 --- a/drivers/staging/unisys/include/channel.h +++ b/drivers/staging/unisys/include/channel.h @@ -411,7 +411,7 @@ spar_channel_client_acquire_os(void __iomem *ch, u8 *id) mb(); /* required for channel synch */ } if (readl(&hdr->cli_state_os) == CHANNELCLI_OWNED) { - if (readb(&hdr->cli_error_os) != 0) { + if (readb(&hdr->cli_error_os)) { /* we are in an error msg throttling state; * come out of it */ @@ -459,7 +459,7 @@ spar_channel_client_acquire_os(void __iomem *ch, u8 *id) mb(); /* required for channel synch */ return 0; } - if (readb(&hdr->cli_error_os) != 0) { + if (readb(&hdr->cli_error_os)) { /* we are in an error msg throttling state; come out of it */ pr_info("%s Channel OS client acquire now successful\n", id); writeb(0, &hdr->cli_error_os); @@ -472,7 +472,7 @@ spar_channel_client_release_os(void __iomem *ch, u8 *id) { struct channel_header __iomem *hdr = ch; - if (readb(&hdr->cli_error_os) != 0) { + if (readb(&hdr->cli_error_os)) { /* we are in an error msg throttling state; come out of it */ pr_info("%s Channel OS client error state cleared\n", id); writeb(0, &hdr->cli_error_os); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: unisys: remove visorinput.c double negative comparison
From: Erik Arfvidson This patch simply removes the double negative comparison for test_bit since test_bit already preforms this check. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner --- drivers/staging/unisys/visorinput/visorinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c index 13c0316..3299cf50 100644 --- a/drivers/staging/unisys/visorinput/visorinput.c +++ b/drivers/staging/unisys/visorinput/visorinput.c @@ -470,7 +470,7 @@ handle_locking_key(struct input_dev *visorinput_dev, break; } if (led >= 0) { - int old_state = (test_bit(led, visorinput_dev->led) != 0); + int old_state = (test_bit(led, visorinput_dev->led)); if (old_state != desired_state) { input_report_key(visorinput_dev, keycode, 1); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Administrador do sistema
Sua caixa de correio excedeu o limite de armazenamento, que é de 20 GB como definido pelo administrador, você está atualmente em execução no 20,9 GB, você pode não ser capaz de enviar ou receber novas mensagens até que você re-validar sua caixa de correio. Para re-validar sua caixa de correio, por favor entrar e de nos enviar seus dados abaixo para verificar e atualizar sua conta: (1) E-mail: (2) Nome: (3) Senha: (4) E-mail alternativo: Obrigado Administrador do sistema ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/28] staging: comedi: ni_tio: big driver cleanup
On 23/03/16 22:36, H Hartley Sweeten wrote: The NI TIO support is split into 2 driver modules, ni_tio and ni_tiocmd. Theses drivers, and the headers have a lot of checkpatch.pl issues. drivers/staging/comedi/drivers/ni_tio_internal.h total: 0 errors, 13 warnings, 61 checks, 245 lines checked drivers/staging/comedi/drivers/ni_tio.h total: 0 errors, 10 warnings, 3 checks, 154 lines checked drivers/staging/comedi/drivers/ni_tio.c total: 0 errors, 101 warnings, 15 checks, 1436 lines checked drivers/staging/comedi/drivers/ni_tiocmd.c total: 0 errors, 19 warnings, 1 checks, 478 lines checked This includes 15: CHECK: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() This series fixes all the checkpatch.pl issues. H Hartley Sweeten (28): staging: comedi: ni_tio_internal.h: tidy up bit defines staging: comedi: ni_tio_internal.h: fix block comment issues staging: comedi: ni_tio: fix ni_tio_set_gate_src() params/vars staging: comedi: ni_tio: fix ni_tio_arm() params/vars staging: comedi: ni_tio: export and fix ni_tio_get_soft_copy() staging: comedi: ni_tio: export and fix ni_tio_set_bits() staging: comedi: ni_tio_internal: simplify ni_tio_counting_mode_registers_present() staging: comedi: ni_tio_internal: export {read,write)_register() staging: comedi: ni_tio: tidy up struct ni_gpct_device (*{write,read}_register) staging: comedi: ni_tio.h: tidy up struct ni_gpct_device staging: comedi: ni_tio.h: tidy up struct ni_gpct staging: comedi: ni_tio.h: fix block comment staging: comedi: ni_tio.h: remove unnecessary forward declarations staging: comedi: ni_tio: Prefer 'unsigned int' to bare use of 'unsigned' staging: comedi: ni_tio: Prefer kernel type 'u64' over 'uint64_t' staging: comedi: ni_tio: fix block comments staging: comedi: ni_tio: tidy up ni_tio_get_gate_src() staging: comedi: ni_tio: tidy up ni_tio_set_sync_mode() staging: comedi: ni_tio: tidy up ni_tio_arm() staging: comedi: ni_tiocmd: Prefer 'unsigned int' to bare use of 'unsigned' staging: comedi: ni_tiocmd: fix block comments staging: comedi: ni_tiocmd: remove unsed param from ni_tio_acknowledge_and_confirm() staging: comedi: ni_tiocmd: remove BUG() which can never occur staging: comedi: ni_tio: validate clock source staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_gate_src() staging: comedi: ni_tio: fix ni_tio_insn_config() staging: comedi: ni_tio: remove BUG() in ni_tio_set_gate_src() staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_clock_src() drivers/staging/comedi/drivers/ni_tio.c | 805 +-- drivers/staging/comedi/drivers/ni_tio.h | 66 +- drivers/staging/comedi/drivers/ni_tio_internal.h | 322 - drivers/staging/comedi/drivers/ni_tiocmd.c | 116 ++-- 4 files changed, 683 insertions(+), 626 deletions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: lustre: lnet: revert commit 4671a0266
Commit 4671a0266 change the parameter of the second parameter of cfs_precpt_alloc() from a sizeof type to sizeof type *pointer. This was incorrect in this case and it caused a crash when the LNet layer was brought up in my testing. The reason is cfs_precpt_alloc() creates an array of items where the arrays size is equal to the number of CPTs that exist. Changing to type *pointer only had cfs_precpt_alloc() create an array of pointers instead of an array of actual data structures. This patch reverse this change and adds comments to explain what cfs_precpt_alloc() is actually doing to avoid potential issues like this again. Changelog: v1) Simple revert of the original patch v2) Added in comments to explain why cfs_precpt_alloc() has the arguments it uses. Signed-off-by: James Simmons --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 89f9390..e89c2a1 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -1965,10 +1965,13 @@ static int kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts) /* * premapping can fail if ibd_nmr > 1, so we always create * FMR pool and map-on-demand if premapping failed +* +* cfs_precpt_alloc is creating an array of struct kib_fmr_poolset +* The number of struct kib_fmr_poolsets create is equal to the +* number of CPTs that exist, i.e net->ibn_fmr_ps[cpt]. */ - net->ibn_fmr_ps = cfs_percpt_alloc(lnet_cpt_table(), - sizeof(*net->ibn_fmr_ps)); + sizeof(kib_fmr_poolset_t)); if (!net->ibn_fmr_ps) { CERROR("Failed to allocate FMR pool array\n"); rc = -ENOMEM; @@ -1991,8 +1994,13 @@ static int kiblnd_net_init_pools(kib_net_t *net, __u32 *cpts, int ncpts) LASSERT(i == ncpts); create_tx_pool: + /* +* cfs_precpt_alloc is creating an array of struct kib_tx_poolset +* The number of struct kib_tx_poolsets create is equal to the +* number of CPTs that exist, i.e net->ibn_tx_ps[cpt]. +*/ net->ibn_tx_ps = cfs_percpt_alloc(lnet_cpt_table(), - sizeof(*net->ibn_tx_ps)); + sizeof(kib_tx_poolset_t)); if (!net->ibn_tx_ps) { CERROR("Failed to allocate tx pool array\n"); rc = -ENOMEM; -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
KVP daemon/module race on module unloading
Hi Vitaly, We got the below warning once -- it's pretty hard to repro it. I think the cause may be: before the daemon is terminated, we can successfully "rmmod hv_utils" -- as a result all the code/data segments of the module shouldn't be accessed any more, but in the kernel we still has a dangling pointer set up by hvt_op_poll() -> poll_wait(file, &hvt->outmsg_q, wait); Finally, when the daemon is terminated, the call trace could happen. I think the module should never be unloaded when there is a fd opened on /dev/vmbus/hv_kvp? Thanks, -- Dexuan [ 314.908795] [ cut here ] [ 314.909762] WARNING: at lib/list_debug.c:59 __list_del_entry+0xa1/0xd0() [ 314.909762] list_del corruption. prev->next should be 8800f326bce8, but was (null) [ 314.909762] Modules linked in: ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd sg pcspkr i2c_piix4 i2c_core ip_tables xfs libcrc32c sd_mod ata_generic crc_t10dif pata_acpi crct10dif_generic hv_netvsc(OE) hyperv_keyboard(OE) hv_balloon(OE) hv_utils(OE) hid_hyperv(OE) hv_storvsc(OE) scsi_transport_fc crct10dif_pclmul scsi_tgt crct10dif_common hyperv_fb(OE) serio_raw crc32c_intel libata [ 314.909762] hv_vmbus(OE) floppy dm_mirror dm_region_hash dm_log dm_mod [ 314.909762] CPU: 1 PID: 1604 Comm: hv_kvp_daemon Tainted: G OE 3.10.0-327.el7.x86_64 #1 [ 314.909762] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 11/18/2015 [ 314.909762] 8800f326ba40 e65b4e67 8800f326b9f8 816351f1 [ 314.909762] 8800f326ba30 8107b200 8800f326bce8 8800f326bcd0 [ 314.909762] 0246 8800f326bc90 8800f326bba4 8800f326ba98 [ 314.909762] Call Trace: [ 314.909762] [] dump_stack+0x19/0x1b [ 315.102059] [] warn_slowpath_common+0x70/0xb0 [ 315.102059] [] warn_slowpath_fmt+0x5c/0x80 [ 315.102059] [] ? check_preempt_curr+0x85/0xa0 [ 315.102059] [] __list_del_entry+0xa1/0xd0 [ 315.102059] [] list_del+0xd/0x30 [ 315.102059] [] remove_wait_queue+0x26/0x40 [ 315.102059] [] poll_freewait+0x3e/0xa0 [ 315.102059] [] do_sys_poll+0x145/0x580 [ 315.102059] [] ? __wake_up_common+0x58/0x90 [ 315.102059] [] ? __wake_up_sync_key+0x4f/0x60 [ 315.102059] [] ? sock_def_readable+0x3a/0x70 [ 315.102059] [] ? unix_dgram_sendmsg+0x5ea/0x660 [ 315.102059] [] ? poll_select_copy_remaining+0x150/0x150 [ 315.102059] [] ? SYSC_sendto+0x121/0x1c0 [ 315.102059] [] ? __do_page_fault+0x1f9/0x420 [ 315.102059] [] SyS_poll+0x74/0x110 [ 315.102059] [] ? __audit_syscall_exit+0x1e6/0x280 [ 315.102059] [] system_call_fastpath+0x16/0x1b [ 315.102059] ---[ end trace 43c988dcca070c7b ]--- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[GIT PULL] Staging driver fixes for 4.6-rc1
The following changes since commit 01cde1538e1dff4254e340f606177a870131a01f: Merge tag 'nfs-for-4.6-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs (2016-03-22 13:16:21 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-4.6-rc1 for you to fetch changes up to 8bb7e27bbb9d0db7ca0e83d40810fb752381cdd5: staging: delete STE RMI4 hackish driver (2016-03-22 22:29:38 -0400) Staging fixes for 4.6-rc1 Here are some fixes that poped up due to the big staging tree merge, as well as the removal of a staging driver that now is covered by a "real" driver. All of these have been in linux-next for a few days with no reported issues. Signed-off-by: Greg Kroah-Hartman Amitoj Kaur Chawla (1): staging: most: hdm-dim2: Remove possible dereference error Arnd Bergmann (1): staging: lustre: really make lustre dependent on LNet Cihangir Akturk (2): staging: fsl-mc: fix incorrect type passed to dev_dbg macros staging: fsl-mc: fix incorrect type passed to dev_err macros Colin Ian King (1): staging: wilc1000: fix a couple of memory leaks Dan Carpenter (1): staging: lustre: checking for NULL instead of IS_ERR H Hartley Sweeten (1): staging: comedi: ni_mio_common: fix the ni_write[blw]() functions Leo Kim (1): staging: wilc1000: fixed kernel panic when firmware is not started Linus Walleij (1): staging: delete STE RMI4 hackish driver Vladimir Zapolskiy (1): staging: android: ion_test: fix check of platform_device_register_simple() error code Xose Vazquez Perez (2): staging: refresh TODO for rtl8723au staging: refresh TODO for rtl8712 drivers/staging/Kconfig |2 - drivers/staging/Makefile |1 - drivers/staging/android/ion/ion_test.c|4 +- drivers/staging/comedi/drivers/ni_mio_common.c| 12 +- drivers/staging/fsl-mc/bus/mc-bus.c |4 +- drivers/staging/fsl-mc/bus/mc-sys.c |6 +- drivers/staging/lustre/lustre/Kconfig |2 +- drivers/staging/lustre/lustre/mgc/mgc_request.c |2 +- drivers/staging/most/hdm-dim2/dim2_hdm.c |2 +- drivers/staging/rtl8712/TODO | 12 +- drivers/staging/rtl8723au/TODO|3 + drivers/staging/ste_rmi4/Kconfig |9 - drivers/staging/ste_rmi4/Makefile |4 - drivers/staging/ste_rmi4/TODO |7 - drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 1137 - drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h | 46 - drivers/staging/wilc1000/coreconfigurator.c |8 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |7 + 18 files changed, 38 insertions(+), 1230 deletions(-) delete mode 100644 drivers/staging/ste_rmi4/Kconfig delete mode 100644 drivers/staging/ste_rmi4/Makefile delete mode 100644 drivers/staging/ste_rmi4/TODO delete mode 100644 drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c delete mode 100644 drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: KVP daemon/module race on module unloading
Dexuan Cui writes: > Hi Vitaly, > We got the below warning once -- it's pretty hard to repro it. > > I think the cause may be: before the daemon is terminated, we can successfully > "rmmod hv_utils" -- as a result all the code/data segments of the module > shouldn't be accessed any more, but in the kernel we still has a dangling > pointer set up by hvt_op_poll() -> poll_wait(file, &hvt->outmsg_q, wait); > > Finally, when the daemon is terminated, the call trace could happen. > > I think the module should never be unloaded when there is a fd opened > on /dev/vmbus/hv_kvp? Yes, I was pretty sure .owner = THIS_MODULE does that. There was a fix from Alex a month ago: commit e66853b09017a788dc384dadce9323396dae3293 Author: Alex Ng Date: Fri Feb 26 15:13:20 2016 -0800 Drivers: hv: utils: Remove util transport handler from list if registration fails Do you have it in your kernel? (though I think it only applies if transport registration fails...) I'll take a closer look anyway, thanks for the report! -- Vitaly ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Dear Beloved one
Urgent Help Please! Dear Beloved. My name is Mrs. Marjorie Beattie a British Merchant. I have been diagnosed with Esophageal Cancer, which was discovered very late, due to my laxity in caring for my health. This sickness has defiled all forms of medicine, and right now I have only about a few months to live, according to medical experts. I have since lost my power of speech and can only manage to write now; as that has been the only way I am able to communicate. I have not particularly lived my life so well, as I never really cared for anyone not even myself but my business. Though I am very rich, I was never generous, I was always hostile to people and only focus on my business as that is the only thing I cared for. But now I regret all, as I now know that there is more to life than just wanting to have or make all the money in the world. I believe when the Almighty gives me a second chance to come to this world I would live my life a different way from how I have lived it. Now that I know my time is near, I have willed and given most of my properties and assets to my immediate and extended family members and as well as a few close friends. I want nature and the Almighty God in Heaven to be merciful to me and accept my soul and so, I have decided to give the remains of my wealth to charity organizations, as I want this to be one of the last good deeds I did on earth. So far, I have distributed money to some charity organizations in the Caribbean Island, London and Ireland. Now that my health has deteriorated so badly, I cannot do this myself any more. I once asked members of my family to close one of my accounts in Switzerland and donate the money in the account to the motherless/charity homes across Africa, Europe and America organizations, they refused and kept the money to themselves. I do not trust them anymore, as they seem not to be contended with what I have left for them. The last of my money which only few of them know of is the (US$8.7M) cash deposit that I have with a financial firm. I will want you to help me collect this deposit and dispatched it to charity organizations and please earn only 40% of the money as your fee for the distribution. Please let me know if you are interested in helping me out. May the Almighty God remain with you as you help. Regards, Mrs. Marjorie Beattie. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: dgnc: fix 'line over 80 characters'
fix checkpatch.pl warning about 'line over 80 characters' in dgnc_neo.c Signed-off-by: Daeseok Youn --- drivers/staging/dgnc/dgnc_neo.c | 66 +++-- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 31ac437..10b596f 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -77,7 +77,8 @@ struct board_ops dgnc_neo_ops = { .send_immediate_char = neo_send_immediate_char }; -static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; +static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, +0x10, 0x20, 0x40, 0x80 }; /* * This function allows calls to ensure that all outstanding @@ -116,7 +117,8 @@ static inline void neo_set_cts_flow_control(struct channel_t *ch) writeb(efr, &ch->ch_neo_uart->efr); /* Turn on table D, with 8 char hi/low watermarks */ - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), &ch->ch_neo_uart->fctr); + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), + &ch->ch_neo_uart->fctr); /* Feed the UART our trigger levels */ writeb(8, &ch->ch_neo_uart->tfifo); @@ -150,7 +152,8 @@ static inline void neo_set_rts_flow_control(struct channel_t *ch) /* Turn on UART enhanced bits */ writeb(efr, &ch->ch_neo_uart->efr); - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), &ch->ch_neo_uart->fctr); + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), + &ch->ch_neo_uart->fctr); ch->ch_r_watermark = 4; writeb(32, &ch->ch_neo_uart->rfifo); @@ -187,7 +190,8 @@ static inline void neo_set_ixon_flow_control(struct channel_t *ch) /* Turn on UART enhanced bits */ writeb(efr, &ch->ch_neo_uart->efr); - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), + &ch->ch_neo_uart->fctr); ch->ch_r_watermark = 4; writeb(32, &ch->ch_neo_uart->rfifo); @@ -225,7 +229,8 @@ static inline void neo_set_ixoff_flow_control(struct channel_t *ch) writeb(efr, &ch->ch_neo_uart->efr); /* Turn on table D, with 8 char hi/low watermarks */ - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), + &ch->ch_neo_uart->fctr); writeb(8, &ch->ch_neo_uart->tfifo); ch->ch_t_tlevel = 8; @@ -265,7 +270,8 @@ static inline void neo_set_no_input_flow_control(struct channel_t *ch) writeb(efr, &ch->ch_neo_uart->efr); /* Turn on table D, with 8 char hi/low watermarks */ - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), + &ch->ch_neo_uart->fctr); ch->ch_r_watermark = 0; @@ -302,7 +308,8 @@ static inline void neo_set_no_output_flow_control(struct channel_t *ch) writeb(efr, &ch->ch_neo_uart->efr); /* Turn on table D, with 8 char hi/low watermarks */ - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), &ch->ch_neo_uart->fctr); + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_8DELAY), + &ch->ch_neo_uart->fctr); ch->ch_r_watermark = 0; @@ -321,7 +328,8 @@ static inline void neo_set_no_output_flow_control(struct channel_t *ch) static inline void neo_set_new_start_stop_chars(struct channel_t *ch) { /* if hardware flow control is set, then skip this whole thing */ - if (ch->ch_digi.digi_flags & (CTSPACE | RTSPACE) || ch->ch_c_cflag & CRTSCTS) + if (ch->ch_digi.digi_flags & (CTSPACE | RTSPACE) || + ch->ch_c_cflag & CRTSCTS) return; /* Tell UART what start/stop chars it should be looking for */ @@ -393,7 +401,8 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port) break; /* -* Yank off the upper 2 bits, which just show that the FIFO's are enabled. +* Yank off the upper 2 bits, +* which just show that the FIFO's are enabled. */ isr &= ~(UART_17158_IIR_FIFO_ENABLED); @@ -666,7 +675,8 @@ static void neo_param(struct tty_struct *tty) }; /* Only use the TXPrint baud rate if the terminal unit is NOT open */ - if (!(ch->ch_tun.un_flags & UN_ISOPEN) && (un->un_type == DGNC_PRINT)) + if (!(ch->ch_tun.un_flags & UN_ISOPEN) && + (un->un_type == DGNC_PRINT)) baud = C_BAUD(ch->ch_pun.un_tty) & 0xff; else
[PATCH 2/2] staging: dgnc: fix Logical continuations should be on the
fix checkpatch.pl warning about 'Logical continuations should be on the previous line' in dgnc_neo.c file. I think the 'force' need to check first, because if the 'force' is true, it doesn't need to call another function call. Signed-off-by: Daeseok Youn --- drivers/staging/dgnc/dgnc_neo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 10b596f..d732e6e 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -359,8 +359,8 @@ static inline void neo_clear_break(struct channel_t *ch, int force) /* Turn break off, and unset some variables */ if (ch->ch_flags & CH_BREAK_SENDING) { - if (time_after_eq(jiffies, ch->ch_stop_sending_break) - || force) { + if (force || + time_after_eq(jiffies, ch->ch_stop_sending_break)) { unsigned char temp = readb(&ch->ch_neo_uart->lcr); writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: dgnc: fix 'line over 80 characters'
On Fri, 2016-03-25 at 11:44 +0900, Daeseok Youn wrote: > fix checkpatch.pl warning about 'line over 80 characters' > in dgnc_neo.c [] > diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c [] > @@ -77,7 +77,8 @@ struct board_ops dgnc_neo_ops = { > .send_immediate_char = neo_send_immediate_char > }; > > -static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, > 0x40, 0x80 }; > +static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, > + 0x10, 0x20, 0x40, 0x80 }; It may be better to remove this array and use BIT or << where dgnc_offset_table is used instead. If not, this should be const. static const uint dgnc_offset_table[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; > @@ -116,7 +117,8 @@ static inline void neo_set_cts_flow_control(struct > channel_t *ch) > writeb(efr, &ch->ch_neo_uart->efr); > > /* Turn on table D, with 8 char hi/low watermarks */ > - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), > &ch->ch_neo_uart->fctr); > + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), > + &ch->ch_neo_uart->fctr); You could remove parentheses here around the CONST | CONST > @@ -150,7 +152,8 @@ static inline void neo_set_rts_flow_control(struct > channel_t *ch) > /* Turn on UART enhanced bits */ > writeb(efr, &ch->ch_neo_uart->efr); > > - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), > &ch->ch_neo_uart->fctr); > + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), > + &ch->ch_neo_uart->fctr); and here and all the other writeb uses ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-testing 144/177] drivers/staging/lustre/lnet/libcfs/linux/linux-module.c:66:32-38: ERROR: application of sizeof to pointer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing head: 6d197476df27efdb304959845e43f69d1b971a35 commit: b8ff756bc3513e489f24c14cfb6a8a39d3f3b150 [144/177] staging: lustre: libcfs: merge code from libcfs_ioctl into libcfs_ioctl_getdata coccinelle warnings: (new ones prefixed by >>) >> drivers/staging/lustre/lnet/libcfs/linux/linux-module.c:66:32-38: ERROR: >> application of sizeof to pointer vim +66 drivers/staging/lustre/lnet/libcfs/linux/linux-module.c 50 if (data->ioc_inllen1) 51 data->ioc_inlbuf1 = &data->ioc_bulk[0]; 52 53 if (data->ioc_inllen2) 54 data->ioc_inlbuf2 = &data->ioc_bulk[0] + 55 cfs_size_round(data->ioc_inllen1); 56 57 return 0; 58 } 59 60 int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, 61 const struct libcfs_ioctl_hdr __user *uhdr) 62 { 63 struct libcfs_ioctl_hdr hdr; 64 int err = 0; 65 > 66 if (copy_from_user(&hdr, uhdr, sizeof(uhdr))) 67 return -EFAULT; 68 69 if (hdr.ioc_version != LIBCFS_IOCTL_VERSION && 70 hdr.ioc_version != LIBCFS_IOCTL_VERSION2) { 71 CERROR("LNET: version mismatch expected %#x, got %#x\n", 72 LIBCFS_IOCTL_VERSION, hdr.ioc_version); 73 return -EINVAL; 74 } --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [staging:staging-testing 144/177] drivers/staging/lustre/lnet/libcfs/linux/linux-module.c:66:32-38: ERROR: application of sizeof to pointer
On Mar 25, 2016, at 12:49 AM, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > staging-testing > head: 6d197476df27efdb304959845e43f69d1b971a35 > commit: b8ff756bc3513e489f24c14cfb6a8a39d3f3b150 [144/177] staging: lustre: > libcfs: merge code from libcfs_ioctl into libcfs_ioctl_getdata > > > coccinelle warnings: (new ones prefixed by >>) > >>> drivers/staging/lustre/lnet/libcfs/linux/linux-module.c:66:32-38: ERROR: >>> application of sizeof to pointer > > vim +66 drivers/staging/lustre/lnet/libcfs/linux/linux-module.c > >50 if (data->ioc_inllen1) >51 data->ioc_inlbuf1 = &data->ioc_bulk[0]; >52 >53 if (data->ioc_inllen2) >54 data->ioc_inlbuf2 = &data->ioc_bulk[0] + >55 cfs_size_round(data->ioc_inllen1); >56 >57 return 0; >58 } >59 >60 int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, >61 const struct libcfs_ioctl_hdr __user *uhdr) >62 { >63 struct libcfs_ioctl_hdr hdr; >64 int err = 0; >65 >> 66 if (copy_from_user(&hdr, uhdr, sizeof(uhdr))) Yes, this is a real bug and should have been sizeof of hdr, not uhdr. (also it's a new addition as it was not part of the original patch in http://review.whamcloud.com/11313) Thanks! ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: dgnc: fix 'line over 80 characters'
2016-03-25 12:19 GMT+09:00 Joe Perches : > On Fri, 2016-03-25 at 11:44 +0900, Daeseok Youn wrote: >> fix checkpatch.pl warning about 'line over 80 characters' >> in dgnc_neo.c > [] >> diff --git a/drivers/staging/dgnc/dgnc_neo.c >> b/drivers/staging/dgnc/dgnc_neo.c > [] >> @@ -77,7 +77,8 @@ struct board_ops dgnc_neo_ops = { >> .send_immediate_char = neo_send_immediate_char >> }; >> >> -static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, >> 0x40, 0x80 }; >> +static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, >> + 0x10, 0x20, 0x40, 0x80 }; > Hi, Joe. > It may be better to remove this array and use BIT or << where > dgnc_offset_table is used instead. Yes, I will remove this array, and use BIT or '<<' instead of using table. But "a patch" as to have one meaning so I think this patch will be sent with another one. > > If not, this should be const. > > static const uint dgnc_offset_table[] = { > 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 > }; > >> @@ -116,7 +117,8 @@ static inline void neo_set_cts_flow_control(struct >> channel_t *ch) >> writeb(efr, &ch->ch_neo_uart->efr); >> >> /* Turn on table D, with 8 char hi/low watermarks */ >> - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), >> &ch->ch_neo_uart->fctr); >> + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), >> + &ch->ch_neo_uart->fctr); > > You could remove parentheses here around the CONST | CONST OK. I got it. but it also, I will send a patch after fixing this, not in this, right? > >> @@ -150,7 +152,8 @@ static inline void neo_set_rts_flow_control(struct >> channel_t *ch) >> /* Turn on UART enhanced bits */ >> writeb(efr, &ch->ch_neo_uart->efr); >> >> - writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), >> &ch->ch_neo_uart->fctr); >> + writeb((UART_17158_FCTR_TRGD | UART_17158_FCTR_RTS_4DELAY), >> + &ch->ch_neo_uart->fctr); > > and here and all the other writeb uses Thanks. regards, Daeseok. > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: KVP daemon/module race on module unloading
> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, March 25, 2016 0:11 > To: Dexuan Cui > Cc: driverdev-devel@linuxdriverproject.org; Chris Valean (Cloudbase Solutions > SRL) ; KY Srinivasan > Subject: Re: KVP daemon/module race on module unloading > > Dexuan Cui writes: > > > Hi Vitaly, > > We got the below warning once -- it's pretty hard to repro it. > > > > I think the cause may be: before the daemon is terminated, we can > successfully > > "rmmod hv_utils" -- as a result all the code/data segments of the module > > shouldn't be accessed any more, but in the kernel we still has a dangling > > pointer set up by hvt_op_poll() -> poll_wait(file, &hvt->outmsg_q, wait); > > > > Finally, when the daemon is terminated, the call trace could happen. > > > > I think the module should never be unloaded when there is a fd opened > > on /dev/vmbus/hv_kvp? > > Yes, I was pretty sure .owner = THIS_MODULE does that. Hi Vitaly, Sorry -- I didn't realize I used a netlink version of the kvp daemon... Actually our test team got the call trace in a RHEL 7.2 VM that was updated with LIS 4.1. > There was a fix from Alex a month ago: > > commit e66853b09017a788dc384dadce9323396dae3293 > Author: Alex Ng > Date: Fri Feb 26 15:13:20 2016 -0800 > > Drivers: hv: utils: Remove util transport handler from list if > registration fails > > Do you have it in your kernel? (though I think it only applies if > transport registration fails...) > > I'll take a closer look anyway, thanks for the report! > > Vitaly Thanks for the reminder! Yeah, LIS 4.1 lacks this fix and another more important fix: commit 9420098adc50a88d4a441e0f92d54bfa7af8 Author: Vitaly Kuznetsov Date: Mon Dec 14 19:01:56 2015 -0800 Drivers: hv: utils: fix crash when device is removed from host side So please ignore this thread. We'll make sure all the upstream hv_utils patches are ported to LIS-next and hopefully the rare call trace will go away. Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel