Re: [PATCH] [media] : Removing warnings caught by checkpatch.pl

2016-10-04 Thread Laurent Pinchart
Hi Andrey,

On Monday 03 Oct 2016 22:52:11 Andrey Utkin wrote:
> On Sun, Oct 02, 2016 at 02:30:45AM +0530, Harman Kalra wrote:
> >  static int iss_video_queue_setup(struct vb2_queue *vq,
> > 
> > -unsigned int *count, unsigned int 
*num_planes,
> > -unsigned int sizes[], struct device 
*alloc_devs[])
> > +   unsigned int *count, unsigned int *num_planes,
> > +   unsigned int sizes[], struct device *alloc_devs[])
> 
> 2 spaces + 3 tabs -> 2 spaces + 2 tabs? Am I seeing this correctly?
> Both ways are against CodingStyle.

It's 4 tabs + 1 space -> 3 tabs as far as I can see.

> > -   /* Try the get selection operation first and fallback to get format if
> > not -* implemented.
> > +   /* Try the get selection operation first and
> > +* fallback to get format if not implemented.
> > 
> >  */
> 
> This comment style is discouraged so this is at lease not perfect.
> Doesn't checkpatch complain with this change? If it doesn't, could you
> please also check with --strict, as long as you're working on style.

-- 
Regards,

Laurent Pinchart

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


Re: [PATCH 14/15] staging: wlang-ng: fix line style warnings in prism2sta.c

2016-10-04 Thread Joe Perches
On Mon, 2016-10-03 at 20:12 +0200, Sergio Paracuellos wrote:
> El 2016年10月03日 a las 18:16, Joe Perches escribió:
> > Perhaps better as   hw->scanresults = kmemdup(inf, sizeof(*inf), 
> > GFP_ATOMIC);
> I agree. But because all the code is full of sizeof(struct xxx) I though 
> it would be bettter to follow the actual style and not change only one...
> I don't have any problem in fix this patch and resend it. What should I do?

I suggest not fixing this patch.

Maybe just send another patch changing all the applicable
sizeof(struct ) uses to sizeof(*var) with the appropriate
line wrapping.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: greybus: fix block comment

2016-10-04 Thread Johan Hovold
On Mon, Oct 03, 2016 at 11:45:15PM +0900, Hisao Tanabe wrote:
> This patch fix the coding style problem of block comment detected by the
> checkpatch.pl.
> 
> WARNING: Block comments use a trailing */ on a separate line
> 
> Signed-off-by: Hisao Tanabe 
> ---
>  drivers/staging/greybus/arche-apb-ctrl.c | 8 +---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/greybus/arche-apb-ctrl.c 
> b/drivers/staging/greybus/arche-apb-ctrl.c
> index 70323aa..3fda0cd 100644
> --- a/drivers/staging/greybus/arche-apb-ctrl.c
> +++ b/drivers/staging/greybus/arche-apb-ctrl.c
> @@ -183,7 +183,7 @@ static int standby_boot_seq(struct platform_device *pdev)
>* Pasted from WDM spec,
>*  - A falling edge on POWEROFF_L is detected (a)
>*  - WDM enters standby mode, but no output signals are changed
> -  * */
> +  */
>  
>   /* TODO: POWEROFF_L is input to WDM module  */
>   apb->state = ARCHE_PLATFORM_STATE_STANDBY;
> @@ -285,8 +285,10 @@ static ssize_t state_store(struct device *dev,
>   if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING)
>   return count;
>  
> - /* First we want to make sure we power off everything
> -  * and then enter FW flashing state */
> + /*
> +  * First we want to make sure we power off everything
> +  * and then enter FW flashing state
> +  */
>   poweroff_seq(pdev);
>   ret = fw_flashing_seq(pdev);
>   } else {

Patch looks fine, but note that someone just sent a patch for this
second chunk the other day.

Acked-by: Johan Hovold 

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


[PATCH 02/13] staging: unisys: visorbus: controlvmchannel.h fix comments

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch simply fixes comments to mantain a more consistent
and shorter comments.

githubissue:
Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/controlvmchannel.h | 82 +-
 1 file changed, 35 insertions(+), 47 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h 
b/drivers/staging/unisys/visorbus/controlvmchannel.h
index a71f875..b904376 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -463,69 +463,57 @@ struct spar_controlvm_parameters_header {
 /* The following error messages are reserved 100, 101,
  * 201, 202, 401, 402, 403
  */
-/* General Errors--[0-99] 
*/
+/* General Errors [0-99] */
 #define CONTROLVM_RESP_SUCCESS  0
 #define CONTROLVM_RESP_ERROR_ALREADY_DONE   1
 #define CONTROLVM_RESP_ERROR_IOREMAP_FAILED 2
 #define CONTROLVM_RESP_ERROR_KMALLOC_FAILED 3
 #define CONTROLVM_RESP_ERROR_MESSAGE_ID_UNKNOWN 4
 #define CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT  5
-/* Payload and Parameter Related[400-499] 
*/
-#define CONTROLVM_RESP_ERROR_PAYLOAD_INVALID   400 /* SWITCH_ATTACHEXTPORT,
-* DEVICE_CONFIGURE
-*/
-/* Specified[Packet Structure] Value---[500-599] */
-#define CONTROLVM_RESP_ERROR_BUS_INVALID   500 /* SWITCH_ATTACHINTPORT,
-* BUS_CONFIGURE,
-* DEVICE_CREATE,
-* DEVICE_CONFIG
-* DEVICE_DESTROY
-*/
-#define CONTROLVM_RESP_ERROR_DEVICE_INVALID501 /* SWITCH_ATTACHINTPORT */
-   /* DEVICE_CREATE,
-* DEVICE_CONFIGURE,
-* DEVICE_DESTROY
-*/
-#define CONTROLVM_RESP_ERROR_CHANNEL_INVALID   502 /* DEVICE_CREATE,
-* DEVICE_CONFIGURE
-*/
-/* Partition Driver Callback Interface--[600-699] */
-#define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE 604/* BUS_CREATE,
-* BUS_DESTROY,
-* DEVICE_CREATE,
-* DEVICE_DESTROY
-*/
+
+/* Payload and Parameter Related [400-499] */
+/* SWITCH_ATTACHEXTPORT, DEVICE_CONFIGURE */
+#define CONTROLVM_RESP_ERROR_PAYLOAD_INVALID   400
+
+/* Specified[Packet Structure] Value [500-599] */
+/* SWITCH_ATTACHINTPORT, BUS_CONFIGURE, DEVICE_CREATE, DEVICE_CONFIG,
+ * DEVICE_DESTROY
+ */
+#define CONTROLVM_RESP_ERROR_BUS_INVALID   500
+/* SWITCH_ATTACHINTPORT, DEVICE_CREATE, DEVICE_CONFIGURE, DEVICE_DESTROY */
+#define CONTROLVM_RESP_ERROR_DEVICE_INVALID501
+ /* DEVICE_CREATE, DEVICE_CONFIGURE */
+#define CONTROLVM_RESP_ERROR_CHANNEL_INVALID   502
+
+/* Partition Driver Callback Interface [600-699] */
 /* Unable to invoke VIRTPCI callback */
-#define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR 605
-   /* BUS_CREATE,
-* BUS_DESTROY,
-* DEVICE_CREATE,
-* DEVICE_DESTROY
-*/
+/* BUS_CREATE, BUS_DESTROY, DEVICE_CREATE, DEVICE_DESTROY */
+#define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE 604
+/* BUS_CREATE, BUS_DESTROY, DEVICE_CREATE, DEVICE_DESTROY */
 /* VIRTPCI Callback returned error */
+#define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR 605
+/* SWITCH_ATTACHEXTPORT, SWITCH_DETACHEXTPORT, DEVICE_CONFIGURE */
 #define CONTROLVM_RESP_ERROR_GENERIC_DRIVER_CALLBACK_ERROR 606
-   /* SWITCH_ATTACHEXTPORT,
-* SWITCH_DETACHEXTPORT
-* DEVICE_CONFIGURE
-*/
-
 /* generic device callback returned error */
-/* Bus Related--[700-799] 
*/
-#define CONTROLVM_RESP_ERROR_BU

[PATCH 04/13] staging: unisys: include: include.h remove unused pound defines

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch removes all the unused pound defines currently in
include.h.

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/include/channel.h | 14 --
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/unisys/include/channel.h 
b/drivers/staging/unisys/include/channel.h
index 259ef64..b8faa13 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/channel.h
@@ -96,20 +96,6 @@ enum channel_clientstate {
  (((o) == CHANNELCLI_BUSY) && ((n) == CHANNELCLI_OWNED)) || (0)) \
 ? (1) : (0))
 
-/* Values for ULTRA_CHANNEL_PROTOCOL.CliErrorBoot: */
-/* throttling invalid boot channel statetransition error due to client
- * disabled
- */
-#define ULTRA_CLIERRORBOOT_THROTTLEMSG_DISABLED0x01
-
-/* throttling invalid boot channel statetransition error due to client
- * not attached
- */
-#define ULTRA_CLIERRORBOOT_THROTTLEMSG_NOTATTACHED 0x02
-
-/* throttling invalid boot channel statetransition error due to busy channel */
-#define ULTRA_CLIERRORBOOT_THROTTLEMSG_BUSY0x04
-
 /* Values for ULTRA_CHANNEL_PROTOCOL.Features: This define exists so
  * that windows guest can look at the FeatureFlags in the io channel,
  * and configure the windows driver to use interrupts or not based on
-- 
1.9.1

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


[PATCH 05/13] staging: unisys: visorbus: remove unused initializations

2016-10-04 Thread David Kershner
From: sameer wadgaonkar 

Removed initializations from visorchipset_open() and visorchipset_init(),
and moved the memset in initialize_controlvm_payload_info() down in case
of early returns from the function.

Signed-off-by: Sameer Wadgaonkar 
Signed-off-by: David Kershner 
Reported-by: Greg Kroah-Hartman 
---
 drivers/staging/unisys/visorbus/visorchipset.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c 
b/drivers/staging/unisys/visorbus/visorchipset.c
index 5987149..e2ac3809 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -57,7 +57,6 @@ visorchipset_open(struct inode *inode, struct file *file)
 
if (minor_number)
return -ENODEV;
-   file->private_data = NULL;
return 0;
 }
 
@@ -1075,7 +1074,6 @@ initialize_controlvm_payload_info(u64 phys_addr, u64 
offset, u32 bytes,
if (!info)
return -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
 
-   memset(info, 0, sizeof(struct visor_controlvm_payload_info));
if ((offset == 0) || (bytes == 0))
return -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
 
@@ -1083,6 +1081,7 @@ initialize_controlvm_payload_info(u64 phys_addr, u64 
offset, u32 bytes,
if (!payload)
return -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
 
+   memset(info, 0, sizeof(struct visor_controlvm_payload_info));
info->offset = offset;
info->bytes = bytes;
info->ptr = payload;
@@ -2119,8 +2118,6 @@ visorchipset_init(struct acpi_device *acpi_device)
if (!addr)
goto error;
 
-   memset(&controlvm_payload_info, 0, sizeof(controlvm_payload_info));
-
controlvm_channel = visorchannel_create_with_lock(addr, 0,
  GFP_KERNEL, uuid);
if (!controlvm_channel)
-- 
1.9.1

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


[PATCH 06/13] staging: unisys: include: iochannel.h remove unused pound defines

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch removes all the unused pound defines currently
in iochannel.h.

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/include/iochannel.h | 28 
 1 file changed, 28 deletions(-)

diff --git a/drivers/staging/unisys/include/iochannel.h 
b/drivers/staging/unisys/include/iochannel.h
index cba4433..21b0366 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -34,32 +34,12 @@
 #include 
 #include "channel.h"
 
-#define ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE ULTRA_CHANNEL_PROTOCOL_SIGNATURE
-#define ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE ULTRA_CHANNEL_PROTOCOL_SIGNATURE
-#define ULTRA_VSWITCH_CHANNEL_PROTOCOL_SIGNATURE \
-   ULTRA_CHANNEL_PROTOCOL_SIGNATURE
-
 /* Must increment these whenever you insert or delete fields within this 
channel
  * struct.  Also increment whenever you change the meaning of fields within 
this
  * channel struct so as to break pre-existing software.  Note that you can
  * usually add fields to the END of the channel struct withOUT needing to
  * increment this.
  */
-#define ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID 2
-#define ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID 2
-#define ULTRA_VSWITCH_CHANNEL_PROTOCOL_VERSIONID 1
-
-#define SPAR_VHBA_CHANNEL_OK_CLIENT(ch)\
-   (spar_check_channel_client(ch, spar_vhba_channel_protocol_uuid, \
-  "vhba", MIN_IO_CHANNEL_SIZE, \
-  ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID, \
-  ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE))
-
-#define SPAR_VNIC_CHANNEL_OK_CLIENT(ch)\
-   (spar_check_channel_client(ch, spar_vnic_channel_protocol_uuid, \
-  "vnic", MIN_IO_CHANNEL_SIZE, \
-  ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID, \
-  ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE))
 
 /*
  * Everything necessary to handle SCSI & NIC traffic between Guest Partition 
and
@@ -153,8 +133,6 @@ struct guest_phys_info {
u64 length;
 } __packed;
 
-#define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info))
-
 struct uisscsi_dest {
u32 channel;/* channel == bus number */
u32 id; /* id == target number */
@@ -456,7 +434,6 @@ struct uiscmdrsp_vdiskmgmt {
char result;
 
/* result of taskmgmt command - set by IOPart - values are: */
-#define VDISK_MGMT_FAILED  0
 } __packed;
 
 /* keeping cmd & rsp info in one structure for now cmd rsp packet for scsi */
@@ -468,7 +445,6 @@ struct uiscmdrsp {
 #define CMD_NET_TYPE   2
 #define CMD_SCSITASKMGMT_TYPE  3
 #define CMD_NOTIFYGUEST_TYPE   4
-#define CMD_VDISKMGMT_TYPE 5
union {
struct uiscmdrsp_scsi scsi;
struct uiscmdrsp_net net;
@@ -512,12 +488,8 @@ struct spar_io_channel_protocol {
 } __packed;
 
 /* INLINE functions for initializing and accessing I/O data channels */
-#define SIZEOF_PROTOCOL (COVER(sizeof(struct spar_io_channel_protocol), 64))
 #define SIZEOF_CMDRSP (COVER(sizeof(struct uiscmdrsp), 64))
 
-#define MIN_IO_CHANNEL_SIZE COVER(SIZEOF_PROTOCOL + \
- 2 * MIN_NUMSIGNALS * SIZEOF_CMDRSP, 4096)
-
 /*
  * INLINE function for expanding a guest's pfn-off-size into multiple 4K page
  * pfn-off-size entires.
-- 
1.9.1

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


[PATCH 09/13] staging: unisys: visorbus: vbuschannel.h remove unused pound defines

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

this patch removes all the unused pound defines currently
in vbuschannel.h

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/vbuschannel.h | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h 
b/drivers/staging/unisys/visorbus/vbuschannel.h
index e979175..6bca83e 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -50,12 +50,6 @@ static const uuid_le spar_vbus_channel_protocol_uuid =
   SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID, \
   SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE)
 
-#define SPAR_VBUS_CHANNEL_OK_SERVER(actual_bytes)\
-   (spar_check_channel_server(spar_vbus_channel_protocol_uuid, \
-  "vbus",  \
-  sizeof(struct spar_vbus_channel_protocol),\
-  actual_bytes))
-
 #pragma pack(push, 1)  /* both GCC and VC now allow this pragma */
 
 /*
@@ -293,11 +287,6 @@ struct spar_vbus_channel_protocol {
/* describes client device and driver for each device on the bus */
 };
 
-#define VBUS_CH_SIZE_EXACT(MAXDEVICES) \
-   (sizeof(ULTRA_VBUS_CHANNEL_PROTOCOL) + ((MAXDEVICES) * \
-   sizeof(ULTRA_VBUS_DEVICEINFO)))
-#define VBUS_CH_SIZE(MAXDEVICES) COVER(VBUS_CH_SIZE_EXACT(MAXDEVICES), 4096)
-
 #pragma pack(pop)
 
 #endif
-- 
1.9.1

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


[PATCH 10/13] staging: unisys: visorbus: visorchannel.c rename 'local' variable to dest

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch renames poorly named 'local' variable to 'dest'.

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/visorchannel.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchannel.c 
b/drivers/staging/unisys/visorbus/visorchannel.c
index 300a65d..ea82e56 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -127,19 +127,19 @@ EXPORT_SYMBOL_GPL(visorchannel_get_uuid);
 
 int
 visorchannel_read(struct visorchannel *channel, ulong offset,
- void *local, ulong nbytes)
+ void *dest, ulong nbytes)
 {
if (offset + nbytes > channel->nbytes)
return -EIO;
 
-   memcpy(local, channel->mapped + offset, nbytes);
+   memcpy(dest, channel->mapped + offset, nbytes);
 
return 0;
 }
 
 int
 visorchannel_write(struct visorchannel *channel, ulong offset,
-  void *local, ulong nbytes)
+  void *dest, ulong nbytes)
 {
size_t chdr_size = sizeof(struct channel_header);
size_t copy_size;
@@ -150,10 +150,10 @@ visorchannel_write(struct visorchannel *channel, ulong 
offset,
if (offset < chdr_size) {
copy_size = min(chdr_size - offset, nbytes);
memcpy(((char *)(&channel->chan_hdr)) + offset,
-  local, copy_size);
+  dest, copy_size);
}
 
-   memcpy(channel->mapped + offset, local, nbytes);
+   memcpy(channel->mapped + offset, dest, nbytes);
 
return 0;
 }
-- 
1.9.1

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


[PATCH 12/13] staging: unisys: visorbus: move DEVICE_ATTR_RO defs as-per conventions

2016-10-04 Thread David Kershner
From: Tim Sell 

The kernel convention is for DEVICE_ATTR_RO() definitions to occur
immediately after the functions that implement the attribute behaviors.
DEVICE_ATTR_RO definitions in visorbus_main.c have been moved to comply
with this convention.

Signed-off-by: Tim Sell 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c 
b/drivers/staging/unisys/visorbus/visorbus_main.c
index fec0a54..2b22515 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -186,6 +186,7 @@ static ssize_t physaddr_show(struct device *dev, struct 
device_attribute *attr,
return snprintf(buf, PAGE_SIZE, "0x%llx\n",
visorchannel_get_physaddr(vdev->visorchannel));
 }
+static DEVICE_ATTR_RO(physaddr);
 
 static ssize_t nbytes_show(struct device *dev, struct device_attribute *attr,
   char *buf)
@@ -197,6 +198,7 @@ static ssize_t nbytes_show(struct device *dev, struct 
device_attribute *attr,
return snprintf(buf, PAGE_SIZE, "0x%lx\n",
visorchannel_get_nbytes(vdev->visorchannel));
 }
+static DEVICE_ATTR_RO(nbytes);
 
 static ssize_t clientpartition_show(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -208,6 +210,7 @@ static ssize_t clientpartition_show(struct device *dev,
return snprintf(buf, PAGE_SIZE, "0x%llx\n",
visorchannel_get_clientpartition(vdev->visorchannel));
 }
+static DEVICE_ATTR_RO(clientpartition);
 
 static ssize_t typeguid_show(struct device *dev, struct device_attribute *attr,
 char *buf)
@@ -220,6 +223,7 @@ static ssize_t typeguid_show(struct device *dev, struct 
device_attribute *attr,
return snprintf(buf, PAGE_SIZE, "%s\n",
visorchannel_id(vdev->visorchannel, typeid));
 }
+static DEVICE_ATTR_RO(typeguid);
 
 static ssize_t zoneguid_show(struct device *dev, struct device_attribute *attr,
 char *buf)
@@ -232,6 +236,7 @@ static ssize_t zoneguid_show(struct device *dev, struct 
device_attribute *attr,
return snprintf(buf, PAGE_SIZE, "%s\n",
visorchannel_zoneid(vdev->visorchannel, zoneid));
 }
+static DEVICE_ATTR_RO(zoneguid);
 
 static ssize_t typename_show(struct device *dev, struct device_attribute *attr,
 char *buf)
@@ -250,12 +255,6 @@ static ssize_t typename_show(struct device *dev, struct 
device_attribute *attr,
drv = to_visor_driver(xdrv);
return snprintf(buf, PAGE_SIZE, "%s\n", drv->channel_types[i - 1].name);
 }
-
-static DEVICE_ATTR_RO(physaddr);
-static DEVICE_ATTR_RO(nbytes);
-static DEVICE_ATTR_RO(clientpartition);
-static DEVICE_ATTR_RO(typeguid);
-static DEVICE_ATTR_RO(zoneguid);
 static DEVICE_ATTR_RO(typename);
 
 static struct attribute *channel_attrs[] = {
@@ -295,6 +294,7 @@ static ssize_t partition_handle_show(struct device *dev,
 
return snprintf(buf, PAGE_SIZE, "0x%llx\n", handle);
 }
+static DEVICE_ATTR_RO(partition_handle);
 
 static ssize_t partition_guid_show(struct device *dev,
   struct device_attribute *attr,
@@ -303,6 +303,7 @@ static ssize_t partition_guid_show(struct device *dev,
 
return snprintf(buf, PAGE_SIZE, "{%pUb}\n", &vdev->partition_uuid);
 }
+static DEVICE_ATTR_RO(partition_guid);
 
 static ssize_t partition_name_show(struct device *dev,
   struct device_attribute *attr,
@@ -311,6 +312,7 @@ static ssize_t partition_name_show(struct device *dev,
 
return snprintf(buf, PAGE_SIZE, "%s\n", vdev->name);
 }
+static DEVICE_ATTR_RO(partition_name);
 
 static ssize_t channel_addr_show(struct device *dev,
 struct device_attribute *attr,
@@ -320,6 +322,7 @@ static ssize_t channel_addr_show(struct device *dev,
 
return snprintf(buf, PAGE_SIZE, "0x%llx\n", addr);
 }
+static DEVICE_ATTR_RO(channel_addr);
 
 static ssize_t channel_bytes_show(struct device *dev,
  struct device_attribute *attr,
@@ -329,6 +332,7 @@ static ssize_t channel_bytes_show(struct device *dev,
 
return snprintf(buf, PAGE_SIZE, "0x%llx\n", nbytes);
 }
+static DEVICE_ATTR_RO(channel_bytes);
 
 static ssize_t channel_id_show(struct device *dev,
   struct device_attribute *attr,
@@ -343,6 +347,7 @@ static ssize_t channel_id_show(struct device *dev,
}
return len;
 }
+static DEVICE_ATTR_RO(channel_id);
 
 static ssize_t client_bus_info_show(struct device *dev,
struct device_attribute *attr,
@@ -406,13 +411,6 @@ static ssize_t client_bus_info_show(struct device *dev,
}
return PAGE_SIZE - remain;
 }
-
-

[PATCH 03/13] staging: unisys: visorbus: controlvmchannel.h fix spacing

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch fixes space and tab aligned comments in
controlvmchannel.h.

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/controlvmchannel.h | 42 +++---
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h 
b/drivers/staging/unisys/visorbus/controlvmchannel.h
index b904376..9599d80 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -33,7 +33,7 @@
  * software.  Note that you can usually add fields to the END of the
  * channel struct withOUT needing to increment this.
  */
-#define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID  1
+#define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID 1
 
 #define SPAR_CONTROLVM_CHANNEL_OK_CLIENT(ch)   \
spar_check_channel_client(ch, \
@@ -44,13 +44,13 @@
ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE)
 
 /* Defines for various channel queues */
-#define CONTROLVM_QUEUE_REQUEST0
-#define CONTROLVM_QUEUE_RESPONSE   1
-#define CONTROLVM_QUEUE_EVENT  2
-#define CONTROLVM_QUEUE_ACK3
+#define CONTROLVM_QUEUE_REQUEST 0
+#define CONTROLVM_QUEUE_RESPONSE 1
+#define CONTROLVM_QUEUE_EVENT 2
+#define CONTROLVM_QUEUE_ACK 3
 
 /* Max num of messages stored during IOVM creation to be reused after crash */
-#define CONTROLVM_CRASHMSG_MAX 2
+#define CONTROLVM_CRASHMSG_MAX 2
 
 struct spar_segment_state  {
/* Bit 0: May enter other states */
@@ -464,26 +464,26 @@ struct spar_controlvm_parameters_header {
  * 201, 202, 401, 402, 403
  */
 /* General Errors [0-99] */
-#define CONTROLVM_RESP_SUCCESS  0
-#define CONTROLVM_RESP_ERROR_ALREADY_DONE   1
-#define CONTROLVM_RESP_ERROR_IOREMAP_FAILED 2
-#define CONTROLVM_RESP_ERROR_KMALLOC_FAILED 3
-#define CONTROLVM_RESP_ERROR_MESSAGE_ID_UNKNOWN 4
-#define CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT  5
+#define CONTROLVM_RESP_SUCCESS 0
+#define CONTROLVM_RESP_ERROR_ALREADY_DONE 1
+#define CONTROLVM_RESP_ERROR_IOREMAP_FAILED 2
+#define CONTROLVM_RESP_ERROR_KMALLOC_FAILED 3
+#define CONTROLVM_RESP_ERROR_MESSAGE_ID_UNKNOWN 4
+#define CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT 5
 
 /* Payload and Parameter Related [400-499] */
 /* SWITCH_ATTACHEXTPORT, DEVICE_CONFIGURE */
-#define CONTROLVM_RESP_ERROR_PAYLOAD_INVALID   400
+#define CONTROLVM_RESP_ERROR_PAYLOAD_INVALID 400
 
 /* Specified[Packet Structure] Value [500-599] */
 /* SWITCH_ATTACHINTPORT, BUS_CONFIGURE, DEVICE_CREATE, DEVICE_CONFIG,
  * DEVICE_DESTROY
  */
-#define CONTROLVM_RESP_ERROR_BUS_INVALID   500
+#define CONTROLVM_RESP_ERROR_BUS_INVALID 500
 /* SWITCH_ATTACHINTPORT, DEVICE_CREATE, DEVICE_CONFIGURE, DEVICE_DESTROY */
-#define CONTROLVM_RESP_ERROR_DEVICE_INVALID501
+#define CONTROLVM_RESP_ERROR_DEVICE_INVALID 501
  /* DEVICE_CREATE, DEVICE_CONFIGURE */
-#define CONTROLVM_RESP_ERROR_CHANNEL_INVALID   502
+#define CONTROLVM_RESP_ERROR_CHANNEL_INVALID 502
 
 /* Partition Driver Callback Interface [600-699] */
 /* Unable to invoke VIRTPCI callback */
@@ -506,14 +506,14 @@ struct spar_controlvm_parameters_header {
 #define CONTROLVM_RESP_ERROR_CHANNEL_SIZE_TOO_SMALL 801/* 
DEVICE_CREATE */
 
 /* Chipset Shutdown Related [1000-1099] */
-#define CONTROLVM_RESP_ERROR_CHIPSET_SHUTDOWN_FAILED1000
-#define CONTROLVM_RESP_ERROR_CHIPSET_SHUTDOWN_ALREADY_ACTIVE1001
+#define CONTROLVM_RESP_ERROR_CHIPSET_SHUTDOWN_FAILED 1000
+#define CONTROLVM_RESP_ERROR_CHIPSET_SHUTDOWN_ALREADY_ACTIVE 1001
 
 /* Chipset Stop Related [1100-1199] */
-#define CONTROLVM_RESP_ERROR_CHIPSET_STOP_FAILED_BUS1100
-#define CONTROLVM_RESP_ERROR_CHIPSET_STOP_FAILED_SWITCH 1101
+#define CONTROLVM_RESP_ERROR_CHIPSET_STOP_FAILED_BUS 1100
+#define CONTROLVM_RESP_ERROR_CHIPSET_STOP_FAILED_SWITCH 1101
 
 /* Device Related [1400-1499] */
-#define CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT1400
+#define CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT 1400
 
 #endif /* __CONTROLVMCHANNEL_H__ */
-- 
1.9.1

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


[PATCH 08/13] staging: unisys: visorbus: vmcallinterface.h remove unused pound defines

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch removes all the unused pound defines currently in
vmcallinterface.h.

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/vmcallinterface.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/unisys/visorbus/vmcallinterface.h 
b/drivers/staging/unisys/visorbus/vmcallinterface.h
index 86e695d..a8f6f6c 100644
--- a/drivers/staging/unisys/visorbus/vmcallinterface.h
+++ b/drivers/staging/unisys/visorbus/vmcallinterface.h
@@ -224,7 +224,6 @@ enum event_pc { /* POSTCODE event 
identifier tuples */
 };
 
 #define POSTCODE_SEVERITY_ERR DIAG_SEVERITY_ERR
-#define POSTCODE_SEVERITY_WARNING DIAG_SEVERITY_WARNING
 /* TODO-> Info currently doesn't show, so we set info=warning */
 #define POSTCODE_SEVERITY_INFO DIAG_SEVERITY_PRINT
 
-- 
1.9.1

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


[PATCH 13/13] staging: unisys: visorbus: convert client_bus_info sysfs to debugfs

2016-10-04 Thread David Kershner
From: Tim Sell 

Previously, the sysfs entry (assuming traditional sysfs mountpoint):

/sys/bus/visorbus/devices/visorbus/client_bus_info

violated kernel conventions by printing more than one item.  This along
with the fact that the data emitted was diagnostic data (intended to shadow
the client driver info provided via s-Par livedumps) made it a logical
candidate for debugfs.  So this patch moves this sysfs entry to debugfs as
(assuming traditional debugfs mountpoint):

/sys/kernel/debug/visorbus/visorbus/client_bus_info

Data for this debugfs is emitted using the preferred seq_file interface,
which allowed a vastly-simplified version of vbuschannel_print_devinfo() to
format the individual output components.

Functionality was verified as follows:

  [root@sparguest visorbus]# mount | grep debug
  debugfs on /sys/kernel/debug type debugfs (rw)
  [root@sparguest visorbus]# pwd
  /sys/kernel/debug/visorbus
  [root@sparguest visorbus]# l visorbus1/
  total 0
  drwxr-xr-x 2 root root 0 Sep 28 16:36 .
  drwxr-xr-x 4 root root 0 Sep 28 16:36 ..
  -r--r- 1 root root 0 Sep 28 16:36 client_bus_info
  [root@sparguest visorbus]# l visorbus2
  total 0
  drwxr-xr-x 2 root root 0 Sep 28 16:36 .
  drwxr-xr-x 4 root root 0 Sep 28 16:36 ..
  -r--r- 1 root root 0 Sep 28 16:36 client_bus_info
  [root@sparguest visorbus]# cat visorbus1/client_bus_info
  Client device / client driver info for s-Par Console partition (vbus #1):
 chipset  visorchipset kernel ver. 4.8.0-rc6-ARCH+
 clientbusvisorbus kernel ver. 4.8.0-rc6-ARCH+
  [2]keyboard visorinput   kernel ver. 4.8.0-rc6-ARCH+
  [3]mousevisorinput   kernel ver. 4.8.0-rc6-ARCH+
  [root@sparguest visorbus]# cat visorbus2/client_bus_info
  Client device / client driver info for s-Par IOVM partition (vbus #2):
 chipset  visorchipset kernel ver. 4.8.0-rc6-ARCH+
 clientbusvisorbus kernel ver. 4.8.0-rc6-ARCH+
  [0]ultravnicvisornic kernel ver. 4.8.0-rc6-ARCH+
  [1]ultravnicvisornic kernel ver. 4.8.0-rc6-ARCH+
  [2]sparvhba visorhba kernel ver. 4.8.0-rc6-ARCH+

Signed-off-by: Tim Sell 
Reported-by: Greg Kroah-Hartman 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/include/visorbus.h   |   2 +
 drivers/staging/unisys/visorbus/vbuschannel.h   | 214 +++-
 drivers/staging/unisys/visorbus/visorbus_main.c | 165 ++
 3 files changed, 127 insertions(+), 254 deletions(-)

diff --git a/drivers/staging/unisys/include/visorbus.h 
b/drivers/staging/unisys/include/visorbus.h
index 677627c..03d56f8 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -166,6 +166,8 @@ struct visor_device {
struct controlvm_message_header *pending_msg_hdr;
void *vbus_hdr_info;
uuid_le partition_uuid;
+   struct dentry *debugfs_dir;
+   struct dentry *debugfs_client_bus_info;
 };
 
 #define to_visor_device(x) container_of(x, struct visor_device, device)
diff --git a/drivers/staging/unisys/visorbus/vbuschannel.h 
b/drivers/staging/unisys/visorbus/vbuschannel.h
index 6bca83e..b0df261 100644
--- a/drivers/staging/unisys/visorbus/vbuschannel.h
+++ b/drivers/staging/unisys/visorbus/vbuschannel.h
@@ -23,6 +23,7 @@
  *  the client devices and client drivers for the server end to see.
  */
 #include 
+#include 
 #include "channel.h"
 
 /* {193b331b-c58f-11da-95a9-00e08161165f} */
@@ -66,199 +67,38 @@ struct ultra_vbus_deviceinfo {
 };
 
 /**
- * vbuschannel_sanitize_buffer() - remove non-printable chars from buffer
- * @p: destination buffer where chars are written to
- * @remain: number of bytes that can be written starting at #p
- * @src: pointer to source buffer
- * @srcmax: number of valid characters at #src
- *
- * Reads chars from the buffer at @src for @srcmax bytes, and writes to
- * the buffer at @p, which is @remain bytes long, ensuring never to
- * overflow the buffer at @p, using the following rules:
- * - printable characters are simply copied from the buffer at @src to the
- *   buffer at @p
- * - intervening streaks of non-printable characters in the buffer at @src
- *   are replaced with a single space in the buffer at @p
- * Note that we pay no attention to '\0'-termination.
- *
- * Pass @p == NULL and @remain == 0 for this special behavior -- In this
- * case, we simply return the number of bytes that WOULD HAVE been written
- * to a buffer at @p, had it been infinitely big.
- *
- * Return: the number of bytes written to @p (or WOULD HAVE been written to
- * @p, as described in the previous paragraph)
- */
-static inline int
-vbuschannel_sanitize_buffer(char *p, int remain, char *src, int srcmax)
-{
-   int chars = 0;
-   int nonprintable_streak = 0;
-
-   while (srcmax > 0) {
-   if ((*src >= ' ') && (*src < 0x7f)) {
-   if (nonprintable_streak) {
-

RE: [PATCH 1/2 v2] pci-hyperv: properly handle pci bus remove

2016-10-04 Thread KY Srinivasan


> -Original Message-
> From: Bjorn Helgaas [mailto:helg...@kernel.org]
> Sent: Tuesday, September 27, 2016 12:30 PM
> To: Long Li 
> Cc: KY Srinivasan ; Haiyang Zhang
> ; Bjorn Helgaas ;
> de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux-
> ker...@vger.kernel.org; Long Li 
> Subject: Re: [PATCH 1/2 v2] pci-hyperv: properly handle pci bus remove
> 
> On Wed, Sep 14, 2016 at 07:10:01PM -0700, Long Li wrote:
> > From: Long Li 
> >
> > hv_pci_devices_present is called in hv_pci_remove when we remove a PCI
> device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove,
> the bus is already removed before the call, so we don't need to rescan the
> bus in the workqueue scheduled from hv_pci_devices_present. By
> introducing status hv_pcibus_removed, we can avoid this situation.
> >
> > The patch fixes the following kernel panic.
> >
> > [  383.853124] Workqueue: events pci_devices_present_work [pci_hyperv]
> > [  383.853124] task: 88007f5f8000 ti: 88007f60 task.ti:
> > 88007f60
> > [  383.853124] RIP: 0010:[]  []
> > pci_is_pcie+0x6/0x20
> > [  383.853124] RSP: 0018:88007f603d38  EFLAGS: 00010206
> > [  383.853124] RAX: 88007f5f8000 RBX: 642f3d4854415056 RCX:
> > 88007f603fd8
> > [  383.853124] RDX:  RSI:  RDI:
> > 642f3d4854415056
> > [  383.853124] RBP: 88007f603d68 R08: 0246 R09:
> > a045eb9e
> > [  383.853124] R10: 88007b419a80 R11: ea0001c0ef40 R12:
> > 880003ee1c00
> > [  383.853124] R13: 63702f30303a3137 R14:  R15:
> > 0246
> > [  383.853124] FS:  () GS:88007b40()
> > knlGS:
> > [  383.853124] CS:  0010 DS:  ES:  CR0: 80050033
> > [  383.853124] CR2: 7f68b3f52350 CR3: 03546000 CR4:
> > 000406f0
> > [  383.853124] DR0:  DR1:  DR2:
> > 
> > [  383.853124] DR3:  DR6: 0ff0 DR7:
> > 0400
> > [  383.853124] Stack:
> > [  383.853124]  88007f603d68 8134db17 0008
> > 880003ee1c00
> > [  383.853124]  63702f30303a3137 880003d8edb8 88007f603da0
> > 8134ee2d
> > [  383.853124]  880003d8ed00 88007f603dd8 880075fec320
> > 880003d8edb8
> > [  383.853124] Call Trace:
> > [  383.853124]  [] ? pci_scan_slot+0x27/0x140
> > [  383.853124]  [] pci_scan_child_bus+0x3d/0x150
> > [  383.853124]  []
> > pci_devices_present_work+0x3ea/0x400 [pci_hyperv]
> > [  383.853124]  [] process_one_work+0x17b/0x470
> > [  383.853124]  [] worker_thread+0x126/0x410
> > [  383.853124]  [] ? rescuer_thread+0x460/0x460
> > [  383.853124]  [] kthread+0xcf/0xe0
> > [  383.853124]  [] ?
> > kthread_create_on_node+0x140/0x140
> > [  383.853124]  [] ret_from_fork+0x58/0x90
> > [  383.853124]  [] ?
> > kthread_create_on_node+0x140/0x140
> > [  383.853124] Code: 89 e5 5d 25 f0 00 00 00 c1 f8 04 c3 66 0f 1f 84 00
> > 00 00 00 00 66 66 66 66 90 55 0f b6 47 4a 48 89 e5 5d c3 90 66 66 66 66
> > 90 55 <80> 7f 4a 00 48 89 e5 5d 0f 95 c0 c3 0f 1f 40 00 66 2e 0f 1f 84
> > [  383.853124] RIP  [] pci_is_pcie+0x6/0x20
> > [  383.853124]  RSP 
> 
> Personally, I would remove the timestamps and addresses from this trace
> because I don't think they contribute to diagnosing the problem.
> 
> > Signed-off-by: Long Li 

Acked-by: KY Srinivasan 

Thanks,

K. Y
> 
> I'm ready to apply these but am waiting for an ack from the maintainers
> listed in MAINTAINERS (feel free to update that if it's out of date).
> 
> > ---
> >  drivers/pci/host/pci-hyperv.c | 20 +---
> >  1 file changed, 17 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
> > index a8deeca..4a37598 100644
> > --- a/drivers/pci/host/pci-hyperv.c
> > +++ b/drivers/pci/host/pci-hyperv.c
> > @@ -348,6 +348,7 @@ enum hv_pcibus_state {
> > hv_pcibus_init = 0,
> > hv_pcibus_probed,
> > hv_pcibus_installed,
> > +   hv_pcibus_removed,
> > hv_pcibus_maximum
> >  };
> >
> > @@ -1481,13 +1482,24 @@ static void pci_devices_present_work(struct
> work_struct *work)
> > put_pcichild(hpdev, hv_pcidev_ref_initial);
> > }
> >
> > -   /* Tell the core to rescan bus because there may have been changes.
> */
> > -   if (hbus->state == hv_pcibus_installed) {
> > +   switch (hbus->state) {
> > +   case hv_pcibus_installed:
> > +   /*
> > +* Tell the core to rescan bus
> > +* because there may have been changes.
> > +*/
> > pci_lock_rescan_remove();
> > pci_scan_child_bus(hbus->pci_bus);
> > pci_unlock_rescan_remove();
> > -   } else {
> > +   break;
> > +
> > +   case hv_pcibus_init:
> > +   case hv_pcibus_probed:
> > survey_child_resources(hbus);
> > +   break;
> > +
> > +   default:
> > +   break;
> > }
> >
> > u

[PATCH 01/13] staging: unisys: visorbus: controlvmchannel.h remove unused pound defines

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch removes all unused pound defines in controlvmchannel.h.
Adds a comment on the now unused error codes for our spar firmware
to avoid new error messages conflicting with previously defined
messages.

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/controlvmchannel.h | 36 ++
 1 file changed, 3 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/controlvmchannel.h 
b/drivers/staging/unisys/visorbus/controlvmchannel.h
index f0bfc4d..a71f875 100644
--- a/drivers/staging/unisys/visorbus/controlvmchannel.h
+++ b/drivers/staging/unisys/visorbus/controlvmchannel.h
@@ -43,8 +43,6 @@
ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID, \
ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE)
 
-#define MAX_SERIAL_NUM 32
-
 /* Defines for various channel queues */
 #define CONTROLVM_QUEUE_REQUEST0
 #define CONTROLVM_QUEUE_RESPONSE   1
@@ -436,26 +434,6 @@ struct spar_controlvm_channel_protocol {
 struct controlvm_message saved_crash_msg[CONTROLVM_CRASHMSG_MAX];
 };
 
-/* Offsets for VM channel attributes */
-#define VM_CH_REQ_QUEUE_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, request_queue)
-#define VM_CH_RESP_QUEUE_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, response_queue)
-#define VM_CH_EVENT_QUEUE_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, event_queue)
-#define VM_CH_ACK_QUEUE_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, event_ack_queue)
-#define VM_CH_REQ_MSG_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, request_msg)
-#define VM_CH_RESP_MSG_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, response_msg)
-#define VM_CH_EVENT_MSG_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, event_msg)
-#define VM_CH_ACK_MSG_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, event_ack_msg)
-#define VM_CH_CRASH_MSG_OFFSET \
-   offsetof(struct spar_controlvm_channel_protocol, saved_crash_msg)
-
 /* The following header will be located at the beginning of PayloadVmOffset for
  * various ControlVm commands. The receiver of a ControlVm command with a
  * PayloadVmOffset will dereference this address and then use 
connection_offset,
@@ -482,6 +460,9 @@ struct spar_controlvm_parameters_header {
u32 reserved;   /* Natural alignment */
 };
 
+/* The following error messages are reserved 100, 101,
+ * 201, 202, 401, 402, 403
+ */
 /* General Errors--[0-99] 
*/
 #define CONTROLVM_RESP_SUCCESS  0
 #define CONTROLVM_RESP_ERROR_ALREADY_DONE   1
@@ -489,21 +470,10 @@ struct spar_controlvm_parameters_header {
 #define CONTROLVM_RESP_ERROR_KMALLOC_FAILED 3
 #define CONTROLVM_RESP_ERROR_MESSAGE_ID_UNKNOWN 4
 #define CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT  5
-
-/* CONTROLVM_INIT_CHIPSET---[100-199] 
*/
-#define CONTROLVM_RESP_ERROR_CLIENT_SWITCHCOUNT_NONZERO 100
-#define CONTROLVM_RESP_ERROR_EXPECTED_CHIPSET_INIT  101
-
-/* Maximum Limit[200-299] 
*/
-#define CONTROLVM_RESP_ERROR_MAX_BUSES 201 /* BUS_CREATE */
-#define CONTROLVM_RESP_ERROR_MAX_DEVICES202/* DEVICE_CREATE */
 /* Payload and Parameter Related[400-499] 
*/
 #define CONTROLVM_RESP_ERROR_PAYLOAD_INVALID   400 /* SWITCH_ATTACHEXTPORT,
 * DEVICE_CONFIGURE
 */
-#define CONTROLVM_RESP_ERROR_INITIATOR_PARAMETER_INVALID 401   /* Multiple */
-#define CONTROLVM_RESP_ERROR_TARGET_PARAMETER_INVALID 402 /* DEVICE_CONFIGURE 
*/
-#define CONTROLVM_RESP_ERROR_CLIENT_PARAMETER_INVALID 403 /* DEVICE_CONFIGURE 
*/
 /* Specified[Packet Structure] Value---[500-599] */
 #define CONTROLVM_RESP_ERROR_BUS_INVALID   500 /* SWITCH_ATTACHINTPORT,
 * BUS_CONFIGURE,
-- 
1.9.1

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


[PATCH 07/13] staging: unisys: include: channel.h remove unused pound defines

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch removes all the unused pound defines currently in
channel.h.

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/include/channel.h | 49 
 1 file changed, 49 deletions(-)

diff --git a/drivers/staging/unisys/include/channel.h 
b/drivers/staging/unisys/include/channel.h
index b8faa13..3c27a73 100644
--- a/drivers/staging/unisys/include/channel.h
+++ b/drivers/staging/unisys/include/channel.h
@@ -30,13 +30,9 @@
 /* define the following to prevent include nesting in kernel header
  * files of similar abbreviated content
  */
-#define __SUPERVISOR_CHANNEL_H__
-
 #define SIGNATURE_16(A, B) ((A) | (B << 8))
 #define SIGNATURE_32(A, B, C, D) \
(SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
-#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
-   (SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
 
 #ifndef lengthof
 #define lengthof(TYPE, MEMBER) (sizeof(((TYPE *)0)->MEMBER))
@@ -75,27 +71,6 @@ enum channel_clientstate {
/* access channel anytime */
 };
 
-#define SPAR_CHANNEL_SERVER_READY(ch) \
-   (readl(&(ch)->srv_state) == CHANNELSRV_READY)
-
-#define ULTRA_VALID_CHANNELCLI_TRANSITION(o, n)
\
-   (o) == CHANNELCLI_DETACHED) && ((n) == CHANNELCLI_DISABLED)) || \
- (((o) == CHANNELCLI_ATTACHING) && ((n) == CHANNELCLI_DISABLED)) || \
- (((o) == CHANNELCLI_ATTACHED) && ((n) == CHANNELCLI_DISABLED)) || \
- (((o) == CHANNELCLI_ATTACHING) && ((n) == CHANNELCLI_DETACHED)) || \
- (((o) == CHANNELCLI_ATTACHED) && ((n) == CHANNELCLI_DETACHED)) || \
- (((o) == CHANNELCLI_DETACHED) && ((n) == CHANNELCLI_ATTACHING)) || \
- (((o) == CHANNELCLI_ATTACHING) && ((n) == CHANNELCLI_ATTACHED)) || \
- (((o) == CHANNELCLI_DETACHED) && ((n) == CHANNELCLI_ATTACHED)) || \
- (((o) == CHANNELCLI_BUSY) && ((n) == CHANNELCLI_ATTACHED)) || \
- (((o) == CHANNELCLI_ATTACHED) && ((n) == CHANNELCLI_BUSY)) || \
- (((o) == CHANNELCLI_DETACHED) && ((n) == CHANNELCLI_OWNED)) || \
- (((o) == CHANNELCLI_DISABLED) && ((n) == CHANNELCLI_OWNED)) || \
- (((o) == CHANNELCLI_ATTACHING) && ((n) == CHANNELCLI_OWNED)) || \
- (((o) == CHANNELCLI_ATTACHED) && ((n) == CHANNELCLI_OWNED)) || \
- (((o) == CHANNELCLI_BUSY) && ((n) == CHANNELCLI_OWNED)) || (0)) \
-? (1) : (0))
-
 /* Values for ULTRA_CHANNEL_PROTOCOL.Features: This define exists so
  * that windows guest can look at the FeatureFlags in the io channel,
  * and configure the windows driver to use interrupts or not based on
@@ -104,10 +79,7 @@ enum channel_clientstate {
  * channels should be defined here.  The io channel feature bits are
  * defined right here
  */
-#define ULTRA_IO_DRIVER_ENABLES_INTS (0x1ULL << 1)
 #define ULTRA_IO_CHANNEL_IS_POLLING (0x1ULL << 3)
-#define ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS (0x1ULL << 4)
-#define ULTRA_IO_DRIVER_DISABLES_INTS (0x1ULL << 5)
 #define ULTRA_IO_DRIVER_SUPPORTS_ENHANCED_RCVBUF_CHECKING (0x1ULL << 6)
 
 /* Common Channel Header */
@@ -158,8 +130,6 @@ struct channel_header {
u8 recover_channel;
 } __packed;
 
-#define ULTRA_CHANNEL_ENABLE_INTS (0x1ULL << 0)
-
 /* Subheader for the Signal Type variation of the Common Channel */
 struct signal_queue_header {
/* 1st cache line */
@@ -200,20 +170,6 @@ struct signal_queue_header {
u8 filler[12];  /* Pad out to 64 byte cacheline */
 } __packed;
 
-#define spar_signal_init(chan, QHDRFLD, QDATAFLD, QDATATYPE, ver, typ) \
-   do {\
-   memset(&chan->QHDRFLD, 0, sizeof(chan->QHDRFLD));   \
-   chan->QHDRFLD.version = ver;\
-   chan->QHDRFLD.chtype = typ; \
-   chan->QHDRFLD.size = sizeof(chan->QDATAFLD);\
-   chan->QHDRFLD.signal_size = sizeof(QDATATYPE);  \
-   chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD) - \
-   (u64)(&chan->QHDRFLD);  \
-   chan->QHDRFLD.max_slots =   \
-   sizeof(chan->QDATAFLD) / sizeof(QDATATYPE); \
-   chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots - 1;\
-   } while (0)
-
 /* Generic function useful for validating any type of channel when it is
  * received by the client that will be accessing the channel.
  * Note that  is only needed for callers in the EFI environment, and
@@ -411,9 +367,4 @@ static const uuid_le spar_siovm_uuid = SPAR_SIOVM_UUID;
 static const uuid_le spar_controldirector_channel_protocol_uuid =
SPAR_CONTROLDIRECTOR_CHANNEL_PROTOCOL_UUID;
 
-/* {b4e79625-aede-4eAA-9e11-D3eddcd4504c} */
-#define SPAR_DIAG_POOL_CHANNEL_PROTOCOL_UUID 

[PATCH 11/13] staging: unisys: visorbus: visorbus_private rename 'local' var to dest

2016-10-04 Thread David Kershner
From: Erik Arfvidson 

This patch renames the poorly named 'local' var to 'dest' in
the visorbus_private.h file

Signed-off-by: Erik Arfvidson 
Signed-off-by: David Kershner 
---
 drivers/staging/unisys/visorbus/visorbus_private.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorbus_private.h 
b/drivers/staging/unisys/visorbus/visorbus_private.h
index 15403fb..49bec17 100644
--- a/drivers/staging/unisys/visorbus/visorbus_private.h
+++ b/drivers/staging/unisys/visorbus/visorbus_private.h
@@ -70,9 +70,9 @@ struct visorchannel *visorchannel_create_with_lock(u64 
physaddr,
   gfp_t gfp, uuid_le guid);
 void visorchannel_destroy(struct visorchannel *channel);
 int visorchannel_read(struct visorchannel *channel, ulong offset,
- void *local, ulong nbytes);
+ void *dest, ulong nbytes);
 int visorchannel_write(struct visorchannel *channel, ulong offset,
-  void *local, ulong nbytes);
+  void *dest, ulong nbytes);
 u64 visorchannel_get_physaddr(struct visorchannel *channel);
 ulong visorchannel_get_nbytes(struct visorchannel *channel);
 char *visorchannel_id(struct visorchannel *channel, char *s);
-- 
1.9.1

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


[PATCH 00/13] staging: unisys: Convert client_bus_info to debugfs

2016-10-04 Thread David Kershner
Move /sys/bus/visorbus/devices/visorbus/client_bus_info to debugfs

In a 9/28/2016 patch inspection that fixed code within the function that
emits this client_bus_info sysfs entry, GregKH pointed out that this
shouldn't actually be a sysfs entry at all, and in fact belongs in debugfs.
This patchset addresses that.

This patchset also addresses several comments pointed out by GregKH,
specifically removal of useless initialization and removing unused
defines from the rest of the driver series. 

Erik Arfvidson (10):
  staging: unisys: visorbus: controlvmchannel.h remove unused pound
defines
  staging: unisys: visorbus: controlvmchannel.h fix comments
  staging: unisys: visorbus: controlvmchannel.h fix spacing
  staging: unisys: include: include.h remove unused pound defines
  staging: unisys: include: iochannel.h remove unused pound defines
  staging: unisys: include: channel.h remove unused pound defines
  staging: unisys: visorbus: vmcallinterface.h remove unused pound
defines
  staging: unisys: visorbus: vbuschannel.h remove unused pound defines
  staging: unisys: visorbus: visorchannel.c rename 'local' variable to
dest
  staging: unisys: visorbus: visorbus_private rename 'local' var to dest

Tim Sell (2):
  staging: unisys: visorbus: move DEVICE_ATTR_RO defs as-per conventions
  staging: unisys: visorbus: convert client_bus_info sysfs to debugfs

sameer wadgaonkar (1):
  staging: unisys: visorbus: remove unused initializations

 drivers/staging/unisys/include/channel.h   |  63 --
 drivers/staging/unisys/include/iochannel.h |  28 ---
 drivers/staging/unisys/include/visorbus.h  |   2 +
 drivers/staging/unisys/visorbus/controlvmchannel.h | 152 +-
 drivers/staging/unisys/visorbus/vbuschannel.h  | 225 +++--
 drivers/staging/unisys/visorbus/visorbus_main.c| 187 +
 drivers/staging/unisys/visorbus/visorbus_private.h |   4 +-
 drivers/staging/unisys/visorbus/visorchannel.c |  10 +-
 drivers/staging/unisys/visorbus/visorchipset.c |   5 +-
 drivers/staging/unisys/visorbus/vmcallinterface.h  |   1 -
 10 files changed, 200 insertions(+), 477 deletions(-)

-- 
1.9.1

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


[PATCH 06/10] staging: most: aim-network: setup mac address before ifup has finished

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

The networking AIM implements a non-standard behavior as it starts the
networking interface with an invalid MAC address and changes it by the time
a valid one is available.

This patch introduces a completion object to set the MAC address of the
networking interface before the .ndo_open callback (ifup) of the net_device
returns.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/aim-network/networking.c | 36 ++-
 1 file changed, 30 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/most/aim-network/networking.c 
b/drivers/staging/most/aim-network/networking.c
index 5728270..9e1b19b 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/aim-network/networking.c
@@ -70,6 +70,7 @@ struct net_dev_context {
struct net_device *dev;
struct net_dev_channel rx;
struct net_dev_channel tx;
+   struct completion mac_compl;
struct list_head list;
 };
 
@@ -180,6 +181,7 @@ static int most_nd_set_mac_address(struct net_device *dev, 
void *p)
 static int most_nd_open(struct net_device *dev)
 {
struct net_dev_context *nd = dev->ml_priv;
+   long wait_res;
 
netdev_info(dev, "open net device\n");
 
@@ -204,8 +206,21 @@ static int most_nd_open(struct net_device *dev)
nd->channels_opened = true;
netif_wake_queue(dev);
 
-   if (!nd->is_mamac)
-   nd->iface->request_netinfo(nd->iface, nd->tx.ch_id);
+   if (is_valid_ether_addr(dev->dev_addr))
+   return 0;
+
+   nd->iface->request_netinfo(nd->iface, nd->tx.ch_id);
+   wait_res = wait_for_completion_interruptible_timeout(
+   &nd->mac_compl, msecs_to_jiffies(5000));
+   if (!wait_res) {
+   netdev_err(dev, "mac timeout\n");
+   return -EBUSY;
+   }
+
+   if (wait_res < 0) {
+   netdev_warn(dev, "mac waiting interrupted\n");
+   return wait_res;
+   }
 
return 0;
 }
@@ -328,6 +343,7 @@ static int aim_probe_channel(struct most_interface *iface, 
int channel_idx,
if (!nd)
return -ENOMEM;
 
+   init_completion(&nd->mac_compl);
nd->iface = iface;
 
spin_lock_irqsave(&list_lock, flags);
@@ -544,8 +560,7 @@ void most_deliver_netinfo(struct most_interface *iface,
 {
struct net_dev_context *nd;
struct net_device *dev;
-
-   pr_info("Received netinfo from %s\n", iface->description);
+   const u8 *m = mac_addr;
 
nd = get_net_dev_context(iface);
if (!nd)
@@ -555,8 +570,17 @@ void most_deliver_netinfo(struct most_interface *iface,
if (!dev)
return;
 
-   if (mac_addr)
-   ether_addr_copy(dev->dev_addr, mac_addr);
+   if (m && is_valid_ether_addr(m)) {
+   if (!is_valid_ether_addr(dev->dev_addr)) {
+   netdev_info(dev, "set mac 
%02x-%02x-%02x-%02x-%02x-%02x\n",
+   m[0], m[1], m[2], m[3], m[4], m[5]);
+   ether_addr_copy(dev->dev_addr, m);
+   complete(&nd->mac_compl);
+   } else if (!ether_addr_equal(dev->dev_addr, m)) {
+   netdev_warn(dev, "reject mac 
%02x-%02x-%02x-%02x-%02x-%02x\n",
+   m[0], m[1], m[2], m[3], m[4], m[5]);
+   }
+   }
 }
 EXPORT_SYMBOL(most_deliver_netinfo);
 
-- 
1.9.1

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


[PATCH 05/10] staging: most: aim-network: fix startup scenario.

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

In case the networking interface (running on MediaLB) is being started
before the MOST network is, it remains disabled even after the MOST network
has transitioned to active mode.

This patch removes the dependency on the MOST link status to keep the
networking queue active and the networking interface working for the
case described above.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/aim-network/networking.c | 16 ++--
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/most/aim-network/networking.c 
b/drivers/staging/most/aim-network/networking.c
index 4659a64..5728270 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/aim-network/networking.c
@@ -67,7 +67,6 @@ struct net_dev_context {
struct most_interface *iface;
bool channels_opened;
bool is_mamac;
-   unsigned char link_stat;
struct net_device *dev;
struct net_dev_channel rx;
struct net_dev_channel tx;
@@ -203,13 +202,10 @@ static int most_nd_open(struct net_device *dev)
}
 
nd->channels_opened = true;
+   netif_wake_queue(dev);
 
-   if (nd->is_mamac) {
-   nd->link_stat = 1;
-   netif_wake_queue(dev);
-   } else {
+   if (!nd->is_mamac)
nd->iface->request_netinfo(nd->iface, nd->tx.ch_id);
-   }
 
return 0;
 }
@@ -561,14 +557,6 @@ void most_deliver_netinfo(struct most_interface *iface,
 
if (mac_addr)
ether_addr_copy(dev->dev_addr, mac_addr);
-
-   if (nd->link_stat != link_stat) {
-   nd->link_stat = link_stat;
-   if (nd->link_stat)
-   netif_wake_queue(dev);
-   else
-   netif_stop_queue(dev);
-   }
 }
 EXPORT_SYMBOL(most_deliver_netinfo);
 
-- 
1.9.1

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


[PATCH 07/10] staging: most: aim-network: avoid calling netdev_info()

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

This patch removes the needless call of function netdev_info() from
function most_nd_setup().

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/aim-network/networking.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/most/aim-network/networking.c 
b/drivers/staging/most/aim-network/networking.c
index 9e1b19b..fe0d516 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/aim-network/networking.c
@@ -211,7 +211,7 @@ static int most_nd_open(struct net_device *dev)
 
nd->iface->request_netinfo(nd->iface, nd->tx.ch_id);
wait_res = wait_for_completion_interruptible_timeout(
-   &nd->mac_compl, msecs_to_jiffies(5000));
+  &nd->mac_compl, msecs_to_jiffies(5000));
if (!wait_res) {
netdev_err(dev, "mac timeout\n");
return -EBUSY;
@@ -288,7 +288,6 @@ static const struct net_device_ops most_nd_ops = {
 
 static void most_nd_setup(struct net_device *dev)
 {
-   netdev_info(dev, "setup net device\n");
ether_setup(dev);
dev->netdev_ops = &most_nd_ops;
 }
-- 
1.9.1

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


[PATCH 01/10] staging: most: core: remove member add_link

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

This patch removes the unused field add_link of struct most_aim_obj.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/mostcore/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/most/mostcore/core.c 
b/drivers/staging/most/mostcore/core.c
index 329109c..9c15b63 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -763,7 +763,6 @@ struct most_aim_obj {
struct kobject kobj;
struct list_head list;
struct most_aim *driver;
-   char add_link[STRING_SIZE];
char remove_link[STRING_SIZE];
 };
 
@@ -984,7 +983,6 @@ static ssize_t store_add_link(struct most_aim_obj *aim_obj,
size_t max_len = min_t(size_t, len + 1, STRING_SIZE);
 
strlcpy(buffer, buf, max_len);
-   strlcpy(aim_obj->add_link, buf, max_len);
 
ret = split_string(buffer, &mdev, &mdev_ch, &mdev_devnod);
if (ret)
-- 
1.9.1

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


[PATCH 04/10] staging: most: core: update examples on how to link channels

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

This patch updates the comments with examples on how to use the "add_link"
and "remove_link" properties.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/mostcore/core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/mostcore/core.c 
b/drivers/staging/most/mostcore/core.c
index 835a5871..4c580d1 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -960,8 +960,8 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch)
  * Searches for a pair of device and channel and probes the AIM
  *
  * Example:
- * (1) echo -n -e "mdev0:ch6:my_rxchannel\n" >add_link
- * (2) echo -n -e "mdev1:ep81\n" >add_link
+ * (1) echo "mdev0:ch6:my_rxchannel" >add_link
+ * (2) echo "mdev1:ep81" >add_link
  *
  * (1) would create the device node /dev/my_rxchannel
  * (2) would create the device node /dev/mdev1-ep81
@@ -1026,7 +1026,7 @@ static struct most_aim_attribute most_aim_attr_add_link =
  * @len: buffer length
  *
  * Example:
- * echo -n -e "mdev0:ep81\n" >remove_link
+ * echo "mdev0:ep81" >remove_link
  */
 static ssize_t store_remove_link(struct most_aim_obj *aim_obj,
 struct most_aim_attribute *attr,
-- 
1.9.1

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


[PATCH 03/10] staging: most: core: remove processing of deprecated names

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

The USB HDM does not use the "@" character for channel names anymore. This
patch cleans up the code processing such names and adapts the corresponding
examples on how to use the properties "add_link" and "remove_link".

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/mostcore/core.c | 25 +++--
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/most/mostcore/core.c 
b/drivers/staging/most/mostcore/core.c
index 6507263..835a5871 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -883,16 +883,16 @@ static ssize_t show_add_link(struct most_aim_obj *aim_obj,
  *
  * Examples:
  *
- * Input: "mdev0:ch0@ep_81:my_channel\n" or
- *"mdev0:ch0@ep_81:my_channel"
+ * Input: "mdev0:ch6:my_channel\n" or
+ *"mdev0:ch6:my_channel"
  *
- * Output: *a -> "mdev0", *b -> "ch0@ep_81", *c -> "my_channel"
+ * Output: *a -> "mdev0", *b -> "ch6", *c -> "my_channel"
  *
- * Input: "mdev0:ch0@ep_81\n"
- * Output: *a -> "mdev0", *b -> "ch0@ep_81", *c -> ""
+ * Input: "mdev1:ep81\n"
+ * Output: *a -> "mdev1", *b -> "ep81", *c -> ""
  *
- * Input: "mdev0:ch0@ep_81"
- * Output: *a -> "mdev0", *b -> "ch0@ep_81", *c == NULL
+ * Input: "mdev1:ep81"
+ * Output: *a -> "mdev1", *b -> "ep81", *c == NULL
  */
 static int split_string(char *buf, char **a, char **b, char **c)
 {
@@ -960,11 +960,11 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch)
  * Searches for a pair of device and channel and probes the AIM
  *
  * Example:
- * (1) echo -n -e "mdev0:ch0@ep_81:my_rxchannel\n" >add_link
- * (2) echo -n -e "mdev0:ch0@ep_81\n" >add_link
+ * (1) echo -n -e "mdev0:ch6:my_rxchannel\n" >add_link
+ * (2) echo -n -e "mdev1:ep81\n" >add_link
  *
  * (1) would create the device node /dev/my_rxchannel
- * (2) would create the device node /dev/mdev0-ch0@ep_81
+ * (2) would create the device node /dev/mdev1-ep81
  */
 static ssize_t store_add_link(struct most_aim_obj *aim_obj,
  struct most_aim_attribute *attr,
@@ -1026,7 +1026,7 @@ static struct most_aim_attribute most_aim_attr_add_link =
  * @len: buffer length
  *
  * Example:
- * echo -n -e "mdev0:ch0@ep_81\n" >remove_link
+ * echo -n -e "mdev0:ep81\n" >remove_link
  */
 static ssize_t store_remove_link(struct most_aim_obj *aim_obj,
 struct most_aim_attribute *attr,
@@ -1749,9 +1749,6 @@ struct kobject *most_register_interface(struct 
most_interface *iface)
 
if (!name_suffix)
snprintf(channel_name, STRING_SIZE, "ch%d", i);
-   else if (name_suffix[0] == '@')
-   snprintf(channel_name, STRING_SIZE, "ch%d%s", i,
-name_suffix);
else
snprintf(channel_name, STRING_SIZE, "%s", name_suffix);
 
-- 
1.9.1

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


[PATCH 08/10] staging: most: hdm-usb: remove filtering of

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

networking state

In case the networking interface goes down and up again, the USB HDM does
not report the state the MOST networking interface controller is in. This
might lead to nonfunctional network.

Since the networking AIM already takes care of hardware address checking
and tracing it can be removed from the HDM USB, which is what this patch is
doing.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/hdm-usb/hdm_usb.c | 104 ++---
 1 file changed, 32 insertions(+), 72 deletions(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c 
b/drivers/staging/most/hdm-usb/hdm_usb.c
index 26c9adb..70e58c4 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -97,9 +97,7 @@ struct clear_hold_work {
  * @cap: channel capabilities
  * @conf: channel configuration
  * @dci: direct communication interface of hardware
- * @hw_addr: MAC address of hardware
  * @ep_address: endpoint address table
- * @link_stat: link status of hardware
  * @description: device description
  * @suffix: suffix for channel name
  * @channel_lock: synchronize channel access
@@ -117,9 +115,7 @@ struct most_dev {
struct most_channel_capability *cap;
struct most_channel_config *conf;
struct most_dci_obj *dci;
-   u8 hw_addr[6];
u8 *ep_address;
-   u16 link_stat;
char description[MAX_STRING_LEN];
char suffix[MAX_NUM_ENDPOINTS][MAX_SUFFIX_LEN];
spinlock_t channel_lock[MAX_NUM_ENDPOINTS]; /* sync channel access */
@@ -738,56 +734,6 @@ exit:
 }
 
 /**
- * hdm_update_netinfo - retrieve latest networking information
- * @mdev: device interface
- *
- * This triggers the USB vendor requests to read the hardware address and
- * the current link status of the attached device.
- */
-static int hdm_update_netinfo(struct most_dev *mdev)
-{
-   struct usb_device *usb_device = mdev->usb_device;
-   struct device *dev = &usb_device->dev;
-   u16 hi, mi, lo, link;
-
-   if (!is_valid_ether_addr(mdev->hw_addr)) {
-   if (drci_rd_reg(usb_device, DRCI_REG_HW_ADDR_HI, &hi) < 0) {
-   dev_err(dev, "Vendor request \"hw_addr_hi\" failed\n");
-   return -EFAULT;
-   }
-
-   if (drci_rd_reg(usb_device, DRCI_REG_HW_ADDR_MI, &mi) < 0) {
-   dev_err(dev, "Vendor request \"hw_addr_mid\" failed\n");
-   return -EFAULT;
-   }
-
-   if (drci_rd_reg(usb_device, DRCI_REG_HW_ADDR_LO, &lo) < 0) {
-   dev_err(dev, "Vendor request \"hw_addr_low\" failed\n");
-   return -EFAULT;
-   }
-
-   mutex_lock(&mdev->io_mutex);
-   mdev->hw_addr[0] = hi >> 8;
-   mdev->hw_addr[1] = hi;
-   mdev->hw_addr[2] = mi >> 8;
-   mdev->hw_addr[3] = mi;
-   mdev->hw_addr[4] = lo >> 8;
-   mdev->hw_addr[5] = lo;
-   mutex_unlock(&mdev->io_mutex);
-   }
-
-   if (drci_rd_reg(usb_device, DRCI_REG_NI_STATE, &link) < 0) {
-   dev_err(dev, "Vendor request \"link status\" failed\n");
-   return -EFAULT;
-   }
-
-   mutex_lock(&mdev->io_mutex);
-   mdev->link_stat = link;
-   mutex_unlock(&mdev->io_mutex);
-   return 0;
-}
-
-/**
  * hdm_request_netinfo - request network information
  * @iface: pointer to interface
  * @channel: channel ID
@@ -807,7 +753,7 @@ static void hdm_request_netinfo(struct most_interface 
*iface, int channel)
 }
 
 /**
- * link_stat_timer_handler - add work to link_stat work queue
+ * link_stat_timer_handler - schedule work obtaining mac address and link 
status
  * @data: pointer to USB device instance
  *
  * The handler runs in interrupt context. That's why we need to defer the
@@ -823,33 +769,47 @@ static void link_stat_timer_handler(unsigned long data)
 }
 
 /**
- * wq_netinfo - work queue function
+ * wq_netinfo - work queue function to deliver latest networking information
  * @wq_obj: object that holds data for our deferred work to do
  *
  * This retrieves the network interface status of the USB INIC
- * and compares it with the current status. If the status has
- * changed, it updates the status of the core.
  */
 static void wq_netinfo(struct work_struct *wq_obj)
 {
struct most_dev *mdev = to_mdev_from_work(wq_obj);
-   int i, prev_link_stat = mdev->link_stat;
-   u8 prev_hw_addr[6];
+   struct usb_device *usb_device = mdev->usb_device;
+   struct device *dev = &usb_device->dev;
+   u16 hi, mi, lo, link;
+   u8 hw_addr[6];
 
-   for (i = 0; i < 6; i++)
-   prev_hw_addr[i] = mdev->hw_addr[i];
+   if (drci_rd_reg(usb_device, DRCI_REG_HW_ADDR_HI, &hi) < 0) {
+   dev_err(dev, "Vendor request 'hw_addr_hi' failed\n");
+   return;
+   }
 
-   if (h

[PATCH 10/10] staging: most: hdm-usb: fix mbo buffer leak

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

This patch fixes an MBO leak by replacing the proprietary
free_anchored_buffers() function with the usb_kill_anchored_urbs() function
of the USB subsystem and guarantees that the mbo->complete() completion
function is being called for each URB.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/hdm-usb/hdm_usb.c | 85 ++
 1 file changed, 25 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c 
b/drivers/staging/most/hdm-usb/hdm_usb.c
index 70e58c4..1a630e1 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -183,30 +183,6 @@ static inline int drci_wr_reg(struct usb_device *dev, u16 
reg, u16 data)
 }
 
 /**
- * free_anchored_buffers - free device's anchored items
- * @mdev: the device
- * @channel: channel ID
- * @status: status of MBO termination
- */
-static void free_anchored_buffers(struct most_dev *mdev, unsigned int channel,
- enum mbo_status_flags status)
-{
-   struct mbo *mbo;
-   struct urb *urb;
-
-   while ((urb = usb_get_from_anchor(&mdev->busy_urbs[channel]))) {
-   mbo = urb->context;
-   usb_kill_urb(urb);
-   if (mbo && mbo->complete) {
-   mbo->status = status;
-   mbo->processed_length = 0;
-   mbo->complete(mbo);
-   }
-   usb_free_urb(urb);
-   }
-}
-
-/**
  * get_stream_frame_size - calculate frame size of current configuration
  * @cfg: channel configuration
  */
@@ -274,7 +250,7 @@ static int hdm_poison_channel(struct most_interface *iface, 
int channel)
cancel_work_sync(&mdev->clear_work[channel].ws);
 
mutex_lock(&mdev->io_mutex);
-   free_anchored_buffers(mdev, channel, MBO_E_CLOSE);
+   usb_kill_anchored_urbs(&mdev->busy_urbs[channel]);
if (mdev->padding_active[channel])
mdev->padding_active[channel] = false;
 
@@ -373,33 +349,27 @@ static void hdm_write_completion(struct urb *urb)
unsigned long flags;
 
spin_lock_irqsave(lock, flags);
-   if (urb->status == -ENOENT || urb->status == -ECONNRESET ||
-   !mdev->is_channel_healthy[channel]) {
-   spin_unlock_irqrestore(lock, flags);
-   return;
-   }
 
-   if (unlikely(urb->status && urb->status != -ESHUTDOWN)) {
-   mbo->processed_length = 0;
+   mbo->processed_length = 0;
+   mbo->status = MBO_E_INVAL;
+   if (likely(mdev->is_channel_healthy[channel])) {
switch (urb->status) {
+   case 0:
+   case -ESHUTDOWN:
+   mbo->processed_length = urb->actual_length;
+   mbo->status = MBO_SUCCESS;
+   break;
case -EPIPE:
dev_warn(dev, "Broken OUT pipe detected\n");
mdev->is_channel_healthy[channel] = false;
-   spin_unlock_irqrestore(lock, flags);
mdev->clear_work[channel].pipe = urb->pipe;
schedule_work(&mdev->clear_work[channel].ws);
-   return;
+   break;
case -ENODEV:
case -EPROTO:
mbo->status = MBO_E_CLOSE;
break;
-   default:
-   mbo->status = MBO_E_INVAL;
-   break;
}
-   } else {
-   mbo->status = MBO_SUCCESS;
-   mbo->processed_length = urb->actual_length;
}
 
spin_unlock_irqrestore(lock, flags);
@@ -527,40 +497,35 @@ static void hdm_read_completion(struct urb *urb)
unsigned long flags;
 
spin_lock_irqsave(lock, flags);
-   if (urb->status == -ENOENT || urb->status == -ECONNRESET ||
-   !mdev->is_channel_healthy[channel]) {
-   spin_unlock_irqrestore(lock, flags);
-   return;
-   }
 
-   if (unlikely(urb->status && urb->status != -ESHUTDOWN)) {
-   mbo->processed_length = 0;
+   mbo->processed_length = 0;
+   mbo->status = MBO_E_INVAL;
+   if (likely(mdev->is_channel_healthy[channel])) {
switch (urb->status) {
+   case 0:
+   case -ESHUTDOWN:
+   mbo->processed_length = urb->actual_length;
+   mbo->status = MBO_SUCCESS;
+   if (mdev->padding_active[channel] &&
+   hdm_remove_padding(mdev, channel, mbo)) {
+   mbo->processed_length = 0;
+   mbo->status = MBO_E_INVAL;
+   }
+   break;
case -EPIPE:
dev_warn(dev, "Broken IN pipe detected\n");
mdev->is_cha

[PATCH 09/10] staging: most: hdm-dim2: remove tracing of mac address

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

This patch removes tracing of the MAC address from the DIM2 HDM as it is
already done in the networking AIM.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c 
b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 78b2c3d..35aee9f 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -306,14 +306,11 @@ static int deliver_netinfo_thread(void *data)
 static void retrieve_netinfo(struct dim2_hdm *dev, struct mbo *mbo)
 {
u8 *data = mbo->virt_address;
-   u8 *mac = dev->mac_addrs;
 
pr_info("Node Address: 0x%03x\n", (u16)data[16] << 8 | data[17]);
dev->link_state = data[18];
pr_info("NIState: %d\n", dev->link_state);
-   memcpy(mac, data + 19, 6);
-   pr_info("MAC address: %02X:%02X:%02X:%02X:%02X:%02X\n",
-   mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+   memcpy(dev->mac_addrs, data + 19, 6);
dev->deliver_netinfo++;
wake_up_interruptible(&dev->netinfo_waitq);
 }
-- 
1.9.1

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


[PATCH 02/10] staging: most: core: remove read option from remove_link

2016-10-04 Thread Christian Gromm
From: Andrey Shvetsov 

The attribute "remove_link" returns the latest link that has been removed
of a certain channel. Since this piece information isn't particulary
useful this patch is going to remove it.

Signed-off-by: Andrey Shvetsov 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/mostcore/core.c | 12 +---
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/staging/most/mostcore/core.c 
b/drivers/staging/most/mostcore/core.c
index 9c15b63..6507263 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -763,7 +763,6 @@ struct most_aim_obj {
struct kobject kobj;
struct list_head list;
struct most_aim *driver;
-   char remove_link[STRING_SIZE];
 };
 
 #define to_aim_obj(d) container_of(d, struct most_aim_obj, kobj)
@@ -1019,13 +1018,6 @@ static ssize_t store_add_link(struct most_aim_obj 
*aim_obj,
 static struct most_aim_attribute most_aim_attr_add_link =
__ATTR(add_link, S_IRUGO | S_IWUSR, show_add_link, store_add_link);
 
-static ssize_t show_remove_link(struct most_aim_obj *aim_obj,
-   struct most_aim_attribute *attr,
-   char *buf)
-{
-   return snprintf(buf, PAGE_SIZE, "%s\n", aim_obj->remove_link);
-}
-
 /**
  * store_remove_link - store function for remove_link attribute
  * @aim_obj: pointer to AIM object
@@ -1049,7 +1041,6 @@ static ssize_t store_remove_link(struct most_aim_obj 
*aim_obj,
size_t max_len = min_t(size_t, len + 1, STRING_SIZE);
 
strlcpy(buffer, buf, max_len);
-   strlcpy(aim_obj->remove_link, buf, max_len);
ret = split_string(buffer, &mdev, &mdev_ch, NULL);
if (ret)
return ret;
@@ -1068,8 +1059,7 @@ static ssize_t store_remove_link(struct most_aim_obj 
*aim_obj,
 }
 
 static struct most_aim_attribute most_aim_attr_remove_link =
-   __ATTR(remove_link, S_IRUGO | S_IWUSR, show_remove_link,
-  store_remove_link);
+   __ATTR(remove_link, S_IWUSR, NULL, store_remove_link);
 
 static struct attribute *most_aim_def_attrs[] = {
&most_aim_attr_add_link.attr,
-- 
1.9.1

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


[PATCH 00/10] staging: most: fix driver modules

2016-10-04 Thread Christian Gromm
This patch set is needed to fix up issues of the driver.

Andrey Shvetsov (10):
  staging: most: core: remove member add_link
  staging: most: core: remove read option from remove_link
  staging: most: core: remove processing of deprecated names
  staging: most: core: update examples on how to link channels
  staging: most: aim-network: fix startup scenario.
  staging: most: aim-network: setup mac address before ifup has finished
  staging: most: aim-network: avoid calling netdev_info()
  staging: most: hdm-usb: remove filtering of
  staging: most: hdm-dim2: remove tracing of mac address
  staging: most: hdm-usb: fix mbo buffer leak

 drivers/staging/most/aim-network/networking.c |  47 ---
 drivers/staging/most/hdm-dim2/dim2_hdm.c  |   5 +-
 drivers/staging/most/hdm-usb/hdm_usb.c| 189 --
 drivers/staging/most/mostcore/core.c  |  39 ++
 4 files changed, 99 insertions(+), 181 deletions(-)

-- 
1.9.1

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


Re: [patch] staging: ion: use two separate locks for heaps and clients in ion_device

2016-10-04 Thread Laura Abbott

On 09/30/2016 01:18 AM, Xu YiPing wrote:

ion_alloc may get into slow path to get free page,
the call stack:

__alloc_pages_slowpath
ion_page_pool_alloc_pages
alloc_buffer_page
ion_system_heap_allocate
ion_buffer_create  <-- hold ion_device->lock
ion_alloc

after that, kernel invokes low-memory killer to kill some apps in
order to free memory in android system. However, sometimes, the
killing is blocked,
the app's call stack:

rwsem_down_write_failed
down_write
ion_client_destroy
ion_release
fput
do_signal

the killing is blocked because ion_device->lock is held by ion_alloc.

ion_alloc hold the lock for accessing the heaps list,
ion_destroy_client hold the lock for accessing the clients list.

so, we can use two separate locks for heaps and clients, to avoid the
unnecessary race.



I've reviewed this and it looks okay at first pass but I don't want it
applied just yet. Ion locking is a bit of a mess and has been added
once piece at a time. It needs a fundamental review. There will be Ion
discussions at plumbers at the end of October. Let's come back to this
after plumbers.


Signed-off-by: Xu YiPing 
---
 drivers/staging/android/ion/ion.c | 37 -
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index a2cf93b..331ad0f 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -46,7 +46,8 @@
  * @dev:   the actual misc device
  * @buffers:   an rb tree of all the existing buffers
  * @buffer_lock:   lock protecting the tree of buffers
- * @lock:  rwsem protecting the tree of heaps and clients
+ * @client_lock:   rwsem protecting the tree of clients
+ * @heap_lock: rwsem protecting the tree of heaps
  * @heaps: list of all the heaps in the system
  * @user_clients:  list of all the clients created from userspace
  */
@@ -54,7 +55,8 @@ struct ion_device {
struct miscdevice dev;
struct rb_root buffers;
struct mutex buffer_lock;
-   struct rw_semaphore lock;
+   struct rw_semaphore client_lock;
+   struct rw_semaphore heap_lock;
struct plist_head heaps;
long (*custom_ioctl)(struct ion_client *client, unsigned int cmd,
 unsigned long arg);
@@ -146,7 +148,7 @@ static inline void ion_buffer_page_clean(struct page **page)
*page = (struct page *)((unsigned long)(*page) & ~(1UL));
 }

-/* this function should only be called while dev->lock is held */
+/* this function should only be called while dev->heap_lock is held */
 static void ion_buffer_add(struct ion_device *dev,
   struct ion_buffer *buffer)
 {
@@ -172,7 +174,7 @@ static void ion_buffer_add(struct ion_device *dev,
rb_insert_color(&buffer->node, &dev->buffers);
 }

-/* this function should only be called while dev->lock is held */
+/* this function should only be called while dev->heap_lock is held */
 static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
 struct ion_device *dev,
 unsigned long len,
@@ -511,7 +513,7 @@ struct ion_handle *ion_alloc(struct ion_client *client, 
size_t len,
if (!len)
return ERR_PTR(-EINVAL);

-   down_read(&dev->lock);
+   down_read(&dev->heap_lock);
plist_for_each_entry(heap, &dev->heaps, node) {
/* if the caller didn't specify this heap id */
if (!((1 << heap->id) & heap_id_mask))
@@ -520,7 +522,7 @@ struct ion_handle *ion_alloc(struct ion_client *client, 
size_t len,
if (!IS_ERR(buffer))
break;
}
-   up_read(&dev->lock);
+   up_read(&dev->heap_lock);

if (buffer == NULL)
return ERR_PTR(-ENODEV);
@@ -713,7 +715,7 @@ static int is_client_alive(struct ion_client *client)
node = ion_root_client->rb_node;
dev = container_of(ion_root_client, struct ion_device, clients);

-   down_read(&dev->lock);
+   down_read(&dev->client_lock);
while (node) {
tmp = rb_entry(node, struct ion_client, node);
if (client < tmp) {
@@ -721,12 +723,12 @@ static int is_client_alive(struct ion_client *client)
} else if (client > tmp) {
node = node->rb_right;
} else {
-   up_read(&dev->lock);
+   up_read(&dev->client_lock);
return 1;
}
}

-   up_read(&dev->lock);
+   up_read(&dev->client_lock);
return 0;
 }

@@ -841,12 +843,12 @@ struct ion_client *ion_client_create(struct ion_device 
*dev,
if (!client->name)
goto err_free_client;

-   down_write(&dev->lock);
+   down_write(&dev->client_lock);
client->display_serial = ion_get_client

RE: [PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject

2016-10-04 Thread KY Srinivasan


> -Original Message-
> From: Long Li
> Sent: Monday, October 3, 2016 11:43 PM
> To: KY Srinivasan ; Haiyang Zhang
> ; Bjorn Helgaas 
> Cc: de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux-
> ker...@vger.kernel.org; Long Li 
> Subject: [PATCH 2/2 v3] pci-hyperv: lock pci bus on device eject
> 
> This sender failed our fraud detection checks and may not be who they
> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing
> 
> From: Long Li 
> 
> A PCI_EJECT message can arrive at the same time we are calling
> pci_scan_child_bus in the workqueue for the previous PCI_BUS_RELATIONS
> message or in create_root_hv_pci_bus(), in this case we could potentailly
> modify the bus from multiple places. Properly lock the bus access.
> 
> Thanks Dexuan Cui  for pointing out the race
> condition in create_root_hv_pci_bus().
> 
> Signed-off-by: Long Li 
> Tested-by: Cathy Avery 
> Reported-by: Xiaofeng Wang 

Acked-by: KY Srinivasan 

> ---
>  drivers/pci/host/pci-hyperv.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
> index 4a37598..33c75c9 100644
> --- a/drivers/pci/host/pci-hyperv.c
> +++ b/drivers/pci/host/pci-hyperv.c
> @@ -1198,9 +1198,11 @@ static int create_root_hv_pci_bus(struct
> hv_pcibus_device *hbus)
> hbus->pci_bus->msi = &hbus->msi_chip;
> hbus->pci_bus->msi->dev = &hbus->hdev->device;
> 
> +   pci_lock_rescan_remove();
> pci_scan_child_bus(hbus->pci_bus);
> pci_bus_assign_resources(hbus->pci_bus);
> pci_bus_add_devices(hbus->pci_bus);
> +   pci_unlock_rescan_remove();
> hbus->state = hv_pcibus_installed;
> return 0;
>  }
> @@ -1590,8 +1592,10 @@ static void hv_eject_device_work(struct
> work_struct *work)
> pdev = pci_get_domain_bus_and_slot(hpdev->hbus->sysdata.domain,
> 0,
>wslot);
> if (pdev) {
> +   pci_lock_rescan_remove();
> pci_stop_and_remove_bus_device(pdev);
> pci_dev_put(pdev);
> +   pci_unlock_rescan_remove();
> }
> 
> memset(&ctxt, 0, sizeof(ctxt));
> --
> 1.8.5.6

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


[PATCH] staging: i4l: icn: fixed some errors and warnings caught by checkpatch.pl

2016-10-04 Thread Harman Kalra
2 errors "open brace { should be on the previous line" are fixed.
Warning "Prefer "pr_debug over printk(KERN_DEBUG... " fixed
Few line more tahn 80 character warnings fixed

Signed-off-by: Harman Kalra 
---
 drivers/staging/i4l/icn/icn.c |3 +--
 drivers/staging/i4l/icn/icn.h |7 ---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/i4l/icn/icn.c b/drivers/staging/i4l/icn/icn.c
index 514bfc2..3750ba3 100644
--- a/drivers/staging/i4l/icn/icn.c
+++ b/drivers/staging/i4l/icn/icn.c
@@ -411,8 +411,7 @@
int action;
 } icn_stat;
 /* *INDENT-OFF* */
-static icn_stat icn_stat_table[] =
-{
+static icn_stat icn_stat_table[] = {
{"BCON_",  ISDN_STAT_BCONN, 1}, /* B-Channel connected*/
{"BDIS_",  ISDN_STAT_BHUP,  2}, /* B-Channel disconnected */
/*
diff --git a/drivers/staging/i4l/icn/icn.h b/drivers/staging/i4l/icn/icn.h
index f8f2e76..1e5a487 100644
--- a/drivers/staging/i4l/icn/icn.h
+++ b/drivers/staging/i4l/icn/icn.h
@@ -54,7 +54,8 @@
 
 /* some useful macros for debugging */
 #ifdef ICN_DEBUG_PORT
-#define OUTB_P(v, p) {printk(KERN_DEBUG "icn: outb_p(0x%02x,0x%03x)\n", v, p); 
outb_p(v, p);}
+#define OUTB_P(v, p) \
+   {pr_debug("icn: outb_p(0x%02x,0x%03x)\n", v, p); outb_p(v, p); }
 #else
 #define OUTB_P outb
 #endif
@@ -186,8 +187,8 @@
 #ifdef __KERNEL__
 
 static icn_card *cards = (icn_card *) 0;
-static u_char chan2bank[] =
-{0, 4, 8, 12};  /* for icn_map_channel() */
+static u_char chan2bank[] = {
+   0, 4, 8, 12};  /* for 
icn_map_channel() */
 
 static icn_dev dev;
 
-- 
1.7.9.5

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


RE: [PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove

2016-10-04 Thread KY Srinivasan


> -Original Message-
> From: Long Li
> Sent: Monday, October 3, 2016 11:43 PM
> To: KY Srinivasan ; Haiyang Zhang
> ; Bjorn Helgaas 
> Cc: de...@linuxdriverproject.org; linux-...@vger.kernel.org; linux-
> ker...@vger.kernel.org; Long Li 
> Subject: [PATCH 1/2 v3] pci-hyperv: properly handle pci bus remove
> 
> This sender failed our fraud detection checks and may not be who they
> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing
> 
> From: Long Li 
> 
> hv_pci_devices_present is called in hv_pci_remove when we remove a PCI
> device from host (e.g. by disabling SRIOV on a device). In hv_pci_remove,
> the bus is already removed before the call, so we don't need to rescan the
> bus in the workqueue scheduled from hv_pci_devices_present. By
> introducing status hv_pcibus_removed, we can avoid this situation.
> 
> Signed-off-by: Long Li 
> Tested-by: Cathy Avery 
> Reported-by: Xiaofeng Wang 

Acked-by: KY Srinivasan 


> ---
>  drivers/pci/host/pci-hyperv.c | 20 +---
>  1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
> index a8deeca..4a37598 100644
> --- a/drivers/pci/host/pci-hyperv.c
> +++ b/drivers/pci/host/pci-hyperv.c
> @@ -348,6 +348,7 @@ enum hv_pcibus_state {
> hv_pcibus_init = 0,
> hv_pcibus_probed,
> hv_pcibus_installed,
> +   hv_pcibus_removed,
> hv_pcibus_maximum
>  };
> 
> @@ -1481,13 +1482,24 @@ static void pci_devices_present_work(struct
> work_struct *work)
> put_pcichild(hpdev, hv_pcidev_ref_initial);
> }
> 
> -   /* Tell the core to rescan bus because there may have been changes. */
> -   if (hbus->state == hv_pcibus_installed) {
> +   switch (hbus->state) {
> +   case hv_pcibus_installed:
> +   /*
> +* Tell the core to rescan bus
> +* because there may have been changes.
> +*/
> pci_lock_rescan_remove();
> pci_scan_child_bus(hbus->pci_bus);
> pci_unlock_rescan_remove();
> -   } else {
> +   break;
> +
> +   case hv_pcibus_init:
> +   case hv_pcibus_probed:
> survey_child_resources(hbus);
> +   break;
> +
> +   default:
> +   break;
> }
> 
> up(&hbus->enum_sem);
> @@ -2163,6 +2175,7 @@ static int hv_pci_probe(struct hv_device *hdev,
> hbus = kzalloc(sizeof(*hbus), GFP_KERNEL);
> if (!hbus)
> return -ENOMEM;
> +   hbus->state = hv_pcibus_init;
> 
> /*
>  * The PCI bus "domain" is what is called "segment" in ACPI and
> @@ -2305,6 +2318,7 @@ static int hv_pci_remove(struct hv_device *hdev)
> pci_stop_root_bus(hbus->pci_bus);
> pci_remove_root_bus(hbus->pci_bus);
> pci_unlock_rescan_remove();
> +   hbus->state = hv_pcibus_removed;
> }
> 
> ret = hv_send_resources_released(hdev);
> --
> 1.8.5.6

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


[PATCH] staging: comedi: Align the * on block comments

2016-10-04 Thread Jakub Jedelsky
Block comments should align the * on each line as reported by checkpatch

Signed-off-by: Jakub Jedelsky 
---
 drivers/staging/comedi/drivers/cb_pcidda.c | 4 ++--
 drivers/staging/comedi/drivers/mite.c  | 2 +-
 drivers/staging/comedi/drivers/pcl818.c| 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c 
b/drivers/staging/comedi/drivers/cb_pcidda.c
index ccb37d1..9874147 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -248,8 +248,8 @@ static void cb_pcidda_write_caldac(struct comedi_device 
*dev,
cb_pcidda_serial_out(dev, value, num_caldac_bits);
 
 /*
-* latch stream into appropriate caldac deselect reference dac
-*/
+ * latch stream into appropriate caldac deselect reference dac
+ */
cal2_bits = DESELECT_REF_DAC_BIT | DUMMY_BIT;
/*  deactivate caldacs (one caldac for every two channels) */
for (i = 0; i < max_num_caldacs; i++)
diff --git a/drivers/staging/comedi/drivers/mite.c 
b/drivers/staging/comedi/drivers/mite.c
index b1c0860..05126ba 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -837,7 +837,7 @@ static int mite_setup(struct comedi_device *dev, struct 
mite *mite,
 * of 0x61f and bursts worked. 6281 powered up with register value of
 * 0x1f and bursts didn't work. The NI windows driver reads the
 * register, then does a bitwise-or of 0x600 with it and writes it back.
-   *
+*
 * The bits 0x90180700 in MITE_UNKNOWN_DMA_BURST_REG can be
 * written and read back.  The bits 0x1f always read as 1.
 * The rest always read as zero.
diff --git a/drivers/staging/comedi/drivers/pcl818.c 
b/drivers/staging/comedi/drivers/pcl818.c
index 5aeed44..5b5df05 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -771,9 +771,9 @@ static int pcl818_ai_cancel(struct comedi_device *dev,
 s->async->scans_done < cmd->stop_arg)) {
if (!devpriv->ai_cmd_canceled) {
/*
-   * Wait for running dma transfer to end,
-   * do cleanup in interrupt.
-   */
+* Wait for running dma transfer to end,
+* do cleanup in interrupt.
+*/
devpriv->ai_cmd_canceled = 1;
return 0;
}
-- 
2.5.5

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


Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework

2016-10-04 Thread Michael Ellerman
Emilio López  writes:

> Hi,
>
> El 27/09/16 a las 01:23, Michael Ellerman escribió:
>> Emilio López  writes:
>>> El 22/09/16 a las 06:43, Michael Ellerman escribió:
 Emilio López  writes:

 Please don't include the *kernel* headers, they're really not meant to
 be used in userspace programs :)

> +CFLAGS += -I../../../../usr/include/

 That is the correct place to get them from. They'll have been put there
 by 'make headers_install'.
>>>
>>> My inspiration here has been tools/testing/selftests/memfd/Makefile,
>>> which does it this way. If I only include the ones on usr then it
>>> doesn't build, as there's no sync_file.h available, even after running
>>> make headers_install. How am I supposed to use the ioctls from there?
>>
>> It looks like it's missing from include/uapi/linux/Kbuild, you need to
>> add it to the list of exported headers:
>
> I tried that over the weekend and it worked, but I wondered if it was 
> the way to go. Thanks for the confirmation :) I've sent a patch for 
> that[0] now.

Great thanks.

> With that resolved, CFLAGS can just be
>
> CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
> CFLAGS += -I../../../../usr/include/

LGTM.

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


[PATCH 1/8] rtlwifi: rtl8192de: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/def.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/led.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/led.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/reg.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/rf.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/rf.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/table.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/table.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h   | 4 
 20 files changed, 80 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/def.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/def.h
index 0a443ed..cb7b9b7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/def.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/def.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c
index 7c1db7e..ac6d554 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.h
index f2d318c..5d346ec 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c
index 09e0057..83a87eb 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.h
index 8a38daa..6b43523 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in 

[PATCH 0/8] Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
A number of these drivers were submitted to the kernel before
checkpatch.pl was modified to state that that the address of the
FSF should not be included. This set of patches remove this
information from the sources.

Signed-off-by: Larry Finger 


Larry Finger (8):
  rtlwifi: rtl8192de: Remove address of Free Software Foundation
  rtlwifi: rtl8192se: Remove address of Free Software Foundation
  rtlwifi: rtl8192ce: Remove address of Free Software Foundation
  rtlwifi: rtl8192cu: Remove address of Free Software Foundation
  rtlwifi: rtl8723ae: Remove address of Free Software Foundation
  rtlwifi: rtl8188ee: Remove address of Free Software Foundation
  rtlwifi: rtl8192c: Remove address of Free Software Foundation
  rtlwifi: Remove address of Free Software Foundation

 drivers/net/wireless/realtek/rtlwifi/pci.c  | 4 
 drivers/net/wireless/realtek/rtlwifi/pci.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/main.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/def.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/led.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/led.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/reg.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/table.c  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/table.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/reg.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.c  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/def.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/fw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h | 4 
 driv

[PATCH 5/8] rtlwifi: rtl8723ae: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/led.c| 4 
 4 files changed, 16 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.h
index 5711105..a113780 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.h
index 9d1fe25..2e668fc 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.h
index bcd64a2..45719fd 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_bt_coexist.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/led.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/led.c
index c7be934..77c1004 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/led.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/led.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
-- 
2.6.6

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


[PATCH 2/8] rtlwifi: rtl8192se: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/def.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/led.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/led.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/phy.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/reg.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/table.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/table.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.h   | 4 
 20 files changed, 80 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/def.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/def.h
index 41466f9..b5ba055 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/def.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/def.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.c
index 9bae5a9..2c073a7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.h
index de6ac79..3af07ef 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c
index 331b158..32f9207 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.h
index b1e44b8..5827aa3 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/fw.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in 

[PATCH 3/8] rtlwifi: rtl8192ce: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/def.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/led.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/led.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/phy.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/reg.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rf.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/table.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/table.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.h   | 4 
 18 files changed, 72 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/def.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/def.h
index 690a7a1..b90aaf1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/def.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/def.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.c
index 09898cf..2c8205e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.h
index 38ba707..9761d0c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/dm.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
index a47be73..4483d40 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h
index 98a0868..877f138 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/led.c 
b/drivers

[PATCH 7/8] rtlwifi: rtl8192c: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/main.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.h | 4 
 6 files changed, 24 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c
index 316be5f..bdc132b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.h
index 6a72d0c..441604f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.h
index 864806c..c5fa14b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/main.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/main.c
index 918b1d1..889bd13 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/main.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/main.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
index 27e3d5f..94dd25c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.h
index 2024125..d11261e 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.

[PATCH 8/8] rtlwifi: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/pci.c | 4 
 drivers/net/wireless/realtek/rtlwifi/pci.h | 4 
 drivers/net/wireless/realtek/rtlwifi/usb.c | 4 
 drivers/net/wireless/realtek/rtlwifi/usb.h | 4 
 4 files changed, 16 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c 
b/drivers/net/wireless/realtek/rtlwifi/pci.c
index 0dfa9ea..d044b23 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.h 
b/drivers/net/wireless/realtek/rtlwifi/pci.h
index b951eba..578b1d9 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.h
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c 
b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 32aa5c1..0a508649 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.h 
b/drivers/net/wireless/realtek/rtlwifi/usb.h
index 685273c..a6d43d2 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.h
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
-- 
2.6.6

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


[PATCH 4/8] rtlwifi: rtl8192cu: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/reg.h   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.h| 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.c | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.h | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c   | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h   | 4 
 20 files changed, 80 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h
index 74a479a..316fe99 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c
index c16209a..00fc068 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h
index fafa6ba..ce71433 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
index ae8f055..5c7da0c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h
index 6758808..932f056 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in 

[PATCH 6/8] rtlwifi: rtl8188ee: Remove address of Free Software Foundation

2016-10-04 Thread Larry Finger
Since this driver was added to the kernel, the checkpatch script was
modified to request that the address of the FSF not be included.

Signed-off-by: Larry Finger 
---
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h  | 4 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c | 4 
 4 files changed, 16 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h
index 071ccee..0fd2bac 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h
index 21bd4a5..b884c30 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h 
b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h
index 1850fde..d38dbca 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c 
b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c
index f05c2c6..6ea7fd7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c
@@ -11,10 +11,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
  *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
  * The full GNU General Public License is included in this distribution in the
  * file called LICENSE.
  *
-- 
2.6.6

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


Re: [PATCH] staging: i4l: icn: fixed some errors and warnings caught by checkpatch.pl

2016-10-04 Thread Greg KH
On Wed, Oct 05, 2016 at 02:23:22AM +0530, Harman Kalra wrote:
> 2 errors "open brace { should be on the previous line" are fixed.
> Warning "Prefer "pr_debug over printk(KERN_DEBUG... " fixed
> Few line more tahn 80 character warnings fixed

That's three different things, please make three different patches,
don't do multiple things in the same patch.

thanks,

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