[PATCH] iio:meter:ade7759: Removing use of deprecated macros

2017-03-29 Thread Chen Guanqiao
Removing use of deprecated macros(S_IRUGO, SIWUGO, S_IXUGO), and replaced with 
4 gidit octal.

Signed-off-by: Chen Guanqiao 
---
 drivers/staging/iio/meter/ade7759.c | 26 ++
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/iio/meter/ade7759.c 
b/drivers/staging/iio/meter/ade7759.c
index 0b65f1847510..dbd106f28cb7 100644
--- a/drivers/staging/iio/meter/ade7759.c
+++ b/drivers/staging/iio/meter/ade7759.c
@@ -279,49 +279,51 @@ static int ade7759_reset(struct device *dev)
 }

 static IIO_DEV_ATTR_AENERGY(ade7759_read_40bit, ADE7759_AENERGY);
-static IIO_DEV_ATTR_CFDEN(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_CFDEN(0644,
ade7759_read_16bit,
ade7759_write_16bit,
ADE7759_CFDEN);
-static IIO_DEV_ATTR_CFNUM(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_CFNUM(0644,
ade7759_read_8bit,
ade7759_write_8bit,
ADE7759_CFNUM);
 static IIO_DEV_ATTR_CHKSUM(ade7759_read_8bit, ADE7759_CHKSUM);
-static IIO_DEV_ATTR_PHCAL(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_PHCAL(0644,
ade7759_read_16bit,
ade7759_write_16bit,
ADE7759_PHCAL);
-static IIO_DEV_ATTR_APOS(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_APOS(0644,
ade7759_read_16bit,
ade7759_write_16bit,
ADE7759_APOS);
-static IIO_DEV_ATTR_SAGCYC(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_SAGCYC(0644,
ade7759_read_8bit,
ade7759_write_8bit,
ADE7759_SAGCYC);
-static IIO_DEV_ATTR_SAGLVL(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_SAGLVL(0644,
ade7759_read_8bit,
ade7759_write_8bit,
ADE7759_SAGLVL);
-static IIO_DEV_ATTR_LINECYC(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_LINECYC(0644,
ade7759_read_8bit,
ade7759_write_8bit,
ADE7759_LINECYC);
 static IIO_DEV_ATTR_LENERGY(ade7759_read_40bit, ADE7759_LENERGY);
-static IIO_DEV_ATTR_PGA_GAIN(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_PGA_GAIN(0644,
ade7759_read_8bit,
ade7759_write_8bit,
ADE7759_GAIN);
-static IIO_DEV_ATTR_ACTIVE_POWER_GAIN(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_ACTIVE_POWER_GAIN(0644,
ade7759_read_16bit,
ade7759_write_16bit,
ADE7759_APGAIN);
-static IIO_DEV_ATTR_CH_OFF(1, S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_CH_OFF(
+   1, 0644,
ade7759_read_8bit,
ade7759_write_8bit,
ADE7759_CH1OS);
-static IIO_DEV_ATTR_CH_OFF(2, S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_CH_OFF(
+   2, 0644,
ade7759_read_8bit,
ade7759_write_8bit,
ADE7759_CH2OS);
@@ -458,7 +460,7 @@ static IIO_DEV_ATTR_TEMP_RAW(ade7759_read_8bit);
 static IIO_CONST_ATTR(in_temp_offset, "70 C");
 static IIO_CONST_ATTR(in_temp_scale, "1 C");

-static IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO,
+static IIO_DEV_ATTR_SAMP_FREQ(0644,
ade7759_read_frequency,
ade7759_write_frequency);

--
2.11.0


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


[PATCH 2/2] staging: atomisp: use local variable to reduce the number of reference

2017-03-29 Thread Daeseok Youn
Define new local variable to reduce the number of reference.
The new local variable is added to save the addess of dfs
and used in atomisp_freq_scaling() function.

Signed-off-by: Daeseok Youn 
---
 .../media/atomisp/pci/atomisp2/atomisp_cmd.c   | 37 --
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c 
b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
index eebfccd..d76a95c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
@@ -251,6 +251,7 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
 {
/* FIXME! Only use subdev[0] status yet */
struct atomisp_sub_device *asd = &isp->asd[0];
+   const struct atomisp_dfs_config *dfs;
unsigned int new_freq;
struct atomisp_freq_scaling_rule curr_rules;
int i, ret;
@@ -268,20 +269,22 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
ATOMISP_USE_YUVPP(asd))
isp->dfs = &dfs_config_cht_soc;
 
-   if (isp->dfs->lowest_freq == 0 || isp->dfs->max_freq_at_vmin == 0 ||
-   isp->dfs->highest_freq == 0 || isp->dfs->dfs_table_size == 0 ||
-   !isp->dfs->dfs_table) {
+   dfs = isp->dfs;
+
+   if (dfs->lowest_freq == 0 || dfs->max_freq_at_vmin == 0 ||
+   dfs->highest_freq == 0 || dfs->dfs_table_size == 0 ||
+   !dfs->dfs_table) {
dev_err(isp->dev, "DFS configuration is invalid.\n");
return -EINVAL;
}
 
if (mode == ATOMISP_DFS_MODE_LOW) {
-   new_freq = isp->dfs->lowest_freq;
+   new_freq = dfs->lowest_freq;
goto done;
}
 
if (mode == ATOMISP_DFS_MODE_MAX) {
-   new_freq = isp->dfs->highest_freq;
+   new_freq = dfs->highest_freq;
goto done;
}
 
@@ -307,26 +310,26 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
}
 
/* search for the target frequency by looping freq rules*/
-   for (i = 0; i < isp->dfs->dfs_table_size; i++) {
-   if (curr_rules.width != isp->dfs->dfs_table[i].width &&
-   isp->dfs->dfs_table[i].width != ISP_FREQ_RULE_ANY)
+   for (i = 0; i < dfs->dfs_table_size; i++) {
+   if (curr_rules.width != dfs->dfs_table[i].width &&
+   dfs->dfs_table[i].width != ISP_FREQ_RULE_ANY)
continue;
-   if (curr_rules.height != isp->dfs->dfs_table[i].height &&
-   isp->dfs->dfs_table[i].height != ISP_FREQ_RULE_ANY)
+   if (curr_rules.height != dfs->dfs_table[i].height &&
+   dfs->dfs_table[i].height != ISP_FREQ_RULE_ANY)
continue;
-   if (curr_rules.fps != isp->dfs->dfs_table[i].fps &&
-   isp->dfs->dfs_table[i].fps != ISP_FREQ_RULE_ANY)
+   if (curr_rules.fps != dfs->dfs_table[i].fps &&
+   dfs->dfs_table[i].fps != ISP_FREQ_RULE_ANY)
continue;
-   if (curr_rules.run_mode != isp->dfs->dfs_table[i].run_mode &&
-   isp->dfs->dfs_table[i].run_mode != ISP_FREQ_RULE_ANY)
+   if (curr_rules.run_mode != dfs->dfs_table[i].run_mode &&
+   dfs->dfs_table[i].run_mode != ISP_FREQ_RULE_ANY)
continue;
break;
}
 
-   if (i == isp->dfs->dfs_table_size)
-   new_freq = isp->dfs->max_freq_at_vmin;
+   if (i == dfs->dfs_table_size)
+   new_freq = dfs->max_freq_at_vmin;
else
-   new_freq = isp->dfs->dfs_table[i].isp_freq;
+   new_freq = dfs->dfs_table[i].isp_freq;
 
 done:
dev_dbg(isp->dev, "DFS target frequency=%d.\n", new_freq);
-- 
1.9.1

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


[PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-29 Thread Daeseok Youn
The condition line in if-statement is needed to be shorthen to
improve readability.

Signed-off-by: Daeseok Youn 
---
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c 
b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
index 94bc793..eebfccd 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
@@ -255,14 +255,17 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
struct atomisp_freq_scaling_rule curr_rules;
int i, ret;
unsigned short fps = 0;
+   unsigned short masked_dev = 0;
 
if (isp->sw_contex.power_state != ATOM_ISP_POWER_UP) {
dev_err(isp->dev, "DFS cannot proceed due to no power.\n");
return -EINVAL;
}
 
-   if ((isp->pdev->device & ATOMISP_PCI_DEVICE_SOC_MASK) ==
-   ATOMISP_PCI_DEVICE_SOC_CHT && ATOMISP_USE_YUVPP(asd))
+   masked_dev = isp->pdev->device & ATOMISP_PCI_DEVICE_SOC_MASK;
+
+   if (masked_dev == ATOMISP_PCI_DEVICE_SOC_CHT &&
+   ATOMISP_USE_YUVPP(asd))
isp->dfs = &dfs_config_cht_soc;
 
if (isp->dfs->lowest_freq == 0 || isp->dfs->max_freq_at_vmin == 0 ||
-- 
1.9.1

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


[PATCH] staging:iio:accel:adis16029 fixed checkpatch issue - drop braces around single if statement

2017-03-29 Thread Andrea della Porta
Fixed the followinf checkpatch warning:
WARNING: braces {} are not necessary for single statement blocks
#258: FILE: drivers/staging/iio/accel/adis16209.c:258:
+   if (ret) {
+   return ret;
+   }

Signed-off-by: Andrea della Porta 
---
 drivers/staging/iio/accel/adis16209.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/accel/adis16209.c 
b/drivers/staging/iio/accel/adis16209.c
index 52fa2e0..159a687 100644
--- a/drivers/staging/iio/accel/adis16209.c
+++ b/drivers/staging/iio/accel/adis16209.c
@@ -255,9 +255,9 @@ static int adis16209_read_raw(struct iio_dev *indio_dev,
}
addr = adis16209_addresses[chan->scan_index][0];
ret = adis_read_reg_16(st, addr, &val16);
-   if (ret) {
+   if (ret)
return ret;
-   }
+
val16 &= (1 << bits) - 1;
val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
*val = val16;
-- 
2.4.10

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


Re: [PATCH 1/1] drivers: staging: fbtft: Hush Checkpatch.pl Error about unnecessary whitespace and comma

2017-03-29 Thread kbuild test robot
Hi Vaibhav,

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.11-rc4 next-20170329]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/vaibhavddit-gmail-com/drivers-staging-fbtft-Hush-Checkpatch-pl-Error-about-unnecessary-whitespace-and-comma/20170330-063109
config: x86_64-randconfig-x009-201713 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers/staging/fbtft/fbtft-bus.c:59:49: error: macro 
>> "define_fbtft_write_reg" requires 3 arguments, but only 2 given
define_fbtft_write_reg(fbtft_write_reg8_bus8, u8)
^
>> drivers/staging/fbtft/fbtft-bus.c:14:1: error: expected '=', ',', ';', 'asm' 
>> or '__attribute__' before 'void'
void func(struct fbtft_par *par, int len, ...)  
  \
^
   drivers/staging/fbtft/fbtft-bus.c:60:1: note: in expansion of macro 
'define_fbtft_write_reg'
define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16)
^~
   drivers/staging/fbtft/fbtft-bus.c:61:52: error: macro 
"define_fbtft_write_reg" requires 3 arguments, but only 2 given
define_fbtft_write_reg(fbtft_write_reg16_bus16, u16)
   ^
   drivers/staging/fbtft/fbtft-bus.c:63:1: error: expected '=', ',', ';', 'asm' 
or '__attribute__' before 'void'
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
^~~~

vim +/define_fbtft_write_reg +59 drivers/staging/fbtft/fbtft-bus.c

 8   *
 9   *   void (*write_reg)(struct fbtft_par *par, int len, ...);
10   *
11   
*/
12  
13  #define define_fbtft_write_reg(func, type, modifier)
  \
  > 14  void func(struct fbtft_par *par, int len, ...)  
  \
15  {   
  \
16  va_list args;   
  \
17  int i, ret; 
  \
18  int offset = 0; 
  \
19  type *buf = (type *)par->buf;   
  \
20  
  \
21  if (unlikely(par->debug & DEBUG_WRITE_REGISTER)) {  
  \
22  va_start(args, len);
  \
23  for (i = 0; i < len; i++) { 
  \
24  buf[i] = (type)va_arg(args, unsigned int);  
  \
25  }   
  \
26  va_end(args);   
  \
27  fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, 
par->info->device, type, buf, len, "%s: ", __func__);   \
28  }   
  \
29  
  \
30  va_start(args, len);
  \
31  
  \
32  if (par->startbyte) {   
  \
33  *(u8 *)par->buf = par->startbyte;   
  \
34  buf = (type *)(par->buf + 1);   
  \
35  offset = 1; 
  \
36  }   
  \
37  
  \
38  *buf = modifier((type)va_arg(args, unsigned int));  
  \
39  ret = fbtft_write_buf_dc(par, par->buf, sizeof(type) + offset, 
0);\
40  if (ret < 0)
  \
41  goto out;   
  \
42  len--;  
  \
43 

Re: [PATCH] coding style issue resolved

2017-03-29 Thread Jonathan Cameron
On 28/03/17 13:01, Andrea della Porta wrote:
> Coding style issue resolved.
> 
> Signed-off-by: Andrea della Porta 
Please include the driver name in the title. Subsystem also good.
staging:iio:accel:adis16029 drop braces around single element if block

or something along those lines would be good.
> ---
>  drivers/staging/iio/accel/adis16209.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index 52fa2e0..159a687 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -255,9 +255,9 @@ static int adis16209_read_raw(struct iio_dev *indio_dev,
>   }
>   addr = adis16209_addresses[chan->scan_index][0];
>   ret = adis_read_reg_16(st, addr, &val16);
> - if (ret) {
> + if (ret)
>   return ret;
> - }
> +
>   val16 &= (1 << bits) - 1;
>   val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
>   *val = val16;
> 

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


Re: [RFC] staging: iio: ad7759: Replace mlock with driver private buf_lock

2017-03-29 Thread Jonathan Cameron
On 28/03/17 18:37, Arushi Singhal wrote:
> The IIO subsystem is redefining iio_dev->mlock to be used by
> the IIO core only for protecting device operating mode changes.
> ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes.
> 
> In this driver, mlock was being used to protect hardware state
> changes.  Replace it with a buf_lock in the devices global data.
> 
> Signed-off-by: Arushi Singhal 
Rule 1 of an RFC.  Explain why it is an RFC rather than simply a
patch.  What needs comment here in particular?

One thing that needs doing is a documentation update to reflect
the additional elements buf_lock is now protecting.

I think the use is sensible and can't otherwise see any issue with
this patch.

Thanks,

Jonathan
> ---

>  drivers/staging/iio/meter/ade7759.c | 9 ++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/meter/ade7759.c 
> b/drivers/staging/iio/meter/ade7759.c
> index 0b65f1847510..514a4f6bb8f9 100644
> --- a/drivers/staging/iio/meter/ade7759.c
> +++ b/drivers/staging/iio/meter/ade7759.c
> @@ -429,7 +429,7 @@ static ssize_t ade7759_write_frequency(struct device *dev,
>   if (!val)
>   return -EINVAL;
>  
> - mutex_lock(&indio_dev->mlock);
> + mutex_lock(&st->buf_lock);
>  
>   t = 27900 / val;
>   if (t > 0)
> @@ -447,10 +447,13 @@ static ssize_t ade7759_write_frequency(struct device 
> *dev,
>   reg &= ~(3 << 13);
>   reg |= t << 13;
>  
> - ret = ade7759_spi_write_reg_16(dev, ADE7759_MODE, reg);
> + st->tx[0] = ADE7754_WRITE_REG(ADE7754_WAVMODE);
> + st->tx[1] = reg;
> +
> + ret = spi_write(st->us, st->tx, 2);
>  
>  out:
> - mutex_unlock(&indio_dev->mlock);
> + mutex_unlock(&st->buf_lock);
>  
>   return ret ? ret : len;
>  }
> 

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


[PATCH v2] staging: atomisp: avoid false-positive maybe-uninitialized warning

2017-03-29 Thread Arnd Bergmann
In combination with CONFIG_PROFILE_ANNOTATED_BRANCHES=y, the unlikely()
inside of the WARN() macro becomes too complex for gcc to see that
we don't use the output arguments of mt9m114_to_res() are used
correctly:

drivers/staging/media/atomisp/i2c/mt9m114.c: In function 'mt9m114_get_fmt':
drivers/staging/media/atomisp/i2c/mt9m114.c:817:13: error: 'height' may be used 
uninitialized in this function [-Werror=maybe-uninitialized]
  int width, height;
 ^~
drivers/staging/media/atomisp/i2c/mt9m114.c: In function 
'mt9m114_s_exposure_selection':
drivers/staging/media/atomisp/i2c/mt9m114.c:1179:13: error: 'height' may be 
used uninitialized in this function [-Werror=maybe-uninitialized]

Without WARN_ON(), there is no problem, so by simply replacing it with
v4l2_err(), the warnings go away. The WARN() output is also not needed
here, as we'd probably catch the problem before even getting here,
and other checks for the same condition already use v4l2_err.

Signed-off-by: Arnd Bergmann 
---
v2: fix new build regression found by 0day kbuild bot
---
 drivers/staging/media/atomisp/i2c/mt9m114.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/mt9m114.c 
b/drivers/staging/media/atomisp/i2c/mt9m114.c
index c4f4c888a59a..ced175c268d1 100644
--- a/drivers/staging/media/atomisp/i2c/mt9m114.c
+++ b/drivers/staging/media/atomisp/i2c/mt9m114.c
@@ -689,12 +689,13 @@ static struct mt9m114_res_struct *mt9m114_to_res(u32 w, 
u32 h)
return &mt9m114_res[index];
 }
 
-static int mt9m114_res2size(unsigned int res, int *h_size, int *v_size)
+static int mt9m114_res2size(struct v4l2_subdev *sd, int *h_size, int *v_size)
 {
+   struct mt9m114_device *dev = to_mt9m114_sensor(sd);
unsigned short hsize;
unsigned short vsize;
 
-   switch (res) {
+   switch (dev->res) {
case MT9M114_RES_736P:
hsize = MT9M114_RES_736P_SIZE_H;
vsize = MT9M114_RES_736P_SIZE_V;
@@ -708,7 +709,8 @@ static int mt9m114_res2size(unsigned int res, int *h_size, 
int *v_size)
vsize = MT9M114_RES_960P_SIZE_V;
break;
default:
-   WARN(1, "%s: Resolution 0x%08x unknown\n", __func__, res);
+   v4l2_err(sd, "%s: Resolution 0x%08x unknown\n", __func__,
+dev->res);
return -EINVAL;
}
 
@@ -812,15 +814,14 @@ static int mt9m114_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *format)
 {
-struct v4l2_mbus_framefmt *fmt = &format->format;
-   struct mt9m114_device *dev = to_mt9m114_sensor(sd);
+   struct v4l2_mbus_framefmt *fmt = &format->format;
int width, height;
int ret;
if (format->pad)
return -EINVAL;
fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
 
-   ret = mt9m114_res2size(dev->res, &width, &height);
+   ret = mt9m114_res2size(sd, &width, &height);
if (ret)
return ret;
fmt->width = width;
@@ -1174,7 +1175,6 @@ static int mt9m114_s_exposure_selection(struct 
v4l2_subdev *sd,
struct v4l2_subdev_selection *sel)
 {
struct i2c_client *client = v4l2_get_subdevdata(sd);
-   struct mt9m114_device *dev = to_mt9m114_sensor(sd);
struct misensor_reg exp_reg;
int width, height;
int grid_width, grid_height;
@@ -1192,7 +1192,7 @@ static int mt9m114_s_exposure_selection(struct 
v4l2_subdev *sd,
grid_right = sel->r.left + sel->r.width - 1;
grid_bottom = sel->r.top + sel->r.height - 1;
 
-   ret = mt9m114_res2size(dev->res, &width, &height);
+   ret = mt9m114_res2size(sd, &width, &height);
if (ret)
return ret;
 
-- 
2.9.0

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


[PATCH] staging: goldfish: Add parenthesis around macros arguments

2017-03-29 Thread aviyae
Fix style issues by adding parenthesis around macros
arguments

Signed-off-by: Aviya Erenfeld 
---
 drivers/staging/goldfish/goldfish_audio.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/goldfish/goldfish_audio.c 
b/drivers/staging/goldfish/goldfish_audio.c
index bd55995..2bb1f27 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -61,10 +61,11 @@ struct goldfish_audio {
 #define COMBINED_BUFFER_SIZE((2 * READ_BUFFER_SIZE) + \
(2 * WRITE_BUFFER_SIZE))

-#define AUDIO_READ(data, addr) (readl(data->reg_base + addr))
-#define AUDIO_WRITE(data, addr, x) (writel(x, data->reg_base + addr))
+#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
-- 
2.7.4

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


[PATCH v2] staging: comedi: labpc: fix isadma dependency

2017-03-29 Thread Arnd Bergmann
When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable
module, thhe ISA DMA code is not reachable by the common module, causing
a link error:

drivers/staging/built-in.o: In function `labpc_interrupt':
ni_labpc_common.c:(.text+0x1d178): undefined reference to 
`labpc_handle_dma_status'
ni_labpc_common.c:(.text+0x1d1cb): undefined reference to `labpc_drain_dma'
drivers/staging/built-in.o: In function `labpc_ai_cmd':
ni_labpc_common.c:(.text+0x1d8ad): undefined reference to `labpc_setup_dma'

This changes the definition of COMEDI_NI_LABPC_ISADMA so that it will
also be builtin for that case. This looks like a rather old bug, but
I have never seen this in randconfig testing until today.

Signed-off-by: Arnd Bergmann 
---
 drivers/staging/comedi/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

v2: fix typo from first version, forgot to amend the patch after successfully
testing until I had sent it out.

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 6079c23237d5..7a655ed071a3 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -505,7 +505,6 @@ config COMEDI_NI_ATMIO16D
 config COMEDI_NI_LABPC_ISA
tristate "NI Lab-PC and compatibles ISA support"
select COMEDI_NI_LABPC
-   select COMEDI_NI_LABPC_ISADMA if ISA_DMA_API
---help---
  Enable support for National Instruments Lab-PC and compatibles
  Lab-PC-1200, Lab-PC-1200AI, Lab-PC+.
@@ -1315,6 +1314,9 @@ config COMEDI_NI_LABPC
 
 config COMEDI_NI_LABPC_ISADMA
tristate
+   default COMEDI_NI_LABPC
+   depends on COMEDI_NI_LABPC_ISA != n
+   depends on ISA_DMA_API
select COMEDI_ISADMA
 
 config COMEDI_NI_TIO
-- 
2.9.0

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


[PATCH] staging: comedi: labpc: fix isadma dependency

2017-03-29 Thread Arnd Bergmann
When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable
module, thhe ISA DMA code is not reachable by the common module, causing
a link error:

drivers/staging/built-in.o: In function `labpc_interrupt':
ni_labpc_common.c:(.text+0x1d178): undefined reference to 
`labpc_handle_dma_status'
ni_labpc_common.c:(.text+0x1d1cb): undefined reference to `labpc_drain_dma'
drivers/staging/built-in.o: In function `labpc_ai_cmd':
ni_labpc_common.c:(.text+0x1d8ad): undefined reference to `labpc_setup_dma'

This changes the definition of COMEDI_NI_LABPC_ISADMA so that it will
also be builtin for that case. This looks like a rather old bug, but
I have never seen this in randconfig testing until today.

Signed-off-by: Arnd Bergmann 
---
 drivers/staging/comedi/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 6079c23237d5..7b4b42572f31 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -505,7 +505,6 @@ config COMEDI_NI_ATMIO16D
 config COMEDI_NI_LABPC_ISA
tristate "NI Lab-PC and compatibles ISA support"
select COMEDI_NI_LABPC
-   select COMEDI_NI_LABPC_ISADMA if ISA_DMA_API
---help---
  Enable support for National Instruments Lab-PC and compatibles
  Lab-PC-1200, Lab-PC-1200AI, Lab-PC+.
@@ -1315,6 +1314,9 @@ config COMEDI_NI_LABPC
 
 config COMEDI_NI_LABPC_ISADMA
tristate
+   default COMEDI_NI_LABPC
+   depends on COMEDI_NI_LABPC_ISADMA != n
+   depends on ISA_DMA_API
select COMEDI_ISADMA
 
 config COMEDI_NI_TIO
-- 
2.9.0

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


Re: [Outreachy kernel] [PATCH v2] staging: iio: Remove unneeded parentheses.

2017-03-29 Thread Julia Lawall


On Wed, 29 Mar 2017, Arushi Singhal wrote:

> Remove the extra parenthesis remove the checkpatch issue.

The patch replaces 1 << x by calls to BIT.  That doesn't correspond to the
commit message.

julia

>
> Signed-off-by: Arushi Singhal 
> ---
> changes in v2
>  -done the changes according to the current tree
>
>  drivers/staging/iio/cdc/ad7746.c | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/iio/cdc/ad7746.c 
> b/drivers/staging/iio/cdc/ad7746.c
> index c2c8aa5585e4..7fa9913386f5 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -45,10 +45,10 @@
>  #define AD7746_STATUS_RDYCAP BIT(0)
>
>  /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) 
> */
> -#define AD7746_CAPSETUP_CAPEN(1 << 7)
> -#define AD7746_CAPSETUP_CIN2 (1 << 6) /* AD7746 only */
> -#define AD7746_CAPSETUP_CAPDIFF  (1 << 5)
> -#define AD7746_CAPSETUP_CACHOP   (1 << 0)
> +#define AD7746_CAPSETUP_CAPENBIT(7)
> +#define AD7746_CAPSETUP_CIN2 BIT(6) /* AD7746 only */
> +#define AD7746_CAPSETUP_CAPDIFF  BIT(5)
> +#define AD7746_CAPSETUP_CACHOP   BIT(0)
>
>  /* Voltage/Temperature Setup Register Bit Designations (AD7746_REG_VT_SETUP) 
> */
>  #define AD7746_VTSETUP_VTEN  (1 << 7)
> @@ -56,9 +56,9 @@
>  #define AD7746_VTSETUP_VTMD_EXT_TEMP (1 << 5)
>  #define AD7746_VTSETUP_VTMD_VDD_MON  (2 << 5)
>  #define AD7746_VTSETUP_VTMD_EXT_VIN  (3 << 5)
> -#define AD7746_VTSETUP_EXTREF(1 << 4)
> -#define AD7746_VTSETUP_VTSHORT   (1 << 1)
> -#define AD7746_VTSETUP_VTCHOP(1 << 0)
> +#define AD7746_VTSETUP_EXTREFBIT(4)
> +#define AD7746_VTSETUP_VTSHORT   BIT(1)
> +#define AD7746_VTSETUP_VTCHOPBIT(0)
>
>  /* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
>  #define AD7746_EXCSETUP_CLKCTRL  BIT(7)
> @@ -82,7 +82,7 @@
>  #define AD7746_CONF_MODE_GAIN_CAL(6 << 0)
>
>  /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
> -#define AD7746_CAPDAC_DACEN  (1 << 7)
> +#define AD7746_CAPDAC_DACEN  BIT(7)
>  #define AD7746_CAPDAC_DACP(x)((x) & 0x7F)
>
>  /*
> --
> 2.11.0
>
> --
> You received this message because you are subscribed to the Google Groups 
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to outreachy-kernel+unsubscr...@googlegroups.com.
> To post to this group, send email to outreachy-ker...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/outreachy-kernel/20170329160551.GA7230%40arushi-HP-Pavilion-Notebook.
> For more options, visit https://groups.google.com/d/optout.
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: rtl8188eu: Macros with complex values should be enclosed in parentheses

2017-03-29 Thread Alfonso Lima Astor
This macro is not used and also had a style error. I have run
grep and compiled the module to be sure.

Signed-off-by: Alfonso Lima Astor 
---
 drivers/staging/rtl8188eu/include/rtw_ioctl.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
index a6b1c85..0fa78ed 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
@@ -58,12 +58,6 @@
 #define OID_MP_SEG30xFF818700
 #define OID_MP_SEG40xFF011100
 
-#define DEBUG_OID(dbg, str)\
-   if ((!dbg)) {   \
-   RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_,  \
-("%s(%d): %s", __func__, __line__, str));  \
-   }
-
 enum oid_type {
QUERY_OID,
SET_OID
-- 
2.7.4

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


[PATCH 21/22] docs-rst: fix usb cross-references

2017-03-29 Thread Mauro Carvalho Chehab
As some USB documentation files got moved, adjust their
cross-references to their new place.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/ABI/stable/sysfs-bus-usb| 2 +-
 Documentation/driver-api/usb/URB.rst  | 2 ++
 Documentation/driver-api/usb/callbacks.rst| 4 ++--
 Documentation/driver-api/usb/error-codes.rst  | 2 ++
 Documentation/driver-api/usb/persist.rst  | 2 ++
 Documentation/driver-api/usb/power-management.rst | 2 +-
 Documentation/driver-api/usb/usb.rst  | 4 ++--
 Documentation/power/swsusp.txt| 2 +-
 drivers/staging/most/hdm-usb/hdm_usb.c| 2 +-
 drivers/usb/core/Kconfig  | 2 +-
 10 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/Documentation/ABI/stable/sysfs-bus-usb 
b/Documentation/ABI/stable/sysfs-bus-usb
index 831f15d9672f..b832eeff 100644
--- a/Documentation/ABI/stable/sysfs-bus-usb
+++ b/Documentation/ABI/stable/sysfs-bus-usb
@@ -9,7 +9,7 @@ Description:
hubs this facility is always enabled and their device
directories will not contain this file.
 
-   For more information, see Documentation/usb/persist.txt.
+   For more information, see 
Documentation/driver-api/usb/persist.rst.
 
 What:  /sys/bus/usb/devices/.../power/autosuspend
 Date:  March 2007
diff --git a/Documentation/driver-api/usb/URB.rst 
b/Documentation/driver-api/usb/URB.rst
index c5d2b68b4dae..d9ea6a3996e7 100644
--- a/Documentation/driver-api/usb/URB.rst
+++ b/Documentation/driver-api/usb/URB.rst
@@ -1,3 +1,5 @@
+.. _usb-urb:
+
 USB Request Block (URB)
 ~~~
 
diff --git a/Documentation/driver-api/usb/callbacks.rst 
b/Documentation/driver-api/usb/callbacks.rst
index 93a8d53e27e7..2b80cf54bcc3 100644
--- a/Documentation/driver-api/usb/callbacks.rst
+++ b/Documentation/driver-api/usb/callbacks.rst
@@ -8,7 +8,7 @@ Usbcore will call into a driver through callbacks defined in 
the driver
 structure and through the completion handler of URBs a driver submits.
 Only the former are in the scope of this document. These two kinds of
 callbacks are completely independent of each other. Information on the
-completion callback can be found in Documentation/usb/URB.txt.
+completion callback can be found in :ref:`usb-urb`.
 
 The callbacks defined in the driver structure are:
 
@@ -53,7 +53,7 @@ The callbacks defined in the driver structure are:
 
 The ioctl interface (2) should be used only if you have a very good
 reason. Sysfs is preferred these days. The PM callbacks are covered
-separately in Documentation/usb/power-management.txt.
+separately in :ref:`usb-power-management`.
 
 Calling conventions
 ===
diff --git a/Documentation/driver-api/usb/error-codes.rst 
b/Documentation/driver-api/usb/error-codes.rst
index 715cc35b29b0..5bc5eda58520 100644
--- a/Documentation/driver-api/usb/error-codes.rst
+++ b/Documentation/driver-api/usb/error-codes.rst
@@ -1,3 +1,5 @@
+.. _usb-error-codes:
+
 USB Error codes
 ~~~
 
diff --git a/Documentation/driver-api/usb/persist.rst 
b/Documentation/driver-api/usb/persist.rst
index af02baf61f57..8ee2a62d889b 100644
--- a/Documentation/driver-api/usb/persist.rst
+++ b/Documentation/driver-api/usb/persist.rst
@@ -1,3 +1,5 @@
+.. _usb-persist:
+
 USB device persistence during system suspend
 
 
diff --git a/Documentation/driver-api/usb/power-management.rst 
b/Documentation/driver-api/usb/power-management.rst
index 7c547d6b8372..3e4ebbf47b76 100644
--- a/Documentation/driver-api/usb/power-management.rst
+++ b/Documentation/driver-api/usb/power-management.rst
@@ -329,7 +329,7 @@ possible to work around the hibernation-forces-disconnect 
problem by
 using the USB Persist facility.)
 
 The ``reset_resume`` method is used by the USB Persist facility (see
-``Documentation/usb/persist.txt``) and it can also be used under certain
+:ref:`usb-persist`) and it can also be used under certain
 circumstances when ``CONFIG_USB_PERSIST`` is not enabled.  Currently, if a
 device is reset during a resume and the driver does not have a
 ``reset_resume`` method, the driver won't receive any notification about
diff --git a/Documentation/driver-api/usb/usb.rst 
b/Documentation/driver-api/usb/usb.rst
index 5ebaf669704c..6824089ef4c8 100644
--- a/Documentation/driver-api/usb/usb.rst
+++ b/Documentation/driver-api/usb/usb.rst
@@ -424,8 +424,8 @@ header.
 Unless noted otherwise, the ioctl requests described here will update
 the modification time on the usbfs file to which they are applied
 (unless they fail). A return of zero indicates success; otherwise, a
-standard USB error code is returned. (These are documented in
-``Documentation/usb/error-codes.txt`` in your kernel sources.)
+standard USB error code is returned (These are documented in
+:ref:`usb-error-codes`).
 
 Each of these files multiplexes access to several I/O streams, 

[PATCH 3/3] fixed extra space coding issue

2017-03-29 Thread Andrea della Porta
Removed an extra spaces at the end of the line

Signed-off-by: Andrea della Porta 
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c 
b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
index f1ce5cf..451942a 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
@@ -539,7 +539,7 @@ int snd_bcm2835_new_spdif_pcm(struct bcm2835_chip *chip)
/* NOTE: this may fail */
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
  
snd_dma_continuous_data(GFP_KERNEL),
- 
snd_bcm2835_playback_spdif_hw.buffer_bytes_max, 
+ 
snd_bcm2835_playback_spdif_hw.buffer_bytes_max,
  
snd_bcm2835_playback_spdif_hw.buffer_bytes_max);
 out:
mutex_unlock(&chip->audio_mutex);
-- 
2.4.10

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


[PATCH 2/3] fixed codepatch coding style issue, line over 80

2017-03-29 Thread Andrea della Porta
Fixed issue:
WARNING: line over 80 characters
#545: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:545:
+   snd_bcm2835_playback_spdif_hw.buffer_bytes_max, 
snd_bcm2835_playback_spdif_hw.buffer_bytes_max);

Signed-off-by: Andrea della Porta 
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c 
b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
index fa6d3d2..f1ce5cf 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
@@ -539,7 +539,8 @@ int snd_bcm2835_new_spdif_pcm(struct bcm2835_chip *chip)
/* NOTE: this may fail */
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
  
snd_dma_continuous_data(GFP_KERNEL),
- 
snd_bcm2835_playback_spdif_hw.buffer_bytes_max, 
snd_bcm2835_playback_spdif_hw.buffer_bytes_max);
+ 
snd_bcm2835_playback_spdif_hw.buffer_bytes_max, 
+ 
snd_bcm2835_playback_spdif_hw.buffer_bytes_max);
 out:
mutex_unlock(&chip->audio_mutex);
audio_info(" .. OUT\n");
-- 
2.4.10

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


[PATCH 1/3] Fixed checkpatch warning about unaligned function params

2017-03-29 Thread Andrea della Porta
Fixed issues:
CHECK: Alignment should match open parenthesis
#71: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:71:
+   audio_info("alsa_stream=%p substream=%p\n", alsa_stream,
+   alsa_stream ? alsa_stream->substream : 0);

CHECK: Alignment should match open parenthesis
#262: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:262:
+static int snd_bcm2835_pcm_hw_params(struct snd_pcm_substream *substream,
+   struct snd_pcm_hw_params *params)

CHECK: Alignment should match open parenthesis
#315: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:315:
+   err = bcm2835_audio_set_params(alsa_stream, channels,
+   alsa_stream->params_rate,

CHECK: Alignment should match open parenthesis
#384: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:384:
+   audio_debug("bcm2835_AUDIO_TRIGGER_START running=%d\n",
+   alsa_stream->running);

CHECK: Alignment should match open parenthesis
#391: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:391:
+   bytes_to_frames(runtime,
+   alsa_stream->pos);

CHECK: Alignment should match open parenthesis
#436: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:436:
+   audio_debug("pcm_pointer... (%d) hwptr=%d appl=%d pos=%d\n", 0,
+   frames_to_bytes(runtime, runtime->status->hw_ptr),

CHECK: Alignment should match open parenthesis
#447: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:447:
+static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream,
+   unsigned int cmd, void *arg)

CHECK: Alignment should match open parenthesis
#452: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:452:
+   audio_info(" .. substream=%p, cmd=%d, arg=%p (%x) ret=%d\n", substream,
+   cmd, arg, arg ? *(unsigned *) arg : 0, ret);

CHECK: Alignment should match open parenthesis
#544: FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:544:
+   snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
+   snd_dma_continuous_data(GFP_KERNEL),

Signed-off-by: Andrea della Porta 
---
 .../vc04_services/bcm2835-audio/bcm2835-pcm.c  | 47 ++
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c 
b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
index 8bd69b9..fa6d3d2 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
@@ -68,7 +68,7 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream 
*alsa_stream)
audio_info(" .. IN\n");
 
audio_info("alsa_stream=%p substream=%p\n", alsa_stream,
-   alsa_stream ? alsa_stream->substream : 0);
+  alsa_stream ? alsa_stream->substream : 0);
 
if (alsa_stream->open)
consumed = bcm2835_audio_retrieve_buffers(alsa_stream);
@@ -83,10 +83,10 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream 
*alsa_stream)
new_period = 1;
}
audio_debug("updating pos cur: %d + %d max:%d period_bytes:%d, hw_ptr: 
%d new_period:%d\n",
-   alsa_stream->pos,
+   alsa_stream->pos,
consumed,
alsa_stream->buffer_size,
-   (int) (alsa_stream->period_size * 
alsa_stream->substream->runtime->periods),
+   (int)(alsa_stream->period_size * 
alsa_stream->substream->runtime->periods),
frames_to_bytes(alsa_stream->substream->runtime, 
alsa_stream->substream->runtime->status->hw_ptr),
new_period);
if (alsa_stream->buffer_size) {
@@ -229,6 +229,7 @@ static int snd_bcm2835_playback_close(struct 
snd_pcm_substream *substream)
 */
if (alsa_stream->running) {
int err;
+
err = bcm2835_audio_stop(alsa_stream);
alsa_stream->running = 0;
if (err)
@@ -259,7 +260,7 @@ static int snd_bcm2835_playback_close(struct 
snd_pcm_substream *substream)
 
 /* hw_params callback */
 static int snd_bcm2835_pcm_hw_params(struct snd_pcm_substream *substream,
-   struct snd_pcm_hw_params *params)
+struct snd_pcm_hw_params *params)
 {
struct snd_pcm_runtime *runtime = substream->runtime;
struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
@@ -312,18 +313,16 @@ static int snd_bcm2835_pcm_prepare(struct 
snd_pcm_substream *substream)
channels = alsa_stream->channels;
 
err = bcm2835_audio_set_params(alsa_stream, channels,
-   alsa_stream->params_rate,
-   alsa_stream->pcm_format_width);
+  alsa_stream->params_rate,
+

staging: vc04_services: bcm2835-audio Fixed checkpatch issues

2017-03-29 Thread Andrea della Porta
Fixed several chekpatch warnign about alignment of function parameters,
removed spaces after a cast, split one line that was over 80 chars

 .../vc04_services/bcm2835-audio/bcm2835-pcm.c  | 48 +++---
 1 file changed, 23 insertions(+), 25 deletions(-)

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


[PATCH] staging: rtl8188eu: Macro should be enclosed

2017-03-29 Thread Alfonso Lima Astor
Fix style error pointed out by checkpatch.pl:
ERROR: Macros with complex values should be enclosed in
parentheses

I have compiled the module just to be sure. I haven't run it
because I haven't changed any funcionality.

Signed-off-by: Alfonso Lima Astor 
---
 drivers/staging/rtl8188eu/include/odm_debug.h | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h 
b/drivers/staging/rtl8188eu/include/odm_debug.h
index 687ff3e..fd92f7e 100644
--- a/drivers/staging/rtl8188eu/include/odm_debug.h
+++ b/drivers/staging/rtl8188eu/include/odm_debug.h
@@ -86,11 +86,13 @@
 #endif
 
 #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt)
\
-   if (((comp) & pDM_Odm->DebugComponents) &&  \
-   (level <= pDM_Odm->DebugLevel)) {   \
-   pr_info("[ODM-8188E] ");\
-   RT_PRINTK fmt;  \
-   }
+   do {\
+   if (((comp) & pDM_Odm->DebugComponents) &&  \
+   (level <= pDM_Odm->DebugLevel)) {   \
+   pr_info("[ODM-8188E] ");\
+   RT_PRINTK fmt;  \
+   }   \
+   } while (0)
 
 #define ODM_RT_ASSERT(pDM_Odm, expr, fmt)  \
if (!(expr)) {  \
-- 
2.7.4

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


[PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-03-29 Thread Prasant Jalan
Checkpatch emits WARNING: Avoid multiple line dereference.

Trivial indentation improvement helps fix the checkpatch warning.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
b/drivers/staging/rtl8712/rtl871x_xmit.c
index de88819..10edf00 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
*pkt,
if (padapter->pwrctrlpriv.pwr_mode !=
padapter->registrypriv.power_mgnt) {
del_timer_sync(&pmlmepriv->dhcp_timer);
-   r8712_set_ps_mode(padapter, padapter->registrypriv.
-   power_mgnt, padapter->registrypriv.smart_ps);
+   r8712_set_ps_mode(padapter,
+ padapter->registrypriv.power_mgnt,
+ padapter->registrypriv.smart_ps);
}
}
 }
@@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter *padapter,
   &pframe[10], 6);
}
if (pqospriv->qos_option == 1)
-   priority[0] = (u8)pxmitframe->
- attrib.priority;
+   priority[0] = (u8)pxmitframe->attrib.priority;
r8712_secmicappend(&micdata, &priority[0], 4);
payload = pframe;
for (curfragnum = 0; curfragnum < pattrib->nr_frags;
 curfragnum++) {
payload = (u8 *)RND4((addr_t)(payload));
-   payload = payload + pattrib->
- hdrlen + pattrib->iv_len;
+   payload = payload + pattrib->hdrlen +
+ pattrib->iv_len;
if ((curfragnum + 1) == pattrib->nr_frags) {
length = pattrib->last_txcmdsz -
  pattrib->hdrlen -
-- 
2.7.4

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


Re: [PATCH v2] staging: media: atomisp: Fix style. remove space before ',' and convert to tabs.

2017-03-29 Thread Alan Cox
On Wed, 2017-03-29 at 09:57 -0700, Daniel Cashman wrote:
> From: Dan Cashman 
> 
> Signed-off-by: Dan Cashman 


As the TODO asks - please no whitespace cleanups yet. They make it
harder to keep other cleanups that fix (or mostly remove) code
applying.

Nothing wrong with the patch otherwise - but it should also have
something in the commit message.

Alan

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


Re: [RFC PATCH v2 18/32] kvm: svm: Use the hardware provided GPA instead of page walk

2017-03-29 Thread Brijesh Singh

Hi Boris,

On 03/29/2017 10:14 AM, Borislav Petkov wrote:

On Thu, Mar 02, 2017 at 10:16:05AM -0500, Brijesh Singh wrote:

From: Tom Lendacky 

When a guest causes a NPF which requires emulation, KVM sometimes walks
the guest page tables to translate the GVA to a GPA. This is unnecessary
most of the time on AMD hardware since the hardware provides the GPA in
EXITINFO2.

The only exception cases involve string operations involving rep or
operations that use two memory locations. With rep, the GPA will only be
the value of the initial NPF and with dual memory locations we won't know
which memory address was translated into EXITINFO2.

Signed-off-by: Tom Lendacky 
Reviewed-by: Borislav Petkov 


I think I already asked you to remove Revewed-by tags when you have to
change an already reviewed patch in non-trivial manner. Why does this
one still have my Reviewed-by tag?



Actually this patch is included in RFCv2 series for the completeness.

The patch is already been reviewed and accepted in kvm upstream tree but it
was not present in the tip branch hence I cherry-picked into RFC so that we do
not break the build. SEV runtime behavior needs this patch. I have tried to
highlight it in cover letter. It was my bad that I missed fixing the Reviewed-by
tag during cherry picking. Sorry about that and will be extra careful next time 
around. Thanks


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


[PATCH v2] staging: media: atomisp: Fix style. remove space before ', ' and convert to tabs.

2017-03-29 Thread Daniel Cashman
From: Dan Cashman 

Signed-off-by: Dan Cashman 
---
 drivers/staging/media/atomisp/i2c/ap1302.c | 4 ++--
 drivers/staging/media/atomisp/i2c/gc0310.c | 2 +-
 drivers/staging/media/atomisp/i2c/gc2235.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/ap1302.c 
b/drivers/staging/media/atomisp/i2c/ap1302.c
index bacffbe..8432ee9 100644
--- a/drivers/staging/media/atomisp/i2c/ap1302.c
+++ b/drivers/staging/media/atomisp/i2c/ap1302.c
@@ -606,8 +606,8 @@ static s32 ap1302_try_mbus_fmt_locked(struct v4l2_subdev 
*sd,
 
 
 static int ap1302_get_fmt(struct v4l2_subdev *sd,
-struct v4l2_subdev_pad_config *cfg,
-struct v4l2_subdev_format *format)
+ struct v4l2_subdev_pad_config *cfg,
+ struct v4l2_subdev_format *format)
 
 {
 struct v4l2_mbus_framefmt *fmt = &format->format;
diff --git a/drivers/staging/media/atomisp/i2c/gc0310.c 
b/drivers/staging/media/atomisp/i2c/gc0310.c
index add8b90..1ec616a 100644
--- a/drivers/staging/media/atomisp/i2c/gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/gc0310.c
@@ -54,7 +54,7 @@ static int gc0310_read_reg(struct i2c_client *client,
return -EINVAL;
}
 
-   memset(msg, 0 , sizeof(msg));
+   memset(msg, 0, sizeof(msg));
 
msg[0].addr = client->addr;
msg[0].flags = 0;
diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c 
b/drivers/staging/media/atomisp/i2c/gc2235.c
index 9b41023..50f4317 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/gc2235.c
@@ -55,7 +55,7 @@ static int gc2235_read_reg(struct i2c_client *client,
return -EINVAL;
}
 
-   memset(msg, 0 , sizeof(msg));
+   memset(msg, 0, sizeof(msg));
 
msg[0].addr = client->addr;
msg[0].flags = 0;
-- 
2.7.4

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


Re: [PATCH v2] staging: iio: Remove unneeded parentheses.

2017-03-29 Thread Jonathan Cameron


On 29 March 2017 17:05:51 BST, Arushi Singhal  
wrote:
>Remove the extra parenthesis remove the checkpatch issue.
>
>Signed-off-by: Arushi Singhal 

Patch doesn't need resending as already applied.
If it did the description is now incorrect!
>---
>changes in v2
> -done the changes according to the current tree
>
> drivers/staging/iio/cdc/ad7746.c | 16 
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/staging/iio/cdc/ad7746.c
>b/drivers/staging/iio/cdc/ad7746.c
>index c2c8aa5585e4..7fa9913386f5 100644
>--- a/drivers/staging/iio/cdc/ad7746.c
>+++ b/drivers/staging/iio/cdc/ad7746.c
>@@ -45,10 +45,10 @@
> #define AD7746_STATUS_RDYCAP  BIT(0)
> 
>/* Capacitive Channel Setup Register Bit Designations
>(AD7746_REG_CAP_SETUP) */
>-#define AD7746_CAPSETUP_CAPEN (1 << 7)
>-#define AD7746_CAPSETUP_CIN2  (1 << 6) /* AD7746 only */
>-#define AD7746_CAPSETUP_CAPDIFF   (1 << 5)
>-#define AD7746_CAPSETUP_CACHOP(1 << 0)
>+#define AD7746_CAPSETUP_CAPEN BIT(7)
>+#define AD7746_CAPSETUP_CIN2  BIT(6) /* AD7746 only */
>+#define AD7746_CAPSETUP_CAPDIFF   BIT(5)
>+#define AD7746_CAPSETUP_CACHOPBIT(0)
> 
>/* Voltage/Temperature Setup Register Bit Designations
>(AD7746_REG_VT_SETUP) */
> #define AD7746_VTSETUP_VTEN   (1 << 7)
>@@ -56,9 +56,9 @@
> #define AD7746_VTSETUP_VTMD_EXT_TEMP  (1 << 5)
> #define AD7746_VTSETUP_VTMD_VDD_MON   (2 << 5)
> #define AD7746_VTSETUP_VTMD_EXT_VIN   (3 << 5)
>-#define AD7746_VTSETUP_EXTREF (1 << 4)
>-#define AD7746_VTSETUP_VTSHORT(1 << 1)
>-#define AD7746_VTSETUP_VTCHOP (1 << 0)
>+#define AD7746_VTSETUP_EXTREF BIT(4)
>+#define AD7746_VTSETUP_VTSHORTBIT(1)
>+#define AD7746_VTSETUP_VTCHOP BIT(0)
> 
>/* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
> #define AD7746_EXCSETUP_CLKCTRL   BIT(7)
>@@ -82,7 +82,7 @@
> #define AD7746_CONF_MODE_GAIN_CAL (6 << 0)
> 
> /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
>-#define AD7746_CAPDAC_DACEN   (1 << 7)
>+#define AD7746_CAPDAC_DACEN   BIT(7)
> #define AD7746_CAPDAC_DACP(x) ((x) & 0x7F)
> 
> /*

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [Outreachy kernel] [RESEND PATCH] staging: iio: Remove extra Parenthesis

2017-03-29 Thread Jonathan Cameron


On 29 March 2017 16:38:28 BST, Julia Lawall  wrote:
>
>
>On Wed, 29 Mar 2017, Arushi Singhal wrote:
>
>> Remove the extra parenthesis remove the checkpatch issue.
>
>Is this a patch on the current state of the staging tree?  When I do a
>pull and then look at the code, the line numbers are all off.
>Furthermore, there are not calls to BIT with parentheses around them,
>so
>it looks like this is a patch on the result of another patch that you
>sent
>that was not accepted.
>
>When Greg says resend what was not picked up, he doesn't mean resend it
>as
>is, but reapply the patch to the current state of the kernel, and if it
>still applies correctly, send the result.

I picked this up on Saturday as I had already pushed out the IIO togreg branch 
with the original patch
and I try to never rebase that other than fast forwards.

So didn't need a resend, but patch was originally correct in this case.

At this time a cycle i tend to send pulls to Greg about every two weeks so 
there can be a bit of
 lag in IIO patches getting to the staging tree.

Jonathan
>
>julia
>
>>
>> Signed-off-by: Arushi Singhal 
>> ---
>>  drivers/staging/iio/cdc/ad7746.c | 16 
>>  1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/staging/iio/cdc/ad7746.c
>b/drivers/staging/iio/cdc/ad7746.c
>> index 033a41fd9bee..b4afc12f827f 100644
>> --- a/drivers/staging/iio/cdc/ad7746.c
>> +++ b/drivers/staging/iio/cdc/ad7746.c
>> @@ -50,10 +50,10 @@
>>  #define AD7746_STATUS_RDYCAPBIT(0)
>>
>>  /* Capacitive Channel Setup Register Bit Designations
>(AD7746_REG_CAP_SETUP) */
>> -#define AD7746_CAPSETUP_CAPEN   (BIT(7))
>> -#define AD7746_CAPSETUP_CIN2(BIT(6)) /* AD7746 only */
>> -#define AD7746_CAPSETUP_CAPDIFF (BIT(5))
>> -#define AD7746_CAPSETUP_CACHOP  (BIT(0))
>> +#define AD7746_CAPSETUP_CAPEN   BIT(7)
>> +#define AD7746_CAPSETUP_CIN2BIT(6) /* AD7746 only */
>> +#define AD7746_CAPSETUP_CAPDIFF BIT(5)
>> +#define AD7746_CAPSETUP_CACHOP  BIT(0)
>>
>>  /* Voltage/Temperature Setup Register Bit Designations
>(AD7746_REG_VT_SETUP) */
>>  #define AD7746_VTSETUP_VTEN (1 << 7)
>> @@ -61,9 +61,9 @@
>>  #define AD7746_VTSETUP_VTMD_EXT_TEMP(1 << 5)
>>  #define AD7746_VTSETUP_VTMD_VDD_MON (2 << 5)
>>  #define AD7746_VTSETUP_VTMD_EXT_VIN (3 << 5)
>> -#define AD7746_VTSETUP_EXTREF   (BIT(4))
>> -#define AD7746_VTSETUP_VTSHORT  (BIT(1))
>> -#define AD7746_VTSETUP_VTCHOP   (BIT(0))
>> +#define AD7746_VTSETUP_EXTREF   BIT(4)
>> +#define AD7746_VTSETUP_VTSHORT  BIT(1)
>> +#define AD7746_VTSETUP_VTCHOP   BIT(0)
>>
>>  /* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP)
>*/
>>  #define AD7746_EXCSETUP_CLKCTRL BIT(7)
>> @@ -87,7 +87,7 @@
>>  #define AD7746_CONF_MODE_GAIN_CAL   (6 << 0)
>>
>>  /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
>> -#define AD7746_CAPDAC_DACEN (BIT(7))
>> +#define AD7746_CAPDAC_DACEN BIT(7)
>>  #define AD7746_CAPDAC_DACP(x)   ((x) & 0x7F)
>>
>>  /*
>> --
>> 2.11.0
>>
>> --
>> You received this message because you are subscribed to the Google
>Groups "outreachy-kernel" group.
>> To unsubscribe from this group and stop receiving emails from it,
>send an email to outreachy-kernel+unsubscr...@googlegroups.com.
>> To post to this group, send email to
>outreachy-ker...@googlegroups.com.
>> To view this discussion on the web visit
>https://groups.google.com/d/msgid/outreachy-kernel/20170329151712.GA5651%40arushi-HP-Pavilion-Notebook.
>> For more options, visit https://groups.google.com/d/optout.
>>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: iio: Remove unneeded parentheses.

2017-03-29 Thread Arushi Singhal
Remove the extra parenthesis remove the checkpatch issue.

Signed-off-by: Arushi Singhal 
---
changes in v2
 -done the changes according to the current tree

 drivers/staging/iio/cdc/ad7746.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index c2c8aa5585e4..7fa9913386f5 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -45,10 +45,10 @@
 #define AD7746_STATUS_RDYCAP   BIT(0)
 
 /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) */
-#define AD7746_CAPSETUP_CAPEN  (1 << 7)
-#define AD7746_CAPSETUP_CIN2   (1 << 6) /* AD7746 only */
-#define AD7746_CAPSETUP_CAPDIFF(1 << 5)
-#define AD7746_CAPSETUP_CACHOP (1 << 0)
+#define AD7746_CAPSETUP_CAPEN  BIT(7)
+#define AD7746_CAPSETUP_CIN2   BIT(6) /* AD7746 only */
+#define AD7746_CAPSETUP_CAPDIFFBIT(5)
+#define AD7746_CAPSETUP_CACHOP BIT(0)
 
 /* Voltage/Temperature Setup Register Bit Designations (AD7746_REG_VT_SETUP) */
 #define AD7746_VTSETUP_VTEN(1 << 7)
@@ -56,9 +56,9 @@
 #define AD7746_VTSETUP_VTMD_EXT_TEMP   (1 << 5)
 #define AD7746_VTSETUP_VTMD_VDD_MON(2 << 5)
 #define AD7746_VTSETUP_VTMD_EXT_VIN(3 << 5)
-#define AD7746_VTSETUP_EXTREF  (1 << 4)
-#define AD7746_VTSETUP_VTSHORT (1 << 1)
-#define AD7746_VTSETUP_VTCHOP  (1 << 0)
+#define AD7746_VTSETUP_EXTREF  BIT(4)
+#define AD7746_VTSETUP_VTSHORT BIT(1)
+#define AD7746_VTSETUP_VTCHOP  BIT(0)
 
 /* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
 #define AD7746_EXCSETUP_CLKCTRLBIT(7)
@@ -82,7 +82,7 @@
 #define AD7746_CONF_MODE_GAIN_CAL  (6 << 0)
 
 /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
-#define AD7746_CAPDAC_DACEN(1 << 7)
+#define AD7746_CAPDAC_DACENBIT(7)
 #define AD7746_CAPDAC_DACP(x)  ((x) & 0x7F)
 
 /*
-- 
2.11.0

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


Re: [Outreachy kernel] [RESEND PATCH] staging: iio: Remove extra Parenthesis

2017-03-29 Thread Julia Lawall


On Wed, 29 Mar 2017, Arushi Singhal wrote:

> Remove the extra parenthesis remove the checkpatch issue.

Is this a patch on the current state of the staging tree?  When I do a
pull and then look at the code, the line numbers are all off.
Furthermore, there are not calls to BIT with parentheses around them, so
it looks like this is a patch on the result of another patch that you sent
that was not accepted.

When Greg says resend what was not picked up, he doesn't mean resend it as
is, but reapply the patch to the current state of the kernel, and if it
still applies correctly, send the result.

julia

>
> Signed-off-by: Arushi Singhal 
> ---
>  drivers/staging/iio/cdc/ad7746.c | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/iio/cdc/ad7746.c 
> b/drivers/staging/iio/cdc/ad7746.c
> index 033a41fd9bee..b4afc12f827f 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -50,10 +50,10 @@
>  #define AD7746_STATUS_RDYCAP BIT(0)
>
>  /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) 
> */
> -#define AD7746_CAPSETUP_CAPEN(BIT(7))
> -#define AD7746_CAPSETUP_CIN2 (BIT(6)) /* AD7746 only */
> -#define AD7746_CAPSETUP_CAPDIFF  (BIT(5))
> -#define AD7746_CAPSETUP_CACHOP   (BIT(0))
> +#define AD7746_CAPSETUP_CAPENBIT(7)
> +#define AD7746_CAPSETUP_CIN2 BIT(6) /* AD7746 only */
> +#define AD7746_CAPSETUP_CAPDIFF  BIT(5)
> +#define AD7746_CAPSETUP_CACHOP   BIT(0)
>
>  /* Voltage/Temperature Setup Register Bit Designations (AD7746_REG_VT_SETUP) 
> */
>  #define AD7746_VTSETUP_VTEN  (1 << 7)
> @@ -61,9 +61,9 @@
>  #define AD7746_VTSETUP_VTMD_EXT_TEMP (1 << 5)
>  #define AD7746_VTSETUP_VTMD_VDD_MON  (2 << 5)
>  #define AD7746_VTSETUP_VTMD_EXT_VIN  (3 << 5)
> -#define AD7746_VTSETUP_EXTREF(BIT(4))
> -#define AD7746_VTSETUP_VTSHORT   (BIT(1))
> -#define AD7746_VTSETUP_VTCHOP(BIT(0))
> +#define AD7746_VTSETUP_EXTREFBIT(4)
> +#define AD7746_VTSETUP_VTSHORT   BIT(1)
> +#define AD7746_VTSETUP_VTCHOPBIT(0)
>
>  /* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
>  #define AD7746_EXCSETUP_CLKCTRL  BIT(7)
> @@ -87,7 +87,7 @@
>  #define AD7746_CONF_MODE_GAIN_CAL(6 << 0)
>
>  /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
> -#define AD7746_CAPDAC_DACEN  (BIT(7))
> +#define AD7746_CAPDAC_DACEN  BIT(7)
>  #define AD7746_CAPDAC_DACP(x)((x) & 0x7F)
>
>  /*
> --
> 2.11.0
>
> --
> You received this message because you are subscribed to the Google Groups 
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to outreachy-kernel+unsubscr...@googlegroups.com.
> To post to this group, send email to outreachy-ker...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/outreachy-kernel/20170329151712.GA5651%40arushi-HP-Pavilion-Notebook.
> For more options, visit https://groups.google.com/d/optout.
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC PATCH v2 16/32] x86: kvm: Provide support to create Guest and HV shared per-CPU variables

2017-03-29 Thread Borislav Petkov
On Wed, Mar 29, 2017 at 05:21:13PM +0200, Paolo Bonzini wrote:
> The GHCB would have to be allocated much earlier, possibly even by
> firmware depending on how things will be designed.

How about a statically allocated page like we do with the early
pagetable pages in head_64.S?

> I think it's premature to consider SEV-ES requirements.

My only concern is not to have to redo a lot when SEV-ES gets enabled.
So it would be prudent to design with SEV-ES in the back of our minds.

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC PATCH v2 16/32] x86: kvm: Provide support to create Guest and HV shared per-CPU variables

2017-03-29 Thread Paolo Bonzini


On 28/03/2017 20:39, Borislav Petkov wrote:
>> 2) Since the encryption attributes works on PAGE_SIZE hence add some extra
>> padding to 'struct kvm-steal-time' to make it PAGE_SIZE and then at runtime
>> clear the encryption attribute of the full PAGE. The downside of this was
>> now we need to modify structure which may break the compatibility.
> From SEV-ES whitepaper:
> 
> "To facilitate this communication, the SEV-ES architecture defines
> a Guest Hypervisor Communication Block (GHCB). The GHCB resides in
> page of shared memory so it is accessible to both the guest VM and the
> hypervisor."
> 
> So this is kinda begging to be implemented with a shared page between
> guest and host. And then put steal-time, ... etc in there too. Provided
> there's enough room in the single page for the GHCB *and* our stuff.

The GHCB would have to be allocated much earlier, possibly even by
firmware depending on how things will be designed.  I think it's
premature to consider SEV-ES requirements.

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


[RESEND PATCH] staging: iio: Remove extra Parenthesis

2017-03-29 Thread Arushi Singhal
Remove the extra parenthesis remove the checkpatch issue.

Signed-off-by: Arushi Singhal 
---
 drivers/staging/iio/cdc/ad7746.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 033a41fd9bee..b4afc12f827f 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -50,10 +50,10 @@
 #define AD7746_STATUS_RDYCAP   BIT(0)
 
 /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) */
-#define AD7746_CAPSETUP_CAPEN  (BIT(7))
-#define AD7746_CAPSETUP_CIN2   (BIT(6)) /* AD7746 only */
-#define AD7746_CAPSETUP_CAPDIFF(BIT(5))
-#define AD7746_CAPSETUP_CACHOP (BIT(0))
+#define AD7746_CAPSETUP_CAPEN  BIT(7)
+#define AD7746_CAPSETUP_CIN2   BIT(6) /* AD7746 only */
+#define AD7746_CAPSETUP_CAPDIFFBIT(5)
+#define AD7746_CAPSETUP_CACHOP BIT(0)
 
 /* Voltage/Temperature Setup Register Bit Designations (AD7746_REG_VT_SETUP) */
 #define AD7746_VTSETUP_VTEN(1 << 7)
@@ -61,9 +61,9 @@
 #define AD7746_VTSETUP_VTMD_EXT_TEMP   (1 << 5)
 #define AD7746_VTSETUP_VTMD_VDD_MON(2 << 5)
 #define AD7746_VTSETUP_VTMD_EXT_VIN(3 << 5)
-#define AD7746_VTSETUP_EXTREF  (BIT(4))
-#define AD7746_VTSETUP_VTSHORT (BIT(1))
-#define AD7746_VTSETUP_VTCHOP  (BIT(0))
+#define AD7746_VTSETUP_EXTREF  BIT(4)
+#define AD7746_VTSETUP_VTSHORT BIT(1)
+#define AD7746_VTSETUP_VTCHOP  BIT(0)
 
 /* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
 #define AD7746_EXCSETUP_CLKCTRLBIT(7)
@@ -87,7 +87,7 @@
 #define AD7746_CONF_MODE_GAIN_CAL  (6 << 0)
 
 /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
-#define AD7746_CAPDAC_DACEN(BIT(7))
+#define AD7746_CAPDAC_DACENBIT(7)
 #define AD7746_CAPDAC_DACP(x)  ((x) & 0x7F)
 
 /*
-- 
2.11.0

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


Re: [RFC PATCH v2 18/32] kvm: svm: Use the hardware provided GPA instead of page walk

2017-03-29 Thread Borislav Petkov
On Thu, Mar 02, 2017 at 10:16:05AM -0500, Brijesh Singh wrote:
> From: Tom Lendacky 
> 
> When a guest causes a NPF which requires emulation, KVM sometimes walks
> the guest page tables to translate the GVA to a GPA. This is unnecessary
> most of the time on AMD hardware since the hardware provides the GPA in
> EXITINFO2.
> 
> The only exception cases involve string operations involving rep or
> operations that use two memory locations. With rep, the GPA will only be
> the value of the initial NPF and with dual memory locations we won't know
> which memory address was translated into EXITINFO2.
> 
> Signed-off-by: Tom Lendacky 
> Reviewed-by: Borislav Petkov 

I think I already asked you to remove Revewed-by tags when you have to
change an already reviewed patch in non-trivial manner. Why does this
one still have my Reviewed-by tag?

-- 
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
-- 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RESEND PATCH] staging: media: davinci_vpfe: Replace a bit shift

2017-03-29 Thread Arushi Singhal
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@

-1 << c
+BIT(c)

Signed-off-by: Arushi Singhal 
---
 drivers/staging/media/davinci_vpfe/dm365_ipipe.c   |  2 +-
 drivers/staging/media/davinci_vpfe/dm365_ipipeif.c |  2 +-
 drivers/staging/media/davinci_vpfe/dm365_isif.c| 10 +-
 drivers/staging/media/davinci_vpfe/dm365_resizer.c |  6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c 
b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
index 6a3434cebd79..7eeb53217168 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
@@ -1815,7 +1815,7 @@ vpfe_ipipe_init(struct vpfe_ipipe_device *ipipe, struct 
platform_device *pdev)
v4l2_subdev_init(sd, &ipipe_v4l2_ops);
sd->internal_ops = &ipipe_v4l2_internal_ops;
strlcpy(sd->name, "DAVINCI IPIPE", sizeof(sd->name));
-   sd->grp_id = 1 << 16;   /* group ID for davinci subdevs */
+   sd->grp_id = BIT(16);   /* group ID for davinci subdevs */
v4l2_set_subdevdata(sd, ipipe);
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c 
b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
index 46fd2c7f69c3..c07f028dd6be 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
@@ -1021,7 +1021,7 @@ int vpfe_ipipeif_init(struct vpfe_ipipeif_device *ipipeif,
 
sd->internal_ops = &ipipeif_v4l2_internal_ops;
strlcpy(sd->name, "DAVINCI IPIPEIF", sizeof(sd->name));
-   sd->grp_id = 1 << 16;   /* group ID for davinci subdevs */
+   sd->grp_id = BIT(16);   /* group ID for davinci subdevs */
 
v4l2_set_subdevdata(sd, ipipeif);
 
diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c 
b/drivers/staging/media/davinci_vpfe/dm365_isif.c
index 569bcdc9ce2f..74b1247203b1 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_isif.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_isif.c
@@ -821,7 +821,7 @@ isif_config_dfc(struct vpfe_isif_device *isif, struct 
vpfe_isif_dfc *vdfc)
 
/* Correct whole line or partial */
if (vdfc->corr_whole_line)
-   val |= 1 << ISIF_VDFC_CORR_WHOLE_LN_SHIFT;
+   val |= BIT(ISIF_VDFC_CORR_WHOLE_LN_SHIFT);
 
/* level shift value */
val |= (vdfc->def_level_shift & ISIF_VDFC_LEVEL_SHFT_MASK) <<
@@ -849,7 +849,7 @@ isif_config_dfc(struct vpfe_isif_device *isif, struct 
vpfe_isif_dfc *vdfc)
 
val = isif_read(isif->isif_cfg.base_addr, DFCMEMCTL);
/* set DFCMARST and set DFCMWR */
-   val |= 1 << ISIF_DFCMEMCTL_DFCMARST_SHIFT;
+   val |= BIT(ISIF_DFCMEMCTL_DFCMARST_SHIFT);
val |= 1;
isif_write(isif->isif_cfg.base_addr, val, DFCMEMCTL);
 
@@ -880,7 +880,7 @@ isif_config_dfc(struct vpfe_isif_device *isif, struct 
vpfe_isif_dfc *vdfc)
}
val = isif_read(isif->isif_cfg.base_addr, DFCMEMCTL);
/* clear DFCMARST and set DFCMWR */
-   val &= ~(1 << ISIF_DFCMEMCTL_DFCMARST_SHIFT);
+   val &= ~BIT(ISIF_DFCMEMCTL_DFCMARST_SHIFT);
val |= 1;
isif_write(isif->isif_cfg.base_addr, val, DFCMEMCTL);
 
@@ -1140,7 +1140,7 @@ static int isif_config_raw(struct v4l2_subdev *sd, int 
mode)
isif_write(isif->isif_cfg.base_addr, val, CGAMMAWD);
/* Configure DPCM compression settings */
if (params->v4l2_pix_fmt == V4L2_PIX_FMT_SGRBG10DPCM8) {
-   val =  1 << ISIF_DPCM_EN_SHIFT;
+   val =  BIT(ISIF_DPCM_EN_SHIFT);
val |= (params->dpcm_predictor &
ISIF_DPCM_PREDICTOR_MASK) << ISIF_DPCM_PREDICTOR_SHIFT;
}
@@ -2044,7 +2044,7 @@ int vpfe_isif_init(struct vpfe_isif_device *isif, struct 
platform_device *pdev)
v4l2_subdev_init(sd, &isif_v4l2_ops);
sd->internal_ops = &isif_v4l2_internal_ops;
strlcpy(sd->name, "DAVINCI ISIF", sizeof(sd->name));
-   sd->grp_id = 1 << 16;   /* group ID for davinci subdevs */
+   sd->grp_id = BIT(16);   /* group ID for davinci subdevs */
v4l2_set_subdevdata(sd, isif);
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
pads[ISIF_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c 
b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
index 857b0e847c5e..3b3469adaf91 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
@@ -1903,7 +1903,7 @@ int vpfe_resizer_init(struct vpfe_resizer_device 
*vpfe_rsz,
v4l2_subdev_init(sd, &resizer_v4l2_ops);
sd->internal_ops = &resizer_v4l2_internal_ops;
strlcpy(sd->name, "DAVINCI RESIZER CROP", sizeof(sd->name));
-   sd->grp_id = 1 << 16;   /

[RESEND PATCH] staging: media: omap4iss: Replace a bit shift by a use of BIT

2017-03-29 Thread Arushi Singhal
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@

-1 << c
+BIT(c)

Signed-off-by: Arushi Singhal 
---
 drivers/staging/media/omap4iss/iss_csi2.c| 2 +-
 drivers/staging/media/omap4iss/iss_ipipe.c   | 2 +-
 drivers/staging/media/omap4iss/iss_ipipeif.c | 2 +-
 drivers/staging/media/omap4iss/iss_resizer.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/omap4iss/iss_csi2.c 
b/drivers/staging/media/omap4iss/iss_csi2.c
index f71d5f2f179f..f6acc541e8a2 100644
--- a/drivers/staging/media/omap4iss/iss_csi2.c
+++ b/drivers/staging/media/omap4iss/iss_csi2.c
@@ -1268,7 +1268,7 @@ static int csi2_init_entities(struct iss_csi2_device 
*csi2, const char *subname)
snprintf(name, sizeof(name), "CSI2%s", subname);
snprintf(sd->name, sizeof(sd->name), "OMAP4 ISS %s", name);
 
-   sd->grp_id = 1 << 16;   /* group ID for iss subdevs */
+   sd->grp_id = BIT(16);   /* group ID for iss subdevs */
v4l2_set_subdevdata(sd, csi2);
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c 
b/drivers/staging/media/omap4iss/iss_ipipe.c
index d38782e8e84c..d86ef8a031f2 100644
--- a/drivers/staging/media/omap4iss/iss_ipipe.c
+++ b/drivers/staging/media/omap4iss/iss_ipipe.c
@@ -508,7 +508,7 @@ static int ipipe_init_entities(struct iss_ipipe_device 
*ipipe)
v4l2_subdev_init(sd, &ipipe_v4l2_ops);
sd->internal_ops = &ipipe_v4l2_internal_ops;
strlcpy(sd->name, "OMAP4 ISS ISP IPIPE", sizeof(sd->name));
-   sd->grp_id = 1 << 16;   /* group ID for iss subdevs */
+   sd->grp_id = BIT(16);   /* group ID for iss subdevs */
v4l2_set_subdevdata(sd, ipipe);
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
diff --git a/drivers/staging/media/omap4iss/iss_ipipeif.c 
b/drivers/staging/media/omap4iss/iss_ipipeif.c
index 23de8330731d..cb88b2bd0d82 100644
--- a/drivers/staging/media/omap4iss/iss_ipipeif.c
+++ b/drivers/staging/media/omap4iss/iss_ipipeif.c
@@ -739,7 +739,7 @@ static int ipipeif_init_entities(struct iss_ipipeif_device 
*ipipeif)
v4l2_subdev_init(sd, &ipipeif_v4l2_ops);
sd->internal_ops = &ipipeif_v4l2_internal_ops;
strlcpy(sd->name, "OMAP4 ISS ISP IPIPEIF", sizeof(sd->name));
-   sd->grp_id = 1 << 16;   /* group ID for iss subdevs */
+   sd->grp_id = BIT(16);   /* group ID for iss subdevs */
v4l2_set_subdevdata(sd, ipipeif);
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
diff --git a/drivers/staging/media/omap4iss/iss_resizer.c 
b/drivers/staging/media/omap4iss/iss_resizer.c
index f1d352c711d5..4bbfa20b3c38 100644
--- a/drivers/staging/media/omap4iss/iss_resizer.c
+++ b/drivers/staging/media/omap4iss/iss_resizer.c
@@ -782,7 +782,7 @@ static int resizer_init_entities(struct iss_resizer_device 
*resizer)
v4l2_subdev_init(sd, &resizer_v4l2_ops);
sd->internal_ops = &resizer_v4l2_internal_ops;
strlcpy(sd->name, "OMAP4 ISS ISP resizer", sizeof(sd->name));
-   sd->grp_id = 1 << 16;   /* group ID for iss subdevs */
+   sd->grp_id = BIT(16);   /* group ID for iss subdevs */
v4l2_set_subdevdata(sd, resizer);
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
-- 
2.11.0

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


Re: [PATCH 0/3] staging: ks7010: refactor tx_device_task()

2017-03-29 Thread Greg Kroah-Hartman
On Wed, Mar 29, 2017 at 09:43:38PM +1100, Tobin C. Harding wrote:
> On Wed, Mar 29, 2017 at 09:21:20AM +0200, Greg Kroah-Hartman wrote:
> > On Sun, Mar 26, 2017 at 07:45:12PM +1100, Tobin C. Harding wrote:
> > > Function tx_device_task() is a candidate for refactoring. Checkpatch
> > > emits a number of warnings/checks for this function.
> > > 
> > > Patch 01 inverts if statement conditional and reduces the level of
> > > nesting.
> > > 
> > > Patch 02 renames rc -> ret, fixes function call and checkpatch WARNING.
> > > 
> > > Patch 03 fixes function argument alignment, and checkpatch CHECK.
> > > 
> > > Code is untested. Patch set applies and builds on x86_64 and PowerPC.
> > 
> > I count 35+ patches from you for the same driver within 2 days.  What
> > order am I supposed to apply these patches in?  Please resend them all
> > as a single patch series, so I have a chance to get it right.
> 
> No worries. Is that the easiest way for maintainer/reviewer to have
> all changes to a single driver in a single patch set instead of having
> multiple patch sets in flight at the same time?

What would you rather try to review?

(hint, make it totally obvious what to do in what order...)

> I am basically a bit lost as to how to structure my work flow when
> there are so many things to do in one driver. Obviously I'm new to
> this, so any tips would be most appreciated.
> 
> Does one just have to pick some chunk of work to do, do it as a single
> patch set then wait for review/merge? And go off and work on something
> else?

Yes, that's usually the best thing to do.  Or, send longer series of
patches, after doing more work.

thanks,

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


Re: [PATCH] staging: vc04_services: bcm2835-audio: fixed checkpatch warning on coding style

2017-03-29 Thread Greg Kroah-Hartman
On Wed, Mar 29, 2017 at 12:29:30AM +0100, Andrea della Porta wrote:
> Fixed several chekpatch warnign about alignment of function parameters,
> removed spaces after a cast, split one line that was over 80 chars

Only do one thing per patch, please fix this up as a patch series.

thanks,

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


[PATCH] tools: hv: properly handle long paths

2017-03-29 Thread Vitaly Kuznetsov
Paths can be up to PATH_MAX long and PATH_MAX is usually greater than 256.
While on it, simplify path reconstruction to a simple snprintf(), define
and reuse KVP_NET_DIR.

Suggested-by: Tomas Hozza 
Signed-off-by: Vitaly Kuznetsov 
---
 tools/hv/hv_kvp_daemon.c | 44 ++--
 1 file changed, 18 insertions(+), 26 deletions(-)

diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index f1758fc..88b20e0 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /*
@@ -97,6 +98,8 @@ static struct utsname uts_buf;
 #define KVP_SCRIPTS_PATH "/usr/libexec/hypervkvpd/"
 #endif
 
+#define KVP_NET_DIR "/sys/class/net/"
+
 #define MAX_FILE_NAME 100
 #define ENTRIES_PER_BLOCK 50
 
@@ -596,26 +599,21 @@ static char *kvp_get_if_name(char *guid)
DIR *dir;
struct dirent *entry;
FILE*file;
-   char*p, *q, *x;
+   char*p, *x;
char*if_name = NULL;
charbuf[256];
-   char *kvp_net_dir = "/sys/class/net/";
-   char dev_id[256];
+   char dev_id[PATH_MAX];
 
-   dir = opendir(kvp_net_dir);
+   dir = opendir(KVP_NET_DIR);
if (dir == NULL)
return NULL;
 
-   snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir);
-   q = dev_id + strlen(kvp_net_dir);
-
while ((entry = readdir(dir)) != NULL) {
/*
 * Set the state for the next pass.
 */
-   *q = '\0';
-   strcat(dev_id, entry->d_name);
-   strcat(dev_id, "/device/device_id");
+   snprintf(dev_id, sizeof(dev_id), "%s%s/device/device_id",
+KVP_NET_DIR, entry->d_name);
 
file = fopen(dev_id, "r");
if (file == NULL)
@@ -653,12 +651,12 @@ static char *kvp_if_name_to_mac(char *if_name)
FILE*file;
char*p, *x;
charbuf[256];
-   char addr_file[256];
+   char addr_file[PATH_MAX];
unsigned int i;
char *mac_addr = NULL;
 
-   snprintf(addr_file, sizeof(addr_file), "%s%s%s", "/sys/class/net/",
-   if_name, "/address");
+   snprintf(addr_file, sizeof(addr_file), "%s%s%s", KVP_NET_DIR,
+if_name, "/address");
 
file = fopen(addr_file, "r");
if (file == NULL)
@@ -688,28 +686,22 @@ static char *kvp_mac_to_if_name(char *mac)
DIR *dir;
struct dirent *entry;
FILE*file;
-   char*p, *q, *x;
+   char*p, *x;
char*if_name = NULL;
charbuf[256];
-   char *kvp_net_dir = "/sys/class/net/";
-   char dev_id[256];
+   char dev_id[PATH_MAX];
unsigned int i;
 
-   dir = opendir(kvp_net_dir);
+   dir = opendir(KVP_NET_DIR);
if (dir == NULL)
return NULL;
 
-   snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir);
-   q = dev_id + strlen(kvp_net_dir);
-
while ((entry = readdir(dir)) != NULL) {
/*
 * Set the state for the next pass.
 */
-   *q = '\0';
-
-   strcat(dev_id, entry->d_name);
-   strcat(dev_id, "/address");
+   snprintf(dev_id, sizeof(dev_id), "%s%s/address", KVP_NET_DIR,
+entry->d_name);
 
file = fopen(dev_id, "r");
if (file == NULL)
@@ -1218,9 +1210,9 @@ static int process_ip_string(FILE *f, char *ip_string, 
int type)
 static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)
 {
int error = 0;
-   char if_file[128];
+   char if_file[PATH_MAX];
FILE *file;
-   char cmd[512];
+   char cmd[PATH_MAX];
char *mac_addr;
 
/*
-- 
2.9.3

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


[PATCH] staging: vc04_services: bcm2835-audio: fixed checkpatch warning on coding style

2017-03-29 Thread Andrea della Porta
Fixed several chekpatch warnign about alignment of function parameters,
removed spaces after a cast, split one line that was over 80 chars

Signed-off-by: Andrea della Porta 
---
 .../vc04_services/bcm2835-audio/bcm2835-pcm.c  | 47 ++
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c 
b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
index 8bd69b9..fa6d3d2 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
@@ -68,7 +68,7 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream 
*alsa_stream)
audio_info(" .. IN\n");
 
audio_info("alsa_stream=%p substream=%p\n", alsa_stream,
-   alsa_stream ? alsa_stream->substream : 0);
+  alsa_stream ? alsa_stream->substream : 0);
 
if (alsa_stream->open)
consumed = bcm2835_audio_retrieve_buffers(alsa_stream);
@@ -83,10 +83,10 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream 
*alsa_stream)
new_period = 1;
}
audio_debug("updating pos cur: %d + %d max:%d period_bytes:%d, hw_ptr: 
%d new_period:%d\n",
-   alsa_stream->pos,
+   alsa_stream->pos,
consumed,
alsa_stream->buffer_size,
-   (int) (alsa_stream->period_size * 
alsa_stream->substream->runtime->periods),
+   (int)(alsa_stream->period_size * 
alsa_stream->substream->runtime->periods),
frames_to_bytes(alsa_stream->substream->runtime, 
alsa_stream->substream->runtime->status->hw_ptr),
new_period);
if (alsa_stream->buffer_size) {
@@ -229,6 +229,7 @@ static int snd_bcm2835_playback_close(struct 
snd_pcm_substream *substream)
 */
if (alsa_stream->running) {
int err;
+
err = bcm2835_audio_stop(alsa_stream);
alsa_stream->running = 0;
if (err)
@@ -259,7 +260,7 @@ static int snd_bcm2835_playback_close(struct 
snd_pcm_substream *substream)
 
 /* hw_params callback */
 static int snd_bcm2835_pcm_hw_params(struct snd_pcm_substream *substream,
-   struct snd_pcm_hw_params *params)
+struct snd_pcm_hw_params *params)
 {
struct snd_pcm_runtime *runtime = substream->runtime;
struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
@@ -312,18 +313,16 @@ static int snd_bcm2835_pcm_prepare(struct 
snd_pcm_substream *substream)
channels = alsa_stream->channels;
 
err = bcm2835_audio_set_params(alsa_stream, channels,
-   alsa_stream->params_rate,
-   alsa_stream->pcm_format_width);
+  alsa_stream->params_rate,
+  alsa_stream->pcm_format_width);
if (err < 0)
audio_error(" error setting hw params\n");
 
-
bcm2835_audio_setup(alsa_stream);
 
/* in preparation of the stream, set the controls (volume level) of the 
stream */
bcm2835_audio_set_ctls(alsa_stream->chip);
 
-
memset(&alsa_stream->pcm_indirect, 0, 
sizeof(alsa_stream->pcm_indirect));
 
alsa_stream->pcm_indirect.hw_buffer_size =
@@ -335,8 +334,8 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream 
*substream)
alsa_stream->pos = 0;
 
audio_debug("buffer_size=%d, period_size=%d pos=%d frame_bits=%d\n",
-   alsa_stream->buffer_size, alsa_stream->period_size,
-   alsa_stream->pos, runtime->frame_bits);
+   alsa_stream->buffer_size, alsa_stream->period_size,
+   alsa_stream->pos, runtime->frame_bits);
 
mutex_unlock(&chip->audio_mutex);
audio_info(" .. OUT\n");
@@ -344,17 +343,16 @@ static int snd_bcm2835_pcm_prepare(struct 
snd_pcm_substream *substream)
 }
 
 static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream,
-   struct snd_pcm_indirect *rec, size_t bytes)
+struct snd_pcm_indirect *rec, size_t bytes)
 {
struct snd_pcm_runtime *runtime = substream->runtime;
struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
-   void *src = (void *) (substream->runtime->dma_area + rec->sw_data);
+   void *src = (void *)(substream->runtime->dma_area + rec->sw_data);
int err;
 
err = bcm2835_audio_write(alsa_stream, bytes, src);
if (err)
audio_error(" Failed to transfer to alsa device (%d)\n", err);
-
 }
 
 static int snd_bcm2835_pcm_ack(struct snd_pcm_substream *substream)
@@ -381,14 +379,14 @@ static int snd_bcm2835_pcm_trigger(struct 
snd_pcm_substream *substream, int cmd)
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
audio_debug("bcm2835_AUDIO_TRIGGER_START running=%d\n",
-   al

[PATCH] staging: xgifb: added blank line after declaration (coding style issue)

2017-03-29 Thread Andrea della Porta
From: Andrea della Porta 
Subject: staging: xgifb: added blankline after decl.

Fixed checkpatch warning:
WARNING: Missing a blank line after declarations
#882: FILE: drivers/staging/xgifb/XGI_main_26.c:882:
+   const u8 *f =
XGI_TV_filter[filter_tb].filter[filter];
+   pr_debug("FilterTable[%d]-%d: %*ph\n",

Signed-off-by: Andrea della Porta 
---
 drivers/staging/xgifb/XGI_main_26.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/xgifb/XGI_main_26.c 
b/drivers/staging/xgifb/XGI_main_26.c
index d938da3..b450c74 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -879,6 +879,7 @@ static void XGIfb_post_setmode(struct xgifb_video_info 
*xgifb_info)
 
if ((filter >= 0) && (filter <= 7)) {
const u8 *f = 
XGI_TV_filter[filter_tb].filter[filter];
+
pr_debug("FilterTable[%d]-%d: %*ph\n",
 filter_tb, filter, 4, f);
xgifb_reg_set(XGIPART2, 0x35, f[0]);
-- 
2.4.10

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


Re: [PATCH] staging: lusten: conrpc.c: fix different address space sparse warning

2017-03-29 Thread Marcos Paulo de Souza
On Wed, Mar 29, 2017 at 12:34:05PM +0200, Greg KH wrote:
> On Thu, Mar 23, 2017 at 04:09:03PM -0300, Marcos Paulo de Souza wrote:
> > On Wed, Mar 29, 2017 at 09:31:14AM +0200, Greg KH wrote:
> > > On Tue, Mar 28, 2017 at 11:14:06PM -0300, Marcos Paulo de Souza wrote:
> > > > head_up parameter is marked with __user attribute, tmp is filled
> > > > by a copy_from_user from next, that is also marked as __user, so
> > > > tmp.next needs to be "casted" as __user to make sparse happy.
> > > 
> > > But is it the correct change?
> > 
> > I don't know, it's my first sparse patch, so I tried to fix this
> > warning.
> > 
> > > 
> > > You also have a typo in your subject :(
> > 
> > Sorry, didn't noticed yesterday :(
> > 
> > > 
> > > > Signed-off-by: Marcos Paulo de Souza 
> > > > ---
> > > > 
> > > >  this is mt first patch addressing an issue of sparse, so let me know
> > > >  if I misunderstood the error message
> > > > 
> > > >  drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
> > > > b/drivers/staging/lustre/lnet/selftest/conrpc.c
> > > > index c6a683b..fb7ad74 100644
> > > > --- a/drivers/staging/lustre/lnet/selftest/conrpc.c
> > > > +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
> > > > @@ -487,7 +487,7 @@ lstcon_rpc_trans_interpreter(struct 
> > > > lstcon_rpc_trans *trans,
> > > >sizeof(struct list_head)))
> > > > return -EFAULT;
> > > >  
> > > > -   if (tmp.next == head_up)
> > > > +   if ((struct list_head __user *)tmp.next == head_up)
> > > 
> > > Aer you sure this is correct?  __user changes for lustre is not
> > > trivial...
> > > 
> > > How did you test this?
> > 
> > I didn't tested, it just removed the warning. Is this a false positive?
> 
> I don't know, it's up to you to prove to me that you know this change is
> correct.  You have to justify your changes, and "because checkpatch.pl
> complained" isn't a valid justification for something like this :)

Fair enough, I'll take in another sparse report to work on. Thanks!

> 
> thanks,
> 
> greg k-h

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


Re: [PATCH 0/3] staging: ks7010: refactor tx_device_task()

2017-03-29 Thread Tobin C. Harding
On Wed, Mar 29, 2017 at 09:21:20AM +0200, Greg Kroah-Hartman wrote:
> On Sun, Mar 26, 2017 at 07:45:12PM +1100, Tobin C. Harding wrote:
> > Function tx_device_task() is a candidate for refactoring. Checkpatch
> > emits a number of warnings/checks for this function.
> > 
> > Patch 01 inverts if statement conditional and reduces the level of
> > nesting.
> > 
> > Patch 02 renames rc -> ret, fixes function call and checkpatch WARNING.
> > 
> > Patch 03 fixes function argument alignment, and checkpatch CHECK.
> > 
> > Code is untested. Patch set applies and builds on x86_64 and PowerPC.
> 
> I count 35+ patches from you for the same driver within 2 days.  What
> order am I supposed to apply these patches in?  Please resend them all
> as a single patch series, so I have a chance to get it right.

No worries. Is that the easiest way for maintainer/reviewer to have
all changes to a single driver in a single patch set instead of having
multiple patch sets in flight at the same time?

I am basically a bit lost as to how to structure my work flow when
there are so many things to do in one driver. Obviously I'm new to
this, so any tips would be most appreciated.

Does one just have to pick some chunk of work to do, do it as a single
patch set then wait for review/merge? And go off and work on something
else?

Sorry to add confusion to your day, I get a bit over excited at times :)

> And you can wait until I apply a series before sending another one,
> otherwise we can easily get out of sync :(
> 
> thanks,
> 
> greg k-h

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


Re: [PATCH] staging: lusten: conrpc.c: fix different address space sparse warning

2017-03-29 Thread Greg KH
On Thu, Mar 23, 2017 at 04:09:03PM -0300, Marcos Paulo de Souza wrote:
> On Wed, Mar 29, 2017 at 09:31:14AM +0200, Greg KH wrote:
> > On Tue, Mar 28, 2017 at 11:14:06PM -0300, Marcos Paulo de Souza wrote:
> > > head_up parameter is marked with __user attribute, tmp is filled
> > > by a copy_from_user from next, that is also marked as __user, so
> > > tmp.next needs to be "casted" as __user to make sparse happy.
> > 
> > But is it the correct change?
> 
> I don't know, it's my first sparse patch, so I tried to fix this
> warning.
> 
> > 
> > You also have a typo in your subject :(
> 
> Sorry, didn't noticed yesterday :(
> 
> > 
> > > Signed-off-by: Marcos Paulo de Souza 
> > > ---
> > > 
> > >  this is mt first patch addressing an issue of sparse, so let me know
> > >  if I misunderstood the error message
> > > 
> > >  drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
> > > b/drivers/staging/lustre/lnet/selftest/conrpc.c
> > > index c6a683b..fb7ad74 100644
> > > --- a/drivers/staging/lustre/lnet/selftest/conrpc.c
> > > +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
> > > @@ -487,7 +487,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans 
> > > *trans,
> > >  sizeof(struct list_head)))
> > >   return -EFAULT;
> > >  
> > > - if (tmp.next == head_up)
> > > + if ((struct list_head __user *)tmp.next == head_up)
> > 
> > Aer you sure this is correct?  __user changes for lustre is not
> > trivial...
> > 
> > How did you test this?
> 
> I didn't tested, it just removed the warning. Is this a false positive?

I don't know, it's up to you to prove to me that you know this change is
correct.  You have to justify your changes, and "because checkpatch.pl
complained" isn't a valid justification for something like this :)

thanks,

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


Re: [PATCH] staging: lusten: conrpc.c: fix different address space sparse warning

2017-03-29 Thread Marcos Paulo de Souza
On Wed, Mar 29, 2017 at 09:31:14AM +0200, Greg KH wrote:
> On Tue, Mar 28, 2017 at 11:14:06PM -0300, Marcos Paulo de Souza wrote:
> > head_up parameter is marked with __user attribute, tmp is filled
> > by a copy_from_user from next, that is also marked as __user, so
> > tmp.next needs to be "casted" as __user to make sparse happy.
> 
> But is it the correct change?

I don't know, it's my first sparse patch, so I tried to fix this
warning.

> 
> You also have a typo in your subject :(

Sorry, didn't noticed yesterday :(

> 
> > Signed-off-by: Marcos Paulo de Souza 
> > ---
> > 
> >  this is mt first patch addressing an issue of sparse, so let me know
> >  if I misunderstood the error message
> > 
> >  drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
> > b/drivers/staging/lustre/lnet/selftest/conrpc.c
> > index c6a683b..fb7ad74 100644
> > --- a/drivers/staging/lustre/lnet/selftest/conrpc.c
> > +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
> > @@ -487,7 +487,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans 
> > *trans,
> >sizeof(struct list_head)))
> > return -EFAULT;
> >  
> > -   if (tmp.next == head_up)
> > +   if ((struct list_head __user *)tmp.next == head_up)
> 
> Aer you sure this is correct?  __user changes for lustre is not
> trivial...
> 
> How did you test this?

I didn't tested, it just removed the warning. Is this a false positive?

> 
> thanks,
> 
> greg k-h

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


Re: [RFC PATCHv2 00/21] Ion clean in preparation for moving out of staging

2017-03-29 Thread Benjamin Gaignard
2017-03-18 1:54 GMT+01:00 Laura Abbott :
>
> Hi,
>
> This is v2 of the series to do some serious Ion clean up in preparation for
> moving out of staging. I got good feedback last time so this series mostly
> attempts to address that feedback and do more still more cleanup. Highlights:
>
> - All calls to DMA APIs should now be with a real actual proper device
>   structure
> - Patch to stop setting sg_dma_address manually now included
> - Fix for a bug in the query interface
> - Removal of custom ioctl interface
> - Removal of import interface
> - Removal of any notion of using Ion as an in kernel interface.
> - Cleanup of ABI so compat interface is no longer needed
> - Deletion of a bit more platform code
> - Combined heap enumeration and heap registration code up so there are fewer
>   layers of abstraction
> - Some general cleanup and header reduction.
> - Removal of both the ion_client and ion_handle structures since these mostly
>   become redundant. As a result, Ion only returns a dma_buf fd. The overall
>   result is that the only Ion interfaces are the query ioctl and the alloc
>   ioctl.
>
> The following are still TODOs/open problems:
> - Sumit's comments about the CMA naming.
> - Bindings/platform for chunk and carveout heap
> - There was some discussion about making the sg_table duplication generic. I
>   got bogged down in handling some of the edge cases for generic handling
>   so I put this aside. Making it generic is still something that should 
> happen.
> - More fine-grained support for restricting heap access. There are good
>   arguments to be made for having a way for having good integration with
>   selinux and other policy mechanisms.
> - While not on the original list, there is still no good good test standalone
>   test framework. I noticed that the existing ion_test was fairly generic so I
>   proposed moving it to dma_buf. Daniel Vetter suggested just using the VGEM
>   module instead. Ideally, the tests can live as part of some other existing
>   test set (drm tests maybe?)
>
> Feedback appreciated as always.

Thanks for this v2, it really clean up and simplify ION.

For me the last question mark is about restricting heap access with
SElinux policy.
Since I haven't see other proposals I still believe that we should
have a /dev/ion/$heapname
per heap.

>
> Thanks,
> Laura
>
> Laura Abbott (21):
>   cma: Store a name in the cma structure
>   cma: Introduce cma_for_each_area
>   staging: android: ion: Remove dmap_cnt
>   staging: android: ion: Remove alignment from allocation field
>   staging: android: ion: Duplicate sg_table
>   staging: android: ion: Call dma_map_sg for syncing and mapping
>   staging: android: ion: Remove page faulting support
>   staging: android: ion: Remove crufty cache support
>   staging: android: ion: Remove custom ioctl interface
>   staging: android: ion: Remove import interface
>   staging: android: ion: Remove duplicate ION_IOC_MAP
>   staging: android: ion: Remove old platform support
>   staging: android: ion: Use CMA APIs directly
>   staging: android: ion: Stop butchering the DMA address
>   staging: android: ion: Break the ABI in the name of forward progress
>   staging: android: ion: Get rid of ion_phys_addr_t
>   staging: android: ion: Collapse internal header files
>   staging: android: ion: Rework heap registration/enumeration
>   staging: android: ion: Drop ion_map_kernel interface
>   staging: android: ion: Remove ion_handle and ion_client
>   staging: android: ion: Set query return value
>
>  drivers/base/dma-contiguous.c  |5 +-
>  drivers/staging/android/ion/Kconfig|   56 +-
>  drivers/staging/android/ion/Makefile   |   18 +-
>  drivers/staging/android/ion/compat_ion.c   |  195 
>  drivers/staging/android/ion/compat_ion.h   |   29 -
>  drivers/staging/android/ion/hisilicon/Kconfig  |5 -
>  drivers/staging/android/ion/hisilicon/Makefile |1 -
>  drivers/staging/android/ion/hisilicon/hi6220_ion.c |  113 --
>  drivers/staging/android/ion/ion-ioctl.c|   85 +-
>  drivers/staging/android/ion/ion.c  | 1164 
> +++-
>  drivers/staging/android/ion/ion.h  |  393 +--
>  drivers/staging/android/ion/ion_carveout_heap.c|   37 +-
>  drivers/staging/android/ion/ion_chunk_heap.c   |   27 +-
>  drivers/staging/android/ion/ion_cma_heap.c |  125 +--
>  drivers/staging/android/ion/ion_dummy_driver.c |  156 ---
>  drivers/staging/android/ion/ion_heap.c |   68 --
>  drivers/staging/android/ion/ion_of.c   |  184 
>  drivers/staging/android/ion/ion_of.h   |   37 -
>  drivers/staging/android/ion/ion_page_pool.c|6 +-
>  drivers/staging/android/ion/ion_priv.h |  473 
>  drivers/staging/android/ion/ion_system_heap.c  |   53 +-
>  drivers/staging/android/ion/ion_test.c |  305 -
>  drivers/staging/android/ion/teg

Re: [RFC PATCHv2 02/21] cma: Introduce cma_for_each_area

2017-03-29 Thread Benjamin Gaignard
2017-03-18 1:54 GMT+01:00 Laura Abbott :
>
> Frameworks (e.g. Ion) may want to iterate over each possible CMA area to
> allow for enumeration. Introduce a function to allow a callback.

even outside ION rework that could be useful

Reviewed-by: Benjamin Gaignard 

>
> Signed-off-by: Laura Abbott 
> ---
>  include/linux/cma.h |  2 ++
>  mm/cma.c| 14 ++
>  2 files changed, 16 insertions(+)
>
> diff --git a/include/linux/cma.h b/include/linux/cma.h
> index d41d1f8..3e8fbf5 100644
> --- a/include/linux/cma.h
> +++ b/include/linux/cma.h
> @@ -34,4 +34,6 @@ extern int cma_init_reserved_mem(phys_addr_t base, 
> phys_addr_t size,
>  extern struct page *cma_alloc(struct cma *cma, size_t count, unsigned int 
> align,
>   gfp_t gfp_mask);
>  extern bool cma_release(struct cma *cma, const struct page *pages, unsigned 
> int count);
> +
> +extern int cma_for_each_area(int (*it)(struct cma *cma, void *data), void 
> *data);
>  #endif
> diff --git a/mm/cma.c b/mm/cma.c
> index 0d187b1..9a040e1 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -498,3 +498,17 @@ bool cma_release(struct cma *cma, const struct page 
> *pages, unsigned int count)
>
> return true;
>  }
> +
> +int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data)
> +{
> +   int i;
> +
> +   for (i = 0; i < cma_area_count; i++) {
> +   int ret = it(&cma_areas[i], data);
> +
> +   if (ret)
> +   return ret;
> +   }
> +
> +   return 0;
> +}
> --
> 2.7.4
>



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/6] staging: ks7010: fix endian issues

2017-03-29 Thread Tobin C. Harding
On Thu, Mar 16, 2017 at 11:27:21PM +1100, Tobin C. Harding wrote:
> Sparse emits numerous warnings highlighting endian issues. The
> endianess is deterministic because the function calls that are causing
> the issues either accept as parameters, or return as results, types of
> specific size and endianess. We can use these types as a guide in
> changing variable declarations and struct member definitions to suit
> the required endianess.
> 
> Patch 01 renames a common kernel identifier.
> 
> Patch 02 fixes variable passed into ntohs().
> 
> Patch 03 fixes declarations for variables that are used as lval's in calls
> to cpu_to_leXX().
> 
> Patch 04 fixes endian bug, making arithmetic work on any architecture.
> 
> Patch 05 fixes endian variable degrading to integer.
> 
> Patch 06 uses le16_to_cpu() for assigning endian value to cpu type.
> 
> Code has not been tested. Patch set builds on x86_64 and PowerPC.
> 
> Tobin C. Harding (6):
>   staging: ks7010: rename sk_buf ptr to skb
>   staging: ks7010: change unsigned short to __be16
>   staging: ks7010: set lval type of cpu_to_leXX()
>   staging: ks7010: use le16_to_cpu for arithmetic
>   staging: ks7010: add endian non-specific variable
>   staging: ks7010: use le16_to_cpu() to queue event
> 
>  drivers/staging/ks7010/eap_packet.h  |  4 +-
>  drivers/staging/ks7010/ks7010_sdio.c | 14 --
>  drivers/staging/ks7010/ks_hostif.c   | 71 ++---
>  drivers/staging/ks7010/ks_hostif.h   | 88 
> ++--
>  4 files changed, 90 insertions(+), 87 deletions(-)
> 
> -- 
> 2.7.4
> 

Please drop this patch.

There are deeper endian problems with the current code that need
addressing also.

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


Re: [PATCH v6 02/39] [media] dt-bindings: Add bindings for i.MX media driver

2017-03-29 Thread Russell King - ARM Linux
On Tue, Mar 28, 2017 at 07:21:34PM -0500, Rob Herring wrote:
> On Mon, Mar 27, 2017 at 7:40 PM, Steve Longerbeam  
> wrote:
> > Add bindings documentation for the i.MX media driver.
> >
> > Signed-off-by: Steve Longerbeam 
> > ---
> >  Documentation/devicetree/bindings/media/imx.txt | 74 
> > +
> >  1 file changed, 74 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/media/imx.txt
> >
> > diff --git a/Documentation/devicetree/bindings/media/imx.txt 
> > b/Documentation/devicetree/bindings/media/imx.txt
> > new file mode 100644
> > index 000..3059c06
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/imx.txt
> > @@ -0,0 +1,74 @@
> > +Freescale i.MX Media Video Device
> > +=
> > +
> > +Video Media Controller node
> > +---
> > +
> > +This is the media controller node for video capture support. It is a
> > +virtual device that lists the camera serial interface nodes that the
> > +media device will control.
> > +
> > +Required properties:
> > +- compatible : "fsl,imx-capture-subsystem";
> > +- ports  : Should contain a list of phandles pointing to camera
> > +   sensor interface ports of IPU devices
> > +
> > +example:
> > +
> > +capture-subsystem {
> > +   compatible = "fsl,imx-capture-subsystem";
> > +   ports = <&ipu1_csi0>, <&ipu1_csi1>;
> > +};
> > +
> > +fim child node
> > +--
> > +
> > +This is an optional child node of the ipu_csi port nodes. If present and
> > +available, it enables the Frame Interval Monitor. Its properties can be
> > +used to modify the method in which the FIM measures frame intervals.
> > +Refer to Documentation/media/v4l-drivers/imx.rst for more info on the
> > +Frame Interval Monitor.
> > +
> > +Optional properties:
> > +- fsl,input-capture-channel: an input capture channel and channel flags,
> > +specified as . The channel number
> > +must be 0 or 1. The flags can be
> > +IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING, or
> > +IRQ_TYPE_EDGE_BOTH, and specify which input
> > +capture signal edge will trigger the input
> > +capture event. If an input capture channel is
> > +specified, the FIM will use this method to
> > +measure frame intervals instead of via the EOF
> > +interrupt. The input capture method is much
> > +preferred over EOF as it is not subject to
> > +interrupt latency errors. However it requires
> > +routing the VSYNC or FIELD output signals of
> > +the camera sensor to one of the i.MX input
> > +capture pads (SD1_DAT0, SD1_DAT1), which also
> > +gives up support for SD1.
> > +
> > +
> > +mipi_csi2 node
> > +--
> > +
> > +This is the device node for the MIPI CSI-2 Receiver, required for MIPI
> > +CSI-2 sensors.
> > +
> > +Required properties:
> > +- compatible   : "fsl,imx6-mipi-csi2", "snps,dw-mipi-csi2";
> 
> As I mentioned in v5, there's a DW CSI2 binding in progress. This
> needs to be based on that.

Maybe someone can provide some kind of reference to it, and it's
associated driver?

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] [media] staging: css2400: fix checkpatch error

2017-03-29 Thread Haim Daniel
isp_capture_defs.h: clean up ERROR: Macros with complex values should be 
enclosed in parentheses

Signed-off-by: Haim Daniel 
---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
 
b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
index aa413df..117c7a2 100644
--- 
a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
+++ 
b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
@@ -19,7 +19,7 @@
 #define _ISP_CAPTURE_BITS_PER_ELEM32  /* only for data, not 
SOP */
 #define _ISP_CAPTURE_BYTES_PER_ELEM   
(_ISP_CAPTURE_BITS_PER_ELEM/8)  
 #define _ISP_CAPTURE_BYTES_PER_WORD   32   /* 256/8 */ 
-#define _ISP_CAPTURE_ELEM_PER_WORD_ISP_CAPTURE_BYTES_PER_WORD 
/ _ISP_CAPTURE_BYTES_PER_ELEM   
+#define _ISP_CAPTURE_ELEM_PER_WORD(_ISP_CAPTURE_BYTES_PER_WORD 
/ _ISP_CAPTURE_BYTES_PER_ELEM)
 
 //#define CAPT_RCV_ACK  1
 //#define CAPT_WRT_ACK  2   
-- 
1.9.1

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


Re: [PATCH]: staging: media: css2400: fix checkpatch error

2017-03-29 Thread Greg KH
On Wed, Mar 29, 2017 at 08:36:27AM +0300, Haim Daniel wrote:

> >From 41d35b455f8eb139912909639e914469ef5e06fb Mon Sep 17 00:00:00 2001
> From: Haim Daniel 
> Date: Tue, 28 Mar 2017 19:27:57 +0300
> Subject: [PATCH] [media] staging: css2400: fix checkpatch error
> 
> isp_capture_defs.h:

What is this line for?

> 
> enclose macro with complex values in parentheses.
> 
> Signed-off-by: Haim Daniel 
> ---
>  .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 
> +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Please don't attach your patch, use 'git send-email' to send it
properly.

thanks,

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


Re: [PATCH v3] Revert "staging: radio-bcm2048: fixed bare use of unsigned int"

2017-03-29 Thread Greg Kroah-Hartman
On Mon, Mar 27, 2017 at 05:20:29PM +1100, Eddie Youseph wrote:
> This reverts previous changes to checkpatch warning:
> WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> ---
> Changes in v2:
>   - Added changelog
> 
> Changes in v3:
>   - Revert changes to using bare unsigned

I don't understand, this patch fails to apply.  What are you making it
aginst?

confused,

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


Re: [PATCH] Clear sparse warning: different address space

2017-03-29 Thread Greg KH
On Sat, Mar 25, 2017 at 12:05:03AM -0300, Guillermo O. Freschi wrote:
> Made tagged `index` as `__user` to remove warning from
> `obd_iocontrol` call.

Your subject line is odd, please make it match other changes for this
driver.

> Signed-off-by: Guillermo O. Freschi 
> ---
>  drivers/staging/lustre/lustre/llite/dir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/dir.c 
> b/drivers/staging/lustre/lustre/llite/dir.c
> index 13b35922a4ca..acdde21d41d9 100644
> --- a/drivers/staging/lustre/lustre/llite/dir.c
> +++ b/drivers/staging/lustre/lustre/llite/dir.c
> @@ -1464,7 +1464,7 @@ static long ll_dir_ioctl(struct file *file, unsigned 
> int cmd, unsigned long arg)
>   case LL_IOC_FID2MDTIDX: {
>   struct obd_export *exp = ll_i2mdexp(inode);
>   struct lu_fid fid;
> - __u32 index;
> + __u32 __user index;

Are you sure?  How did you test this?

thanks,

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


Re: [PATCHv2] staging: wlan-ng: fix avoid multiple line dereference warning reported by checkpatch.pl

2017-03-29 Thread Greg KH
On Sun, Mar 12, 2017 at 05:30:09PM +0200, Andrii wrote:
> Fixed three code style warnings (multiple line dereference) reported
> by checkpatch.pl script.
> 
> Signed-off-by: Andrii Vladyka 
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c 
> b/drivers/staging/wlan-ng/hfa384x_usb.c
> index 6134eba..a050748 100644
> --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> @@ -1346,14 +1346,8 @@ hfa384x_docmd(struct hfa384x *hw,
>   } else if (mode == DOWAIT) {
>   struct usbctlx_cmd_completor completor;
>  
> - result =
> - hfa384x_usbctlx_complete_sync(hw, ctlx,
> -   init_cmd_completor(&completor,
> -  &ctlx->
> -  inbuf.
> -  cmdresp,
> -  &cmd->
> -  result));
> + result = hfa384x_usbctlx_complete_sync(hw, ctlx,
> + init_cmd_completor(&completor, &ctlx->inbuf.cmdresp, &cmd->result))

Ick, no, that doesn't look right, does it?

Please use your brain when making checkpatch changes, it's just a dumb
perl script...

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


Re: [PATCH] staging: rtl8188eu: fix unnecessary parentheses, multiple blank lines, spaces around '&' reported by checkpatch.pl

2017-03-29 Thread Greg KH
On Sun, Mar 12, 2017 at 06:52:26PM +0200, Andrii wrote:
> Signed-off-by: Andrii Vladyka 

I can't take a patch without any changelog text :(

Also, your From: line does not match your signed-off-by line :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: lusten: conrpc.c: fix different address space sparse warning

2017-03-29 Thread Greg KH
On Tue, Mar 28, 2017 at 11:14:06PM -0300, Marcos Paulo de Souza wrote:
> head_up parameter is marked with __user attribute, tmp is filled
> by a copy_from_user from next, that is also marked as __user, so
> tmp.next needs to be "casted" as __user to make sparse happy.

But is it the correct change?

You also have a typo in your subject :(

> Signed-off-by: Marcos Paulo de Souza 
> ---
> 
>  this is mt first patch addressing an issue of sparse, so let me know
>  if I misunderstood the error message
> 
>  drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c 
> b/drivers/staging/lustre/lnet/selftest/conrpc.c
> index c6a683b..fb7ad74 100644
> --- a/drivers/staging/lustre/lnet/selftest/conrpc.c
> +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
> @@ -487,7 +487,7 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans 
> *trans,
>  sizeof(struct list_head)))
>   return -EFAULT;
>  
> - if (tmp.next == head_up)
> + if ((struct list_head __user *)tmp.next == head_up)

Aer you sure this is correct?  __user changes for lustre is not
trivial...

How did you test this?

thanks,

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


Re: [PATCH v2] [media] staging: css2400: fix checkpatch error

2017-03-29 Thread Greg KH
On Wed, Mar 29, 2017 at 10:12:28AM +0300, Haim Daniel wrote:
> isp_capture_defs.h:

What is this line for?

> fix checkpatch ERROR: 

Trailing whitespace?

> Macros with complex values should be enclosed in parentheses
> 
> Signed-off-by: Haim Daniel 
> ---
>  .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 
> +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
>  
> b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
> index aa413df..78cbbf6 100644
> --- 
> a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
> +++ 
> b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
> @@ -19,7 +19,7 @@
>  #define _ISP_CAPTURE_BITS_PER_ELEM32  /* only for data, not 
> SOP */  
>  #define _ISP_CAPTURE_BYTES_PER_ELEM   
> (_ISP_CAPTURE_BITS_PER_ELEM/8  )  
>  #define _ISP_CAPTURE_BYTES_PER_WORD   32 /* 256/8 */ 
> -#define _ISP_CAPTURE_ELEM_PER_WORD
> _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM 
> +#define _ISP_CAPTURE_ELEM_PER_WORD
> (_ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM) 

Does this change really make sense?  Why keep the trailing whitespace if
you touch the line?

thanks,

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


Re: [PATCH 1/1] staging: rtl8188eu: Macros with complex values should be enclosed in parentheses

2017-03-29 Thread Greg KH
On Tue, Mar 28, 2017 at 09:56:19PM +0100, Alfonso Lima Astor wrote:
> Fix coding style issue
> 
> Signed-off-by: Alfonso Lima Astor 
> ---
>  drivers/staging/rtl8188eu/include/rtw_ioctl.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl.h 
> b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
> index a6b1c85..0c022a5 100644
> --- a/drivers/staging/rtl8188eu/include/rtw_ioctl.h
> +++ b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
> @@ -59,10 +59,10 @@
>  #define OID_MP_SEG4  0xFF011100
>  
>  #define DEBUG_OID(dbg, str)  \
> - if ((!dbg)) {   \
> + (if ((!dbg)) {  \
>   RT_TRACE(_module_rtl871x_ioctl_c_, _drv_info_,  \
>("%s(%d): %s", __func__, __line__, str));  \
> - }
> + })

Your change doesn't do what you think it does :(

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


Re: [PATCH 0/3] staging: ks7010: refactor tx_device_task()

2017-03-29 Thread Greg Kroah-Hartman
On Sun, Mar 26, 2017 at 07:45:12PM +1100, Tobin C. Harding wrote:
> Function tx_device_task() is a candidate for refactoring. Checkpatch
> emits a number of warnings/checks for this function.
> 
> Patch 01 inverts if statement conditional and reduces the level of
> nesting.
> 
> Patch 02 renames rc -> ret, fixes function call and checkpatch WARNING.
> 
> Patch 03 fixes function argument alignment, and checkpatch CHECK.
> 
> Code is untested. Patch set applies and builds on x86_64 and PowerPC.

I count 35+ patches from you for the same driver within 2 days.  What
order am I supposed to apply these patches in?  Please resend them all
as a single patch series, so I have a chance to get it right.

And you can wait until I apply a series before sending another one,
otherwise we can easily get out of sync :(

thanks,

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


Re: [PATCH v3] staging: goldfish: Fix style issues in macros

2017-03-29 Thread Greg KH
On Mon, Mar 27, 2017 at 03:19:06PM +0300, aviyae wrote:
> Fix coding style issues in macros:
> 1. Add parenthesis around macro arguments
> 2. Avoid arguments reuse in macro

That's different things, please make different patches for this.

Remember, only one patch per "thing" and "fix all style issues" is not
"one thing" :)

thanks,

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


Re: [PATCH] minor coding style fix

2017-03-29 Thread Greg Kroah-Hartman
On Mon, Mar 27, 2017 at 03:34:47PM +0100, sfaragnaus wrote:
> This patch fix a minor coding style issue.

You need to be a lot more specific here, and in your subject line.

> Signed-off-by: sfaragnaus 

I also need a "real name" here and in the from: line please.

thanks,

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


[PATCH v2] [media] staging: css2400: fix checkpatch error

2017-03-29 Thread Haim Daniel
isp_capture_defs.h:

fix checkpatch ERROR: 
Macros with complex values should be enclosed in parentheses

Signed-off-by: Haim Daniel 
---
 .../pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
 
b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
index aa413df..78cbbf6 100644
--- 
a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
+++ 
b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
@@ -19,7 +19,7 @@
 #define _ISP_CAPTURE_BITS_PER_ELEM32  /* only for data, not 
SOP */
 #define _ISP_CAPTURE_BYTES_PER_ELEM   
(_ISP_CAPTURE_BITS_PER_ELEM/8)  
 #define _ISP_CAPTURE_BYTES_PER_WORD   32   /* 256/8 */ 
-#define _ISP_CAPTURE_ELEM_PER_WORD_ISP_CAPTURE_BYTES_PER_WORD 
/ _ISP_CAPTURE_BYTES_PER_ELEM   
+#define _ISP_CAPTURE_ELEM_PER_WORD(_ISP_CAPTURE_BYTES_PER_WORD 
/ _ISP_CAPTURE_BYTES_PER_ELEM) 
 
 //#define CAPT_RCV_ACK  1
 //#define CAPT_WRT_ACK  2   
-- 
1.9.1

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


Re: [PATCH 1/1] drivers: staging: fbtft: Hush Checkpatch.pl Error about unnecessary whitespace and comma

2017-03-29 Thread Greg KH
On Wed, Mar 29, 2017 at 12:23:01PM +0530, vaibhavd...@gmail.com wrote:
> From: Vaibhav Kothari 
> 
> Removed whitespace & comma in fbtft-bus.c as a part of
> checkpatch.pl fix-up.

Did you test build this?  Always do so, otherwise you will get grumpy
emails saying you need to test-build your changes...

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


Re: [PATCH] Remove atomisp/i2c style errors.

2017-03-29 Thread Greg KH
On Tue, Mar 28, 2017 at 08:31:37PM -0700, Daniel Cashman wrote:
> From: Dan Cashman 

Please list what the issue you fixed in the subject line.

Also change the subject to match others for this driver, a 'git log'
will show you what to do there.

> 
> Remove two ' , ' issues and change spaces to tabs found by poking around in
> drivers/staging/. Warnings left untouched.
> 
> Test: Run checkpatch script in drivers/staging/media/atomisp/i2c before and
> after change.  Errors go from 3 to 0.

This isn't needed, and really, you didn't test the code, only a random
perl script :)

thanks,

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


Re: [PATCH] staging: media: atomisp: i2c: removed unnecessary white space before comma in memset()

2017-03-29 Thread Greg KH
On Tue, Mar 28, 2017 at 11:02:45AM +0530, vaibhavd...@gmail.com wrote:
> From: Vaibhav Kothari 
> 
> Removed extra space before comma in memset() as a part of
> checkpatch.pl fix-up.
> 
> Signed-off-by: Vaibhav Kothari 
> ---
>  drivers/staging/media/atomisp/i2c/gc2235.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

What changed from your prior emails with the same subject?  Always
version your patches, as SubmittingPatches describes how to do.

Please fix up and resend.

thanks,

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