Re: [PATCH v3 24/27] staging: ccree: use a consistent file naming convention

2018-01-08 Thread Gilad Ben-Yossef
On Mon, Jan 8, 2018 at 5:28 PM, Greg Kroah-Hartman
 wrote:
> On Sun, Jan 07, 2018 at 12:14:35PM +, Gilad Ben-Yossef wrote:
>> The ccree driver source files were using an inconsistent
>> naming convention stemming from what the company was called
>> when they were added.
>>
>> Move to a single consistent naming convention for better
>> code readability.
>>
>> Signed-off-by: Gilad Ben-Yossef 
>> ---
>>  drivers/staging/ccree/Makefile   |6 +-
>>  drivers/staging/ccree/cc_aead.c  | 2709 
>> ++
>>  drivers/staging/ccree/cc_aead.h  |  109 ++
>>  drivers/staging/ccree/cc_buffer_mgr.c| 1657 ++
>>  drivers/staging/ccree/cc_buffer_mgr.h|   74 +
>>  drivers/staging/ccree/cc_cipher.c| 1171 +
>>  drivers/staging/ccree/cc_cipher.h|   74 +
>>  drivers/staging/ccree/cc_debugfs.c   |2 +-
>>  drivers/staging/ccree/cc_driver.c|  508 ++
>>  drivers/staging/ccree/cc_driver.h|  194 +++
>>  drivers/staging/ccree/cc_fips.c  |  112 ++
>>  drivers/staging/ccree/cc_fips.h  |   37 +
>>  drivers/staging/ccree/cc_hash.c  | 2299 +
>>  drivers/staging/ccree/cc_hash.h  |  114 ++
>>  drivers/staging/ccree/cc_host_regs.h |  142 ++
>>  drivers/staging/ccree/cc_hw_queue_defs.h |2 +-
>>  drivers/staging/ccree/cc_ivgen.c |  281 
>>  drivers/staging/ccree/cc_ivgen.h |   55 +
>>  drivers/staging/ccree/cc_kernel_regs.h   |  167 ++
>>  drivers/staging/ccree/cc_pm.c|  125 ++
>>  drivers/staging/ccree/cc_pm.h|   57 +
>>  drivers/staging/ccree/cc_request_mgr.c   |  719 
>>  drivers/staging/ccree/cc_request_mgr.h   |   51 +
>>  drivers/staging/ccree/cc_sram_mgr.c  |  107 ++
>>  drivers/staging/ccree/cc_sram_mgr.h  |   65 +
>>  drivers/staging/ccree/dx_crys_kernel.h   |  167 --
>>  drivers/staging/ccree/dx_host.h  |  142 --
>>  drivers/staging/ccree/ssi_aead.c | 2709 
>> --
>>  drivers/staging/ccree/ssi_aead.h |  109 --
>>  drivers/staging/ccree/ssi_buffer_mgr.c   | 1657 --
>>  drivers/staging/ccree/ssi_buffer_mgr.h   |   74 -
>>  drivers/staging/ccree/ssi_cipher.c   | 1171 -
>>  drivers/staging/ccree/ssi_cipher.h   |   74 -
>>  drivers/staging/ccree/ssi_driver.c   |  508 --
>>  drivers/staging/ccree/ssi_driver.h   |  194 ---
>>  drivers/staging/ccree/ssi_fips.c |  112 --
>>  drivers/staging/ccree/ssi_fips.h |   37 -
>>  drivers/staging/ccree/ssi_hash.c | 2299 -
>>  drivers/staging/ccree/ssi_hash.h |  114 --
>>  drivers/staging/ccree/ssi_ivgen.c|  281 
>>  drivers/staging/ccree/ssi_ivgen.h|   55 -
>>  drivers/staging/ccree/ssi_pm.c   |  125 --
>>  drivers/staging/ccree/ssi_pm.h   |   57 -
>>  drivers/staging/ccree/ssi_request_mgr.c  |  719 
>>  drivers/staging/ccree/ssi_request_mgr.h  |   51 -
>>  drivers/staging/ccree/ssi_sram_mgr.c |  107 --
>>  drivers/staging/ccree/ssi_sram_mgr.h |   65 -
>>  47 files changed, 10832 insertions(+), 10832 deletions(-)
>>  create mode 100644 drivers/staging/ccree/cc_aead.c
>>  create mode 100644 drivers/staging/ccree/cc_aead.h
>>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.c
>>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.h
>>  create mode 100644 drivers/staging/ccree/cc_cipher.c
>>  create mode 100644 drivers/staging/ccree/cc_cipher.h
>>  create mode 100644 drivers/staging/ccree/cc_driver.c
>>  create mode 100644 drivers/staging/ccree/cc_driver.h
>>  create mode 100644 drivers/staging/ccree/cc_fips.c
>>  create mode 100644 drivers/staging/ccree/cc_fips.h
>>  create mode 100644 drivers/staging/ccree/cc_hash.c
>>  create mode 100644 drivers/staging/ccree/cc_hash.h
>>  create mode 100644 drivers/staging/ccree/cc_host_regs.h
>>  create mode 100644 drivers/staging/ccree/cc_ivgen.c
>>  create mode 100644 drivers/staging/ccree/cc_ivgen.h
>>  create mode 100644 drivers/staging/ccree/cc_kernel_regs.h
>>  create mode 100644 drivers/staging/ccree/cc_pm.c
>>  create mode 100644 drivers/staging/ccree/cc_pm.h
>>  create mode 100644 drivers/staging/ccree/cc_request_mgr.c
>>  create mode 100644 drivers/staging/ccree/cc_request_mgr.h
>>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.c
>>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.h
>>  delete mode 100644 drivers/staging/ccree/dx_crys_kernel.h
>>  delete mode 100644 drivers/staging/ccree/dx_host.h
>>  delete mode 100644 drivers/staging/ccree/ssi_aead.c
>>  delete mode 100644 drivers/staging/ccree/ssi_aead.h
>>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.c
>>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.h
>>  delete mode 100644 drivers/staging/ccree/ssi_cipher.c
>>  delete mode 100644 

Re: [PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting

2018-01-08 Thread Chen Feng


On 2018/1/9 18:43, Zeng Tao wrote:
> This issue is introduced by the commit  ("ION: Sys_heap:
> Add cached pool to spead up cached buffer alloc"), the gfp_mask low
> order pool is overlapped by the high order inside the loop, so the
> gfp_mask of all pools are set to high_order_gfp_flags.
> 

Thanks
> Signed-off-by: Zeng Tao 
> ---
>  drivers/staging/android/ion/ion_system_heap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/android/ion/ion_system_heap.c 
> b/drivers/staging/android/ion/ion_system_heap.c
> index 4dc5d7a..b6386be 100644
> --- a/drivers/staging/android/ion/ion_system_heap.c
> +++ b/drivers/staging/android/ion/ion_system_heap.c
> @@ -298,10 +298,10 @@ static int ion_system_heap_create_pools(struct 
> ion_page_pool **pools,
>   bool cached)
>  {
>   int i;
> - gfp_t gfp_flags = low_order_gfp_flags;
>  
>   for (i = 0; i < NUM_ORDERS; i++) {
>   struct ion_page_pool *pool;
> + gfp_t gfp_flags = low_order_gfp_flags;

Not define here. Better "gfp_flags = low_order_gfp_flags"
>  
>   if (orders[i] > 4)
>   gfp_flags = high_order_gfp_flags;
> 

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


[PATCH] ION: Sys_heap: fix the incorrect pool->gfp_mask setting

2018-01-08 Thread Zeng Tao
This issue is introduced by the commit  ("ION: Sys_heap:
Add cached pool to spead up cached buffer alloc"), the gfp_mask low
order pool is overlapped by the high order inside the loop, so the
gfp_mask of all pools are set to high_order_gfp_flags.

Signed-off-by: Zeng Tao 
---
 drivers/staging/android/ion/ion_system_heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_system_heap.c 
b/drivers/staging/android/ion/ion_system_heap.c
index 4dc5d7a..b6386be 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -298,10 +298,10 @@ static int ion_system_heap_create_pools(struct 
ion_page_pool **pools,
bool cached)
 {
int i;
-   gfp_t gfp_flags = low_order_gfp_flags;
 
for (i = 0; i < NUM_ORDERS; i++) {
struct ion_page_pool *pool;
+   gfp_t gfp_flags = low_order_gfp_flags;
 
if (orders[i] > 4)
gfp_flags = high_order_gfp_flags;
-- 
2.7.4

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


Re: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else

2018-01-08 Thread Dan Carpenter
> There are counterexamples in the subsystem.

Staging is essentially one giant counter example.

regards,
dan carpenter

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


Re: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else

2018-01-08 Thread Joe Perches
On Mon, 2018-01-08 at 22:26 +0300, Dan Carpenter wrote:
> On Mon, Jan 08, 2018 at 10:27:01AM -0800, Joe Perches wrote:
> > On Mon, 2018-01-08 at 18:03 +0300, Dan Carpenter wrote:
> > > On Mon, Jan 08, 2018 at 11:06:37AM +0100, Luis Gerhorst wrote:
> > > > The Linux kernel coding style states that braces should only be used
> > > > when necessary.
> > > > 
> > > > This fixes the checkpatch warning
> > > > 
> > > > WARNING: line over 80 characters
> > > > +   } else if (display->regwidth == 8 && display->buswidth == 9 && 
> > > > par->spi) {
> > > > 
> > > > introduced by patch #1.
> > > > 
> > > 
> > > Don't introduce warnings and then fix them in later patches.

Hey Dan.

btw: I completely agree with this

> > > Anyway there is another unwritten rule that multi-line indents get curly
> > > braces.  Probably it should be:
> > 
> > Nope.  That'd be your own preferred style.
> > 
> I copied it from Greg so it's the subsystem style.

I don't fine any examples that match your
suggestion above in drivers/staging/fbtft.

Perhaps because there aren't many multi line
if statements.

All of the blocks that use braces are required
because one or more of the if/else blocks
contain multiple statements.

There are counterexamples in the subsystem.

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


Re: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else

2018-01-08 Thread Dan Carpenter
On Mon, Jan 08, 2018 at 10:27:01AM -0800, Joe Perches wrote:
> On Mon, 2018-01-08 at 18:03 +0300, Dan Carpenter wrote:
> > On Mon, Jan 08, 2018 at 11:06:37AM +0100, Luis Gerhorst wrote:
> > > The Linux kernel coding style states that braces should only be used
> > > when necessary.
> > > 
> > > This fixes the checkpatch warning
> > > 
> > > WARNING: line over 80 characters
> > > + } else if (display->regwidth == 8 && display->buswidth == 9 && 
> > > par->spi) {
> > > 
> > > introduced by patch #1.
> > > 
> > 
> > Don't introduce warnings and then fix them in later patches.
> > 
> > Anyway there is another unwritten rule that multi-line indents get curly
> > braces.  Probably it should be:
> 
> Nope.  That'd be your own preferred style.
> 

I copied it from Greg so it's the subsystem style.


> If you want it to be followed by others,
> please try and get it added to CodingStyle
> and use examples to show why it's better
> than allowing maintainer preference.
> 

I'm not going to NACK patches which don't follow that rule, so it's not
something which is helpful to put in checkpatch.pl.  The reason I'm
complaining about this patch is that it fixes a patch the author
introduces earlier in the patchset.


> > } else if (display->regwidth == 8 && display->buswidth == 9 &&
> >par->spi) {
> 
> My own preferred style here would be to align
> the display->regwidth and display->buswidth so
> I can differentiate the similarity in naming a
> bit more easily.

Yeah.  I thought about that as well but then it takes up 3 lines...
Either way is fine.

> 
>   } else if (display->regwidth == 8 &&
>  display->buswidth == 9 && par->spi) {
> 
> I'm not sure at all there is a single best
> style for this and it can easily become
> situation dependent.
> 
> And so I suggest not adding anything about this
> style nit to CodingStyle.

Agreed.

regards,
dan carpenter

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


Re: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else

2018-01-08 Thread Joe Perches
On Mon, 2018-01-08 at 18:03 +0300, Dan Carpenter wrote:
> On Mon, Jan 08, 2018 at 11:06:37AM +0100, Luis Gerhorst wrote:
> > The Linux kernel coding style states that braces should only be used
> > when necessary.
> > 
> > This fixes the checkpatch warning
> > 
> > WARNING: line over 80 characters
> > +   } else if (display->regwidth == 8 && display->buswidth == 9 && 
> > par->spi) {
> > 
> > introduced by patch #1.
> > 
> 
> Don't introduce warnings and then fix them in later patches.
> 
> Anyway there is another unwritten rule that multi-line indents get curly
> braces.  Probably it should be:

Nope.  That'd be your own preferred style.

If you want it to be followed by others,
please try and get it added to CodingStyle
and use examples to show why it's better
than allowing maintainer preference.

>   } else if (display->regwidth == 8 && display->buswidth == 9 &&
>  par->spi) {

My own preferred style here would be to align
the display->regwidth and display->buswidth so
I can differentiate the similarity in naming a
bit more easily.

} else if (display->regwidth == 8 &&
   display->buswidth == 9 && par->spi) {

I'm not sure at all there is a single best
style for this and it can easily become
situation dependent.

And so I suggest not adding anything about this
style nit to CodingStyle.

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


Re: hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-08 Thread SF Markus Elfring
> These messages are not displayed anywhere else:
> "unable to allocate receive buffer of size %u\n"
> "unable to allocate send buffer of size %u\n",
> 
> After set ret = -ENOMEM; and cleanup, we won't know which buffer allocation 
> failed without the error message.

Do you notice a Linux allocation failure report before them in your system?


> So please do not remove these messages.

How much does the distinction matter for these buffers?

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


Re: [greybus-dev] [PATCH v2] Staging: greybus: camera: cleanup multiple checks for null pointers

2018-01-08 Thread Alex Elder
On 01/08/2018 10:50 AM, Sumit Pundir wrote:
> Fixed coding style issue regarding null comparison at multiple lines.
> Issue reported by checkpatch.pl
> 
> Signed-off-by: Sumit Pundir 

Looks good.  The subject should say "staging" rather than "Staging" 
but that's probably not a big deal.

Reviewed-by: Alex Elder 

> ---
> v2:
>  Updated the patch title and description.
> 
>  drivers/staging/greybus/camera.c | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/greybus/camera.c 
> b/drivers/staging/greybus/camera.c
> index f13f16b..07ebfb8 100644
> --- a/drivers/staging/greybus/camera.c
> +++ b/drivers/staging/greybus/camera.c
> @@ -918,7 +918,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
> gb_camera *gcam,
>  
>   /* Retrieve number of streams to configure */
>   token = strsep(, ";");
> - if (token == NULL)
> + if (!token)
>   return -EINVAL;
>  
>   ret = kstrtouint(token, 10, );
> @@ -929,7 +929,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
> gb_camera *gcam,
>   return -EINVAL;
>  
>   token = strsep(, ";");
> - if (token == NULL)
> + if (!token)
>   return -EINVAL;
>  
>   ret = kstrtouint(token, 10, );
> @@ -946,7 +946,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
> gb_camera *gcam,
>  
>   /* width */
>   token = strsep(, ";");
> - if (token == NULL) {
> + if (!token) {
>   ret = -EINVAL;
>   goto done;
>   }
> @@ -956,7 +956,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
> gb_camera *gcam,
>  
>   /* height */
>   token = strsep(, ";");
> - if (token == NULL)
> + if (!token)
>   goto done;
>  
>   ret = kstrtouint(token, 10, >height);
> @@ -965,7 +965,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
> gb_camera *gcam,
>  
>   /* Image format code */
>   token = strsep(, ";");
> - if (token == NULL)
> + if (!token)
>   goto done;
>  
>   ret = kstrtouint(token, 16, >format);
> @@ -1009,7 +1009,7 @@ static ssize_t gb_camera_debugfs_capture(struct 
> gb_camera *gcam,
>  
>   /* Request id */
>   token = strsep(, ";");
> - if (token == NULL)
> + if (!token)
>   return -EINVAL;
>   ret = kstrtouint(token, 10, _id);
>   if (ret < 0)
> @@ -1017,7 +1017,7 @@ static ssize_t gb_camera_debugfs_capture(struct 
> gb_camera *gcam,
>  
>   /* Stream mask */
>   token = strsep(, ";");
> - if (token == NULL)
> + if (!token)
>   return -EINVAL;
>   ret = kstrtouint(token, 16, _mask);
>   if (ret < 0)
> @@ -1025,7 +1025,7 @@ static ssize_t gb_camera_debugfs_capture(struct 
> gb_camera *gcam,
>  
>   /* number of frames */
>   token = strsep(, ";");
> - if (token == NULL)
> + if (!token)
>   return -EINVAL;
>   ret = kstrtouint(token, 10, _frames);
>   if (ret < 0)
> 

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


[PATCH] staging: pi433: align function parameters with open parenthesis

2018-01-08 Thread Valentin Vidic
Fixes checkpatch warnings:

  CHECK: Alignment should match open parenthesis
---
 drivers/staging/pi433/pi433_if.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index f56425ffbe90..edcd7e798f99 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -799,7 +799,7 @@ pi433_read(struct file *filp, char __user *buf, size_t 
size, loff_t *f_pos)
 
 static ssize_t
 pi433_write(struct file *filp, const char __user *buf,
-   size_t count, loff_t *f_pos)
+   size_t count, loff_t *f_pos)
 {
struct pi433_instance   *instance;
struct pi433_device *device;
@@ -870,17 +870,17 @@ pi433_ioctl(struct file *filp, unsigned int cmd, unsigned 
long arg)
switch (cmd) {
case PI433_IOC_RD_TX_CFG:
if (copy_to_user(argp, >tx_cfg,
-   sizeof(struct pi433_tx_cfg)))
+sizeof(struct pi433_tx_cfg)))
return -EFAULT;
break;
case PI433_IOC_WR_TX_CFG:
if (copy_from_user(>tx_cfg, argp,
-   sizeof(struct pi433_tx_cfg)))
+  sizeof(struct pi433_tx_cfg)))
return -EFAULT;
break;
case PI433_IOC_RD_RX_CFG:
if (copy_to_user(argp, >rx_cfg,
-   sizeof(struct pi433_rx_cfg)))
+sizeof(struct pi433_rx_cfg)))
return -EFAULT;
break;
case PI433_IOC_WR_RX_CFG:
@@ -893,7 +893,7 @@ pi433_ioctl(struct file *filp, unsigned int cmd, unsigned 
long arg)
}
 
if (copy_from_user(>rx_cfg, argp,
-   sizeof(struct pi433_rx_cfg))) {
+  sizeof(struct pi433_rx_cfg))) {
mutex_unlock(>rx_lock);
return -EFAULT;
}
-- 
2.15.1

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


[PATCH] staging: pi433: remove unnecessary parentheses

2018-01-08 Thread Valentin Vidic
Fixes checkpatch warnings:

  CHECK: Unnecessary parentheses around 'mantisse != mantisse16'
  CHECK: Unnecessary parentheses around 'mantisse != mantisse20'
  CHECK: Unnecessary parentheses around 'mantisse != mantisse24'

Signed-off-by: Valentin Vidic 
---
 drivers/staging/pi433/rf69.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index bdd00f750765..a07fc6bc27f7 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -391,9 +391,9 @@ static int rf69_set_bandwidth_intern(struct spi_device 
*spi, u8 reg,
return -EINVAL;
}
 
-   if ((mantisse != mantisse16) &&
-   (mantisse != mantisse20) &&
-   (mantisse != mantisse24)) {
+   if (mantisse != mantisse16 &&
+   mantisse != mantisse20 &&
+   mantisse != mantisse24) {
dev_dbg(>dev, "set: illegal input param");
return -EINVAL;
}
-- 
2.15.1

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


[PATCH] staging: pi433: replace shifting with BIT macro

2018-01-08 Thread Valentin Vidic
Fixes checkpatch warnings:

  CHECK: Prefer using the BIT macro

Signed-off-by: Valentin Vidic 
---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 960249c600a5..f56425ffbe90 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -54,7 +54,7 @@
 #include "pi433_if.h"
 #include "rf69.h"
 
-#define N_PI433_MINORS (1U << MINORBITS) /*32*//* ... 
up to 256 */
+#define N_PI433_MINORS BIT(MINORBITS) /*32*/   /* ... up to 
256 */
 #define MAX_MSG_SIZE   900 /* min: FIFO_SIZE! */
 #define MSG_FIFO_SIZE  65536   /* 65536 = 2^16  */
 #define NUM_DIO2
-- 
2.15.1

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


[PATCH v2] Staging: greybus: camera: cleanup multiple checks for null pointers

2018-01-08 Thread Sumit Pundir
Fixed coding style issue regarding null comparison at multiple lines.
Issue reported by checkpatch.pl

Signed-off-by: Sumit Pundir 
---
v2:
 Updated the patch title and description.

 drivers/staging/greybus/camera.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index f13f16b..07ebfb8 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -918,7 +918,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
gb_camera *gcam,
 
/* Retrieve number of streams to configure */
token = strsep(, ";");
-   if (token == NULL)
+   if (!token)
return -EINVAL;
 
ret = kstrtouint(token, 10, );
@@ -929,7 +929,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
gb_camera *gcam,
return -EINVAL;
 
token = strsep(, ";");
-   if (token == NULL)
+   if (!token)
return -EINVAL;
 
ret = kstrtouint(token, 10, );
@@ -946,7 +946,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
gb_camera *gcam,
 
/* width */
token = strsep(, ";");
-   if (token == NULL) {
+   if (!token) {
ret = -EINVAL;
goto done;
}
@@ -956,7 +956,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
gb_camera *gcam,
 
/* height */
token = strsep(, ";");
-   if (token == NULL)
+   if (!token)
goto done;
 
ret = kstrtouint(token, 10, >height);
@@ -965,7 +965,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct 
gb_camera *gcam,
 
/* Image format code */
token = strsep(, ";");
-   if (token == NULL)
+   if (!token)
goto done;
 
ret = kstrtouint(token, 16, >format);
@@ -1009,7 +1009,7 @@ static ssize_t gb_camera_debugfs_capture(struct gb_camera 
*gcam,
 
/* Request id */
token = strsep(, ";");
-   if (token == NULL)
+   if (!token)
return -EINVAL;
ret = kstrtouint(token, 10, _id);
if (ret < 0)
@@ -1017,7 +1017,7 @@ static ssize_t gb_camera_debugfs_capture(struct gb_camera 
*gcam,
 
/* Stream mask */
token = strsep(, ";");
-   if (token == NULL)
+   if (!token)
return -EINVAL;
ret = kstrtouint(token, 16, _mask);
if (ret < 0)
@@ -1025,7 +1025,7 @@ static ssize_t gb_camera_debugfs_capture(struct gb_camera 
*gcam,
 
/* number of frames */
token = strsep(, ";");
-   if (token == NULL)
+   if (!token)
return -EINVAL;
ret = kstrtouint(token, 10, _frames);
if (ret < 0)
-- 
2.7.4

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


Re: [PATCH] Staging: greybus: Fix multiple checks for null pointers

2018-01-08 Thread Sumit Pundir
On Mon, Jan 8, 2018 at 8:15 PM, Johan Hovold  wrote:

> Since you're not really fixing anything here, besides silencing a
> checkpatch suggestion when run with the --strict option (or on staging
> code), I suggest you reword you commit summary (Subject) to, for
> example:
>
> staging: greybus: camera: clean up NULL checks
>
> or similar.
>
> Note that I also added "camera" as a module prefix above.
>
Hi Johan,

I will send a v2 of this patch with all the prescribed changes.

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


RE: [PATCH] hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-08 Thread Haiyang Zhang


> -Original Message-
> From: SF Markus Elfring [mailto:elfr...@users.sourceforge.net]
> Sent: Sunday, January 7, 2018 3:10 PM
> To: de...@linuxdriverproject.org; net...@vger.kernel.org; Haiyang Zhang
> ; KY Srinivasan ; Stephen
> Hemminger 
> Cc: LKML ; kernel-janit...@vger.kernel.org
> Subject: [PATCH] hyperv/netvsc: Delete two error messages for a failed
> memory allocation in netvsc_init_buf()
> 
> From: Markus Elfring 
> Date: Sun, 7 Jan 2018 21:03:26 +0100
> 
> Omit extra messages for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring 
> ---
>  drivers/net/hyperv/netvsc.c | 5 -
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index
> 17e529af79dc..c1ec02f801f6 100644
> --- a/drivers/net/hyperv/netvsc.c
> +++ b/drivers/net/hyperv/netvsc.c
> @@ -275,9 +275,6 @@ static int netvsc_init_buf(struct hv_device *device,
> 
>   net_device->recv_buf = vzalloc(buf_size);
>   if (!net_device->recv_buf) {
> - netdev_err(ndev,
> -"unable to allocate receive buffer of size %u\n",
> -buf_size);
>   ret = -ENOMEM;
>   goto cleanup;
>   }
> @@ -357,8 +354,6 @@ static int netvsc_init_buf(struct hv_device *device,
> 
>   net_device->send_buf = vzalloc(buf_size);
>   if (!net_device->send_buf) {
> - netdev_err(ndev, "unable to allocate send buffer of
> size %u\n",
> -buf_size);
>   ret = -ENOMEM;
>   goto cleanup;
>   }

These messages are not displayed anywhere else:
"unable to allocate receive buffer of size %u\n"
"unable to allocate send buffer of size %u\n",

After set ret = -ENOMEM; and cleanup, we won't know which buffer allocation 
failed without the error message.

So please do not remove these messages.

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


Re: [PATCH] Staging: vt6656: Fix unnecessary parantheses

2018-01-08 Thread Greg KH
On Mon, Dec 25, 2017 at 11:05:34AM +0530, Sumit Pundir wrote:
> This patch fixes a few coding style issues as noted by checkpatch.pl
> related to unnecessary parantheses.
> 
> This patch fixes the following checkpatch.pl warnings:
> 
> WARNING: Unnecessary parentheses around 'priv->eeprom[EEP_OFS_MAJOR_VER] == 
> 0x1'
> WARNING: Unnecessary parentheses around 'priv->eeprom[EEP_OFS_MINOR_VER] >= 
> 0x4'
> 
> Signed-off-by: Sumit Pundir 
> ---
>  drivers/staging/vt6656/main_usb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/vt6656/main_usb.c 
> b/drivers/staging/vt6656/main_usb.c
> index 1b51b83..c15ae72 100644
> --- a/drivers/staging/vt6656/main_usb.c
> +++ b/drivers/staging/vt6656/main_usb.c
> @@ -266,8 +266,8 @@ static int vnt_init_registers(struct vnt_private *priv)
>  
>   /* load vt3266 calibration parameters in EEPROM */
>   if (priv->rf_type == RF_VT3226D0) {
> - if ((priv->eeprom[EEP_OFS_MAJOR_VER] == 0x1) &&
> - (priv->eeprom[EEP_OFS_MINOR_VER] >= 0x4)) {
> + if (priv->eeprom[EEP_OFS_MAJOR_VER] == 0x1 &&
> + priv->eeprom[EEP_OFS_MINOR_VER] >= 0x4) {

No, now you have to guess if && or == or >= comes first :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: vt6656: fix unnecessary parantheses

2018-01-08 Thread Greg KH
On Fri, Dec 22, 2017 at 07:53:52PM +0530, Sumit Pundir wrote:
> This patch fixes a coding style issue as noted by
> checkpatch.pl related to unnecessary parentheses.
> 
> This patch fixes the following checkpatch.pl warning:
> 
> WARNING: Unnecessary parentheses around 'priv->basic_rates'.
> 
> Signed-off-by: Sumit Pundir 
> ---
>  drivers/staging/vt6656/card.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
> index 501f482..811602e 100644
> --- a/drivers/staging/vt6656/card.c
> +++ b/drivers/staging/vt6656/card.c
> @@ -443,7 +443,7 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)
>   int ii;
> 
>   for (ii = RATE_54M; ii >= RATE_6M; ii--) {
> - if ((priv->basic_rates) & ((u16)BIT(ii)))
> + if (priv->basic_rates & ((u16)BIT(ii)))

You still have one too many () around the BIT stuff...

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


Re: [PATCH] Staging: vme: vme_user: removed unnecessary parentheses

2018-01-08 Thread Greg KH
On Thu, Dec 28, 2017 at 11:15:30PM +0100, Philippe Loctaux wrote:
> Removed unnecessary parentheses in the if statement.
> 
> Signed-off-by: Philippe Loctaux 
> ---
>  drivers/staging/vme/devices/vme_user.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vme/devices/vme_user.c 
> b/drivers/staging/vme/devices/vme_user.c
> index 41a5b32e0..611ea219f 100644
> --- a/drivers/staging/vme/devices/vme_user.c
> +++ b/drivers/staging/vme/devices/vme_user.c
> @@ -511,7 +511,7 @@ static int vme_user_match(struct vme_dev *vdev)
>   int cur_slot = vme_slot_num(vdev);
>  
>   for (i = 0; i < bus_num; i++)
> - if ((cur_bus == bus[i]) && (cur_slot == vdev->num))
> + if (cur_bus == bus[i] && cur_slot == vdev->num)

Ick, horrid, no, now you have to look up what the order of == vs. && is,
do you know it?

thanks,

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


Re: [PATCH 2/2] Staging: most: aim-sound: sound.c: removed unnecessary parentheses

2018-01-08 Thread Greg KH
On Fri, Dec 29, 2017 at 12:06:50AM +0100, Philippe Loctaux wrote:
> Removed unnecessary parentheses in a if statement.
> 
> Signed-off-by: Philippe Loctaux 
> ---
>  drivers/staging/most/aim-sound/sound.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Also not in my tree anymore :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] Staging: most: aim-sound: sound.c: fixed an alignment issue

2018-01-08 Thread Greg KH
On Fri, Dec 29, 2017 at 12:06:49AM +0100, Philippe Loctaux wrote:
> Fixed a coding style issue.
> 
> Signed-off-by: Philippe Loctaux 
> ---
>  drivers/staging/most/aim-sound/sound.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)

This file is not in my tree anymore, please always work off of
linux-next.

thanks,

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


Re: [PATCH] staging: pi433: Cleanup codestyle, indent statements after case labels

2018-01-08 Thread Greg KH
On Sun, Dec 24, 2017 at 04:38:02AM +0100, Michael Panzlaff wrote:
> This patch changes the indentation of the statements after case labels.
> The linux coding guidelines do not explicitly mentiond this but pretty
> much all existing code doesn't put any statements into the same line of
> their belonging case labels. Therefore this adapts to the more usual style.
> 
> Please note that there is still a lot of > 80 character lines which will
> cause checkpatch warnings. This patch does not intent to fix this
> already existing issue.
> 
> Signed-off-by: Michael Panzlaff 
> Signed-off-by: Tillmann Zipperer 
> ---
>  drivers/staging/pi433/rf69.c | 246 
> ---
>  1 file changed, 164 insertions(+), 82 deletions(-)

Does not apply to my tree, please rebase and resend.

thanks,

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


Re: [PATCH] staging: pi433: Cleanup codestyle, indent statements after case labels

2018-01-08 Thread Greg KH
On Sun, Dec 24, 2017 at 04:38:02AM +0100, Michael Panzlaff wrote:
> To be applied on:
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> Branch:
> staging-next

That's not needed to be in the changelog text.
I'll hand-edit it for now, but please don't include it in future
patches.

thanks,

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


[staging:staging-testing 346/364] drivers/staging//lustre/lnet/libcfs/workitem.c:322:20: error: implicit declaration of function 'cfs_time_seconds'; did you mean 'cfs_time_shift'?

2018-01-08 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   1dbf40a0663ec52c0f718d5805b134933cc60372
commit: c64cea1d7df653e2f3f111f81b68f507adb61cc4 [346/364] staging: lustre: 
discard cfs_time_seconds()
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c64cea1d7df653e2f3f111f81b68f507adb61cc4
# save the attached .config to linux build tree
make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   drivers/staging//lustre/lnet/libcfs/workitem.c: In function 
'cfs_wi_sched_destroy':
>> drivers/staging//lustre/lnet/libcfs/workitem.c:322:20: error: implicit 
>> declaration of function 'cfs_time_seconds'; did you mean 'cfs_time_shift'? 
>> [-Werror=implicit-function-declaration]
  schedule_timeout(cfs_time_seconds(1) / 20);
   ^~~~
   cfs_time_shift
   cc1: some warnings being treated as errors

vim +322 drivers/staging//lustre/lnet/libcfs/workitem.c

d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  289  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  290  void
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  291  cfs_wi_sched_destroy(struct cfs_wi_sched *sched)
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  292  {
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  293 int i;
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  294  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  295 LASSERT(cfs_wi_data.wi_init);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  296 LASSERT(!cfs_wi_data.wi_stopping);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  297  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  298 spin_lock(_wi_data.wi_glock);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  299 if (sched->ws_stopping) {
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  300 CDEBUG(D_INFO, "%s is in progress of 
stopping\n",
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  301sched->ws_name);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  302 spin_unlock(_wi_data.wi_glock);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  303 return;
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  304 }
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  305  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  306 LASSERT(!list_empty(>ws_list));
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  307 sched->ws_stopping = 1;
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  308  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  309 spin_unlock(_wi_data.wi_glock);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  310  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  311 i = 2;
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  312 wake_up_all(>ws_waitq);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  313  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  314 spin_lock(_wi_data.wi_glock);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  315 while (sched->ws_nthreads > 0) {
57b573d14 drivers/staging/lustre/lustre/libcfs/workitem.c Aya Mahfouz   
2015-10-29  316 CDEBUG(is_power_of_2(++i) ? D_WARNING : D_NET,
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  317"waiting for %d threads of WI sched[%s] 
to terminate\n",
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  318sched->ws_nthreads, sched->ws_name);
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  319  
d7e09d039 drivers/staging/lustre/lustre/libcfs/workitem.c Peng Tao  
2013-05-02  320 spin_unlock(_wi_data.wi_glock);
d3caf4d58 

Re: [PATCH v3 24/27] staging: ccree: use a consistent file naming convention

2018-01-08 Thread Greg Kroah-Hartman
On Sun, Jan 07, 2018 at 12:14:35PM +, Gilad Ben-Yossef wrote:
> The ccree driver source files were using an inconsistent
> naming convention stemming from what the company was called
> when they were added.
> 
> Move to a single consistent naming convention for better
> code readability.
> 
> Signed-off-by: Gilad Ben-Yossef 
> ---
>  drivers/staging/ccree/Makefile   |6 +-
>  drivers/staging/ccree/cc_aead.c  | 2709 
> ++
>  drivers/staging/ccree/cc_aead.h  |  109 ++
>  drivers/staging/ccree/cc_buffer_mgr.c| 1657 ++
>  drivers/staging/ccree/cc_buffer_mgr.h|   74 +
>  drivers/staging/ccree/cc_cipher.c| 1171 +
>  drivers/staging/ccree/cc_cipher.h|   74 +
>  drivers/staging/ccree/cc_debugfs.c   |2 +-
>  drivers/staging/ccree/cc_driver.c|  508 ++
>  drivers/staging/ccree/cc_driver.h|  194 +++
>  drivers/staging/ccree/cc_fips.c  |  112 ++
>  drivers/staging/ccree/cc_fips.h  |   37 +
>  drivers/staging/ccree/cc_hash.c  | 2299 +
>  drivers/staging/ccree/cc_hash.h  |  114 ++
>  drivers/staging/ccree/cc_host_regs.h |  142 ++
>  drivers/staging/ccree/cc_hw_queue_defs.h |2 +-
>  drivers/staging/ccree/cc_ivgen.c |  281 
>  drivers/staging/ccree/cc_ivgen.h |   55 +
>  drivers/staging/ccree/cc_kernel_regs.h   |  167 ++
>  drivers/staging/ccree/cc_pm.c|  125 ++
>  drivers/staging/ccree/cc_pm.h|   57 +
>  drivers/staging/ccree/cc_request_mgr.c   |  719 
>  drivers/staging/ccree/cc_request_mgr.h   |   51 +
>  drivers/staging/ccree/cc_sram_mgr.c  |  107 ++
>  drivers/staging/ccree/cc_sram_mgr.h  |   65 +
>  drivers/staging/ccree/dx_crys_kernel.h   |  167 --
>  drivers/staging/ccree/dx_host.h  |  142 --
>  drivers/staging/ccree/ssi_aead.c | 2709 
> --
>  drivers/staging/ccree/ssi_aead.h |  109 --
>  drivers/staging/ccree/ssi_buffer_mgr.c   | 1657 --
>  drivers/staging/ccree/ssi_buffer_mgr.h   |   74 -
>  drivers/staging/ccree/ssi_cipher.c   | 1171 -
>  drivers/staging/ccree/ssi_cipher.h   |   74 -
>  drivers/staging/ccree/ssi_driver.c   |  508 --
>  drivers/staging/ccree/ssi_driver.h   |  194 ---
>  drivers/staging/ccree/ssi_fips.c |  112 --
>  drivers/staging/ccree/ssi_fips.h |   37 -
>  drivers/staging/ccree/ssi_hash.c | 2299 -
>  drivers/staging/ccree/ssi_hash.h |  114 --
>  drivers/staging/ccree/ssi_ivgen.c|  281 
>  drivers/staging/ccree/ssi_ivgen.h|   55 -
>  drivers/staging/ccree/ssi_pm.c   |  125 --
>  drivers/staging/ccree/ssi_pm.h   |   57 -
>  drivers/staging/ccree/ssi_request_mgr.c  |  719 
>  drivers/staging/ccree/ssi_request_mgr.h  |   51 -
>  drivers/staging/ccree/ssi_sram_mgr.c |  107 --
>  drivers/staging/ccree/ssi_sram_mgr.h |   65 -
>  47 files changed, 10832 insertions(+), 10832 deletions(-)
>  create mode 100644 drivers/staging/ccree/cc_aead.c
>  create mode 100644 drivers/staging/ccree/cc_aead.h
>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.c
>  create mode 100644 drivers/staging/ccree/cc_buffer_mgr.h
>  create mode 100644 drivers/staging/ccree/cc_cipher.c
>  create mode 100644 drivers/staging/ccree/cc_cipher.h
>  create mode 100644 drivers/staging/ccree/cc_driver.c
>  create mode 100644 drivers/staging/ccree/cc_driver.h
>  create mode 100644 drivers/staging/ccree/cc_fips.c
>  create mode 100644 drivers/staging/ccree/cc_fips.h
>  create mode 100644 drivers/staging/ccree/cc_hash.c
>  create mode 100644 drivers/staging/ccree/cc_hash.h
>  create mode 100644 drivers/staging/ccree/cc_host_regs.h
>  create mode 100644 drivers/staging/ccree/cc_ivgen.c
>  create mode 100644 drivers/staging/ccree/cc_ivgen.h
>  create mode 100644 drivers/staging/ccree/cc_kernel_regs.h
>  create mode 100644 drivers/staging/ccree/cc_pm.c
>  create mode 100644 drivers/staging/ccree/cc_pm.h
>  create mode 100644 drivers/staging/ccree/cc_request_mgr.c
>  create mode 100644 drivers/staging/ccree/cc_request_mgr.h
>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.c
>  create mode 100644 drivers/staging/ccree/cc_sram_mgr.h
>  delete mode 100644 drivers/staging/ccree/dx_crys_kernel.h
>  delete mode 100644 drivers/staging/ccree/dx_host.h
>  delete mode 100644 drivers/staging/ccree/ssi_aead.c
>  delete mode 100644 drivers/staging/ccree/ssi_aead.h
>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.c
>  delete mode 100644 drivers/staging/ccree/ssi_buffer_mgr.h
>  delete mode 100644 drivers/staging/ccree/ssi_cipher.c
>  delete mode 100644 drivers/staging/ccree/ssi_cipher.h
>  delete mode 100644 drivers/staging/ccree/ssi_driver.c
>  delete mode 100644 drivers/staging/ccree/ssi_driver.h
>  delete mode 100644 

Re: [PATCH] staging: iio: light: Add breaks to lengthy lines

2018-01-08 Thread Joe Perches
On Mon, 2018-01-08 at 15:02 +0300, Dan Carpenter wrote:
> On Sun, Jan 07, 2018 at 05:17:42PM +, Jonathan Cameron wrote:
> > On Sun, 07 Jan 2018 08:42:27 -0800
> > Joe Perches  wrote:
> > 
> > > On Sun, 2018-01-07 at 16:28 +, Jonathan Cameron wrote:
> > > > On Sun,  7 Jan 2018 15:08:01 +
> > > > George Edward Bulmer  wrote:
> > > >   
> > > > > This fixes three instances of checkpatch warning:
> > > > > WARNING: line over 80 characters
> > > > > 
> > > > > Signed-off-by: George Edward Bulmer   
> > > > 
> > > > Applied, thanks,  
> > > 
> > > I believe these are examples of long line conversions
> > > that should not be applied.
> > 
> > On this one I disagree. The line breaks don't hurt readability
> > so aren't a problem.  The benefit is admittedly small, however
> > we are adding churn in a fairly safe place - this stuff rarely
> > changes.
> 
> They do hurt read
> ability.
> 
> Checkpatch.pl should maybe have a special case to not complain if the
> last variable in the line is over 40 characters long.  I didn't
> realize that we had LONG_LINE_COMMENT.  Does that mean we don't complain
> if comment goes over 80 characters?

No.  It's just an extra classifier.

It means that long lines with comments that
exceed 80 columns can be ignored by using the
command line argument

--ignore=long_line_comment

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


Re: [PATCH] staging: ccree: ssi_hash: remove unnecessary parentheses

2018-01-08 Thread Greg KH
On Thu, Dec 28, 2017 at 12:24:17PM +0200, Elad Wexler wrote:
> Fixed a coding style issue
> 
> Signed-off-by: Elad Wexler 
> ---
>  drivers/staging/ccree/ssi_hash.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Why did you send this twice?

> diff --git a/drivers/staging/ccree/ssi_hash.c 
> b/drivers/staging/ccree/ssi_hash.c
> index 2035835..8d56fa7 100644
> --- a/drivers/staging/ccree/ssi_hash.c
> +++ b/drivers/staging/ccree/ssi_hash.c
> @@ -2280,8 +2280,8 @@ int ssi_hash_alloc(struct ssi_drvdata *drvdata)
> _handle->hash_list);
>   }
>  
> - if ((hw_mode == DRV_CIPHER_XCBC_MAC) ||
> - (hw_mode == DRV_CIPHER_CMAC))
> + if (hw_mode == DRV_CIPHER_XCBC_MAC ||
> + hw_mode == DRV_CIPHER_CMAC)

No, now I have to go look up if == or || comes in which order.  Ick,
just leave it as-is please.

thanks,

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


Re: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else

2018-01-08 Thread Dan Carpenter
On Mon, Jan 08, 2018 at 11:06:37AM +0100, Luis Gerhorst wrote:
> The Linux kernel coding style states that braces should only be used
> when necessary.
> 
> This fixes the checkpatch warning
> 
> WARNING: line over 80 characters
> + } else if (display->regwidth == 8 && display->buswidth == 9 && 
> par->spi) {
> 
> introduced by patch #1.
> 

Don't introduce warnings and then fix them in later patches.

Anyway there is another unwritten rule that multi-line indents get curly
braces.  Probably it should be:


} else if (display->regwidth == 8 && display->buswidth == 9 &&
   par->spi) {

regards,
dan carpenter

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


Re: [PATCH 3/3] drivers/fbtft: Fix indentation

2018-01-08 Thread Greg Kroah-Hartman
On Mon, Jan 08, 2018 at 11:07:41AM +0100, Luis Gerhorst wrote:
> Signed-off-by: Luis Gerhorst 
> Acked-by: Jonny Schaefer 
> Acked-by: Alexander Wuerstlein 
> ---
>  drivers/staging/fbtft/fbtft-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I can't take a patch without any changelog text at all, sorry.

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


Re: [PATCH 1/8] staging: lustre: Enclose complex macros in parantheses

2018-01-08 Thread Greg Kroah-Hartman
On Thu, Dec 21, 2017 at 04:43:27PM +0100, Christoph Volkert wrote:
> This is a duplicate patch. We fixed a typo and this was still left as a
> temporary file. (emacs…) Sorry. The patch with Message-Id
> <1513869932-27407-3-git-send-email-fabian_hue...@web.de> is the right one.
> 
> We can provide a new patch series without the fix, if needed.

Please do, as I have no idea what to do otherwise.

Consider this patch series dropped.

thanks,

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


Re: [PATCH] Staging: greybus: Fix multiple checks for null pointers

2018-01-08 Thread Johan Hovold
On Mon, Jan 08, 2018 at 11:28:13AM +0530, Sumit Pundir wrote:
> Fixes the following coding style issue as noted by checkpatch.pl
> at multiple lines:
> 
> Comparison to NULL could be written "!token"
> 
> Signed-off-by: Sumit Pundir 

Since you're not really fixing anything here, besides silencing a
checkpatch suggestion when run with the --strict option (or on staging
code), I suggest you reword you commit summary (Subject) to, for
example:

staging: greybus: camera: clean up NULL checks

or similar.

Note that I also added "camera" as a module prefix above.

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


Re: [PATCH] staging: iio: light: Add breaks to lengthy lines

2018-01-08 Thread Dan Carpenter
On Sun, Jan 07, 2018 at 05:17:42PM +, Jonathan Cameron wrote:
> On Sun, 07 Jan 2018 08:42:27 -0800
> Joe Perches  wrote:
> 
> > On Sun, 2018-01-07 at 16:28 +, Jonathan Cameron wrote:
> > > On Sun,  7 Jan 2018 15:08:01 +
> > > George Edward Bulmer  wrote:
> > >   
> > > > This fixes three instances of checkpatch warning:
> > > > WARNING: line over 80 characters
> > > > 
> > > > Signed-off-by: George Edward Bulmer   
> > > 
> > > Applied, thanks,  
> > 
> > I believe these are examples of long line conversions
> > that should not be applied.
> 
> On this one I disagree. The line breaks don't hurt readability
> so aren't a problem.  The benefit is admittedly small, however
> we are adding churn in a fairly safe place - this stuff rarely
> changes.

They do hurt read
ability.

Checkpatch.pl should maybe have a special case to not complain if the
last variable in the line is over 40 characters long.  I didn't
realize that we had LONG_LINE_COMMENT.  Does that mean we don't complain
if comment goes over 80 characters?

regards,
dan carpenter

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


Re: [PATCH] staging: iio: light: Add breaks to lengthy lines

2018-01-08 Thread Dan Carpenter
On Sun, Jan 07, 2018 at 03:08:01PM +, George Edward Bulmer wrote:
> This fixes three instances of checkpatch warning:
> WARNING: line over 80 characters
> 
> Signed-off-by: George Edward Bulmer 
> ---
>  drivers/staging/iio/light/tsl2x7x.c | 9 ++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2x7x.c 
> b/drivers/staging/iio/light/tsl2x7x.c
> index 42ed9c015aaf..126e11530ce0 100644
> --- a/drivers/staging/iio/light/tsl2x7x.c
> +++ b/drivers/staging/iio/light/tsl2x7x.c
> @@ -1441,7 +1441,8 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void 
> *private)
>  
>  static struct attribute *tsl2x7x_ALS_device_attrs[] = {
>   _attr_in_illuminance0_calibscale_available.attr,
> - 
> _const_attr_in_illuminance0_integration_time_available.dev_attr.attr,
> + _const_attr_in_illuminance0_integration_time_available
> + .dev_attr.attr,

Ugh.  No.  The original was better.

regards,
dan carpenter

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


Re: [PATCH] Staging: iio: Prefer using BIT macro

2018-01-08 Thread Jonathan Cameron
On Mon, 8 Jan 2018 01:30:29 +0200
Andy Shevchenko  wrote:

> On Sat, Jan 6, 2018 at 2:42 PM, Jonathan Cameron  wrote:
> > On Thu,  4 Jan 2018 22:06:31 +0530  
> 
> >>  /* Setup Register Bit Designations (AD7152_REG_CHx_SETUP) */
> >> -#define AD7152_SETUP_CAPDIFF (1 << 5)
> >> +#define AD7152_SETUP_CAPDIFF BIT(5)  
> >
> > This is indeed a 1 bit field so fine.  
> 
> But shouldn't we prevent style over the module? Otherwise it might be
> hard to decode one field from the other because of style differences.

I'm not sure using BIT for single bit fields really makes it much harder
to read, but perhaps you are right.  Anyhow, can't say I feel strongly
about this one either way!

Jonathan

> 
> >>  #define AD7152_SETUP_RANGE_2pF   (0 << 6)
> >> -#define AD7152_SETUP_RANGE_0_5pF (1 << 6)
> >> +#define AD7152_SETUP_RANGE_0_5pF BIT(6)  
> > This is clearly putting the value 1 in a 2 bit field within
> > the register - BIT macro obscures this compeltely.  
> 

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


[PATCH] tools: hv: include string.h in hv_fcopy_daemon

2018-01-08 Thread Olaf Hering
The usage of strchr requires inclusion of string.h.

Fixes: 0c38cda64aec ("tools: hv: remove unnecessary header files and netlink 
related code")
Signed-off-by: Olaf Hering 
---
 tools/hv/hv_fcopy_daemon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c
index 457a1521f32f..89ed6f325e45 100644
--- a/tools/hv/hv_fcopy_daemon.c
+++ b/tools/hv/hv_fcopy_daemon.c
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Compliment of the Season

2018-01-08 Thread Samuel Mabota


Good day

This is to inform you after much deliberation on your countless efforts to get 
your payment without success and with regard to your dealings with impostors. I 
wish to inform you that a resolution has been reached by members of the payment 
committee to get your funds cleared and delivered to your home address within a 
period of 72 hours solemnly agreed by Board of Trustee of the United Nations 
World Re-compensation Commission (U.N.W.R.C). A VISA MASTER CARD containing the 
sum of Four Million Eight Hundred Thousand United States Dollars ($4,800,000.00 
USD) will be issued in your Favor.

Secondly, as a result of widespread fraud over the internet and to avoid abuse 
of the program, we will provide you details of the VISA GOLD CARD upon your 
response. Please we will like you to confirm the following information.Now we 
have arranged your payment through ATM Card department which you will use to 
withdraw your money in any ATM machine in your country or any part of the 
world, but the maximum you can withdraw is (US$5000) per day stated by the Bank 
rules.So if you like to receive your fund in this way, please let us know by 
responding for the release of your ATM Card to you.

Your Full Name:
Current Residential Address:
Direct Contact Telephone Number:

You are further advised to STOP further contact with any offices or agency 
related to your transactions.

Yours Sincerely,
Dr. Samuel Mabota.
Payment Coordinator
U.N.C.C Service Regional office
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else

2018-01-08 Thread Luis Gerhorst
The Linux kernel coding style states that braces should only be used
when necessary.

This fixes the checkpatch warning

WARNING: line over 80 characters
+   } else if (display->regwidth == 8 && display->buswidth == 9 && 
par->spi) {

introduced by patch #1.

Signed-off-by: Luis Gerhorst 
Acked-by: Jonny Schaefer 
Acked-by: Alexander Wuerstlein 
---
 drivers/staging/fbtft/fbtft-core.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c 
b/drivers/staging/fbtft/fbtft-core.c
index 66b46b2..34b1c81 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1367,19 +1367,18 @@ int fbtft_probe_common(struct fbtft_display *display,
}
 
/* write register functions */
-   if (display->regwidth == 8 && display->buswidth == 8) {
+   if (display->regwidth == 8 && display->buswidth == 8)
par->fbtftops.write_register = fbtft_write_reg8_bus8;
-   } else if (display->regwidth == 8 && display->buswidth == 9 && 
par->spi) {
+   else if (display->regwidth == 8 && display->buswidth == 9 && par->spi)
par->fbtftops.write_register = fbtft_write_reg8_bus9;
-   } else if (display->regwidth == 16 && display->buswidth == 8) {
+   else if (display->regwidth == 16 && display->buswidth == 8)
par->fbtftops.write_register = fbtft_write_reg16_bus8;
-   } else if (display->regwidth == 16 && display->buswidth == 16) {
+   else if (display->regwidth == 16 && display->buswidth == 16)
par->fbtftops.write_register = fbtft_write_reg16_bus16;
-   } else {
+   else
dev_warn(dev,
"no default functions for regwidth=%d and 
buswidth=%d\n",
display->regwidth, display->buswidth);
-   }
 
/* write_vmem() functions */
if (display->buswidth == 8)
-- 
2.7.4

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


[PATCH 1/3] drivers/fbtft: Remove newline after else in else-if

2018-01-08 Thread Luis Gerhorst
This removes the following warning issued by checkpatch

WARNING: suspect code indent for conditional statements (8, 8)
+   } else
+   if (display->regwidth == 8 && display->buswidth == 9 && par->spi) {

Signed-off-by: Luis Gerhorst 
Acked-by: Jonny Schaefer 
Acked-by: Alexander Wuerstlein 
---
 drivers/staging/fbtft/fbtft-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c 
b/drivers/staging/fbtft/fbtft-core.c
index 6d0363d..66b46b2 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1369,8 +1369,7 @@ int fbtft_probe_common(struct fbtft_display *display,
/* write register functions */
if (display->regwidth == 8 && display->buswidth == 8) {
par->fbtftops.write_register = fbtft_write_reg8_bus8;
-   } else
-   if (display->regwidth == 8 && display->buswidth == 9 && par->spi) {
+   } else if (display->regwidth == 8 && display->buswidth == 9 && 
par->spi) {
par->fbtftops.write_register = fbtft_write_reg8_bus9;
} else if (display->regwidth == 16 && display->buswidth == 8) {
par->fbtftops.write_register = fbtft_write_reg16_bus8;
-- 
2.7.4

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


[PATCH 3/3] drivers/fbtft: Fix indentation

2018-01-08 Thread Luis Gerhorst
Signed-off-by: Luis Gerhorst 
Acked-by: Jonny Schaefer 
Acked-by: Alexander Wuerstlein 
---
 drivers/staging/fbtft/fbtft-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c 
b/drivers/staging/fbtft/fbtft-core.c
index 34b1c81..566f89c 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1377,8 +1377,8 @@ int fbtft_probe_common(struct fbtft_display *display,
par->fbtftops.write_register = fbtft_write_reg16_bus16;
else
dev_warn(dev,
-   "no default functions for regwidth=%d and 
buswidth=%d\n",
-   display->regwidth, display->buswidth);
+"no default functions for regwidth=%d and 
buswidth=%d\n",
+display->regwidth, display->buswidth);
 
/* write_vmem() functions */
if (display->buswidth == 8)
-- 
2.7.4

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