Re: [PATCH] Staging: fwserial: remove unnecessary parenthesis
On Wed, Jan 31, 2018 at 09:39:51PM -0800, Quytelda Kahja wrote: > Removed parenthesis causing a coding style warning. > > Signed-off-by: Quytelda Kahja > --- > drivers/staging/fwserial/dma_fifo.c | 2 +- > drivers/staging/fwserial/fwserial.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/fwserial/dma_fifo.c > b/drivers/staging/fwserial/dma_fifo.c > index 8b23a553fd4a..ead71f93f3c9 100644 > --- a/drivers/staging/fwserial/dma_fifo.c > +++ b/drivers/staging/fwserial/dma_fifo.c > @@ -259,7 +259,7 @@ int dma_fifo_out_complete(struct dma_fifo *fifo, struct > dma_pending *complete) > if (list_empty(&fifo->pending) && fifo->open == 0) > return -EINVAL; > > - if (FAIL(fifo, list_empty(&fifo->pending) != (fifo->open == 0), > + if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, No no no... You've changed what the code does here... I'm so surprised the compiler doesn't complain. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()
On Wed, 2018-01-31 at 15:01 -0800, Stephen Hemminger wrote: > On Wed, 31 Jan 2018 12:16:49 +0100 > Mohammed Gamal wrote: > > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > > > On Tue, 23 Jan 2018 10:34:04 +0100 > > > Mohammed Gamal wrote: > > > > > > > Split each of the functions into two for each of send/recv > > > > buffers > > > > > > > > Signed-off-by: Mohammed Gamal > > > > > > Splitting these functions is not necessary > > > > How so? We need to send each message independently, and hence the > > split > > (see cover letter). Is there another way? > > This is all that is needed. > > > Subject: [PATCH] hv_netvsc: work around for gpadl teardown on older > windows > server > > On WS2012 the host ignores messages after vmbus channel is closed. > Workaround this by doing what Windows does and send the teardown > before close on older versions of NVSP protocol. > > Reported-by: Mohammed Gamal > Fixes: 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") > Signed-off-by: Stephen Hemminger > --- > drivers/net/hyperv/netvsc.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/hyperv/netvsc.c > b/drivers/net/hyperv/netvsc.c > index 17e529af79dc..1a3df0eff42f 100644 > --- a/drivers/net/hyperv/netvsc.c > +++ b/drivers/net/hyperv/netvsc.c > @@ -574,10 +574,17 @@ void netvsc_device_remove(struct hv_device > *device) > */ > netdev_dbg(ndev, "net device safe to remove\n"); > > + /* Workaround for older versions of Windows require that > + * buffer be revoked before channel is disabled > + */ > + if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_4) > + netvsc_teardown_gpadl(device, net_device); > + > /* Now, we can close the channel safely */ > vmbus_close(device->channel); > > - netvsc_teardown_gpadl(device, net_device); > + if (net_device->nvsp_version >= NVSP_PROTOCOL_VERSION_4) > + netvsc_teardown_gpadl(device, net_device); > > /* And dissassociate NAPI context from device */ > for (i = 0; i < net_device->num_chn; i++) I've tried a similar workaround before by calling netvsc_teardown_gpadl() after netvsc_revoke_buf(), but before setting net_device_ctx->nvdev to NULL and it caused the guest to hang when trying to change MTU. Let me try that change and see if it behaves differently. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3] Staging: iio: ade7758: Expand buf_lock to cover both buffer and state protection
On Tue, 30 Jan 2018 23:30:17 +0530 Shreeya Patel wrote: > iio_dev->mlock is to be used only by the IIO core for protecting > device mode changes between INDIO_DIRECT and INDIO_BUFFER. > > This patch replaces the use of mlock with the already established > buf_lock mutex. > > Introducing 'unlocked' forms of read and write registers. The > read/write frequency functions now require buf_lock to be held. > That's not obvious so avoid this but moving the locking inside > the functions where it is then clear that they are taking the > unlocked forms of the register read/write. > > Signed-off-by: Shreeya Patel Good, this should now work nicely. I have suggested a further improvement inline which I think will improve code clarity by moving the lock to where it is obvious what it is protecting. Thanks, Jonathan > --- > > Changes in v2 > -Add static keyword to newly introduced functions and remove some > added comments which are not required. > > Changes in v3 > -Remove some useless mlocks and send it as another patch. > Also make the necessary change in the current patch associated with > the new patch with commit id 88eba33. Make commit message more > appropriate. > > > drivers/staging/iio/meter/ade7758.h | 2 +- > drivers/staging/iio/meter/ade7758_core.c | 40 > > 2 files changed, 31 insertions(+), 11 deletions(-) > > diff --git a/drivers/staging/iio/meter/ade7758.h > b/drivers/staging/iio/meter/ade7758.h > index 6ae78d8..2de81b5 100644 > --- a/drivers/staging/iio/meter/ade7758.h > +++ b/drivers/staging/iio/meter/ade7758.h > @@ -111,7 +111,7 @@ > * @trig:data ready trigger registered with iio > * @tx: transmit buffer > * @rx: receive buffer > - * @buf_lock:mutex to protect tx and rx > + * @buf_lock:mutex to protect tx, rx, read and write > frequency > **/ > struct ade7758_state { > struct spi_device *us; > diff --git a/drivers/staging/iio/meter/ade7758_core.c > b/drivers/staging/iio/meter/ade7758_core.c > index 227dbfc..38e5d67 100644 > --- a/drivers/staging/iio/meter/ade7758_core.c > +++ b/drivers/staging/iio/meter/ade7758_core.c > @@ -24,17 +24,25 @@ > #include "meter.h" > #include "ade7758.h" > > -int ade7758_spi_write_reg_8(struct device *dev, u8 reg_address, u8 val) > +static int __ade7758_spi_write_reg_8(struct device *dev, u8 reg_address, u8 > val) > { > - int ret; > struct iio_dev *indio_dev = dev_to_iio_dev(dev); > struct ade7758_state *st = iio_priv(indio_dev); > > - mutex_lock(&st->buf_lock); > st->tx[0] = ADE7758_WRITE_REG(reg_address); > st->tx[1] = val; > > - ret = spi_write(st->us, st->tx, 2); > + return spi_write(st->us, st->tx, 2); > +} > + > +int ade7758_spi_write_reg_8(struct device *dev, u8 reg_address, u8 val) > +{ > + int ret; > + struct iio_dev *indio_dev = dev_to_iio_dev(dev); > + struct ade7758_state *st = iio_priv(indio_dev); > + > + mutex_lock(&st->buf_lock); > + ret = __ade7758_spi_write_reg_8(dev, reg_address, val); > mutex_unlock(&st->buf_lock); > > return ret; > @@ -91,7 +99,7 @@ static int ade7758_spi_write_reg_24(struct device *dev, u8 > reg_address, > return ret; > } > > -int ade7758_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val) > +static int __ade7758_spi_read_reg_8(struct device *dev, u8 reg_address, u8 > *val) > { > struct iio_dev *indio_dev = dev_to_iio_dev(dev); > struct ade7758_state *st = iio_priv(indio_dev); > @@ -111,7 +119,6 @@ int ade7758_spi_read_reg_8(struct device *dev, u8 > reg_address, u8 *val) > }, > }; > > - mutex_lock(&st->buf_lock); > st->tx[0] = ADE7758_READ_REG(reg_address); > st->tx[1] = 0; > > @@ -124,7 +131,19 @@ int ade7758_spi_read_reg_8(struct device *dev, u8 > reg_address, u8 *val) > *val = st->rx[0]; > > error_ret: > + return ret; > +} > + > +int ade7758_spi_read_reg_8(struct device *dev, u8 reg_address, u8 *val) > +{ > + struct iio_dev *indio_dev = dev_to_iio_dev(dev); > + struct ade7758_state *st = iio_priv(indio_dev); > + int ret; > + > + mutex_lock(&st->buf_lock); > + ret = __ade7758_spi_read_reg_8(dev, reg_address, val); > mutex_unlock(&st->buf_lock); > + > return ret; > } > > @@ -503,14 +522,14 @@ static int ade7758_write_samp_freq(struct device *dev, > int val) > goto out; > } > > - ret = ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, ®); > + ret = __ade7758_spi_read_reg_8(dev, ADE7758_WAVMODE, ®); > if (ret) > goto out; > > reg &= ~(5 << 3); > reg |= t << 5; > > - ret = ade7758_spi_write_reg_8(dev, ADE7758_WAVMODE, reg); > + ret = __ade7758_spi_write_reg_8(dev, ADE7758_WAVMODE, reg); > > out: > return ret; > @@ -540,14 +559,15 @@ static int ade7758_write_raw(struct iio_dev *indio_dev,
[GIT PULL] Staging/IIO update for 4.16-rc1
The following changes since commit 30a7acd573899fd8b8ac39236eff6468b195ac7d: Linux 4.15-rc6 (2017-12-31 14:47:43 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-4.16-rc1 for you to fetch changes up to 3384e01179eff2b2fe91ba7bcad98ee2be5f87f7: staging: rtlwifi: remove redundant initialization of 'cfg_cmd' (2018-01-26 15:08:43 +0100) Staging/IIO patches for 4.16-rc1 Here is the big Staging and IIO driver patches for 4.16-rc1. There is the normal amount of new IIO drivers added, like all releases. The networking IPX and the ncpfs filesystem are moved into the staging tree, as they are on their way out of the kernel due to lack of use anymore. The visorbus subsystem finall has started moving out of the staging tree to the "real" part of the kernel, and the most and fsl-mc codebases are almost ready to move out, that will probably happen for 4.17-rc1 if all goes well. Other than that, there is a bunch of license header cleanups in the tree, along with the normal amount of coding style churn that we all know and love for this codebase. I also got frustrated at the Meltdown/Spectre mess and took it out on the dgnc tty driver, deleting huge chunks of it that were never even being used. Full details of everything is in the shortlog. All of these patches have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman Abdul Rauf (1): staging: rtl8192u: ieee80211: ieee80211_rx.c fix checkpatch space prohibited before that '++' Aishwarya Pant (1): staging: iio: trigger: blackfin timer: replace device_attr with device_attr_rw Ajay Singh (22): staging: wilc1000: removed typedef from enum BSSTYPE_T staging: wilc1000: remove unnecessary typedef enum G_OPERATING_MODE_T staging: wilc1000: removed enums typedef for BEACON_IE & TX_RATE_T staging: wilc1000: removed enum typedef CHIP_PS_STATE_T staging: wilc1000: removed enum typedef BUS_ACQUIRE_T staging: wilc1000: removed enum typedef BUS_RELEASE_T staging: wilc1000: rename elements of wilc_priv struct to avoid using camelCase staging: wilc1000: rename wilc_wfi_p2pListenParams struct and its member variable staging: wilc1000: rename au8Sta_AssociatedBss element sta_info structure staging: wilc1000: remove unused element in wilc_wfi_p2p_listen_params struct staging: wilc1000: rename s32Error variable to avoid camelCase notation staging: wilc1000: rename CfgConnectResult() and its local variable names staging: wilc1000: rename camelCase used in functions start with WILC_WFI_Cfg staging: wilc1000: rename pstrWFIDrv to wfi_drv to avoid camelCase naming staging: wilc1000: rename NullBssid to null_bssid to avoid camelCase variable name staging: wilc1000: rename variables using camelCase in add_key() staging: wilc1000: rename strStaParams variable to avoid camelCase staging: wilc1000: rename pstrCfgParamVal varaible in set_wiphy_params() staging: wilc1000: rename strStatistics & tenuAuth_type to avoid camelCase staging: wilc1000: remove unnecessary use of parentheses staging: wilc1000: removed unnecessary defined enums typedef staging: wilc1000: fix alignments to match open parenthesis Akash Kumar (1): Staging: rtl8192u: Fix no spaces around '+' Alexander Kapshuk (1): vboxvideo: Fix incorrect type in assignment sparse warning Aliaksei Karaliou (5): drivers: lustre: osc: check result of register_shrinker() drivers: lustre: ptlrpc: check result of register_shrinker() drivers: lustre: ldlm: check result of register_shrinker() drivers: lustre: obdclass: check result of register_shrinker() drivers: lustre: obdclass: simplify unregister_shrinker() usage Andreas Klinger (2): iio: hx711: add triggered buffer support iio: hx711: fix bug in reset functionality Andrew F. Davis (1): iio: dac: mcp4725: Remove unneeded conversions to bool Andrey Shvetsov (2): staging: most: update driver usage file staging: most: core: fix list traversing Andrii (1): staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap() Andy Pusch (1): Staging: wlan-ng: hfa384x_usb: fixed two line limit coding style issues Andy Shevchenko (3): iio: proximity: sx9500: Add another ACPI ID iio: magnetometer: ak8975: Add another ACPI ID iio: imu: inv_mpu6050: Remove duplicate NULL check Arnd Bergmann (6): staging: rtlwifi: rtlwifi: use ktime_get_real_seconds() for suspend time staging: bcm2835-camera use ktime_t for timestamps staging: imx: use ktime_t for timestamps iio: common: ssp_sensors: use ktime_get_real_ns() timestamps staging: ccree: mark debu
[PATCH 1/2] staging: android: ion: Avoid NULL point in error path
If we failed to create debugfs for ion at ion_device_create, the debug_root of ion_device will be NULL, and then when try to create debug file for shrinker of heap it will be create on the top of debugfs. If we also failed to create this the debug file, it call dentry_path to found the path of debug_root, then a NULL point will occur. Fix this by avoiding call dentry_path, but show the debug name only when failed to create debug file for shrinker. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index f480885..3e41644 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -570,13 +570,9 @@ void ion_device_add_heap(struct ion_heap *heap) debug_file = debugfs_create_file( debug_name, 0644, dev->debug_root, heap, &debug_shrink_fops); - if (!debug_file) { - char buf[256], *path; - - path = dentry_path(dev->debug_root, buf, 256); - pr_err("Failed to create heap shrinker debugfs at %s/%s\n", - path, debug_name); - } + if (!debug_file) + pr_err("Failed to create ion heap shrinker debugfs at %s\n", + debug_name); } dev->heap_cnt++; -- 1.7.12.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: android: ion: Remove lable debugfs_done
When failed to create debug_root, we will go on initail other part of ion, so we can just info this message to user and do not need a lable to jump. Signed-off-by: Yisheng Xie --- drivers/staging/android/ion/ion.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 3e41644..70a70f5 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -601,12 +601,9 @@ static int ion_device_create(void) } idev->debug_root = debugfs_create_dir("ion", NULL); - if (!idev->debug_root) { + if (!idev->debug_root) pr_err("ion: failed to create debugfs root directory.\n"); - goto debugfs_done; - } -debugfs_done: idev->buffers = RB_ROOT; mutex_init(&idev->buffer_lock); init_rwsem(&idev->lock); -- 1.7.12.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 04/11] Staging: rtl8192u: kconfig: Remove blank help text
2018-01-31 18:34 GMT+09:00 Ulf Magnusson : > Blank help texts are probably either a typo, a Kconfig misunderstanding, > or some kind of half-committing to adding a help text (in which case a > TODO comment would be clearer, if the help text really can't be added > right away). > > Best to remove them, IMO. > > Signed-off-by: Ulf Magnusson > --- FYI. I picked up this patch to kbuild because I need this to suppress warning messages introduced by 11/11. I am planning to send a PR for this series next week. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 05/11] Staging: rtl8192e: kconfig: Remove blank help text
2018-01-31 18:34 GMT+09:00 Ulf Magnusson : > Blank help texts are probably either a typo, a Kconfig misunderstanding, > or some kind of half-committing to adding a help text (in which case a > TODO comment would be clearer, if the help text really can't be added > right away). > > Best to remove them, IMO. > > Signed-off-by: Ulf Magnusson > --- FYI. I picked up this patch to kbuild because I need this to suppress warning messages introduced by 11/11. I am planning to send a PR for this series next week. -- Best Regards Masahiro Yamada ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: rtl8712: make unsigned length for rtl8717_get{_wpa_, _wpa2_, _}ie
Fixed r8712_get_ie, r8712_get_wpa_ie, r8712_get_wpa2_ie to have a length as unsigned int pointer instead of signed. Sparse warnings: drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27:expected signed int *len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27:got unsigned int * drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35:expected signed int *len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35:got unsigned int * drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67:expected signed int *len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67:got unsigned int * drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33:expected int *rsn_ie_len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33:got unsigned int * drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33:expected int *rsn_ie_len drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33:got unsigned int * drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: warning: incorrect type in argument 3 (different signedness) drivers/staging/rtl8712/rtl871x_mlme.c:1701:59:expected signed int *len drivers/staging/rtl8712/rtl871x_mlme.c:1701:59:got unsigned int * Signed-off-by: Stefano Manni --- drivers/staging/rtl8712/ieee80211.c| 8 drivers/staging/rtl8712/ieee80211.h| 6 +++--- drivers/staging/rtl8712/rtl871x_mlme.c | 3 ++- drivers/staging/rtl8712/rtl871x_xmit.c | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c index 33e82a9dd462..35e29112006b 100644 --- a/drivers/staging/rtl8712/ieee80211.c +++ b/drivers/staging/rtl8712/ieee80211.c @@ -107,7 +107,7 @@ u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen) * index: the information element id index, limit is the limit for search * --- */ -u8 *r8712_get_ie(u8 *pbuf, sint index, sint *len, sint limit) +u8 *r8712_get_ie(u8 *pbuf, sint index, uint *len, sint limit) { sint tmp, i; u8 *p; @@ -210,9 +210,9 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv) return sz; } -unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) +unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit) { - int len; + u32 len; u16 val16; unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01}; u8 *pbuf = pie; @@ -243,7 +243,7 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) return NULL; } -unsigned char *r8712_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit) +unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len, int limit) { return r8712_get_ie(pie, _WPA2_IE_ID_, rsn_ie_len, limit); } diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h index 68fd65e80906..d605dfd02200 100644 --- a/drivers/staging/rtl8712/ieee80211.h +++ b/drivers/staging/rtl8712/ieee80211.h @@ -738,9 +738,9 @@ static inline int ieee80211_get_hdrlen(u16 fc) struct registry_priv; u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen); -u8 *r8712_get_ie(u8 *pbuf, sint index, sint *len, sint limit); -unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *rsn_ie_len, int limit); -unsigned char *r8712_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, +u8 *r8712_get_ie(u8 *pbuf, sint index, uint *len, sint limit); +unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *rsn_ie_len, int limit); +unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len, int limit); int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher); diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index 111c809afc51..215fa8999a80 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -1728,7 +1728,8 @@ unsigned int r8712_restructure_ht_ie(struct _adapter *padapter, u8 *in_ie, static void update_ht_cap(struct _adapter *padapter, u8 *pie, uint ie_len) { u8 *p, max_ampdu_sz; - int i, len; + int i; + uint len; struct sta_info *bmc_sta, *psta; struct iee
[PATCH 2/2] staging: rtl8712: fix signedness of length to rtl8717_set_ie
rtl8717_set_it() takes an unsigned int pointer as length, fixed signedness in code using it. Sparse warnings: drivers/staging/rtl8712/ieee80211.c:191:53: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8712/ieee80211.c:191:53:expected unsigned int [usertype] *frlen drivers/staging/rtl8712/ieee80211.c:191:53:got int * drivers/staging/rtl8712/ieee80211.c:197:57: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8712/ieee80211.c:197:57:expected unsigned int [usertype] *frlen drivers/staging/rtl8712/ieee80211.c:197:57:got int * drivers/staging/rtl8712/ieee80211.c:199:63: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8712/ieee80211.c:199:63:expected unsigned int [usertype] *frlen drivers/staging/rtl8712/ieee80211.c:199:63:got int * drivers/staging/rtl8712/ieee80211.c:202:67: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8712/ieee80211.c:202:67:expected unsigned int [usertype] *frlen drivers/staging/rtl8712/ieee80211.c:202:67:got int * drivers/staging/rtl8712/ieee80211.c:206:73: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8712/ieee80211.c:206:73:expected unsigned int [usertype] *frlen drivers/staging/rtl8712/ieee80211.c:206:73:got int * drivers/staging/rtl8712/ieee80211.c:209:75: warning: incorrect type in argument 5 (different signedness) drivers/staging/rtl8712/ieee80211.c:209:75:expected unsigned int [usertype] *frlen drivers/staging/rtl8712/ieee80211.c:209:75:got int * Signed-off-by: Stefano Manni --- drivers/staging/rtl8712/ieee80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c index 35e29112006b..5095af13a6dc 100644 --- a/drivers/staging/rtl8712/ieee80211.c +++ b/drivers/staging/rtl8712/ieee80211.c @@ -166,7 +166,8 @@ static uint r8712_get_rateset_len(u8 *rateset) int r8712_generate_ie(struct registry_priv *pregistrypriv) { - int sz = 0, rate_len; + int rate_len; + uint sz = 0; struct wlan_bssid_ex *pdev_network = &pregistrypriv->dev_network; u8 *ie = pdev_network->IEs; -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vc04_services: remove unused files
All thoses files are not used by anybody. Lets just remove them. Signed-off-by: Corentin Labbe --- .../interface/vchiq_arm/vchiq_build_info.h | 37 -- .../interface/vchiq_arm/vchiq_memdrv.h | 59 -- .../interface/vchiq_arm/vchiq_version.c| 59 -- 3 files changed, 155 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_build_info.h delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_memdrv.h delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_version.c diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_build_info.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_build_info.h deleted file mode 100644 index df645813bdae.. --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_build_info.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2010-2012 Broadcom. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions, and the following disclaimer, - *without modification. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. The names of the above-listed copyright holders may not be used - *to endorse or promote products derived from this software without - *specific prior written permission. - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2, as published by the Free - * Software Foundation. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const char *vchiq_get_build_hostname(void); -const char *vchiq_get_build_version(void); -const char *vchiq_get_build_time(void); -const char *vchiq_get_build_date(void); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_memdrv.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_memdrv.h deleted file mode 100644 index c233b866725b.. --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_memdrv.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2010-2012 Broadcom. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions, and the following disclaimer, - *without modification. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. The names of the above-listed copyright holders may not be used - *to endorse or promote products derived from this software without - *specific prior written permission. - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2, as published by the Free - * Software Foundation. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMA
Re: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()
On Thu, 2018-02-01 at 09:37 +0100, Mohammed Gamal wrote: > On Wed, 2018-01-31 at 15:01 -0800, Stephen Hemminger wrote: > > On Wed, 31 Jan 2018 12:16:49 +0100 > > Mohammed Gamal wrote: > > > > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > > > > On Tue, 23 Jan 2018 10:34:04 +0100 > > > > Mohammed Gamal wrote: > > > > > > > > > Split each of the functions into two for each of send/recv > > > > > buffers > > > > > > > > > > Signed-off-by: Mohammed Gamal > > > > > > > > Splitting these functions is not necessary > > > > > > How so? We need to send each message independently, and hence the > > > split > > > (see cover letter). Is there another way? > > > > This is all that is needed. > > > > > > Subject: [PATCH] hv_netvsc: work around for gpadl teardown on older > > windows > > server > > > > On WS2012 the host ignores messages after vmbus channel is closed. > > Workaround this by doing what Windows does and send the teardown > > before close on older versions of NVSP protocol. > > > > Reported-by: Mohammed Gamal > > Fixes: 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") > > Signed-off-by: Stephen Hemminger > > --- > > drivers/net/hyperv/netvsc.c | 9 - > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/hyperv/netvsc.c > > b/drivers/net/hyperv/netvsc.c > > index 17e529af79dc..1a3df0eff42f 100644 > > --- a/drivers/net/hyperv/netvsc.c > > +++ b/drivers/net/hyperv/netvsc.c > > @@ -574,10 +574,17 @@ void netvsc_device_remove(struct hv_device > > *device) > > */ > > netdev_dbg(ndev, "net device safe to remove\n"); > > > > + /* Workaround for older versions of Windows require that > > + * buffer be revoked before channel is disabled > > + */ > > + if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_4) > > + netvsc_teardown_gpadl(device, net_device); > > + > > /* Now, we can close the channel safely */ > > vmbus_close(device->channel); > > > > - netvsc_teardown_gpadl(device, net_device); > > + if (net_device->nvsp_version >= NVSP_PROTOCOL_VERSION_4) > > + netvsc_teardown_gpadl(device, net_device); > > > > /* And dissassociate NAPI context from device */ > > for (i = 0; i < net_device->num_chn; i++) > > I've tried a similar workaround before by calling > netvsc_teardown_gpadl() after netvsc_revoke_buf(), but before setting > net_device_ctx->nvdev to NULL and it caused the guest to hang when > trying to change MTU. > > Let me try that change and see if it behaves differently. I tested the patch, but I've actually seen some unexpected behavior. First, net_device->nvsp_version is actually NVSP_PROTOCOL_VERSION_5 on both my Win2012 and Win2016 hosts that I tested on, so the condition is never executed. Second, when doing the check instead as if (vmbus_proto_version < VERSION_WIN10), I get the same behavior I described above where the guest hangs as the kernel waits indefinitely in vmbus_teardown_gpadl() for a completion to be signaled. This is actually what lead me to propose splitting netvsc_revoke_buf() and netvsc_teardown_gpadl() in my initial patchset so that we keep the same order of messages and avoid that indefinite wait. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()
There are multiple issues with some of the parameter change paths. Still working on getting something stable. Both upstream, and net-next do have crash issues under concurrent changes. I don't want Linux doing different workaround than Windows if at all possible; because it means that it would require much wider testing against many different versions. Ps: WS2008r2 still needs to be supported. -Original Message- From: Mohammed Gamal [mailto:mga...@redhat.com] Sent: Thursday, February 1, 2018 2:34 PM To: Stephen Hemminger Cc: net...@vger.kernel.org; ot...@redhat.com; Stephen Hemminger ; Haiyang Zhang ; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; vkuzn...@redhat.com Subject: Re: [RFC PATCH 1/2] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl() On Thu, 2018-02-01 at 09:37 +0100, Mohammed Gamal wrote: > On Wed, 2018-01-31 at 15:01 -0800, Stephen Hemminger wrote: > > On Wed, 31 Jan 2018 12:16:49 +0100 > > Mohammed Gamal wrote: > > > > > On Tue, 2018-01-30 at 11:29 -0800, Stephen Hemminger wrote: > > > > On Tue, 23 Jan 2018 10:34:04 +0100 > > > > Mohammed Gamal wrote: > > > > > > > > > Split each of the functions into two for each of send/recv > > > > > buffers > > > > > > > > > > Signed-off-by: Mohammed Gamal > > > > > > > > Splitting these functions is not necessary > > > > > > How so? We need to send each message independently, and hence the > > > split > > > (see cover letter). Is there another way? > > > > This is all that is needed. > > > > > > Subject: [PATCH] hv_netvsc: work around for gpadl teardown on older > > windows > > server > > > > On WS2012 the host ignores messages after vmbus channel is closed. > > Workaround this by doing what Windows does and send the teardown > > before close on older versions of NVSP protocol. > > > > Reported-by: Mohammed Gamal > > Fixes: 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") > > Signed-off-by: Stephen Hemminger > > --- > > drivers/net/hyperv/netvsc.c | 9 - > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/hyperv/netvsc.c > > b/drivers/net/hyperv/netvsc.c > > index 17e529af79dc..1a3df0eff42f 100644 > > --- a/drivers/net/hyperv/netvsc.c > > +++ b/drivers/net/hyperv/netvsc.c > > @@ -574,10 +574,17 @@ void netvsc_device_remove(struct hv_device > > *device) > > */ > > netdev_dbg(ndev, "net device safe to remove\n"); > > > > + /* Workaround for older versions of Windows require that > > + * buffer be revoked before channel is disabled > > + */ > > + if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_4) > > + netvsc_teardown_gpadl(device, net_device); > > + > > /* Now, we can close the channel safely */ > > vmbus_close(device->channel); > > > > - netvsc_teardown_gpadl(device, net_device); > > + if (net_device->nvsp_version >= NVSP_PROTOCOL_VERSION_4) > > + netvsc_teardown_gpadl(device, net_device); > > > > /* And dissassociate NAPI context from device */ > > for (i = 0; i < net_device->num_chn; i++) > > I've tried a similar workaround before by calling > netvsc_teardown_gpadl() after netvsc_revoke_buf(), but before setting > net_device_ctx->nvdev to NULL and it caused the guest to hang when > trying to change MTU. > > Let me try that change and see if it behaves differently. I tested the patch, but I've actually seen some unexpected behavior. First, net_device->nvsp_version is actually NVSP_PROTOCOL_VERSION_5 on both my Win2012 and Win2016 hosts that I tested on, so the condition is never executed. Second, when doing the check instead as if (vmbus_proto_version < VERSION_WIN10), I get the same behavior I described above where the guest hangs as the kernel waits indefinitely in vmbus_teardown_gpadl() for a completion to be signaled. This is actually what lead me to propose splitting netvsc_revoke_buf() and netvsc_teardown_gpadl() in my initial patchset so that we keep the same order of messages and avoid that indefinite wait. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: fwserial: remove unnecessary parenthesis
Hi Quytelda, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.15 next-20180201] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Quytelda-Kahja/Staging-fwserial-remove-unnecessary-parenthesis/20180202-093148 config: i386-randconfig-x019-201804 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:10:0, from drivers/staging//fwserial/dma_fifo.c:8: drivers/staging//fwserial/dma_fifo.c: In function 'dma_fifo_out_complete': >> drivers/staging//fwserial/dma_fifo.c:253:44: warning: suggest parentheses >> around comparison in operand of '==' [-Wparentheses] if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ~~~^~ include/linux/compiler.h:58:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/staging//fwserial/dma_fifo.c:253:2: note: in expansion of macro 'if' if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ^~ >> drivers/staging//fwserial/dma_fifo.c:253:6: note: in expansion of macro >> 'FAIL' if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ^~~~ >> drivers/staging//fwserial/dma_fifo.c:253:44: warning: suggest parentheses >> around comparison in operand of '==' [-Wparentheses] if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ~~~^~ include/linux/compiler.h:58:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/staging//fwserial/dma_fifo.c:253:2: note: in expansion of macro 'if' if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ^~ >> drivers/staging//fwserial/dma_fifo.c:253:6: note: in expansion of macro >> 'FAIL' if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ^~~~ >> drivers/staging//fwserial/dma_fifo.c:253:44: warning: suggest parentheses >> around comparison in operand of '==' [-Wparentheses] if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ~~~^~ include/linux/compiler.h:69:16: note: in definition of macro '__trace_if' __r = !!(cond); \ ^~~~ >> drivers/staging//fwserial/dma_fifo.c:253:2: note: in expansion of macro 'if' if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ^~ >> drivers/staging//fwserial/dma_fifo.c:253:6: note: in expansion of macro >> 'FAIL' if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, ^~~~ vim +253 drivers/staging//fwserial/dma_fifo.c 236 237 /** 238 * dma_fifo_out_complete - marks pended dma as completed 239 * @fifo: address of in-place "struct dma_fifo" which was read from 240 * @complete: address of structure for previously pended dma to mark completed 241 */ 242 int dma_fifo_out_complete(struct dma_fifo *fifo, struct dma_pending *complete) 243 { 244 struct dma_pending *pending, *next, *tmp; 245 246 if (!fifo->data) 247 return -ENOENT; 248 if (fifo->corrupt) 249 return -ENXIO; 250 if (list_empty(&fifo->pending) && fifo->open == 0) 251 return -EINVAL; 252 > 253 if (FAIL(fifo, list_empty(&fifo->pending) != fifo->open == 0, --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Darlehensangebot
Bist du verschuldet? Willst du deine Schulden bezahlen? Haben Sie Pläne, Ihr Geschäft zu erweitern? Möchten Sie sich finanziell ausgestattet machen? Wenn ja, dann kontaktieren Sie uns und Sie erhalten das beste finanzielle Unterstützung. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel