Re: [PATCH] staging: lustre: Fix 'unexpected unlock' warning generated by sparse

2016-02-07 Thread Niranjan Dighe
On Thu, Feb 4, 2016 at 3:53 AM, Greg Kroah-Hartman
 wrote:
> On Sun, Jan 03, 2016 at 08:27:04AM +0530, Niranjan Dighe wrote:
>> Added annotation '__must_hold' to function ksocknal_send_keepalive_locked
>> which unlocks the lock ksocknal_data.ksnd_global_lock. As this lock is
>> not acquired in the current function, sparse warns about context imbalance
>>
>> Signed-off-by: Niranjan Dighe 
>> ---
>>  drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 1 +
>>  1 file changed, 1 insertion(+)
>
> Doesn't apply to my tree :(

Sorry about this Greg, I will recreate it on the latest staging-next and resend.

Thanks,
Niranjan Dighe
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RESEND 3/3] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs

2016-02-07 Thread kbuild test robot
Hi Jake,

[auto build test ERROR on pci/next]
[also build test ERROR on v4.5-rc2 next-20160205]
[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/jakeo-microsoft-com/PCI-hv-New-paravirtual-PCI-front-end-driver/20160203-014543
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-randconfig-x013-02041016 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/pci/host/hv_pcifront.c: In function 'hv_compose_msi_msg':
>> drivers/pci/host/hv_pcifront.c:830:4: error: 'apic' undeclared (first use in 
>> this function)
  (apic->irq_delivery_mode == dest_LowestPrio) ? 1 : 0;
   ^
   drivers/pci/host/hv_pcifront.c:830:4: note: each undeclared identifier is 
reported only once for each function it appears in

vim +/apic +830 drivers/pci/host/hv_pcifront.c

   824  int_pkt = (struct pci_create_interrupt *)
   825  int_pkt->message_type.message_type = 
PCI_CREATE_INTERRUPT_MESSAGE;
   826  int_pkt->wslot.slot = hpdev->desc.win_slot.slot;
   827  int_pkt->int_desc.vector = cfg->vector;
   828  int_pkt->int_desc.vector_count = 1;
   829  int_pkt->int_desc.delivery_mode =
 > 830  (apic->irq_delivery_mode == dest_LowestPrio) ? 1 : 0;
   831  
   832  /*
   833   * This bit doesn't have to work on machines with more than 64

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: speakup: Fix allyesconfig build on mn10300

2016-02-07 Thread Geert Uytterhoeven
Hi Samuel,

On Mon, Feb 1, 2016 at 9:06 AM, Samuel Thibault
 wrote:
> mn10300 uses an mmio-driven uart. This is not supported by speakup, so
> prevent from enabling it.

Just wondering, what are the symptoms of the failure?
Is it a compile-time or run-time failure?

Is this about drivers/staging/speakup/serialio.c?
I guess there are many other platforms where the UART is MMIO-driven...

> Signed-off-by: Samuel Thibault 
>
> --- a/drivers/staging/speakup/Kconfig
> +++ b/drivers/staging/speakup/Kconfig
> @@ -1,7 +1,7 @@
>  menu "Speakup console speech"
>
>  config SPEAKUP
> -   depends on VT
> +   depends on VT && !MN10300
> tristate "Speakup core"
> ---help---
> This is the Speakup screen reader.  Think of it as a

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/2] Lustre debugfs fixes

2016-02-07 Thread Greg Kroah-Hartman
On Sat, Feb 06, 2016 at 02:01:49AM -0500, gr...@linuxhacker.ru wrote:
> From: Oleg Drokin 
> 
> These two patches tie some loose ends from the Lustre debugfs conversion,
> but while investigating them I also accumulated some questions
> that would be good to get answers for.
> 
> 1. Unlike procfs, debugfs does not really guard your back and if root
> comes in and tries to write to a readonly file (or read a write-only one),
> it's allowed (as are permission changes too) as long as the appropriate write
> (or read) method is provided.
> So apparently there's whole class of bugs related to this, sample
> exhibits are in e.g. acpi_ec_add_debugfs creating a totally noop module
> parameter to control writes that does not really prevent any writes
> (patch submitted separately).
> But also things like wil_debugfs_create_iomem_x32 where when called from
> e.g. wil6210_debugfs_init_offset, some read-only attributed get a generic
> write method that would write straight to hardware registers (who knows
> what would happen when you write there, possibly they are readonly, but
> you are not getting an error).
> At first it looked like an easy way to catch this would be to just check
> for RO/WO mode with write/read handler set, but this is thwarted by
> the simple attribute defines that always assign read and write methods,
> but do the check internally for the get/set method instead.
> But also some fault injection code that sets readonly access on some files,
> but provides a fully functional write method that works as desired.
> 
> Would it make sense to redo the simple-attribute framework to easy such
> cases detection (and also update writeable attributes to have permissions
> reflecting this) and have a correspinding kernel debug compile option
> to check for these?

If a developer provides the write hooks for a debugfs file, and
userspace changes the permissions to write to it, why would you prevent
this?  Perhaps this is what is intended.

Remember, debugfs is only for debugging stuff, never rely on it for
actual device/system use.

> 2. I noticed we exported some of the presumably GPL-only debugfs
> functionality with plain EXPORT_SYMBOL, so the second patch rectifies this.

Thanks.

> Now, I also see that drm_debugfs_create_files allows anybody to
> insert any debugfs file anywhere and it is a non-gpl EXPORT_SYMBOL as well,
> should it be converted too, or is it sysfs access only that is restricted?

No, these should be as well, a patch for that would be great, thanks.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/3] staging: most: return proper error

2016-02-07 Thread Greg Kroah-Hartman
On Sun, Nov 22, 2015 at 10:30:55PM +0530, Sudip Mukherjee wrote:
> We were returning ENOMEM on all types of errors. Lets return the actual
> error code. At the same time remove the label which became unused as a
> result of this patch.
> 
> Signed-off-by: Sudip Mukherjee 
> ---
>  drivers/staging/most/mostcore/core.c | 22 +++---
>  1 file changed, 15 insertions(+), 7 deletions(-)

This and patch 3/3 don't apply anymore :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/5] iio: hmc5843: Add ABI documentation file for hmc5843

2016-02-07 Thread Cristina Moraru
Add ABI file documenting hmc5843 non-standard attributes
meas_conf and meas_conf_available for bias current
configuration.

Signed-off-by: Cristina Moraru 
---
 .../ABI/testing/sysfs-bus-iio-magnetometer-hmc5843| 15 +++
 1 file changed, 15 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-magnetometer-hmc5843

diff --git a/Documentation/ABI/testing/sysfs-bus-iio-magnetometer-hmc5843 
b/Documentation/ABI/testing/sysfs-bus-iio-magnetometer-hmc5843
new file mode 100644
index 000..7c3fc4c
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-magnetometer-hmc5843
@@ -0,0 +1,15 @@
+What:   /sys/bus/iio/devices/iio:deviceX/meas_conf
+What:   /sys/bus/iio/devices/iio:deviceX/meas_conf_available
+KernelVersion:  4.3.0
+Contact:linux-...@vger.kernel.org
+Description:
+Current configuration and available configurations
+   for the bias current.
+   0 - Normal measurement configurations (default)
+   1 - Positive bias configuration
+   2 - Negative bias configuration
+   3 - Only available on HMC5983. Disables magnetic
+   sensor and enables temperature sensor.
+   Note: The effect of this configuration may vary
+   according to the device. For exact documentation
+   check the device's datasheet.
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/5] iio: hmc5843: Fix comment style warnings

2016-02-07 Thread Cristina Moraru
Fix comment style warnings in order to comply with Coding Style
standard provided by Documentation/CodingStyle.

This patch solves following issue found with checkpatch:
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Cristina Moraru 
---
 drivers/staging/iio/magnetometer/hmc5843.h | 4 ++--
 drivers/staging/iio/magnetometer/hmc5843_i2c.c | 2 +-
 drivers/staging/iio/magnetometer/hmc5843_spi.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.h 
b/drivers/staging/iio/magnetometer/hmc5843.h
index 06f35d3..cb284cf 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.h
+++ b/drivers/staging/iio/magnetometer/hmc5843.h
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * */
+ */
 
 #ifndef HMC5843_CORE_H
 #define HMC5843_CORE_H
@@ -38,7 +38,7 @@ enum hmc5843_ids {
  * @regmap:hardware access register maps
  * @variant:   describe chip variants
  * @buffer:3x 16-bit channels + padding + 64-bit timestamp
- **/
+ */
 struct hmc5843_data {
struct device *dev;
struct mutex lock;
diff --git a/drivers/staging/iio/magnetometer/hmc5843_i2c.c 
b/drivers/staging/iio/magnetometer/hmc5843_i2c.c
index 3e06ceb..6f7b8fb 100644
--- a/drivers/staging/iio/magnetometer/hmc5843_i2c.c
+++ b/drivers/staging/iio/magnetometer/hmc5843_i2c.c
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * */
+ */
 
 #include 
 #include 
diff --git a/drivers/staging/iio/magnetometer/hmc5843_spi.c 
b/drivers/staging/iio/magnetometer/hmc5843_spi.c
index 1549192..85adcdd 100644
--- a/drivers/staging/iio/magnetometer/hmc5843_spi.c
+++ b/drivers/staging/iio/magnetometer/hmc5843_spi.c
@@ -7,7 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * */
+ */
 
 #include 
 #include 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/5] iio: hmc5843: Move hmc5843 out of staging

2016-02-07 Thread Cristina Moraru
This patch moves hmc5843 driver from staging/iio/magnetometer
to iio/magnetometer, updates the corresponding Makefiles and
moves the hmc5843* entries to the 'Industrial I/O support ->
Magnetometer sensors' menu.

Signed-off-by: Cristina Moraru 
---
 drivers/iio/magnetometer/Kconfig|  33 ++
 drivers/iio/magnetometer/Makefile   |   4 +
 drivers/iio/magnetometer/hmc5843.h  |  66 +++
 drivers/iio/magnetometer/hmc5843_core.c | 693 
 drivers/iio/magnetometer/hmc5843_i2c.c  | 104 
 drivers/iio/magnetometer/hmc5843_spi.c  | 102 
 drivers/staging/iio/magnetometer/Kconfig|  32 --
 drivers/staging/iio/magnetometer/Makefile   |   4 +-
 drivers/staging/iio/magnetometer/hmc5843.h  |  66 ---
 drivers/staging/iio/magnetometer/hmc5843_core.c | 693 
 drivers/staging/iio/magnetometer/hmc5843_i2c.c  | 104 
 drivers/staging/iio/magnetometer/hmc5843_spi.c  | 102 
 12 files changed, 1003 insertions(+), 1000 deletions(-)
 create mode 100644 drivers/iio/magnetometer/hmc5843.h
 create mode 100644 drivers/iio/magnetometer/hmc5843_core.c
 create mode 100644 drivers/iio/magnetometer/hmc5843_i2c.c
 create mode 100644 drivers/iio/magnetometer/hmc5843_spi.c
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843.h
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843_core.c
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843_i2c.c
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843_spi.c

diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
index 868abad..021dc53 100644
--- a/drivers/iio/magnetometer/Kconfig
+++ b/drivers/iio/magnetometer/Kconfig
@@ -105,4 +105,37 @@ config IIO_ST_MAGN_SPI_3AXIS
depends on IIO_ST_MAGN_3AXIS
depends on IIO_ST_SENSORS_SPI
 
+config SENSORS_HMC5843
+   tristate
+   select IIO_BUFFER
+   select IIO_TRIGGERED_BUFFER
+
+config SENSORS_HMC5843_I2C
+   tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer (I2C)"
+   depends on I2C
+   select SENSORS_HMC5843
+   select REGMAP_I2C
+   help
+ Say Y here to add support for the Honeywell HMC5843, HMC5883 and
+ HMC5883L 3-Axis Magnetometer (digital compass).
+
+ This driver can also be compiled as a set of modules.
+ If so, these modules will be created:
+ - hmc5843_core (core functions)
+ - hmc5843_i2c (support for HMC5843, HMC5883, HMC5883L and HMC5983)
+
+config SENSORS_HMC5843_SPI
+   tristate "Honeywell HMC5983 3-Axis Magnetometer (SPI)"
+   depends on SPI_MASTER
+   select SENSORS_HMC5843
+   select REGMAP_SPI
+   help
+ Say Y here to add support for the Honeywell HMC5983 3-Axis 
Magnetometer
+ (digital compass).
+
+ This driver can also be compiled as a set of modules.
+ If so, these modules will be created:
+ - hmc5843_core (core functions)
+ - hmc5843_spi (support for HMC5983)
+
 endmenu
diff --git a/drivers/iio/magnetometer/Makefile 
b/drivers/iio/magnetometer/Makefile
index 2c72df4..dd03fe5 100644
--- a/drivers/iio/magnetometer/Makefile
+++ b/drivers/iio/magnetometer/Makefile
@@ -15,3 +15,7 @@ st_magn-$(CONFIG_IIO_BUFFER) += st_magn_buffer.o
 
 obj-$(CONFIG_IIO_ST_MAGN_I2C_3AXIS) += st_magn_i2c.o
 obj-$(CONFIG_IIO_ST_MAGN_SPI_3AXIS) += st_magn_spi.o
+
+obj-$(CONFIG_SENSORS_HMC5843)  += hmc5843_core.o
+obj-$(CONFIG_SENSORS_HMC5843_I2C)  += hmc5843_i2c.o
+obj-$(CONFIG_SENSORS_HMC5843_SPI)  += hmc5843_spi.o
diff --git a/drivers/iio/magnetometer/hmc5843.h 
b/drivers/iio/magnetometer/hmc5843.h
new file mode 100644
index 000..cb284cf
--- /dev/null
+++ b/drivers/iio/magnetometer/hmc5843.h
@@ -0,0 +1,66 @@
+/*
+ * Header file for hmc5843 driver
+ *
+ * Split from hmc5843.c
+ * Copyright (C) Josef Gajdusek 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef HMC5843_CORE_H
+#define HMC5843_CORE_H
+
+#include 
+#include 
+
+#define HMC5843_CONFIG_REG_A   0x00
+#define HMC5843_CONFIG_REG_B   0x01
+#define HMC5843_MODE_REG   0x02
+#define HMC5843_DATA_OUT_MSB_REGS  0x03
+#define HMC5843_STATUS_REG 0x09
+#define HMC5843_ID_REG 0x0a
+#define HMC5843_ID_END 0x0c
+
+enum hmc5843_ids {
+   HMC5843_ID,
+   HMC5883_ID,
+   HMC5883L_ID,
+   HMC5983_ID,
+};
+
+/**
+ * struct hcm5843_data - device specific data
+ * @dev:   actual device
+ * @lock:  update and read regmap data
+ * @regmap:hardware access register maps
+ * @variant:   describe chip variants
+ * @buffer:3x 16-bit channels + 

[PATCH 1/5] iio: hmc5843: Add attribute for available measurement config

2016-02-07 Thread Cristina Moraru
Add static attribute meas_conf_available to show available
configurations for the bias current.

API for setting bias measurement configuration:

0 - Normal measurement configuration (default): In normal measurement
configuration the device follows normal measurement flow. Pins BP
and BN are left floating and high impedance.

1 - Positive bias configuration: In positive bias configuration, a
positive current is forced across the resistive load on pins BP
and BN.

2 - Negative bias configuration. In negative bias configuration, a
negative current is forced across the resistive load on pins BP
and BN.

3 - Only available on HMC5983. Magnetic sensor is disabled.
Temperature sensor is enabled.

Signed-off-by: Cristina Moraru 
---
 drivers/staging/iio/magnetometer/hmc5843_core.c | 83 +++--
 1 file changed, 65 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c 
b/drivers/staging/iio/magnetometer/hmc5843_core.c
index 4aab022..4e2a7ec 100644
--- a/drivers/staging/iio/magnetometer/hmc5843_core.c
+++ b/drivers/staging/iio/magnetometer/hmc5843_core.c
@@ -66,6 +66,34 @@
 #define HMC5843_MEAS_CONF_NEGATIVE_BIAS0x02
 #define HMC5843_MEAS_CONF_MASK 0x03
 
+/*
+ * API for setting the measurement configuration to
+ * Normal, Positive bias and Negative bias
+ *
+ * From the datasheet:
+ * 0 - Normal measurement configuration (default): In normal measurement
+ * configuration the device follows normal measurement flow. Pins BP
+ * and BN are left floating and high impedance.
+ *
+ * 1 - Positive bias configuration: In positive bias configuration, a
+ * positive current is forced across the resistive load on pins BP
+ * and BN.
+ *
+ * 2 - Negative bias configuration. In negative bias configuration, a
+ * negative current is forced across the resistive load on pins BP
+ * and BN.
+ *
+ * 3 - Only available on HMC5983. Magnetic sensor is disabled.
+ * Temperature sensor is enabled.
+ */
+static const int hmc5843_regval_to_meas_conf[] = {
+   0, 1, 2
+};
+
+static const int hmc5983_regval_to_meas_conf[] = {
+   0, 1, 2, 3
+};
+
 /* Scaling factors: 1000/Gain */
 static const int hmc5843_regval_to_nanoscale[] = {
6173, 7692, 10309, 12821, 18868, 21739, 25641, 35714
@@ -109,6 +137,8 @@ static const int hmc5983_regval_to_samp_freq[][2] = {
 /* Describe chip variants */
 struct hmc5843_chip_info {
const struct iio_chan_spec *channels;
+   const int *regval_to_meas_conf;
+   const int n_regval_to_meas_conf;
const int (*regval_to_samp_freq)[2];
const int n_regval_to_samp_freq;
const int *regval_to_nanoscale;
@@ -174,24 +204,6 @@ static int hmc5843_read_measurement(struct hmc5843_data 
*data,
return IIO_VAL_INT;
 }
 
-/*
- * API for setting the measurement configuration to
- * Normal, Positive bias and Negative bias
- *
- * From the datasheet:
- * 0 - Normal measurement configuration (default): In normal measurement
- * configuration the device follows normal measurement flow. Pins BP
- * and BN are left floating and high impedance.
- *
- * 1 - Positive bias configuration: In positive bias configuration, a
- * positive current is forced across the resistive load on pins BP
- * and BN.
- *
- * 2 - Negative bias configuration. In negative bias configuration, a
- * negative current is forced across the resistive load on pins BP
- * and BN.
- *
- */
 static int hmc5843_set_meas_conf(struct hmc5843_data *data, u8 meas_conf)
 {
int ret;
@@ -248,6 +260,28 @@ static IIO_DEVICE_ATTR(meas_conf,
hmc5843_set_measurement_configuration,
0);
 
+static ssize_t hmc5843_show_meas_conf_avail(struct device *dev,
+   struct device_attribute *attr,
+   char *buf)
+{
+   struct hmc5843_data *data = iio_priv(dev_to_iio_dev(dev));
+
+   size_t len = 0;
+   int i;
+
+   for (i = 0; i < data->variant->n_regval_to_meas_conf; i++)
+   len += scnprintf(buf + len, PAGE_SIZE - len,
+   "%d ", data->variant->regval_to_meas_conf[i]);
+
+   /* replace trailing space by newline */
+   buf[len - 1] = '\n';
+
+   return len;
+}
+
+static IIO_DEVICE_ATTR(meas_conf_available, S_IRUGO,
+   hmc5843_show_meas_conf_avail, NULL, 0);
+
 static
 ssize_t hmc5843_show_samp_freq_avail(struct device *dev,
 struct device_attribute *attr, char *buf)
@@ -478,6 +512,7 @@ static const struct iio_chan_spec hmc5883_channels[] = {
 
 static struct attribute *hmc5843_attributes[] = {
_dev_attr_meas_conf.dev_attr.attr,
+   _dev_attr_meas_conf_available.dev_attr.attr,
_dev_attr_scale_available.dev_attr.attr,
_dev_attr_sampling_frequency_available.dev_attr.attr,

[PATCH 2/5] iio: hmc5843: Swap suspend and resume implementations

2016-02-07 Thread Cristina Moraru
Swap implementations of hmc5843_common_suspend and
hmc5843_common_resume functions for they have been
inversed. Device should go on SLEEP mode on suspend
and on CONTINUOUS mode on resume.

Signed-off-by: Cristina Moraru 
---
 drivers/staging/iio/magnetometer/hmc5843_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c 
b/drivers/staging/iio/magnetometer/hmc5843_core.c
index 4e2a7ec..dca8d64 100644
--- a/drivers/staging/iio/magnetometer/hmc5843_core.c
+++ b/drivers/staging/iio/magnetometer/hmc5843_core.c
@@ -612,14 +612,14 @@ static const unsigned long hmc5843_scan_masks[] = {0x7, 
0};
 int hmc5843_common_suspend(struct device *dev)
 {
return hmc5843_set_mode(iio_priv(dev_get_drvdata(dev)),
-   HMC5843_MODE_CONVERSION_CONTINUOUS);
+   HMC5843_MODE_SLEEP);
 }
 EXPORT_SYMBOL(hmc5843_common_suspend);
 
 int hmc5843_common_resume(struct device *dev)
 {
return hmc5843_set_mode(iio_priv(dev_get_drvdata(dev)),
-   HMC5843_MODE_SLEEP);
+   HMC5843_MODE_CONVERSION_CONTINUOUS);
 }
 EXPORT_SYMBOL(hmc5843_common_resume);
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/5] iio: hmc5843: Fix issues and move out of staging

2016-02-07 Thread Cristina Moraru
Fix driver issues and add completions.
Add custom attribute to display available values for bias
current, add documentation for undocumented custom attributes,
swap implementation of two functions that have been inversed,
fix checkpatch warnings and, move the driver from the staging
directory to drivers/iio/magnetometer updating corresponding
Makefile and Kconfig files.

Cristina Moraru (5):
  iio: hmc5843: Add attribute for available measurement config
  iio: hmc5843: Swap suspend and resume implementations
  iio: hmc5843: Add ABI documentation file for hmc5843
  iio: hmc5843: Fix comment style warnings
  iio: hmc5843: Move hmc5843 out of staging

 .../ABI/testing/sysfs-bus-iio-magnetometer-hmc5843 |  15 +
 drivers/iio/magnetometer/Kconfig   |  33 +
 drivers/iio/magnetometer/Makefile  |   4 +
 drivers/iio/magnetometer/hmc5843.h |  66 ++
 drivers/iio/magnetometer/hmc5843_core.c| 693 +
 drivers/iio/magnetometer/hmc5843_i2c.c | 104 
 drivers/iio/magnetometer/hmc5843_spi.c | 102 +++
 drivers/staging/iio/magnetometer/Kconfig   |  32 -
 drivers/staging/iio/magnetometer/Makefile  |   4 +-
 drivers/staging/iio/magnetometer/hmc5843.h |  66 --
 drivers/staging/iio/magnetometer/hmc5843_core.c| 646 ---
 drivers/staging/iio/magnetometer/hmc5843_i2c.c | 104 
 drivers/staging/iio/magnetometer/hmc5843_spi.c | 102 ---
 13 files changed, 1018 insertions(+), 953 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-magnetometer-hmc5843
 create mode 100644 drivers/iio/magnetometer/hmc5843.h
 create mode 100644 drivers/iio/magnetometer/hmc5843_core.c
 create mode 100644 drivers/iio/magnetometer/hmc5843_i2c.c
 create mode 100644 drivers/iio/magnetometer/hmc5843_spi.c
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843.h
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843_core.c
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843_i2c.c
 delete mode 100644 drivers/staging/iio/magnetometer/hmc5843_spi.c

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RESEND 40/70] staging: wilc1000: wilc_wlan.c: replaces PRINT_ER with netdev_err

2016-02-07 Thread Greg KH
On Thu, Feb 04, 2016 at 06:24:01PM +0900, Glen Lee wrote:
> From: Leo Kim 
> 
> This patches replaces PRINT_ER with netdev_err.

No, that's not what this patch does :(

> Removes unnecessary debug logs as well.

That's what this patch does.

Please be more careful.

I'm not going to apply this patch.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RESEND 41/70] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err

2016-02-07 Thread Greg KH
On Thu, Feb 04, 2016 at 06:24:02PM +0900, Glen Lee wrote:
> From: Leo Kim 
> 
> This patches replaces PRINT_ER with netdev_err.

It also does more than that:

> @@ -273,7 +266,9 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
>   /* if source address and bssid fields are equal>>Mac header */
>   /*send it to mgmt frames handler */
>   if (!(memcmp(srcAdd, bssid, 6))) {
> - mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
> + ret = mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
> + if (ret)
> + netdev_err(dev, "fail to mgmt tx\n");

Look, proper error checking.

Which is great, but again, the changelog text was wrong :(

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] staging: unisys: use common return path

2016-02-07 Thread Greg Kroah-Hartman
On Tue, Dec 01, 2015 at 04:22:33PM +0530, Sudip Mukherjee wrote:
> The success path and the error path both are first doing
> spin_unlock_irqrestore() before returning. Use that in the common path
> and return the success/error value.
> 
> Signed-off-by: Sudip Mukherjee 
> ---
> 
> v2: changed label name
> 
> It is dependent on the patch series sent by Benjamin (Nov 30th).

Which didn't get applied, so can you resend this after that does get
accepted?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 00/16] staging: unisys: cleanup series

2016-02-07 Thread Greg KH
On Fri, Jan 29, 2016 at 10:21:26AM -0500, Benjamin Romer wrote:
> This patch series cleans up all the remaining issues reported by
> checkpatch.pl that can be fixed. The series was rebased against
> the current contents of staging-next.

As this was a 'v2' series of patches, you should have said so,
describing what was changed from the original set, so that people know
if you did or did not respond to the last set of review comments :(

Please fix that up and resend this.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 3/3] staging: rtl8723au: whitespace and blank line cleaning

2016-02-07 Thread Julian Calaby
Hi Geliang,

On Sun, Feb 7, 2016 at 2:30 PM, Geliang Tang  wrote:
> This patch cleans whitespaces and blank lines surrounding
> list_for_each_entry*().

It does a lot more than this, including:
 - Removing some unnecessary brackets
 - Whitespace changes well away from the list_for_each_entry*() calls

You need to either specify all of these in the changelog or split it
up into multiple patches.

Thanks,

Julian Calaby


>
> Signed-off-by: Geliang Tang 
> ---
> Changes in v3:
>  - split it into three patches.
> Changes in v2:
>  - drop the coding style fixing in v1.
> ---
>  drivers/staging/rtl8723au/core/rtw_ap.c   | 41 
> ++-
>  drivers/staging/rtl8723au/core/rtw_mlme.c | 14 +---
>  drivers/staging/rtl8723au/core/rtw_mlme_ext.c |  3 +-
>  drivers/staging/rtl8723au/core/rtw_recv.c | 18 +++---
>  drivers/staging/rtl8723au/core/rtw_sta_mgt.c  | 11 +-
>  drivers/staging/rtl8723au/core/rtw_xmit.c | 30 -
>  drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c |  8 -
>  7 files changed, 17 insertions(+), 108 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c 
> b/drivers/staging/rtl8723au/core/rtw_ap.c
> index 4bcd617..ce4b589 100644
> --- a/drivers/staging/rtl8723au/core/rtw_ap.c
> +++ b/drivers/staging/rtl8723au/core/rtw_ap.c
> @@ -171,7 +171,7 @@ static u8 chk_sta_is_alive(struct sta_info *psta)
> return ret;
>  }
>
> -void   expire_timeout_chk23a(struct rtw_adapter *padapter)
> +void expire_timeout_chk23a(struct rtw_adapter *padapter)
>  {
> struct list_head *phead;
> u8 updated = 0;
> @@ -182,12 +182,9 @@ void   expire_timeout_chk23a(struct rtw_adapter 
> *padapter)
> int i;
>
> spin_lock_bh(>auth_list_lock);
> -
> phead = >auth_list;
> -
> /* check auth_queue */
> list_for_each_entry_safe(psta, ptmp, phead, auth_list) {
> -
> if (psta->expire_to > 0) {
> psta->expire_to--;
> if (psta->expire_to == 0) {
> @@ -205,18 +202,13 @@ void  expire_timeout_chk23a(struct rtw_adapter 
> *padapter)
> spin_lock_bh(>auth_list_lock);
> }
> }
> -
> }
> -
> spin_unlock_bh(>auth_list_lock);
>
> spin_lock_bh(>asoc_list_lock);
> -
> phead = >asoc_list;
> -
> /* check asoc_queue */
> list_for_each_entry_safe(psta, ptmp, phead, asoc_list) {
> -
> if (chk_sta_is_alive(psta) || !psta->expire_to) {
> psta->expire_to = pstapriv->expire_to;
> psta->keep_alive_trycnt = 0;
> @@ -281,7 +273,6 @@ voidexpire_timeout_chk23a(struct rtw_adapter 
> *padapter)
> }
> }
> }
> -
> spin_unlock_bh(>asoc_list_lock);
>
> if (chk_alive_num) {
> @@ -1071,11 +1062,8 @@ int rtw_acl_add_sta23a(struct rtw_adapter *padapter, 
> u8 *addr)
> return -1;
>
> spin_lock_bh(_node_q->lock);
> -
> phead = get_list_head(pacl_node_q);
> -
> list_for_each_entry(paclnode, phead, list) {
> -
> if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
> if (paclnode->valid == true) {
> added = true;
> @@ -1084,7 +1072,6 @@ int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 
> *addr)
> }
> }
> }
> -
> spin_unlock_bh(_node_q->lock);
>
> if (added)
> @@ -1127,11 +1114,8 @@ int rtw_acl_remove_sta23a(struct rtw_adapter 
> *padapter, u8 *addr)
> DBG_8723A("%s(acl_num =%d) = %pM\n", __func__, pacl_list->num, addr);
>
> spin_lock_bh(_node_q->lock);
> -
> phead = get_list_head(pacl_node_q);
> -
> list_for_each_entry_safe(paclnode, ptmp, phead, list) {
> -
> if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
> if (paclnode->valid) {
> paclnode->valid = false;
> @@ -1142,7 +1126,6 @@ int rtw_acl_remove_sta23a(struct rtw_adapter *padapter, 
> u8 *addr)
> }
> }
> }
> -
> spin_unlock_bh(_node_q->lock);
>
> DBG_8723A("%s, acl_num =%d\n", __func__, pacl_list->num);
> @@ -1355,14 +1338,9 @@ void associated_clients_update23a(struct rtw_adapter 
> *padapter, u8 updated)
> struct sta_priv *pstapriv = >stapriv;
>
> spin_lock_bh(>asoc_list_lock);
> -
> phead = >asoc_list;
> -
> -   list_for_each_entry_safe(psta, ptmp, phead, asoc_list) {
> -
> +   list_for_each_entry_safe(psta, ptmp, phead, asoc_list)
> VCS_update23a(padapter, psta);
> -   }
> -
> spin_unlock_bh(>asoc_list_lock);
> }
>  }
> @@ -1637,9 

Re: [PATCH 1/1] staging: coding style cleanups for staging/most/mostcore driver

2016-02-07 Thread Greg KH
On Fri, Jan 29, 2016 at 11:33:20PM +0530, Bijosh Thykkoottathil wrote:
> Fixes following coding style issues reported by the check patch script.
> - ERROR: Macros with complex values should be enclosed in parentheses
> 
> Moving static storage class to the beginning of declaration fixes these
> errors.

Well that's a horrid fix for this, as you aren't doing anything
different here.

Fix the tool if it is reporting things incorrectly, don't blindly change
code for no reason please.  checkpatch isn't always correct, as you have
found out.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] staging: most: return error value

2016-02-07 Thread Greg Kroah-Hartman
On Fri, Nov 27, 2015 at 01:07:49PM +0530, Sudip Mukherjee wrote:
> On error we were returning retval, but retval is not having the error
> value. We will get the error value using PTR_ERR.
> 
> Signed-off-by: Sudip Mukherjee 
> ---
> 
> This series doesnot depend on my earlier pending series.
> 
>  drivers/staging/most/aim-cdev/cdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Doesn't apply anymore :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: speakup: Fix allyesconfig build on mn10300

2016-02-07 Thread Samuel Thibault
Geert Uytterhoeven, on Sun 07 Feb 2016 10:18:46 +0100, wrote:
> I guess there are many other platforms where the UART is MMIO-driven...

Actually they can't ever get to be exposed to speakup's serialio.c:
their SERIAL_PORT_DFNS would set SERIAL_IO_MEM in the io_type field,
but that field doesn't even exist in serialio.c's old_serial_port, so
serialio.c would actually not even build, so we are on the safe side.

Samuel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 5/8] staging: wilc1000: fix return type of wilc_send_config_pkt

2016-02-07 Thread Greg KH
On Fri, Feb 05, 2016 at 10:35:15AM +0900, Chaehyun Lim wrote:
> wilc_send_config_pkt is returned 0 or -ETIMEDOUT according to return
> value of wilc_wlan_cfg_get or wilc_wlan_cfg_set.
> It is better to use int type to represent linux standard error code.
> 
> Signed-off-by: Chaehyun Lim 
> ---
>  drivers/staging/wilc1000/coreconfigurator.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

This, and the remaining patches in the series, don't apply anymore due
to patches I took right before your series.  Can you refresh these and
resend?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: unisys: remove unnecessary goto

2016-02-07 Thread Greg KH
On Mon, Dec 07, 2015 at 10:58:36AM -0500, Benjamin Romer wrote:
> parser_param_start() had a goto Away, which went to nothing but
> a return statement. Remove the goto, the CamelCased label, and
> just return directly.
> 
> Signed-off-by: Benjamin Romer 
> ---
>  drivers/staging/unisys/visorbus/visorchipset.c | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)

Didn't apply to my tree :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] [media] media: davinci_vpfe: fix missing unlock on error in vpfe_prepare_pipeline()

2016-02-07 Thread Sakari Ailus
Hi Wei,

On Fri, Feb 05, 2016 at 09:52:00PM +0800, weiyj...@163.com wrote:
> From: Wei Yongjun 
> 
> Add the missing unlock before return from function
> vpfe_prepare_pipeline() in the error handling case.
> 
> video->lock is lock/unlock in function vpfe_open(),
> and no need to unlock it here, so remove unlock
> video->lock.
> 
> Signed-off-by: Wei Yongjun 
> ---
>  drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c 
> b/drivers/staging/media/davinci_vpfe/vpfe_video.c
> index 3ec7e65..db49af9 100644
> --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
> +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
> @@ -147,7 +147,7 @@ static int vpfe_prepare_pipeline(struct vpfe_video_device 
> *video)
>   mutex_lock(>graph_mutex);
>   ret = media_entity_graph_walk_init(, entity->graph_obj.mdev);
>   if (ret) {
> - mutex_unlock(>lock);
> + mutex_unlock(>graph_mutex);

Oh dear. I wonder how could this have happened... thanks for the fix!

I've applied this to my tree.

>   return -ENOMEM;
>   }
>   media_entity_graph_walk_start(, entity);
> 

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: speakup: Fix allyesconfig build on mn10300

2016-02-07 Thread Samuel Thibault
Geert Uytterhoeven, on Sun 07 Feb 2016 10:18:46 +0100, wrote:
> On Mon, Feb 1, 2016 at 9:06 AM, Samuel Thibault
>  wrote:
> > mn10300 uses an mmio-driven uart. This is not supported by speakup, so
> > prevent from enabling it.
> 
> Just wondering, what are the symptoms of the failure?

It'll try to request the 0x00-0x08 ports and fail, returning -ENODEV.

> Is it a compile-time or run-time failure?

The fix is for compile-time. run-time failure will already return
-ENODEV.

> Is this about drivers/staging/speakup/serialio.c?

Yes.

This code is to be replaced anyway.

Samuel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: android: sync.c: Changed the ways nullptrs were being checked

2016-02-07 Thread Greg Kroah-Hartman
On Thu, Dec 31, 2015 at 11:47:15PM -0800, Chase Metzger wrote:
> Removed all checkpatch.pl CHECKs that suggested to check NULL by
> !obj instead of obj == NULL.
> 
> Signed-off-by: Chase Metzger 
> ---
>  drivers/staging/android/sync.c | 18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)

I think this is the same as an earlier patch you sent, but I can't tell
for sure, as you didn't say why you resent this one :(

Please resend it with the needed information.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] android/binder: fix fput comment

2016-02-07 Thread Greg Kroah-Hartman
On Fri, Dec 25, 2015 at 09:47:17PM +0100, Jann Horn wrote:
> Just something I noticed while looking at FD-passing code.
> Didn't test the change.
> 
> BUG_ON is intentional, if someone rewrites the code to hit
> that, it can be a security issue.

Never add BUG to the kernel, you just crashed the machine and made it so
that the user lost their data without any idea of what happend :(

and if at all possible, please test your changes before sending them
out...

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/2] Lustre debugfs fixes

2016-02-07 Thread Oleg Drokin

On Feb 7, 2016, at 4:39 PM, Greg Kroah-Hartman wrote:

> On Sat, Feb 06, 2016 at 02:01:49AM -0500, gr...@linuxhacker.ru wrote:
>> From: Oleg Drokin 
>> 
>> These two patches tie some loose ends from the Lustre debugfs conversion,
>> but while investigating them I also accumulated some questions
>> that would be good to get answers for.
>> 
>> 1. Unlike procfs, debugfs does not really guard your back and if root
>> comes in and tries to write to a readonly file (or read a write-only one),
>> it's allowed (as are permission changes too) as long as the appropriate write
>> (or read) method is provided.
>> So apparently there's whole class of bugs related to this, sample
>> exhibits are in e.g. acpi_ec_add_debugfs creating a totally noop module
>> parameter to control writes that does not really prevent any writes
>> (patch submitted separately).
>> But also things like wil_debugfs_create_iomem_x32 where when called from
>> e.g. wil6210_debugfs_init_offset, some read-only attributed get a generic
>> write method that would write straight to hardware registers (who knows
>> what would happen when you write there, possibly they are readonly, but
>> you are not getting an error).
>> At first it looked like an easy way to catch this would be to just check
>> for RO/WO mode with write/read handler set, but this is thwarted by
>> the simple attribute defines that always assign read and write methods,
>> but do the check internally for the get/set method instead.
>> But also some fault injection code that sets readonly access on some files,
>> but provides a fully functional write method that works as desired.
>> 
>> Would it make sense to redo the simple-attribute framework to easy such
>> cases detection (and also update writeable attributes to have permissions
>> reflecting this) and have a correspinding kernel debug compile option
>> to check for these?
> 
> If a developer provides the write hooks for a debugfs file, and
> userspace changes the permissions to write to it, why would you prevent
> this?  Perhaps this is what is intended.

Well, it works differently for procfs where you cannot really change the 
permissions.
I understand the developer might envision permission changes (or even ignoring 
of
permissions by root) and there is such a code out there even.
But DEFINE_SIMPLE_ATTRIBUTE code for one always provides both read and write 
methods
and then internally checks if get and set are available and returns -EACCESS if 
not.
That's totally ok too (other than -EACCESS that I think it not permitted as an 
errno
from read/write with EINVAL being used for that), I am just trying to figure 
out if
there is a way to more automatically detect cases where the write or read 
access is
not desired and is left there by mistake.

> Remember, debugfs is only for debugging stuff, never rely on it for
> actual device/system use.

Yes, I understand that. But debugfs is on by default pretty much anywhere and if
there's a bug that lets you write to some hardware register you were supposed 
to only
read and get some elevated privileges, or you read some write-only file and 
crash
the kernel - that's bad too.
We have kernel debugging options to check for all sorts of stuff, like use 
after free,
double unlocks and so on.
This sounded like another class of bugs that would have benefitted from that.

>> Now, I also see that drm_debugfs_create_files allows anybody to
>> insert any debugfs file anywhere and it is a non-gpl EXPORT_SYMBOL as well,
>> should it be converted too, or is it sysfs access only that is restricted?
> No, these should be as well, a patch for that would be great, thanks.

Done.

Bye,
Oleg
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: android: sync_debug.c: remove unnecessary braces

2016-02-07 Thread Greg KH
On Wed, Jan 06, 2016 at 10:36:46PM +0100, Robin Krahl wrote:
> Remove unnecessary braces {} around a single statement within a for loop.
> Indicated by checkpatch.
> 
> Signed-off-by: Robin Krahl 
> ---
>  drivers/staging/android/sync_debug.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/android/sync_debug.c 
> b/drivers/staging/android/sync_debug.c
> index f45d13c..02a1649 100644
> --- a/drivers/staging/android/sync_debug.c
> +++ b/drivers/staging/android/sync_debug.c
> @@ -158,9 +158,8 @@ static void sync_print_fence(struct seq_file *s, struct 
> sync_fence *fence)
>   seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
>  sync_status_str(atomic_read(>status)));
>  
> - for (i = 0; i < fence->num_fences; ++i) {
> + for (i = 0; i < fence->num_fences; ++i)
>   sync_print_pt(s, fence->cbs[i].sync_pt, true);
> - }
>  
>   spin_lock_irqsave(>wq.lock, flags);
>   list_for_each_entry(pos, >wq.task_list, task_list) {
> -- 
> 2.5.0
> 

Doesn't apply to my tree :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: android: sync_debug: Fixed braces related coding style issue

2016-02-07 Thread Greg KH
On Sun, Jan 24, 2016 at 03:51:32PM +0530, Tapan Prakash T wrote:
> This patch fixes checkpatch.pl warning in file sync_debug
> WARNING: braces {} are not necessary for single statement blocks
> 
> Signed-off-by: Tapan Prakash T 
> ---
>  drivers/staging/android/sync_debug.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/android/sync_debug.c 
> b/drivers/staging/android/sync_debug.c
> index f45d13c..02a1649 100644
> --- a/drivers/staging/android/sync_debug.c
> +++ b/drivers/staging/android/sync_debug.c
> @@ -158,9 +158,8 @@ static void sync_print_fence(struct seq_file *s, struct 
> sync_fence *fence)
>   seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
>  sync_status_str(atomic_read(>status)));
>  
> - for (i = 0; i < fence->num_fences; ++i) {
> + for (i = 0; i < fence->num_fences; ++i)
>   sync_print_pt(s, fence->cbs[i].sync_pt, true);
> - }
>  
>   spin_lock_irqsave(>wq.lock, flags);
>   list_for_each_entry(pos, >wq.task_list, task_list) {
> -- 
> 1.9.1

Someone sent this fix in before you, sorry.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RESEND] staging: android: sync_debug.c: remove unnecessary braces

2016-02-07 Thread Greg KH
On Tue, Jan 19, 2016 at 12:29:41PM +0100, Robin Krahl wrote:
> Remove unnecessary braces {} around a single statement within a for loop.
> Indicated by checkpatch.
> 
> Signed-off-by: Robin Krahl 
> ---
>  drivers/staging/android/sync_debug.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/android/sync_debug.c 
> b/drivers/staging/android/sync_debug.c
> index f45d13c..02a1649 100644
> --- a/drivers/staging/android/sync_debug.c
> +++ b/drivers/staging/android/sync_debug.c
> @@ -158,9 +158,8 @@ static void sync_print_fence(struct seq_file *s, struct 
> sync_fence *fence)
>   seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
>  sync_status_str(atomic_read(>status)));
>  
> - for (i = 0; i < fence->num_fences; ++i) {
> + for (i = 0; i < fence->num_fences; ++i)
>   sync_print_pt(s, fence->cbs[i].sync_pt, true);
> - }
>  
>   spin_lock_irqsave(>wq.lock, flags);
>   list_for_each_entry(pos, >wq.task_list, task_list) {
> -- 
> 2.5.0
> 


Someone sent a fixed up patch before this one :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: android: Fix brace coding style warning in sync_debug.c

2016-02-07 Thread Greg KH
On Tue, Jan 26, 2016 at 05:31:33PM -0800, Bopamo Osaisai wrote:
> This is a patch to the sync_debug.c file that rectifies a brace warning
> that was found with the checkpatch.pl tool
> 
> Signed-off-by: Bopamo Osaisai 
> ---
>  drivers/staging/android/sync_debug.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/android/sync_debug.c 
> b/drivers/staging/android/sync_debug.c
> index f45d13c..02a1649 100644
> --- a/drivers/staging/android/sync_debug.c
> +++ b/drivers/staging/android/sync_debug.c
> @@ -158,9 +158,8 @@ static void sync_print_fence(struct seq_file *s, struct 
> sync_fence *fence)
>   seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
>  sync_status_str(atomic_read(>status)));
>  
> - for (i = 0; i < fence->num_fences; ++i) {
> + for (i = 0; i < fence->num_fences; ++i)
>   sync_print_pt(s, fence->cbs[i].sync_pt, true);
> - }
>  
>   spin_lock_irqsave(>wq.lock, flags);
>   list_for_each_entry(pos, >wq.task_list, task_list) {
> -- 
> 2.7.0

Someone else already sent this in before you :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: sm750fb: Fix comments style

2016-02-07 Thread Greg Kroah-Hartman
On Wed, Dec 02, 2015 at 08:18:11PM +0100, sebastian.lawnic...@yahoo.com wrote:
> From: Sebastian Lawniczak 
> 
> Fix warnings reported by checkpatch.pl in block comments.
> 
> Signed-off-by: Sebastian Lawniczak 
> ---
>  drivers/staging/sm750fb/ddk750_chip.c | 70 
> +++
>  1 file changed, 39 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
> b/drivers/staging/sm750fb/ddk750_chip.c
> index 0331d34..01ddf44 100644
> --- a/drivers/staging/sm750fb/ddk750_chip.c
> +++ b/drivers/staging/sm750fb/ddk750_chip.c
> @@ -86,8 +86,10 @@ static void setMemoryClock(unsigned int frequency)
>   return;
>  
>   if (frequency) {
> - /* Set the frequency to the maximum frequency that the DDR 
> Memory can take
> - which is 336MHz. */
> + /*
> + * Set the frequency to the maximum frequency that the DDR 
> Memory can take
> + * which is 336MHz.
> + */

It should look like:
/*
 * Set the frequency to the maximum frequency that the DDR 
Memory can take
 * which is 336MHz.
 */

So I can't take this patch, sorry.

Please fix it up and resend.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


patch "staging: sm750fb, fix typos" added to staging-testing

2016-02-07 Thread gregkh

This is a note to let you know that I've just added the patch titled

staging: sm750fb, fix typos

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-testing branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will be merged to the staging-next branch sometime soon,
after it passes testing, and the merge window is open.

If you have any questions about this process, please let me know.


>From fbb8c963573926bceb5c59e2a7d74e5ce7669e78 Mon Sep 17 00:00:00 2001
From: Matej Vasek 
Date: Mon, 25 Jan 2016 16:02:33 +0100
Subject: staging: sm750fb, fix typos

The code contained typos like "structur", "fointers", etc. Fix that.

No code change, only comments.

Signed-off-by: Matej Vasek 
Cc: Sudip Mukherjee 
Cc: Teddy Wang 
Cc: Greg Kroah-Hartman 
Cc: 
Cc: 
Signed-off-by: Jiri Slaby 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/sm750fb/ddk750_hwi2c.c  | 4 ++--
 drivers/staging/sm750fb/ddk750_mode.c   | 2 +-
 drivers/staging/sm750fb/ddk750_sii164.h | 5 -
 drivers/staging/sm750fb/sm750.c | 2 +-
 drivers/staging/sm750fb/sm750.h | 2 +-
 drivers/staging/sm750fb/sm750_accel.c   | 4 ++--
 drivers/staging/sm750fb/sm750_accel.h   | 2 +-
 drivers/staging/sm750fb/sm750_hw.c  | 2 +-
 8 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.c 
b/drivers/staging/sm750fb/ddk750_hwi2c.c
index b824681e55a7..40253bd8cf2a 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.c
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.c
@@ -127,7 +127,7 @@ static unsigned int hw_i2c_write_data(
if (hw_i2c_wait_tx_done() != 0)
break;
 
-   /* Substract length */
+   /* Subtract length */
length -= (count + 1);
 
/* Total byte written */
@@ -194,7 +194,7 @@ static unsigned int hw_i2c_read_data(
for (i = 0; i <= count; i++)
*buf++ = PEEK32(I2C_DATA0 + i);
 
-   /* Substract length by 16 */
+   /* Subtract length by 16 */
length -= (count + 1);
 
/* Number of bytes read. */
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index 0fd34fa93a41..d0e3935654ff 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -42,7 +42,7 @@ static unsigned long 
displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
dispControl &= FIELD_CLEAR(CRT_DISPLAY_CTRL, CLK);
 
/* Set bit 29:27 of display control register for the right clock */
-   /* Note that SM750LE only need to supported 7 resoluitons. */
+   /* Note that SM750LE only need to supported 7 resolutions. */
if (x == 800 && y == 600)
dispControl = FIELD_SET(dispControl, CRT_DISPLAY_CTRL, CLK, 
PLL41);
else if (x == 1024 && y == 768)
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h 
b/drivers/staging/sm750fb/ddk750_sii164.h
index f2610c90eeb4..664ad089f753 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -39,7 +39,10 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller 
chip */
+/*
+ * below register definition is used for
+ * Silicon Image SiI164 DVI controller chip
+ */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 2ae2a522136f..c9d4871cd62d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -319,7 +319,7 @@ static int lynxfb_ops_set_par(struct fb_info *info)
var = >var;
fix = >fix;
 
-   /* fix structur is not so FIX ... */
+   /* fix structure is not so FIX ... */
line_length = var->xres_virtual * var->bits_per_pixel / 8;
line_length = ALIGN(line_length, crtc->line_pad);
fix->line_length = line_length;
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index fddffac6930f..8e70ce0d6da4 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -53,7 +53,7 @@ struct lynx_accel {
/* base virtual address of de data port */
volatile unsigned char __iomem *dpPortBase;
 
-   /* function fointers */
+   /* function pointers */
void (*de_init)(struct lynx_accel *);
 
int (*de_wait)(void);/* see if hardware ready to work */
diff --git 

Re: [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc

2016-02-07 Thread Greg Kroah-Hartman
On Wed, Nov 11, 2015 at 05:17:50PM +0700, Ivan Safonov wrote:
> On 11/11/2015 04:43 PM, Dan Carpenter wrote:
> >On Sun, Nov 08, 2015 at 02:11:08PM +0700, Ivan Safonov wrote:
> >>_rtl88e_fill_dummy fills the array elemets with zeros if necessary.
> >>
> >_rtl88e_fill_dummy() fills the last sizeof(u32) or whatever so the code
> >is aligned but it doesn't fill up to the end of FW_8188E_SIZE.  Why do
> >we even allocate that much memory.  Why don't we just allocate:
> >
> > pfwdata = kmalloc(round_up(fwsize, sizeof(u32)), GFP_KERNEL);
> >
> >regards,
> >dan carpenter
> 
> Yes, it will save about 2 KB. I will correct it in the next patch.

Please send a v3 series with this fixed up.

Also, please properly thread your patches so they all show up grouped
together.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: wlan-ng: prism2mgmt.h: Coding style warning fix for block comments

2016-02-07 Thread Kroah-Hartman
On Sun, Jan 17, 2016 at 05:48:49AM +0800, YU Bo wrote:
> This patch is to prism2mgmt.h file that fixes up following warnings
> reported by checkpatch.pl:
> A): Block comments use a trailing */ on a separate line
> 
> Signed-off-by: YU BO 
> ---
>  drivers/staging/wlan-ng/prism2mgmt.h |8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

Didn't apply :(

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 13/13] staging: fbtft: Remove unused and duplicated defines

2016-02-07 Thread Greg Kroah-Hartman
On Sun, Dec 20, 2015 at 08:36:07PM +0200, Priit Laes wrote:
> This patch makes use of the standard MIPI Display Command Set to remove
> some of duplicate defines from the headers.
> 
> Signed-off-by: Priit Laes 
> ---
>  drivers/staging/fbtft/fb_hx8357d.h | 32 
>  drivers/staging/fbtft/fbtft.h  |  8 
>  2 files changed, 40 deletions(-)

This patch causes build errors, I can't apply it.  Please be more
careful in the future...

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8712: Fix Comparison with constant warning.

2016-02-07 Thread Greg Kroah-Hartman
On Sat, Feb 06, 2016 at 08:11:11PM +0530, Pinkesh Badjatiya wrote:
> Fix Comparisons with constant on the left side of the test.
> Checkpatch.pl warning.
> --
> WARNING: Comparisons should place the constant on the right side of the
> test
> 296: FILE: ./rtl8712_cmd.c:296:
>   while ((0 != r8712_read32(pAdapter, IOCMD_CTRL_REG)) &&
> 
> Signed-off-by: Pinkesh Badjatiya 
> Acked-by: Larry Finger 
> ---
>  drivers/staging/rtl8712/rtl8712_cmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Someone else sent this before you did, sorry :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 172/182] staging: vme: use gpiochip data pointer

2016-02-07 Thread Greg Kroah-Hartman
On Wed, Dec 09, 2015 at 02:50:05PM +0100, Linus Walleij wrote:
> This makes the driver use the data pointer added to the gpio_chip
> to store a pointer to the state container instead of relying on
> container_of().
> 
> Cc: Greg Kroah-Hartman 
> Cc: Martyn Welch 
> Cc: Manohar Vanga 
> Cc: de...@driverdev.osuosl.org
> Signed-off-by: Linus Walleij 
> ---
> Greg, please ACK this so I can take this through the GPIO tree.

Acked-by: Greg Kroah-Hartman 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: clocking-wizard: add blank line after struct declaration.

2016-02-07 Thread Greg KH
On Sun, Feb 07, 2016 at 08:06:16PM -0800, Greg KH wrote:
> On Tue, Dec 01, 2015 at 01:56:01PM +0100, Christian Colic wrote:
> > Add blank line after struct declaration to fix checkpatch check.
> > 
> > Signed-off-by: Christian Colic 
> > Reviewed-by: Soren Brinkmann 
> > 
> > ---
> >  drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c 
> > b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> > index b8e2f61..1cbf5eb 100644
> > --- a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> > +++ b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> > @@ -71,6 +71,7 @@ struct clk_wzrd {
> > int speed_grade;
> > bool suspended;
> >  };
> > +
> >  #define to_clk_wzrd(_nb) container_of(_nb, struct clk_wzrd, nb)
> >  
> >  /* maximum frequencies for input/output clocks per speed grade */
> > -- 
> > 2.5.0
> > 
> 
> Doesn't apply :(

Because I took another patch, which was sent after yours, sorry about
that, my fault.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: clocking-wizard: add blank line after struct declaration.

2016-02-07 Thread Greg KH
On Tue, Dec 01, 2015 at 01:56:01PM +0100, Christian Colic wrote:
> Add blank line after struct declaration to fix checkpatch check.
> 
> Signed-off-by: Christian Colic 
> Reviewed-by: Soren Brinkmann 
> 
> ---
>  drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c 
> b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> index b8e2f61..1cbf5eb 100644
> --- a/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> +++ b/drivers/staging/clocking-wizard/clk-xlnx-clock-wizard.c
> @@ -71,6 +71,7 @@ struct clk_wzrd {
>   int speed_grade;
>   bool suspended;
>  };
> +
>  #define to_clk_wzrd(_nb) container_of(_nb, struct clk_wzrd, nb)
>  
>  /* maximum frequencies for input/output clocks per speed grade */
> -- 
> 2.5.0
> 

Doesn't apply :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


VERY URGENT

2016-02-07 Thread Andrew Smith
Dr.Richard Anderson,
No 15 Alfateh St Damascus Syria

Hello Friend,

My name is Dr.Richard Anderson, a citizen of France a doctor
and personal adviser to the Syrian deputy defense minister,
late Assef Shawkat; who was killed on the 18th of July 2012,
we are all moving our money out of Syria I need your assistance
to receive the sum of $22,500.000.00 Dollars for further investment
under your care and management,
I will give you 30% of the total money for your assistance.
Contact me with this email address below for more details.
E-mail: richanderson...@gmail.com
Please reply urgent
Thanks
Dr.Richard Anderson

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/2] Lustre debugfs fixes

2016-02-07 Thread Greg Kroah-Hartman
On Sun, Feb 07, 2016 at 06:51:09PM -0500, Oleg Drokin wrote:
> 
> On Feb 7, 2016, at 4:39 PM, Greg Kroah-Hartman wrote:
> 
> > On Sat, Feb 06, 2016 at 02:01:49AM -0500, gr...@linuxhacker.ru wrote:
> >> From: Oleg Drokin 
> >> 
> >> These two patches tie some loose ends from the Lustre debugfs conversion,
> >> but while investigating them I also accumulated some questions
> >> that would be good to get answers for.
> >> 
> >> 1. Unlike procfs, debugfs does not really guard your back and if root
> >> comes in and tries to write to a readonly file (or read a write-only one),
> >> it's allowed (as are permission changes too) as long as the appropriate 
> >> write
> >> (or read) method is provided.
> >> So apparently there's whole class of bugs related to this, sample
> >> exhibits are in e.g. acpi_ec_add_debugfs creating a totally noop module
> >> parameter to control writes that does not really prevent any writes
> >> (patch submitted separately).
> >> But also things like wil_debugfs_create_iomem_x32 where when called from
> >> e.g. wil6210_debugfs_init_offset, some read-only attributed get a generic
> >> write method that would write straight to hardware registers (who knows
> >> what would happen when you write there, possibly they are readonly, but
> >> you are not getting an error).
> >> At first it looked like an easy way to catch this would be to just check
> >> for RO/WO mode with write/read handler set, but this is thwarted by
> >> the simple attribute defines that always assign read and write methods,
> >> but do the check internally for the get/set method instead.
> >> But also some fault injection code that sets readonly access on some files,
> >> but provides a fully functional write method that works as desired.
> >> 
> >> Would it make sense to redo the simple-attribute framework to easy such
> >> cases detection (and also update writeable attributes to have permissions
> >> reflecting this) and have a correspinding kernel debug compile option
> >> to check for these?
> > 
> > If a developer provides the write hooks for a debugfs file, and
> > userspace changes the permissions to write to it, why would you prevent
> > this?  Perhaps this is what is intended.
> 
> Well, it works differently for procfs where you cannot really change the 
> permissions.
> I understand the developer might envision permission changes (or even 
> ignoring of
> permissions by root) and there is such a code out there even.
> But DEFINE_SIMPLE_ATTRIBUTE code for one always provides both read and write 
> methods
> and then internally checks if get and set are available and returns -EACCESS 
> if not.
> That's totally ok too (other than -EACCESS that I think it not permitted as 
> an errno
> from read/write with EINVAL being used for that), I am just trying to figure 
> out if
> there is a way to more automatically detect cases where the write or read 
> access is
> not desired and is left there by mistake.

I don't really know, the SIMPLE_ATTRIBUTE() stuff was just a way to try
to reduce a ton of boiler-plate code that was all over the place.  I
doubt anyone thought of this when it was added (I know I didn't.)

> > Remember, debugfs is only for debugging stuff, never rely on it for
> > actual device/system use.
> 
> Yes, I understand that. But debugfs is on by default pretty much anywhere

But it's root-only, thankfully.  If only ftrace wouldn't use it, distros
could turn it off entirely :(

> and if there's a bug that lets you write to some hardware register you
> were supposed to only read and get some elevated privileges, or you
> read some write-only file and crash the kernel - that's bad too.

I agree, again, which is why it's mounted root-only.  Also, bad things
happen when you remove debugfs files while someone has a file open :)

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred around that '+'

2016-02-07 Thread Greg KH
On Fri, Dec 11, 2015 at 04:38:59PM -0500, Benjamin Young wrote:
> Helped improve coding style to make arithemethic easier to read
> 
> Signed-off-by: Benjamin Young 
> ---
>  drivers/staging/goldfish/goldfish_audio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/goldfish/goldfish_audio.c 
> b/drivers/staging/goldfish/goldfish_audio.c
> index b0927e4..f1e1838 100644
> --- a/drivers/staging/goldfish/goldfish_audio.c
> +++ b/drivers/staging/goldfish/goldfish_audio.c
> @@ -63,7 +63,7 @@ struct goldfish_audio {
>  #define AUDIO_READ(data, addr)   (readl(data->reg_base + addr))
>  #define AUDIO_WRITE(data, addr, x)   (writel(x, data->reg_base + addr))
>  #define AUDIO_WRITE64(data, addr, addr2, x)  \
> - (gf_write_dma_addr((x), data->reg_base + addr, data->reg_base+addr2))
> + (gf_write_dma_addr((x), data->reg_base + addr, data->reg_base + addr2))
>  
>  /*
>   *  temporary variable used between goldfish_audio_probe() and

Someone else sent this before you did, sorry.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r"

2016-02-07 Thread Greg KH
On Fri, Dec 11, 2015 at 04:39:26PM -0500, Benjamin Young wrote:
> Fixed coding style for null comparisons in goldfish_audio.c to be more 
> consistant
> with the rest of the kernel coding style
> 
> Signed-off-by: Benjamin Young 
> ---
>  drivers/staging/goldfish/goldfish_audio.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/goldfish/goldfish_audio.c 
> b/drivers/staging/goldfish/goldfish_audio.c
> index f1e1838..364fdcd 100644
> --- a/drivers/staging/goldfish/goldfish_audio.c
> +++ b/drivers/staging/goldfish/goldfish_audio.c
> @@ -280,12 +280,12 @@ static int goldfish_audio_probe(struct platform_device 
> *pdev)
>   platform_set_drvdata(pdev, data);
>  
>   r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (r == NULL) {
> + if (!r) {
>   dev_err(>dev, "platform_get_resource failed\n");
>   return -ENODEV;
>   }
>   data->reg_base = devm_ioremap(>dev, r->start, PAGE_SIZE);
> - if (data->reg_base == NULL)
> + if (!data->reg_base)
>   return -ENOMEM;
>  
>   data->irq = platform_get_irq(pdev, 0);
> @@ -295,7 +295,7 @@ static int goldfish_audio_probe(struct platform_device 
> *pdev)
>   }
>   data->buffer_virt = dmam_alloc_coherent(>dev,
>   COMBINED_BUFFER_SIZE, _addr, GFP_KERNEL);
> - if (data->buffer_virt == NULL) {
> + if (!data->buffer_virt) {
>   dev_err(>dev, "allocate buffer failed\n");
>   return -ENOMEM;
>   }

Same here, someone beat you to it.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups

2016-02-07 Thread Greg Kroah-Hartman
On Thu, Jan 07, 2016 at 11:08:36PM +0530, Shraddha Barke wrote:
> These patches remove the last few checkpatch warnings in staging/goldfish 
> directory
> 
> Shraddha Barke (2):
>   Staging: goldfish: Add space around +
>   Staging: goldfish: Remove explicit NULL comparison
> 
>  drivers/staging/goldfish/goldfish_audio.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

Someone else did these changes before you did, sorry.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: fix more characters coding style issue in comedi_pcmcia.h

2016-02-07 Thread Kroah-Hartman
On Thu, Jan 14, 2016 at 09:46:57PM +0800, YU Bo wrote:
> This is a patch to the comedi_pcmcia.h file that fixes up a "line over
> 80 characters" warning  found by the checkpatch.pl tool
> 
> Signed-off-by: YU Bo 
> ---
>  drivers/staging/comedi/comedi_pcmcia.h |3 ++-
>  1 个文件被修改,插入 2 行(+),删除 1 行(-)
> 
> diff --git a/drivers/staging/comedi/comedi_pcmcia.h 
> b/drivers/staging/comedi/comedi_pcmcia.h
> index 5d3db2b..3d076e7 100644
> --- a/drivers/staging/comedi/comedi_pcmcia.h
> +++ b/drivers/staging/comedi/comedi_pcmcia.h
> @@ -39,7 +39,8 @@ void comedi_pcmcia_driver_unregister(struct comedi_driver *,
>struct pcmcia_driver *);
> 
>  /**
> - * module_comedi_pcmcia_driver() - Helper macro for registering a comedi 
> PCMCIA driver
> + * module_comedi_pcmcia_driver() - Helper
> + * macro for registering a comedi PCMCIA driver
>   * @__comedi_driver: comedi_driver struct
>   * @__pcmcia_driver: pcmcia_driver struct
>   *
> --
> 1.7.10.4
> 

Also did not apply :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: fix coding style issue in comedilib.h

2016-02-07 Thread Greg KH
On Thu, Jan 14, 2016 at 09:40:14AM +0800, Bo YU wrote:
> This is a patch to the comedilib.h file that fixes "bloch comment use
> * on subsequent lines" warning found by the checkpatch.pl tool
> 
> Signed-off-by: YU Bo 
> ---
>   drivers/staging/comedi/comedilib.h |   32 
>   1 个文件被修改,插入 16 行(+),删除 16 行(-)

Did not apply to my tree :(

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi.h: Fix coding style issue in comedi.h

2016-02-07 Thread Kroah-Hartman
On Thu, Jan 14, 2016 at 11:06:25PM +0800, YU Bo wrote:
> This is a patch to the comedi.h file that fixes up warnings found by the
> checkpatch.pl tool
> 
> Signed-off-by: YU Bo 
> ---
>  drivers/staging/comedi/comedi.h |  260 
> +++
>  1 个文件被修改,插入 154 行(+),删除 106 行(-)

This didn't apply either :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/6] staging: rtl8188eu: add spaces around binary '*'

2016-02-07 Thread Greg Kroah-Hartman
On Wed, Dec 02, 2015 at 10:54:00PM +0100, Luca Ceresoli wrote:
> Fix checkpatch issue:
>   CHECK: spaces preferred around that '*' (ctx:VxV)
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Larry Finger 
> Cc: Greg Kroah-Hartman 

Odd, I don't think I've ever used gre...@linux.com anywhere, where did
you find it?

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RESEND v2 1/8] staging: fsl-mc: static inline function to differentiate root dprc

2016-02-07 Thread Greg KH
On Fri, Dec 11, 2015 at 01:25:47PM -0600, Lijun Pan wrote:
> Define a static inline function is_root_dprc(dev) to tell whether
> a device is root dprc or not via platform_bus_type.
> Remove fsl_mc_is_root_dprc() because is_root_dprc() is simpler
> and easier to understand.
> 
> Signed-off-by: Lijun Pan 
> ---
> v2: use static inline function instead of macro
> replace the fsl_mc_is_root_dprc with is_root_dprc


This series doesn't apply to my tree anymore, due to another big
patcheset for this subsystem being applied.  Can you please rebase it
against my staging-testing branch of staging.git and resend?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 13/13] staging: fbtft: Remove unused and duplicated defines

2016-02-07 Thread Greg Kroah-Hartman
On Sun, Feb 07, 2016 at 07:40:06PM -0800, Greg Kroah-Hartman wrote:
> On Sun, Dec 20, 2015 at 08:36:07PM +0200, Priit Laes wrote:
> > This patch makes use of the standard MIPI Display Command Set to remove
> > some of duplicate defines from the headers.
> > 
> > Signed-off-by: Priit Laes 
> > ---
> >  drivers/staging/fbtft/fb_hx8357d.h | 32 
> >  drivers/staging/fbtft/fbtft.h  |  8 
> >  2 files changed, 40 deletions(-)
> 
> This patch causes build errors, I can't apply it.  Please be more
> careful in the future...

Oh nevermind, that was my fault, sorry for the noise, this was fine...
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: fbtft: Use monotonic clock

2016-02-07 Thread Greg KH
On Sun, Jan 31, 2016 at 11:29:05PM -0500, Abhilash Jindal wrote:
> Wall time obtained from getnstimeofday is susceptible to sudden jumps due to
> user setting the time or due to NTP. Monotonic time is constantly increasing
> time better suited for comparing two timestamps
> 
> Signed-off-by: Abhilash Jindal 
> ---
>  drivers/staging/fbtft/fbtft-core.c |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Patch does not apply at all to my tree :(

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: rtl8192u: r8192U_core: use kmalloc_array instead of kmalloc

2016-02-07 Thread Greg Kroah-Hartman
On Sun, Nov 08, 2015 at 10:17:54PM +0800, Geliang Tang wrote:
> Use kmalloc_array instead of kmalloc to allocate memory for an array.
> 
> Signed-off-by: Geliang Tang 
> ---
>  drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c 
> b/drivers/staging/rtl8192u/r8192U_core.c
> index e06864f..07a1447 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -1725,8 +1725,8 @@ static short rtl8192_usb_initendpoints(struct 
> net_device *dev)
>  {
>   struct r8192_priv *priv = ieee80211_priv(dev);
>  
> - priv->rx_urb = kmalloc(sizeof(struct urb *) * (MAX_RX_URB + 1),
> -GFP_KERNEL);
> + priv->rx_urb = kmalloc_array(MAX_RX_URB + 1, sizeof(struct urb *),
> +  GFP_KERNEL);

I don't see the benefit here with this change, do you?

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] Staging: rts5208: Add missing dma_mapping_error

2016-02-07 Thread Greg KH
On Mon, Jan 25, 2016 at 06:27:28PM -0800, Shaun Ren wrote:
> Signed-off-by: Shaun Ren 
> ---

I can't take a patch without a changelog entry, sorry.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: olpc_dcon: Added a space

2016-02-07 Thread Greg KH
On Tue, Nov 24, 2015 at 10:41:03PM +0530, Anjali Menon wrote:
> Added a space around '/' to remove the check detected by
> the checkpatch.pl.
> 
> CHECK: spaces preferred around that '/' (ctx:VxV)
> 
> Signed-off-by: Anjali Menon 
> ---
>  drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This driver has been deleted from the kernel tree :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: xgifb: vgatypes.h: Coding style warning fix for block comments

2016-02-07 Thread Kroah-Hartman
On Fri, Jan 15, 2016 at 05:30:02PM +0800, YU Bo wrote:
> This patch is to vgatypes.h file that fixes up following warnings
> reported by checkpatch.pl tool
> 
> Signed-off-by: YU Bo 
> ---
>  drivers/staging/xgifb/vgatypes.h |   12 
>  1 file changed, 8 insertions(+), 4 deletions(-)

None of your patches applied, are you sure you are sending them
properly?

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: xgifb: vgatypes.h: fixed coding style warnings

2016-02-07 Thread Greg KH
On Wed, Jan 13, 2016 at 05:11:56PM +0530, Saatvik Arya wrote:
> fixed warnings about comment block coding style
> 
> Signed-off-by: Saatvik Arya 
> ---
>  drivers/staging/xgifb/vgatypes.h | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 

Why did you resend this without saying why you resent it?  It just
confuses us...

Please fix up and resend properly.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv2] staging: rtl8192e: prefer using eth_broadcast_addr()

2016-02-07 Thread Gujulan Elango, Hari Prasath (H.)
From: Hari Prasath Gujulan Elango 

Prefer using the eth_broadcast_addr() instead of memset to broadcast
address 0xFF to the array.

Signed-off-by: Hari Prasath Gujulan Elango 
---
v2: From email address was missing as pointed by Greg.
---
 drivers/staging/rtl8192e/rtllib_softmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c 
b/drivers/staging/rtl8192e/rtllib_softmac.c
index d0fedb0..2a57640 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -355,9 +355,9 @@ static inline struct sk_buff *rtllib_probe_req(struct 
rtllib_device *ieee)
req->header.frame_ctl = cpu_to_le16(RTLLIB_STYPE_PROBE_REQ);
req->header.duration_id = 0;
 
-   memset(req->header.addr1, 0xff, ETH_ALEN);
+   eth_broadcast_addr(req->header.addr1);
ether_addr_copy(req->header.addr2, ieee->dev->dev_addr);
-   memset(req->header.addr3, 0xff, ETH_ALEN);
+   eth_broadcast_addr(req->header.addr3);
 
tag = (u8 *) skb_put(skb, len + 2 + rate_len);
 
-- 
1.9.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RESEND 00/18] staging: sm750fb: change some register fields defines

2016-02-07 Thread Greg Kroah-Hartman
On Sun, Jan 17, 2016 at 08:04:13PM +0200, Mike Rapoport wrote:
> Hi,
> 
> This is the first set of patches that aim to replace custom defines for
> register fields. The ultimate goal is to have MSB:LSB notation for register
> fields and FIELD_* macros removed. 

For some reason you resent this, and the other series, but didn't say
why you did it...

Anyway, I'll pick these up now, please be more specific as to why you
resent something when you do so.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: vt6655: rf.c: checkpatch fixes

2016-02-07 Thread Greg Kroah-Hartman
On Mon, Jan 11, 2016 at 11:16:08PM +, Lewis Eason wrote:
> This patch fixes "spaces preferred around that $operator" checks.
> 
> Signed-off-by: Lewis Eason 
> ---
>  drivers/staging/vt6655/rf.c | 638 
> ++--
>  1 file changed, 319 insertions(+), 319 deletions(-)

Doesn't apply to my tree :(

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 1/2] staging: fwserial: Fix pointer comparison to NULL checkpatch problem

2016-02-07 Thread Greg KH
On Tue, Dec 01, 2015 at 03:18:11PM +0530, Rajan Vaja wrote:
> Fix pointer comparison to NULL problem reported by checkpatch.
> 
> Signed-off-by: Rajan Vaja 
> ---
>  drivers/staging/fwserial/dma_fifo.c |   10 +-
>  drivers/staging/fwserial/fwserial.c |4 ++--
>  2 files changed, 7 insertions(+), 7 deletions(-)

Someone else sent this, and patch 2/2 already before you did, sorry.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/4] staging: rtl8712: Make error handling check for failure

2016-02-07 Thread Greg KH
On Wed, Nov 25, 2015 at 01:04:14PM -0200, Mauro Dreissig wrote:
> On 25-11-2015 12:56, Mauro Dreissig wrote:
> > On 25-11-2015 09:44, Sudip Mukherjee wrote:
> >> On Tue, Nov 24, 2015 at 10:19:41AM -0200, Mauro Dreissig wrote:
> >>> Some error handling paths are checking for success
> >>> instead of error on rtl871x_ioctl_rtl.c.
> >>>
> >>> Signed-off-by: Mauro Dreissig 
> >>> ---
> >>>  drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 239 
> >>> ++--
> >>>  1 file changed, 121 insertions(+), 118 deletions(-)
> >>>
> >>   
> >>> @@ -147,13 +147,13 @@ uint oid_rt_get_rx_icv_err_hdl(struct oid_par_priv 
> >>> *poid_par_priv)
> >>>  
> >>>   if (poid_par_priv->type_of_oid != QUERY_OID)
> >>>   return RNDIS_STATUS_NOT_ACCEPTED;
> >>> - if (poid_par_priv->information_buf_len >= sizeof(u32)) {
> >>> - *(uint *)poid_par_priv->information_buf =
> >>> -  adapter->recvpriv.rx_icv_err;
> >>> - *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
> >>> - } else {
> >>> +
> >>> + if (poid_par_priv->information_buf_len < sizeof(u32)) 
> >>
> >> trailing whitespace here.
> >> Please always test your patch with checkpatch.
> >>
> >> regards
> >> sudip
> >>
> > This blank line is intentional, there is no trailing whitespace.
> > 
> > thanks,
> > Mauro
> > 
> My mistake, seems like I fixed it in the other patch in the series.

Which isn't ok, please fix up the series and resend.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8712: Fix typos and checkpatch warnings.

2016-02-07 Thread Greg KH
On Tue, Nov 17, 2015 at 01:23:54PM +0100, Christian Colic wrote:
> Fix typo SUCESS -> SUCCESS and multiple
> checkpatch checks (blank line, indentation).

That's multiple different things, please break this into multiple
patches, each one only doing one thing.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8712: Fix Comparison with constant warning.

2016-02-07 Thread Greg Kroah-Hartman
On Sat, Feb 06, 2016 at 08:53:57AM -0600, Larry Finger wrote:
> On 02/06/2016 08:41 AM, Pinkesh Badjatiya wrote:
> >Fix Comparisons with constant on the left side of the test.
> >Checkpatch.pl warning.
> >--
> >WARNING: Comparisons should place the constant on the right side of the
> >test
> >296: FILE: ./rtl8712_cmd.c:296:
> > while ((0 != r8712_read32(pAdapter, IOCMD_CTRL_REG)) &&
> >
> >Signed-off-by: Pinkesh Badjatiya 
> >---
> >  drivers/staging/rtl8712/rtl8712_cmd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> This is another case where the writers of checkpatch are forcing their ideas
> of style on the whole world. The problem is that if I reject your patch, it
> will be submitted by someone else. Thus, reluctantly
> 
> Acked-by: Larry Finger 

Well, the general kernel coding style is to put constants on the right
hand of the expression, so it is good to have it this way...

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/4] staging: rtl8712: Rename local variable

2016-02-07 Thread Greg KH
On Wed, Nov 25, 2015 at 03:42:40PM -0200, Mauro Dreissig wrote:
> Renames all instances of struct _adapter to adapter in rtl871x_ioctl_rtl.c,
> avoiding camel case.
> 
> Signed-off-by: Mauro Dreissig 
> ---
>  drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 86 
> ++---
>  1 file changed, 43 insertions(+), 43 deletions(-)

Two patches with the identical subject line isn't good, I can't accept
these, please fix up.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] staging/dgap: move duplicated code from the dgap_cm.* functions

2016-02-07 Thread Greg Kroah-Hartman
On Wed, Nov 25, 2015 at 11:51:21PM +0600, Alexander Kuleshov wrote:
> The dgap driver contains three functions: dgap_cmdb(), dgap_cmdw()
> and dgap_cmdw_exit which are contain duplicated code which waits
> if necessary before updating the pointer to limit outstanding
> commands. This patch introduces the wait_for_fep_cmds_limit()
> function which is will be called from these functions to prevent
> code duplication.
> 
> Signed-off-by: Alexander Kuleshov 
> ---
> Forgot Signed-off-by line
> 
>  drivers/staging/dgap/dgap.c | 103 
> 
>  1 file changed, 37 insertions(+), 66 deletions(-)

This driver is now deleted from the kernel tree, sorry :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8192e: prefer using eth_broadcast_addr()

2016-02-07 Thread gre...@linuxfoundation.org
On Wed, Jan 20, 2016 at 01:06:13PM +, Gujulan Elango, Hari Prasath (H.) 
wrote:
> From: Hari Prasath Gujulan Elango

When you do this, you need an email address after the name, otherwise
git complains and refuses to apply the patch.

Please fix up and resend.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] Staging: rts5208: Cleanup rtsx_transport.c

2016-02-07 Thread Greg KH
On Mon, Jan 25, 2016 at 06:27:27PM -0800, Shaun Ren wrote:
> This patch fixes coding style issues in rtsx_transport.c.
> 
> Signed-off-by: Shaun Ren 
> ---
>  drivers/staging/rts5208/rtsx_transport.c | 115 
> +--
>  1 file changed, 65 insertions(+), 50 deletions(-)

What coding style issues?  Please be specific, and only do one type of
cleanup per patch, otherwise it's hard to review them.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: netlogic: Coding Style Fix Comparison to NULL could be written with !

2016-02-07 Thread Greg Kroah-Hartman
On Sat, Dec 12, 2015 at 06:45:59AM -0800, Benjamin Young wrote:
> Fixed coding style for null comparisons in netlogic driver to be more 
> consistant
> with the rest of the kernel coding style
> 
> Signed-off-by: Benjamin Young 
> ---
>  drivers/staging/netlogic/xlr_net.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

Doesn't apply to my tree at all :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: netlogic: Coding Style Alignment should match open parenthesis

2016-02-07 Thread Greg KH
On Sat, Dec 12, 2015 at 09:49:37PM -0800, Benjamin Young wrote:
> Fixed alignment issues with parenthesis so the code is easier to read.
> 
> Signed-off-by: Benjamin Young 
> ---
>  drivers/staging/netlogic/platform_net.c |  12 +--
>  drivers/staging/netlogic/xlr_net.c  | 159 
> +---
>  2 files changed, 91 insertions(+), 80 deletions(-)

Also does not apply :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: dgnc: convert to wait_event_interruptible_timeout

2016-02-07 Thread gre...@linuxfoundation.org
On Thu, Dec 24, 2015 at 01:54:12PM +, Gujulan Elango, Hari Prasath (H.) 
wrote:
> This patch makes use of wait_event_interruptible_timeout to achieve timeout
> functionality.This is a TODO mentiond in the comment which is also removed.
> It also aligns with what the function is supposed to do as in the
> comments.
> 
> Signed-off-by: Hari Prasath Gujulan Elango 
> ---
>  drivers/staging/dgnc/dgnc_neo.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
> index 39c76e7..7d9efe0 100644
> --- a/drivers/staging/dgnc/dgnc_neo.c
> +++ b/drivers/staging/dgnc/dgnc_neo.c
> @@ -1306,10 +1306,8 @@ static int neo_drain(struct tty_struct *tty, uint 
> seconds)
>   /*
>* Go to sleep waiting for the tty layer to wake me back up when
>* the empty flag goes away.
> -  *
> -  * NOTE: TODO: Do something with time passed in.
>*/
> - rc = wait_event_interruptible(un->un_flags_wait, ((un->un_flags & 
> UN_EMPTY) == 0));
> + rc = wait_event_interruptible_timeout(un->un_flags_wait, ((un->un_flags 
> & UN_EMPTY) == 0), msecs_to_jiffies(seconds * 1000));

Any reason you didn't properly wrap your line at the 80 column limit?

Please fix and resend.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V2 06/13] Drivers: hv: vmbus: define the new offer type for Hyper-V socket (hvsock)

2016-02-07 Thread Greg KH
On Wed, Jan 27, 2016 at 10:29:38PM -0800, K. Y. Srinivasan wrote:
> From: Dexuan Cui 
> 
> A helper function is also added.
> 
> Signed-off-by: Dexuan Cui 
> Signed-off-by: K. Y. Srinivasan 
> ---
>  include/linux/hyperv.h |7 +++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> index 4af51a3..79c4aa7 100644
> --- a/include/linux/hyperv.h
> +++ b/include/linux/hyperv.h
> @@ -235,6 +235,7 @@ struct vmbus_channel_offer {
>  #define VMBUS_CHANNEL_LOOPBACK_OFFER 0x100
>  #define VMBUS_CHANNEL_PARENT_OFFER   0x200
>  #define VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATION 0x400
> +#define VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER   0x2000

In the future the BIT() macro might be good here...
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] Staging:iio:Prefer using BIT macro

2016-02-07 Thread Bhumika Goyal
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
 @@ int g; @@
-(1 << g)
+BIT(g)

Signed-off-by: Bhumika Goyal 
---
 drivers/staging/iio/adc/ad7816.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index 2226051..f631012 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -222,7 +222,7 @@ static ssize_t ad7816_show_value(struct device *dev,
value = (s8)((data >> AD7816_TEMP_FLOAT_OFFSET) - 103);
data &= AD7816_TEMP_FLOAT_MASK;
if (value < 0)
-   data = (1 << AD7816_TEMP_FLOAT_OFFSET) - data;
+   data = BIT(AD7816_TEMP_FLOAT_OFFSET) - data;
return sprintf(buf, "%d.%.2d\n", value, data * 25);
}
return sprintf(buf, "%u\n", data);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] Staging: iio: adc: Prefer using the BIT macro

2016-02-07 Thread Bhumika Goyal
This patch replaces bit shifting on 1 with the BIT(x) macro.

This was done with coccinelle:

@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Bhumika Goyal 
---
 drivers/staging/iio/adc/ad7280a.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7280a.c 
b/drivers/staging/iio/adc/ad7280a.c
index 0c73bce..ccf3157 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -117,7 +117,7 @@
  */
 #define POLYNOM0x2F
 #define POLYNOM_ORDER  8
-#define HIGHBIT(1 << (POLYNOM_ORDER - 1))
+#define HIGHBITBIT((POLYNOM_ORDER - 1))
 
 struct ad7280_state {
struct spi_device   *spi;
@@ -388,7 +388,7 @@ static ssize_t ad7280_show_balance_sw(struct device *dev,
 
return sprintf(buf, "%d\n",
   !!(st->cb_mask[this_attr->address >> 8] &
-  (1 << ((this_attr->address & 0xFF) + 2;
+  BIT(((this_attr->address & 0xFF) + 2;
 }
 
 static ssize_t ad7280_store_balance_sw(struct device *dev,
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/2] Staging:iio:adc:Prefer using BIT macro

2016-02-07 Thread Bhumika Goyal
This patchset replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@ int g; @@ 
-(1 << g) 
+BIT(g)

Bhumika Goyal (2):
  Staging:iio:Prefer using BIT macro
  Staging: iio: adc: Prefer using the BIT macro

 drivers/staging/iio/adc/ad7280a.c | 4 ++--
 drivers/staging/iio/adc/ad7816.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


patch "staging: sm750fb, fix typos" added to staging-next

2016-02-07 Thread gregkh

This is a note to let you know that I've just added the patch titled

staging: sm750fb, fix typos

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-next branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release
during the merge window.

If you have any questions about this process, please let me know.


>From fbb8c963573926bceb5c59e2a7d74e5ce7669e78 Mon Sep 17 00:00:00 2001
From: Matej Vasek 
Date: Mon, 25 Jan 2016 16:02:33 +0100
Subject: staging: sm750fb, fix typos

The code contained typos like "structur", "fointers", etc. Fix that.

No code change, only comments.

Signed-off-by: Matej Vasek 
Cc: Sudip Mukherjee 
Cc: Teddy Wang 
Cc: Greg Kroah-Hartman 
Cc: 
Cc: 
Signed-off-by: Jiri Slaby 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/sm750fb/ddk750_hwi2c.c  | 4 ++--
 drivers/staging/sm750fb/ddk750_mode.c   | 2 +-
 drivers/staging/sm750fb/ddk750_sii164.h | 5 -
 drivers/staging/sm750fb/sm750.c | 2 +-
 drivers/staging/sm750fb/sm750.h | 2 +-
 drivers/staging/sm750fb/sm750_accel.c   | 4 ++--
 drivers/staging/sm750fb/sm750_accel.h   | 2 +-
 drivers/staging/sm750fb/sm750_hw.c  | 2 +-
 8 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.c 
b/drivers/staging/sm750fb/ddk750_hwi2c.c
index b824681e55a7..40253bd8cf2a 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.c
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.c
@@ -127,7 +127,7 @@ static unsigned int hw_i2c_write_data(
if (hw_i2c_wait_tx_done() != 0)
break;
 
-   /* Substract length */
+   /* Subtract length */
length -= (count + 1);
 
/* Total byte written */
@@ -194,7 +194,7 @@ static unsigned int hw_i2c_read_data(
for (i = 0; i <= count; i++)
*buf++ = PEEK32(I2C_DATA0 + i);
 
-   /* Substract length by 16 */
+   /* Subtract length by 16 */
length -= (count + 1);
 
/* Number of bytes read. */
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index 0fd34fa93a41..d0e3935654ff 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -42,7 +42,7 @@ static unsigned long 
displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
dispControl &= FIELD_CLEAR(CRT_DISPLAY_CTRL, CLK);
 
/* Set bit 29:27 of display control register for the right clock */
-   /* Note that SM750LE only need to supported 7 resoluitons. */
+   /* Note that SM750LE only need to supported 7 resolutions. */
if (x == 800 && y == 600)
dispControl = FIELD_SET(dispControl, CRT_DISPLAY_CTRL, CLK, 
PLL41);
else if (x == 1024 && y == 768)
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h 
b/drivers/staging/sm750fb/ddk750_sii164.h
index f2610c90eeb4..664ad089f753 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -39,7 +39,10 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller 
chip */
+/*
+ * below register definition is used for
+ * Silicon Image SiI164 DVI controller chip
+ */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 2ae2a522136f..c9d4871cd62d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -319,7 +319,7 @@ static int lynxfb_ops_set_par(struct fb_info *info)
var = >var;
fix = >fix;
 
-   /* fix structur is not so FIX ... */
+   /* fix structure is not so FIX ... */
line_length = var->xres_virtual * var->bits_per_pixel / 8;
line_length = ALIGN(line_length, crtc->line_pad);
fix->line_length = line_length;
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index fddffac6930f..8e70ce0d6da4 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -53,7 +53,7 @@ struct lynx_accel {
/* base virtual address of de data port */
volatile unsigned char __iomem *dpPortBase;
 
-   /* function fointers */
+   /* function pointers */
void (*de_init)(struct lynx_accel *);
 
int (*de_wait)(void);/* see if hardware ready to work */
diff --git a/drivers/staging/sm750fb/sm750_accel.c 

Re: drivres/hv

2016-02-07 Thread Greg KH
On Mon, Nov 30, 2015 at 01:15:32PM -0800, K. Y. Srinivasan wrote:
>  
> Greg, over the last month or more we have sent numerous Hyper-V patches and
> these are yet to be comitted (all review comments have been addressed
> for these patches). Please let me know if I should resend these patches.

All should now be applied.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCHv2] staging: dgnc: convert to wait_event_interruptible_timeout

2016-02-07 Thread Gujulan Elango, Hari Prasath (H.)
From: Hari Prasath Gujulan Elango 

This patch makes use of wait_event_interruptible_timeout to achieve
timeout functionality.This is a TODO mentiond in the comment which is also
removed.It also aligns with what the function is supposed to do as in the
comments.

Signed-off-by: Hari Prasath Gujulan Elango 
---
v2: Patch introduced checkpatch warning on the 80 character
limit & it was pointed out by Greg.Hence resubmitting
---
 drivers/staging/dgnc/dgnc_neo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 39c76e7..ee3155b 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1306,10 +1306,10 @@ static int neo_drain(struct tty_struct *tty, uint 
seconds)
/*
 * Go to sleep waiting for the tty layer to wake me back up when
 * the empty flag goes away.
-*
-* NOTE: TODO: Do something with time passed in.
 */
-   rc = wait_event_interruptible(un->un_flags_wait, ((un->un_flags & 
UN_EMPTY) == 0));
+   rc = wait_event_interruptible_timeout(un->un_flags_wait,
+ ((un->un_flags & UN_EMPTY) == 0),
+ msecs_to_jiffies(seconds * 1000));
 
/* If ret is non-zero, user ctrl-c'ed us */
return rc;
-- 
1.9.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel