Re: [PATCH 1/2 net-next] Drivers: hv: vmbus: Export the vmbus_sendpacket_pagebuffer_ctl()

2015-03-12 Thread Greg KH
On Tue, Mar 10, 2015 at 11:50:03AM -0700, K. Y. Srinivasan wrote:
 Export the vmbus_sendpacket_pagebuffer_ctl() interface. This interface
 will be used in the netvsc driver to optimize signalling the host.
 
 Signed-off-by: K. Y. Srinivasan k...@microsoft.com

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


[PATCH v2 6/6] staging: sm750fb: Remove spinlock helper function

2015-03-12 Thread Lorenzo Stoakes
This patch removes the unnecessary spinlock helper function and instead
calls spin_lock and spin_unlock directly.

This does *not* resolve sparse warnings about context imbalances but these are
spurious.

Signed-off-by: Lorenzo Stoakes lstoa...@gmail.com
---
 drivers/staging/sm750fb/sm750.c | 47 +
 1 file changed, 24 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 3e36b6a..217795e 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -56,23 +56,6 @@ static char * g_settings = NULL;
 static int g_dualview = 0;
 static char * g_option = NULL;
 
-/* if not use spin_lock,system will die if user load driver
- * and immediatly unload driver frequently (dual)*/
-static inline void myspin_lock(spinlock_t * sl){
-   struct lynx_share * share;
-   share = container_of(sl,struct lynx_share,slock);
-   if(share-dual){
-   spin_lock(sl);
-   }
-}
-
-static inline void myspin_unlock(spinlock_t * sl){
-   struct lynx_share * share;
-   share = container_of(sl,struct lynx_share,slock);
-   if(share-dual){
-   spin_unlock(sl);
-   }
-}
 static const struct fb_videomode lynx750_ext[] = {
/*  1024x600-60 VESA[1.71:1]*/
{NULL,  60, 1024, 600, 20423, 144,  40, 18, 1, 104, 3,
@@ -209,13 +192,19 @@ static void lynxfb_ops_fillrect(struct fb_info* 
info,const struct fb_fillrect* r
color = (Bpp == 
1)?region-color:((u32*)info-pseudo_palette)[region-color];
rop = ( region-rop != ROP_COPY ) ? HW_ROP2_XOR:HW_ROP2_COPY;
 
-   myspin_lock(share-slock);
+   /* if not use spin_lock,system will die if user load driver
+* and immediatly unload driver frequently (dual)*/
+   if (share-dual)
+   spin_lock(share-slock);
+
share-accel.de_fillrect(share-accel,
base,pitch,Bpp,
region-dx,region-dy,

region-width,region-height,
color,rop);
-   myspin_unlock(share-slock);
+
+   if (share-dual)
+   spin_unlock(share-slock);
 }
 
 static void lynxfb_ops_copyarea(struct fb_info * info,const struct fb_copyarea 
* region)
@@ -233,12 +222,18 @@ static void lynxfb_ops_copyarea(struct fb_info * 
info,const struct fb_copyarea *
pitch = info-fix.line_length;
Bpp = info-var.bits_per_pixel  3;
 
-   myspin_lock(share-slock);
+   /* if not use spin_lock,system will die if user load driver
+* and immediatly unload driver frequently (dual)*/
+   if (share-dual)
+   spin_lock(share-slock);
+
share-accel.de_copyarea(share-accel,

base,pitch,region-sx,region-sy,

base,pitch,Bpp,region-dx,region-dy,

region-width,region-height,HW_ROP2_COPY);
-   myspin_unlock(share-slock);
+
+   if (share-dual)
+   spin_unlock(share-slock);
 }
 
 static void lynxfb_ops_imageblit(struct fb_info*info,const struct fb_image* 
image)
@@ -272,14 +267,20 @@ static void lynxfb_ops_imageblit(struct 
fb_info*info,const struct fb_image* imag
}
return;
 _do_work:
-   myspin_lock(share-slock);
+   /* if not use spin_lock,system will die if user load driver
+* and immediatly unload driver frequently (dual)*/
+   if (share-dual)
+   spin_lock(share-slock);
+
share-accel.de_imageblit(share-accel,
image-data,image-width3,0,
base,pitch,Bpp,
image-dx,image-dy,
image-width,image-height,
fgcol,bgcol,HW_ROP2_COPY);
-   myspin_unlock(share-slock);
+
+   if (share-dual)
+   spin_unlock(share-slock);
 }
 
 static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var,
-- 
2.3.2

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


[PATCH RFCv2 18/21] Tools: hv: vss: use misc char device to communicate with kernel

2015-03-12 Thread Vitaly Kuznetsov
Use /dev/vmbus/hv_vss instead of netlink.

Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com
---
 tools/hv/hv_vss_daemon.c | 139 +--
 1 file changed, 25 insertions(+), 114 deletions(-)

diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c
index 5e63f70..135425a 100644
--- a/tools/hv/hv_vss_daemon.c
+++ b/tools/hv/hv_vss_daemon.c
@@ -19,7 +19,6 @@
 
 
 #include sys/types.h
-#include sys/socket.h
 #include sys/poll.h
 #include sys/ioctl.h
 #include fcntl.h
@@ -30,21 +29,11 @@
 #include string.h
 #include ctype.h
 #include errno.h
-#include arpa/inet.h
 #include linux/fs.h
-#include linux/connector.h
 #include linux/hyperv.h
-#include linux/netlink.h
 #include syslog.h
 #include getopt.h
 
-static struct sockaddr_nl addr;
-
-#ifndef SOL_NETLINK
-#define SOL_NETLINK 270
-#endif
-
-
 /* Don't use syslog() in the function since that can cause write to disk */
 static int vss_do_freeze(char *dir, unsigned int cmd)
 {
@@ -137,33 +126,6 @@ out:
return error;
 }
 
-static int netlink_send(int fd, struct cn_msg *msg)
-{
-   struct nlmsghdr nlh = { .nlmsg_type = NLMSG_DONE };
-   unsigned int size;
-   struct msghdr message;
-   struct iovec iov[2];
-
-   size = sizeof(struct cn_msg) + msg-len;
-
-   nlh.nlmsg_pid = getpid();
-   nlh.nlmsg_len = NLMSG_LENGTH(size);
-
-   iov[0].iov_base = nlh;
-   iov[0].iov_len = sizeof(nlh);
-
-   iov[1].iov_base = msg;
-   iov[1].iov_len = size;
-
-   memset(message, 0, sizeof(message));
-   message.msg_name = addr;
-   message.msg_namelen = sizeof(addr);
-   message.msg_iov = iov;
-   message.msg_iovlen = 2;
-
-   return sendmsg(fd, message, 0);
-}
-
 void print_usage(char *argv[])
 {
fprintf(stderr, Usage: %s [options]\n
@@ -174,16 +136,11 @@ void print_usage(char *argv[])
 
 int main(int argc, char *argv[])
 {
-   int fd, len, nl_group;
+   int vss_fd, len;
int error;
-   struct cn_msg *message;
struct pollfd pfd;
-   struct nlmsghdr *incoming_msg;
-   struct cn_msg   *incoming_cn_msg;
int op;
-   struct hv_vss_msg *vss_msg;
-   char *vss_recv_buffer;
-   size_t vss_recv_buffer_len;
+   struct hv_vss_msg vss_msg[1];
int daemonize = 1, long_index = 0, opt;
 
static struct option long_options[] = {
@@ -211,98 +168,50 @@ int main(int argc, char *argv[])
openlog(Hyper-V VSS, 0, LOG_USER);
syslog(LOG_INFO, VSS starting; pid is:%d, getpid());
 
-   vss_recv_buffer_len = NLMSG_LENGTH(0) + sizeof(struct cn_msg) + 
sizeof(struct hv_vss_msg);
-   vss_recv_buffer = calloc(1, vss_recv_buffer_len);
-   if (!vss_recv_buffer) {
-   syslog(LOG_ERR, Failed to allocate netlink buffers);
-   exit(EXIT_FAILURE);
-   }
-
-   fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
-   if (fd  0) {
-   syslog(LOG_ERR, netlink socket creation failed; error:%d %s,
-   errno, strerror(errno));
-   exit(EXIT_FAILURE);
-   }
-   addr.nl_family = AF_NETLINK;
-   addr.nl_pad = 0;
-   addr.nl_pid = 0;
-   addr.nl_groups = 0;
-
-
-   error = bind(fd, (struct sockaddr *)addr, sizeof(addr));
-   if (error  0) {
-   syslog(LOG_ERR, bind failed; error:%d %s, errno, 
strerror(errno));
-   close(fd);
-   exit(EXIT_FAILURE);
-   }
-   nl_group = CN_VSS_IDX;
-   if (setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, nl_group, 
sizeof(nl_group))  0) {
-   syslog(LOG_ERR, setsockopt failed; error:%d %s, errno, 
strerror(errno));
-   close(fd);
+   vss_fd = open(/dev/vmbus/hv_vss, O_RDWR);
+   if (vss_fd  0) {
+   syslog(LOG_ERR, open /dev/vmbus/hv_vss failed; error: %d %s,
+  errno, strerror(errno));
exit(EXIT_FAILURE);
}
/*
 * Register ourselves with the kernel.
 */
-   message = (struct cn_msg *)vss_recv_buffer;
-   message-id.idx = CN_VSS_IDX;
-   message-id.val = CN_VSS_VAL;
-   message-ack = 0;
-   vss_msg = (struct hv_vss_msg *)message-data;
-   vss_msg-vss_hdr.operation = VSS_OP_REGISTER;
-
-   message-len = sizeof(struct hv_vss_msg);
+   vss_msg-vss_hdr.operation = VSS_OP_REGISTER1;
 
-   len = netlink_send(fd, message);
+   len = write(vss_fd, vss_msg, sizeof(struct hv_vss_msg));
if (len  0) {
-   syslog(LOG_ERR, netlink_send failed; error:%d %s, errno, 
strerror(errno));
-   close(fd);
+   syslog(LOG_ERR, registration to kernel failed; error: %d %s,
+  errno, strerror(errno));
+   close(vss_fd);
exit(EXIT_FAILURE);
}
 
-   pfd.fd = fd;
+   pfd.fd = vss_fd;
 
while (1) {
-   struct sockaddr *addr_p = (struct sockaddr *) addr;
-  

[PATCH RFCv2 21/21] Drivers: hv: utils: unify driver registration reporting

2015-03-12 Thread Vitaly Kuznetsov
... and move it to debug level as normally daemons write to syslog themselves
and these kernel messages are useless.

Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com
---
 drivers/hv/hv_fcopy.c| 3 +--
 drivers/hv/hv_kvp.c  | 3 ++-
 drivers/hv/hv_snapshot.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hv/hv_fcopy.c b/drivers/hv/hv_fcopy.c
index b7b528c..b50dd33 100644
--- a/drivers/hv/hv_fcopy.c
+++ b/drivers/hv/hv_fcopy.c
@@ -107,8 +107,7 @@ static int fcopy_handle_handshake(u32 version)
 */
return -EINVAL;
}
-   pr_info(FCP: user-mode registering done. Daemon version: %d\n,
-   version);
+   pr_debug(FCP: userspace daemon ver. %d registered\n, version);
fcopy_transaction.state = HVUTIL_READY;
hv_poll_channel(fcopy_transaction.fcopy_context,
hv_fcopy_onchannelcallback);
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c
index baa1208..d85798d 100644
--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -150,7 +150,8 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg)
/*
 * We have a compatible daemon; complete the handshake.
 */
-   pr_info(KVP: user-mode registering done.\n);
+   pr_debug(KVP: userspace daemon ver. %d registered\n,
+KVP_OP_REGISTER);
kvp_register(dm_reg_value);
kvp_transaction.state = HVUTIL_READY;
 
diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c
index ee1762b..815405f 100644
--- a/drivers/hv/hv_snapshot.c
+++ b/drivers/hv/hv_snapshot.c
@@ -113,7 +113,7 @@ static int vss_handle_handshake(struct hv_vss_msg *vss_msg)
return -EINVAL;
}
vss_transaction.state = HVUTIL_READY;
-   pr_info(VSS daemon registered\n);
+   pr_debug(VSS: userspace daemon ver. %d registered\n, dm_reg_value);
return 0;
 }
 
-- 
1.9.3

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


[PATCH 1/3] Staging: dgnc: dgnc_driver: Add a missing call to dgnc_tty_uninit

2015-03-12 Thread Quentin Lambert
This function is called on the previous and the next failure branches.
This patch adds the call on the branch where it seems to be missing.

Signed-off-by: Quentin Lambert lambert.quen...@gmail.com
---
 drivers/staging/dgnc/dgnc_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/dgnc/dgnc_driver.c 
b/drivers/staging/dgnc/dgnc_driver.c
index fa1ee79..b7fd2bf 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -581,6 +581,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
 
rc = dgnc_finalize_board_init(brd);
if (rc  0) {
+   dgnc_tty_uninit(brd);
pr_err(DRVSTR : Can't finalize board init (%d)\n, rc);
brd-state = BOARD_FAILED;
brd-dpastatus = BD_NOFEP;
-- 
1.9.1

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


[PATCH] ion: improve ion_phys error message

2015-03-12 Thread Mitchel Humpherys
Clients often get confused when ion_phys errors out due to some heap
being used that they didn't expect.  Add the heap name and heap type to
the error message to make it more obvious.

Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org
---
 drivers/staging/android/ion/ion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index 296d347660fc..966b7fdc9ecf 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -566,8 +566,8 @@ int ion_phys(struct ion_client *client, struct ion_handle 
*handle,
buffer = handle-buffer;
 
if (!buffer-heap-ops-phys) {
-   pr_err(%s: ion_phys is not implemented by this heap.\n,
-  __func__);
+   pr_err(%s: ion_phys is not implemented by this heap (name=%s, 
type=%d).\n,
+   __func__, buffer-heap-name, buffer-heap-type);
mutex_unlock(client-lock);
return -ENODEV;
}
-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

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


RE: [PATCH 2/2 net-next] hyperv: Support batched notification

2015-03-12 Thread KY Srinivasan


 -Original Message-
 From: Jason Wang [mailto:jasow...@redhat.com]
 Sent: Tuesday, March 10, 2015 8:34 PM
 To: KY Srinivasan
 Cc: da...@davemloft.net; net...@vger.kernel.org;
 gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; KY
 Srinivasan
 Subject: Re: [PATCH 2/2 net-next] hyperv: Support batched notification
 
 
 
 On Wed, Mar 11, 2015 at 2:50 AM, K. Y. Srinivasan k...@microsoft.com
 wrote:
  Optimize notifying the host by deferring notification until there are
  no more packets to be sent. This will help in batching the requests on
  the host.
 
  Signed-off-by: K. Y. Srinivasan k...@microsoft.com
  ---
   drivers/net/hyperv/hyperv_net.h   |2 +-
   drivers/net/hyperv/netvsc.c   |   14 +-
   drivers/net/hyperv/netvsc_drv.c   |3 ++-
   drivers/net/hyperv/rndis_filter.c |2 +-
   4 files changed, 13 insertions(+), 8 deletions(-)
 
  diff --git a/drivers/net/hyperv/hyperv_net.h
  b/drivers/net/hyperv/hyperv_net.h index 4815843..3fd9896 100644
  --- a/drivers/net/hyperv/hyperv_net.h
  +++ b/drivers/net/hyperv/hyperv_net.h
  @@ -184,7 +184,7 @@ struct rndis_device {  int
  netvsc_device_add(struct hv_device *device, void *additional_info);
  int netvsc_device_remove(struct hv_device *device);  int
  netvsc_send(struct hv_device *device,
  -   struct hv_netvsc_packet *packet);
  +   struct hv_netvsc_packet *packet, bool kick_q);
   void netvsc_linkstatus_callback(struct hv_device *device_obj,
  struct rndis_message *resp);
   int netvsc_recv_callback(struct hv_device *device_obj, diff --git
  a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index
  208eb05..9003b94 100644
  --- a/drivers/net/hyperv/netvsc.c
  +++ b/drivers/net/hyperv/netvsc.c
  @@ -707,7 +707,7 @@ static u32 netvsc_copy_to_send_buf(struct
  netvsc_device *net_device,  }
 
   int netvsc_send(struct hv_device *device,
  -   struct hv_netvsc_packet *packet)
  +   struct hv_netvsc_packet *packet, bool kick_q)
   {
  struct netvsc_device *net_device;
  int ret = 0;
  @@ -719,6 +719,7 @@ int netvsc_send(struct hv_device *device,
  u32 msg_size = 0;
  struct sk_buff *skb = NULL;
  u16 q_idx = packet-q_idx;
  +   u32 vmbus_flags =
 VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
 
 
  net_device = get_outbound_net_device(device); @@ -768,18
 +769,21 @@
  int netvsc_send(struct hv_device *device,
  return -ENODEV;
 
  if (packet-page_buf_cnt) {
  -   ret = vmbus_sendpacket_pagebuffer(out_channel,
  +   ret = vmbus_sendpacket_pagebuffer_ctl(out_channel,
packet-page_buf,
packet-page_buf_cnt,
sendMessage,
sizeof(struct
 nvsp_message),
  - req_id);
  + req_id,
  + vmbus_flags,
  + kick_q);
 
 What if kick_q is false but ret is -EAGAIN here? Looks like in this case host
 won't get notified at all. How about checking whether txq and kicking if it 
 has
 been stopped like what other network driver did?

Good point. I am going to fix this issue in the VMBUS layer. The kick_q argument
is simply a hint to the vmbus level - the lower level can choose not to notify 
the
host (even if kick_q is true) based on other considerations.

I will resend this series with the logic in the vmbus driver. I will send the 
patch out
and Greg can decide if the vmbus change should go through Greg's tree or 
David's tree.

Regards,

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


[PATCH 2/6] staging: sm750fb: remove unused variables

2015-03-12 Thread Sudip Mukherjee
removed some variables which were only declared but were never used.

Signed-off-by: Sudip Mukherjee su...@vectorindia.org
---
 drivers/staging/sm750fb/sm750_cursor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_cursor.c 
b/drivers/staging/sm750fb/sm750_cursor.c
index 480615c..76b6029 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -99,7 +99,6 @@ void hw_cursor_setData(struct lynx_cursor * cursor,
u8 color,mask,opr;
u16 data;
u16 * pbuffer,*pstart;
-   static ulong odd = 0;
 
/*  in byte*/
pitch = cursor-w  3;
@@ -188,7 +187,7 @@ void hw_cursor_setData2(struct lynx_cursor * cursor,
u16 rop,const u8* pcol,const u8* pmsk)
 {
int i,j,count,pitch,offset;
-   u8 color,mask,opr;
+   u8 color, mask;
u16 data;
u16 * pbuffer,*pstart;
 
-- 
1.8.1.2

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


[PATCH 0/2 net-next] hyperv: Enable batched notification

2015-03-12 Thread K. Y. Srinivasan
Take into consideration the xmit_more flag in skb to decide if we should
notify the host as we place packets in VMBUS.

The VMBUS API that would give us this control is already in Greg's tree, in this
patch-set, that API is exported so it can be used in the netvsc driver.

K. Y. Srinivasan (2):
  Drivers: hv: vmbus: Export the vmbus_sendpacket_pagebuffer_ctl()
  hyperv: Support batched notification

 drivers/hv/channel.c  |1 +
 drivers/net/hyperv/hyperv_net.h   |2 +-
 drivers/net/hyperv/netvsc.c   |   14 +-
 drivers/net/hyperv/netvsc_drv.c   |3 ++-
 drivers/net/hyperv/rndis_filter.c |2 +-
 5 files changed, 14 insertions(+), 8 deletions(-)

-- 
1.7.4.1

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


Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread Greg KH
On Thu, Mar 12, 2015 at 10:02:24AM +0100, Greg KH wrote:
 On Wed, Mar 11, 2015 at 06:56:54PM -0700, K. Y. Srinivasan wrote:
  This patch is a continuation of the rescind handling cleanup work. We cannot
  block in the global message handling work context especially if we are 
  blocking
  waiting for the host to wake us up. I would like to thank
  Dexuan Cui de...@microsoft.com for observing this problem.
  
  The current Linux 4.0 RC3 tree is broken and this patch fixes the problem.
  
  Signed-off-by: K. Y. Srinivasan k...@microsoft.com
  ---
   drivers/hv/channel_mgmt.c |  143 
  +++-
   drivers/hv/connection.c   |6 ++-
   drivers/hv/hyperv_vmbus.h |2 +-
   3 files changed, 107 insertions(+), 44 deletions(-)
 
 This is a very big patch so late in the -rc cycle.  Is there some patch
 that got merged in 4.0-rc1 that I should be reverting instead to fix
 things up?

Make that, this is a very large patch set, not just one patch.  I
can't take all of these this late, sorry.  Please just tell me what to
revert.

thanks,

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


Re: [PATCH 2/3] Staging: dgnc: Use goto for error handling

2015-03-12 Thread Dan Carpenter
On Wed, Mar 11, 2015 at 06:37:30PM +0200, Giedrius Statkevičius wrote:
 It's still not in staging-testing for some reason :(
 

It can take several weeks to get merged.  Relax.

regards,
dan carpenter

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


[PATCH V2 2/3 net-next] Drivers: hv: vmbus: Fix a bug in the signalling logic with kick_q

2015-03-12 Thread K. Y. Srinivasan
When the caller specifies that signalling should be deferred, we need to
address the case where we are not able to place the current packet because
the buffer is full. In this case, we will signal the host as some packets
may have been placed on the ring buffer.
I would like to thank Jason Wang jasow...@redhat.com for pointing
out this issue.

Signed-off-by: K. Y. Srinivasan k...@microsoft.com
---
 drivers/hv/channel.c |   32 
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index e58cdb7..ae06ba9 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -614,8 +614,24 @@ int vmbus_sendpacket_ctl(struct vmbus_channel *channel, 
void *buffer,
 
ret = hv_ringbuffer_write(channel-outbound, bufferlist, 3, signal);
 
+   /*
+* Here is the logic for signalling the host:
+* 1. If the host is already draining the ringbuffer,
+*don't signal. This is indicated by the parameter
+*signal.
+*
+* 2. If we are not able to write, signal if kick_q is false.
+*kick_q being false indicates that we may have placed zero or
+*more packets with more packets to come. We will signal in
+*this case even if potentially we may have not placed any
+*packet. This is a rare enough condition that it should not
+*matter.
+*/
+
if ((ret == 0)  kick_q  signal)
vmbus_setevent(channel);
+   else if ((ret != 0)  !kick_q)
+   vmbus_setevent(channel);
 
return ret;
 }
@@ -705,8 +721,24 @@ int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel 
*channel,
 
ret = hv_ringbuffer_write(channel-outbound, bufferlist, 3, signal);
 
+   /*
+* Here is the logic for signalling the host:
+* 1. If the host is already draining the ringbuffer,
+*don't signal. This is indicated by the parameter
+*signal.
+*
+* 2. If we are not able to write, signal if kick_q is false.
+*kick_q being false indicates that we may have placed zero or
+*more packets with more packets to come. We will signal in
+*this case even if potentially we may have not placed any
+*packet. This is a rare enough condition that it should not
+*matter.
+*/
+
if ((ret == 0)  kick_q  signal)
vmbus_setevent(channel);
+   else if ((ret != 0)  !kick_q)
+   vmbus_setevent(channel);
 
return ret;
 }
-- 
1.7.4.1

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


[PATCH] staging: sm750fb: moved open brace next to declaration

2015-03-12 Thread Ragavendra BN
Signed-off-by: Ragavendra BN ragavendra...@gmail.com [user]

This patch fixes the coding style warning found by checkpath.pl for the
open braces next to declaration.
---
 drivers/staging/sm750fb/ddk750_chip.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index b71169e..2c12dd0 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -11,8 +11,7 @@ typedef struct _pllcalparam{
 pllcalparam;
 
 
-logical_chip_type_t getChipType()
-{
+logical_chip_type_t getChipType(){
unsigned short physicalID;
char physicalRev;
logical_chip_type_t chip;
-- 
1.7.10.4

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


Re: [PATCH 2/3] Staging: dgnc: Use goto for error handling

2015-03-12 Thread Quentin Lambert



On 12/03/2015 10:27, Dan Carpenter wrote:

On Wed, Mar 11, 2015 at 06:37:30PM +0200, Giedrius Statkevičius wrote:

It's still not in staging-testing for some reason :(


It can take several weeks to get merged.  Relax.

regards,
dan carpenter


What should i do concerning that ?
I need to send a second version of this patch anyway to fix the
fact that i inverted 2 statements, namely:

+exit_unlock:
+   if (ld)
+   tty_ldisc_deref(ld);
+   spin_unlock_irqrestore(ch-ch_lock, flags);

should be

+exit_unlock:
+   spin_unlock_irqrestore(ch-ch_lock, flags);
+   if (ld)
+   tty_ldisc_deref(ld);

Should I wait these several weeks to send the second version or should
I send a second version fixing this issue a wait for someone to ask me
to solve the conflict ?

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


Re: [PATCH 2/3] Staging: dgnc: Use goto for error handling

2015-03-12 Thread Dan Carpenter
On Thu, Mar 12, 2015 at 10:32:40AM +0100, Quentin Lambert wrote:
 Should I wait these several weeks to send the second version or should
 I send a second version fixing this issue a wait for someone to ask me
 to solve the conflict ?

Greg applies patches in the order they come.  It's normally straight
forward which ones are going to be merged and which ones are not.  So
you could just apply Giedrius's patch and put a note in the --- cut off
the it depends on the earlier patch.

If the patch doesn't apply, Greg won't take any time to figure out why.
You'll just get a note to redo it.

If you two plan on working on the same driver for a while then you could
coordinate your patches and send them as a patchset.

regards,
dan carpenter

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


Re: [PATCH 2/3] dgnc: remove DGNC_VERIFY_BOARD macro

2015-03-12 Thread Greg KH
On Tue, Mar 10, 2015 at 09:29:19PM +0200, Giedrius Statkevičius wrote:
 In sysfs methods struct device is guaranteed to not be NULL thus bd will
 not be NULL in any way. Also, checking for bd-magic != DGNC_BOARD_MAGIC
 and bd-state != BOARD_READY is redundant because we already don't
 initialize broken boards since dgnc: Don't save boards in memory that
 have failed to initialize and make sysfs files after initializing the
 board in dgnc_driver.c or IOW they are already set for successfully
 initialized boards before their sysfs files created (412 and 593 lines
 in dgnc_driver.c).

As I didn't take your previous patch that this relies on, I can't take
this one at this point in time, sorry.

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


Re: [PATCH 2/2 net-next] hyperv: Support batched notification

2015-03-12 Thread Olaf Hering
On Wed, Mar 11, KY Srinivasan wrote:

 This is the convention that we have used for patches submitted to
 David's tree.

I see, it refers to the directory name. In a bunch of backports it gives
the impression it affects the Hyper-V support as whole, while in fact a
given change is just for the network driver. Looks like I have to live
with that.

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


Re: [PATCH 2/3] Staging: dgnc: Use goto for error handling

2015-03-12 Thread Greg Kroah-Hartman
On Thu, Mar 12, 2015 at 10:32:40AM +0100, Quentin Lambert wrote:
 
 
 On 12/03/2015 10:27, Dan Carpenter wrote:
 On Wed, Mar 11, 2015 at 06:37:30PM +0200, Giedrius Statkevičius wrote:
 It's still not in staging-testing for some reason :(
 
 It can take several weeks to get merged.  Relax.
 
 regards,
 dan carpenter
 
 What should i do concerning that ?
 I need to send a second version of this patch anyway to fix the
 fact that i inverted 2 statements, namely:
 
 +exit_unlock:
 + if (ld)
 + tty_ldisc_deref(ld);
 + spin_unlock_irqrestore(ch-ch_lock, flags);
 
 should be
 
 +exit_unlock:
 + spin_unlock_irqrestore(ch-ch_lock, flags);
 + if (ld)
 + tty_ldisc_deref(ld);
 
 Should I wait these several weeks to send the second version or should
 I send a second version fixing this issue a wait for someone to ask me
 to solve the conflict ?

Just wait a bit, I should catch up on patches in this area soon, and I
will let everyone know if patches do not apply.

thanks,

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


[PATCH] staging: sm750fb: if else block checkpath warnings

2015-03-12 Thread Ragavendra BN
Signed-off-by: Ragavendra BN ragavendra...@gmail.com

This patch fixes the coding style warnings found by checkpath.pl for
the if else block

---
 drivers/staging/sm750fb/ddk750_chip.c |   25 ++---
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index 2c12dd0..041a05a 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -11,7 +11,8 @@ typedef struct _pllcalparam{
 pllcalparam;
 
 
-logical_chip_type_t getChipType(){
+logical_chip_type_t getChipType()
+{
unsigned short physicalID;
char physicalRev;
logical_chip_type_t chip;
@@ -19,22 +20,16 @@ logical_chip_type_t getChipType(){
physicalID = devId750;//either 0x718 or 0x750
physicalRev = revId750;
 
-if (physicalID == 0x718)
-{
-chip = SM718;
-}
-else if (physicalID == 0x750)
-{
-chip = SM750;
+   if (physicalID == 0x718) {
+   chip = SM718;
+   } else if (physicalID == 0x750) {
+   chip = SM750;
/* SM750 and SM750LE are different in their revision ID only. */
-   if (physicalRev == SM750LE_REVISION_ID){
+   if (physicalRev == SM750LE_REVISION_ID)
chip = SM750LE;
-   }
-}
-else
-{
-chip = SM_UNKNOWN;
-}
+   } else {
+   chip = SM_UNKNOWN;
+   }
 
return chip;
 }
-- 
1.7.10.4

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


Re: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-03-12 Thread Olaf Hering
On Wed, Mar 11, K. Y. Srinivasan wrote:

 +++ b/drivers/hv/hv_balloon.c
 @@ -652,6 +652,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned 
 long size,
   }
   has-ha_end_pfn -= HA_CHUNK;
   has-covered_end_pfn -=  processed_pfn;
 + mutex_lock(dm_device.ha_region_mutex);
   break;
   }

Should it call the wrapper instead of doing mutex_lock directly?
Like 'acquire_region_mutex(false);'.

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


Re: [PATCH v2] dgnc: Don't save boards in memory that have failed to initialize

2015-03-12 Thread Dan Carpenter
On Thu, Mar 12, 2015 at 11:08:49AM +0100, Greg KH wrote:
 I really want to see this whole static list of boards/cards go away.

Yes, but I feel like this is a step in that direction.  It just deletes
dead code, it doesn't add anything.

regards,
dan carpenter

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


[PATCH] staging: sm750fb: Fix typo in sm750fb sources

2015-03-12 Thread Masanari Iida
This patch fixed spelling typo found in sm750fb source files.
Both printk and comments are fixed.

Signed-off-by: Masanari Iida standby2...@gmail.com
---
 drivers/staging/sm750fb/ddk750_chip.c   |  4 ++--
 drivers/staging/sm750fb/ddk750_dvi.h|  2 +-
 drivers/staging/sm750fb/ddk750_help.h   |  2 +-
 drivers/staging/sm750fb/ddk750_mode.c   |  6 +++---
 drivers/staging/sm750fb/ddk750_reg.h|  2 +-
 drivers/staging/sm750fb/ddk750_sii164.c |  4 ++--
 drivers/staging/sm750fb/ddk750_swi2c.c  |  2 +-
 drivers/staging/sm750fb/readme  |  8 
 drivers/staging/sm750fb/sm750.c | 20 ++--
 drivers/staging/sm750fb/sm750_accel.c   |  4 ++--
 drivers/staging/sm750fb/sm750_accel.h   |  2 +-
 drivers/staging/sm750fb/sm750_hw.c  |  2 +-
 drivers/staging/sm750fb/sm750_hw.h  |  2 +-
 13 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index b71169e..f05c3c4 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -264,7 +264,7 @@ int ddk750_initHw(initchip_param_t * pInitParam)
 
unsigned int ulReg;
 #if 0
-   //move the code to map regiter function.
+   //move the code to map register function.
if(getChipType() == SM718){
/* turn on big endian bit*/
ulReg = PEEK32(0x74);
@@ -447,7 +447,7 @@ unsigned int calcPllValue(unsigned int 
request_orig,pll_value_t *pll)
 #if 1
if (getChipType() == SM750LE)
 {
-/* SM750LE don't have prgrammable PLL and M/N values to work on.
+/* SM750LE don't have programmable PLL and M/N values to work on.
Just return the requested clock. */
 return request_orig;
 }
diff --git a/drivers/staging/sm750fb/ddk750_dvi.h 
b/drivers/staging/sm750fb/ddk750_dvi.h
index 50bcec2..ac4eafb 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.h
+++ b/drivers/staging/sm750fb/ddk750_dvi.h
@@ -1,7 +1,7 @@
 #ifndef DDK750_DVI_H__
 #define DDK750_DVI_H__
 
-/* dvi chip stuffs structros */
+/* dvi chip stuffs structurs */
 
 typedef long (*PFN_DVICTRL_INIT)(
 unsigned char edgeSelect,
diff --git a/drivers/staging/sm750fb/ddk750_help.h 
b/drivers/staging/sm750fb/ddk750_help.h
index 4fc93b5..18acb04 100644
--- a/drivers/staging/sm750fb/ddk750_help.h
+++ b/drivers/staging/sm750fb/ddk750_help.h
@@ -14,7 +14,7 @@
 #warning big endian on target cpu and enable nature big endian support of 718 
capability !
 #define PEEK32(addr)   __raw_readl((void __iomem 
*)(mmio750)+(addr))
 #define POKE32(addr,data)  __raw_writel((data),(void 
__iomem*)(mmio750)+(addr))
-#else /* software control endianess */
+#else /* software control endianness */
 #define PEEK32(addr) readl((addr)+mmio750)
 #define POKE32(addr,data) writel((data),(addr)+mmio750)
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index 2e418fb..41a17cc 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -42,7 +42,7 @@ static unsigned long 
displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
 dispControl = FIELD_CLEAR(CRT_DISPLAY_CTRL, CLK);
 
/* Set bit 29:27 of display control register for the right clock */
-   /* Note that SM750LE only need to supported 7 resoluitons. */
+   /* Note that SM750LE only need to supported 7 resolutions. */
if ( x == 800  y == 600 )
dispControl = FIELD_SET(dispControl, CRT_DISPLAY_CTRL, CLK, PLL41);
else if (x == 1024  y == 768)
@@ -74,7 +74,7 @@ static unsigned long 
displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
 
 
 
-/* only timing related registers will be  programed */
+/* only timing related registers will be  programmed */
 static int programModeRegisters(mode_parameter_t * pModeParam,pll_value_t * 
pll)
 {
int ret = 0;
@@ -162,7 +162,7 @@ static int programModeRegisters(mode_parameter_t * 
pModeParam,pll_value_t * pll)
 
/* May a hardware bug or just my test chip (not confirmed).
* PANEL_DISPLAY_CTRL register seems requiring few writes
-   * before a value can be succesfully written in.
+   * before a value can be successfully written in.
* Added some masks to mask out the reserved bits.
* Note: This problem happens by design. The hardware will wait 
for the
*   next vertical sync to turn on/off the plane.
diff --git a/drivers/staging/sm750fb/ddk750_reg.h 
b/drivers/staging/sm750fb/ddk750_reg.h
index 2016f97..fd931f5 100644
--- a/drivers/staging/sm750fb/ddk750_reg.h
+++ b/drivers/staging/sm750fb/ddk750_reg.h
@@ -1892,7 +1892,7 @@
 #define CRT_PALETTE_RAM   0x080C00
 
 /* 2D registers
- * move their defination into general lynx_accel.h file
+ * move their definition into general lynx_accel.h file
  * because all smi 

RE: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-03-12 Thread KY Srinivasan


 -Original Message-
 From: Olaf Hering [mailto:o...@aepfle.de]
 Sent: Thursday, March 12, 2015 4:14 AM
 To: Vitaly Kuznetsov
 Cc: KY Srinivasan; gre...@linuxfoundation.org; linux-
 ker...@vger.kernel.org; de...@linuxdriverproject.org; a...@canonical.com
 Subject: Re: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on
 add_memory() failure
 
 On Thu, Mar 12, Vitaly Kuznetsov wrote:
 
  My Drivers: hv: hv_balloon: eliminate the trylock path in
  acquire/release_region_mutex
  (b05d8d9ef5ef21d1b18440430f950304836e1aaa
  in char-misc-next) removed these wrappers.
 
 I see now. There are many changes in char-misc-next. The description gives
 the impression that mainline is broken. Not sure if thats true, perhaps its 
 just
 char-misc-next which is affected.

Yes; I notified Greg of this and I have resent the set with proper tag for Greg 
to pick this set up
for 4.0.

Regards,

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


[patch] staging: unisys: fix some debugfs output

2015-03-12 Thread Dan Carpenter
When we removed the ERRDEV() macro we made a small mistake so now it
doesn't print the Virtual PCI devices section header.

Fixes: 0aca78449b58 ('staging: unisys: remove ERRDEV macros')
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/drivers/staging/unisys/virtpci/virtpci.c 
b/drivers/staging/unisys/virtpci/virtpci.c
index 43b5736..cfefdab 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -1289,8 +1289,8 @@ static ssize_t info_debugfs_read(struct file *file, char 
__user *buf,
printparam.str_pos = str_pos;
printparam.buf = vbuf;
printparam.len = len;
-   if (bus_for_each_dev(virtpci_bus_type, NULL,
-(void *)printparam, print_vbus))
+   bus_for_each_dev(virtpci_bus_type, NULL, (void *)printparam,
+print_vbus);
 
str_pos += scnprintf(vbuf + str_pos, len - str_pos,
\n Virtual PCI devices\n);
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread KY Srinivasan


 -Original Message-
 From: Greg KH [mailto:gre...@linuxfoundation.org]
 Sent: Thursday, March 12, 2015 2:03 AM
 To: KY Srinivasan
 Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
 o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com
 Subject: Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the
 per-channel work element
 
 On Thu, Mar 12, 2015 at 10:02:24AM +0100, Greg KH wrote:
  On Wed, Mar 11, 2015 at 06:56:54PM -0700, K. Y. Srinivasan wrote:
   This patch is a continuation of the rescind handling cleanup work.
   We cannot block in the global message handling work context
   especially if we are blocking waiting for the host to wake us up. I
   would like to thank Dexuan Cui de...@microsoft.com for observing
 this problem.
  
   The current Linux 4.0 RC3 tree is broken and this patch fixes the problem.
  
   Signed-off-by: K. Y. Srinivasan k...@microsoft.com
   ---
drivers/hv/channel_mgmt.c |  143
 +++-
drivers/hv/connection.c   |6 ++-
drivers/hv/hyperv_vmbus.h |2 +-
3 files changed, 107 insertions(+), 44 deletions(-)
 
  This is a very big patch so late in the -rc cycle.  Is there some
  patch that got merged in 4.0-rc1 that I should be reverting instead to
  fix things up?
 
 Make that, this is a very large patch set, not just one patch.  I can't 
 take all
 of these this late, sorry.  Please just tell me what to revert.

Greg,

Would it be possible to pick up two patches. I could prune this down to two. 
The two I want you to
pick up are (in the order of importance):

[PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work 
element
[PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

If you could pickup an additional patch that would be:

[PATCH 6/6] Drivers: hv: vmbus: Fix a bug in rescind processing in 
vmbus_close_internal()

The first one is the most important one and if you can only pickup one, the 
first one is the one I want you to pick up.
The third one fixes a memory leak issue that occurs only under
certain conditions. We may have to revert more patches than applying the two 
patches that
would fix the most important issues.

Let me know if you want me to resend the ones that you can apply.

Thank you in advance,

K. Y

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


[PATCH 2/2] staging: unisys: remove comparison

2015-03-12 Thread Sudip Mukherjee
the macro comparison is always true as MAJOR is defined as
unsiged int.

Signed-off-by: Sudip Mukherjee su...@vectorindia.org
---
 drivers/staging/unisys/visorchipset/file.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c 
b/drivers/staging/unisys/visorchipset/file.c
index 9ca7f1e..a1e8e79 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -82,10 +82,8 @@ visorchipset_file_cleanup(void)
cdev_del(file_cdev);
file_cdev.ops = NULL;
if (registered) {
-   if (MAJOR(majordev) = 0) {
-   unregister_chrdev_region(majordev, 1);
-   majordev = MKDEV(0, 0);
-   }
+   unregister_chrdev_region(majordev, 1);
+   majordev = MKDEV(0, 0);
registered = FALSE;
}
 }
-- 
1.8.1.2

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


Re: [PATCH 2/2] staging: unisys: remove comparison

2015-03-12 Thread Greg Kroah-Hartman
On Thu, Mar 12, 2015 at 07:44:21PM +0530, Sudip Mukherjee wrote:
 the macro comparison is always true as MAJOR is defined as
 unsiged int.
 
 Signed-off-by: Sudip Mukherjee su...@vectorindia.org
 ---
  drivers/staging/unisys/visorchipset/file.c | 6 ++
  1 file changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/staging/unisys/visorchipset/file.c 
 b/drivers/staging/unisys/visorchipset/file.c
 index 9ca7f1e..a1e8e79 100644
 --- a/drivers/staging/unisys/visorchipset/file.c
 +++ b/drivers/staging/unisys/visorchipset/file.c
 @@ -82,10 +82,8 @@ visorchipset_file_cleanup(void)
   cdev_del(file_cdev);
   file_cdev.ops = NULL;
   if (registered) {
 - if (MAJOR(majordev) = 0) {
 - unregister_chrdev_region(majordev, 1);
 - majordev = MKDEV(0, 0);
 - }
 + unregister_chrdev_region(majordev, 1);
 + majordev = MKDEV(0, 0);

If this is really true, then why is someone trying to assign -1 to
majordev at the top of the file?  :)

I suggest you fix this up properly, not by papering over the bug.

thanks,

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


[PATCH 1/2] staging: unisys: remove unused variables

2015-03-12 Thread Sudip Mukherjee
these variable were being assigned some values but never reused.

Signed-off-by: Sudip Mukherjee su...@vectorindia.org
---
 drivers/staging/unisys/virthba/virthba.c | 18 ++
 drivers/staging/unisys/virtpci/virtpci.c | 22 +++---
 2 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c 
b/drivers/staging/unisys/virthba/virthba.c
index e5b0dd8..655db2f 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -333,16 +333,14 @@ static inline void
 send_disk_add_remove(struct diskaddremove *dar)
 {
struct scsi_device *sdev;
-   int error;
 
sdev = scsi_device_lookup(dar-shost, dar-channel, dar-id, dar-lun);
if (sdev) {
if (!(dar-add))
scsi_remove_device(sdev);
} else if (dar-add) {
-   error =
-   scsi_add_device(dar-shost, dar-channel, dar-id,
-   dar-lun);
+   scsi_add_device(dar-shost, dar-channel, dar-id,
+   dar-lun);
}
kfree(dar);
 }
@@ -401,7 +399,6 @@ virthba_isr(int irq, void *dev_id)
struct channel_header __iomem *channel_header;
struct signal_queue_header __iomem *pqhdr;
u64 mask;
-   unsigned long long rc1;
 
if (virthbainfo == NULL)
return IRQ_NONE;
@@ -414,7 +411,8 @@ virthba_isr(int irq, void *dev_id)
0)) {
virthbainfo-interrupts_disabled++;
mask = ~ULTRA_CHANNEL_ENABLE_INTS;
-   rc1 = uisqueue_interlocked_and(virthbainfo-flags_addr, mask);
+   uisqueue_interlocked_and(virthbainfo-flags_addr,
+mask);
}
if (spar_signalqueue_empty(channel_header, IOCHAN_FROM_IOPART)) {
virthbainfo-interrupts_notme++;
@@ -807,7 +805,6 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 {
struct scsi_device *scsidev = scsicmd-device;
int insert_location;
-   unsigned char op;
unsigned char *cdb = scsicmd-cmnd;
struct Scsi_Host *scsihost = scsidev-host;
struct uiscmdrsp *cmdrsp;
@@ -890,7 +887,6 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
cmdrsp-scsi.guest_phys_entries = scsi_sg_count(scsicmd);
}
 
-   op = cdb[0];
i = uisqueue_put_cmdrsp_with_lock_client(virthbainfo-chinfo.queueinfo,
 cmdrsp, IOCHAN_TO_IOPART,
 virthbainfo-chinfo.
@@ -984,11 +980,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct 
scsi_cmnd *scsicmd)
 {
struct virtdisk_info *vdisk;
struct scsi_device *scsidev;
-   struct sense_data *sd;
 
scsidev = scsicmd-device;
memcpy(scsicmd-sense_buffer, cmdrsp-scsi.sensebuf, MAX_SENSE_SIZE);
-   sd = (struct sense_data *)scsicmd-sense_buffer;
 
/* Do not log errors for disk-not-present inquiries */
if ((cmdrsp-scsi.cmnd[0] == INQUIRY) 
@@ -1178,7 +1172,6 @@ process_incoming_rsps(void *v)
struct uiscmdrsp *cmdrsp = NULL;
const int SZ = sizeof(struct uiscmdrsp);
u64 mask;
-   unsigned long long rc1;
 
UIS_DAEMONIZE(vhba_incoming);
/* alloc once and reuse */
@@ -1197,7 +1190,8 @@ process_incoming_rsps(void *v)
atomic_set(virthbainfo-interrupt_rcvd, 0);
/* drain queue */
drain_queue(virthbainfo, dc, cmdrsp);
-   rc1 = uisqueue_interlocked_or(virthbainfo-flags_addr, mask);
+   uisqueue_interlocked_or(virthbainfo-flags_addr,
+   mask);
}
 
kfree(cmdrsp);
diff --git a/drivers/staging/unisys/virtpci/virtpci.c 
b/drivers/staging/unisys/virtpci/virtpci.c
index 43b5736..e0d38d5 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -546,7 +546,6 @@ static void delete_all(void)
 static int delete_all_virt(enum virtpci_dev_type devtype,
   struct del_vbus_guestpart *delparams)
 {
-   int i;
unsigned char busid[BUS_ID_SIZE];
struct device *vbus;
 
@@ -561,7 +560,7 @@ static int delete_all_virt(enum virtpci_dev_type devtype,
return 0;
 
/* delete all vhbas/vnics */
-   i = virtpci_device_del(vbus, devtype, NULL, NULL);
+   virtpci_device_del(vbus, devtype, NULL, NULL);
return 1;
 }
 
@@ -797,7 +796,6 @@ static int virtpci_device_add(struct device *parentbus, int 
devtype,
struct virtpci_dev *tmpvpcidev = NULL, *prev;
unsigned long flags;
int ret;
-   struct spar_io_channel_protocol __iomem *io_chan = NULL;
struct device *dev;
 
POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
@@ -831,10 +829,6 @@ static int 

RE: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread KY Srinivasan


 -Original Message-
 From: Olaf Hering [mailto:o...@aepfle.de]
 Sent: Thursday, March 12, 2015 3:44 AM
 To: KY Srinivasan
 Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; a...@canonical.com; vkuzn...@redhat.com
 Subject: Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the
 per-channel work element
 
 On Wed, Mar 11, K. Y. Srinivasan wrote:
 
  The current Linux 4.0 RC3 tree is broken and this patch fixes the problem.
 
 This does not seem to apply to master. What it is based on?

They were based on Greg's tree. 

K. Y

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


Re: [PATCH] staging: sm750fb: Fix typo in sm750fb sources

2015-03-12 Thread Sudip Mukherjee
On Thu, Mar 12, 2015 at 09:43:38PM +0900, Masanari Iida wrote:
 This patch fixed spelling typo found in sm750fb source files.
 Both printk and comments are fixed.

your patch is not applying to next-20150312. please refresh your patch
against staging-testing branch of the staging tree.

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


Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread Greg KH
On Thu, Mar 12, 2015 at 01:12:29PM +, KY Srinivasan wrote:
 
 
  -Original Message-
  From: Greg KH [mailto:gre...@linuxfoundation.org]
  Sent: Thursday, March 12, 2015 2:03 AM
  To: KY Srinivasan
  Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
  o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com
  Subject: Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the
  per-channel work element
  
  On Thu, Mar 12, 2015 at 10:02:24AM +0100, Greg KH wrote:
   On Wed, Mar 11, 2015 at 06:56:54PM -0700, K. Y. Srinivasan wrote:
This patch is a continuation of the rescind handling cleanup work.
We cannot block in the global message handling work context
especially if we are blocking waiting for the host to wake us up. I
would like to thank Dexuan Cui de...@microsoft.com for observing
  this problem.
   
The current Linux 4.0 RC3 tree is broken and this patch fixes the 
problem.
   
Signed-off-by: K. Y. Srinivasan k...@microsoft.com
---
 drivers/hv/channel_mgmt.c |  143
  +++-
 drivers/hv/connection.c   |6 ++-
 drivers/hv/hyperv_vmbus.h |2 +-
 3 files changed, 107 insertions(+), 44 deletions(-)
  
   This is a very big patch so late in the -rc cycle.  Is there some
   patch that got merged in 4.0-rc1 that I should be reverting instead to
   fix things up?
  
  Make that, this is a very large patch set, not just one patch.  I can't 
  take all
  of these this late, sorry.  Please just tell me what to revert.
 
 Greg,
 
 Would it be possible to pick up two patches. I could prune this down to two. 
 The two I want you to
 pick up are (in the order of importance):
 
 [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel 
 work element
 [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() 
 failure
 
 If you could pickup an additional patch that would be:
 
 [PATCH 6/6] Drivers: hv: vmbus: Fix a bug in rescind processing in 
 vmbus_close_internal()
 
 The first one is the most important one and if you can only pickup one, the 
 first one is the one I want you to pick up.

You aren't answering my question, what happened that caused these to
become an error and break the 4.0-rc tree?  Shouldn't I just revert a
recent change here?  Or has things always been broken and no one has
noticed it before?

I need a lot more information here please.

Oh, and also, please wrap your email lines :)

 The third one fixes a memory leak issue that occurs only under
 certain conditions.

You need to describe those certian conditions better.

 We may have to revert more patches than applying the two patches that
 would fix the most important issues.

I can easly revert everything recently applied, which is much safer than
adding more patches on top of things.  In fact, I prefer to do that, so
what git commit ids should I revert?

thanks,

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


RE: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread KY Srinivasan


 -Original Message-
 From: Greg KH [mailto:gre...@linuxfoundation.org]
 Sent: Thursday, March 12, 2015 6:29 AM
 To: KY Srinivasan
 Cc: a...@canonical.com; de...@linuxdriverproject.org; o...@aepfle.de;
 linux-ker...@vger.kernel.org
 Subject: Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the
 per-channel work element
 
 On Thu, Mar 12, 2015 at 01:12:29PM +, KY Srinivasan wrote:
 
 
   -Original Message-
   From: Greg KH [mailto:gre...@linuxfoundation.org]
   Sent: Thursday, March 12, 2015 2:03 AM
   To: KY Srinivasan
   Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
   o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com
   Subject: Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register
   in the per-channel work element
  
   On Thu, Mar 12, 2015 at 10:02:24AM +0100, Greg KH wrote:
On Wed, Mar 11, 2015 at 06:56:54PM -0700, K. Y. Srinivasan wrote:
 This patch is a continuation of the rescind handling cleanup work.
 We cannot block in the global message handling work context
 especially if we are blocking waiting for the host to wake us
 up. I would like to thank Dexuan Cui de...@microsoft.com for
 observing
   this problem.

 The current Linux 4.0 RC3 tree is broken and this patch fixes the
 problem.

 Signed-off-by: K. Y. Srinivasan k...@microsoft.com
 ---
  drivers/hv/channel_mgmt.c |  143
   +++-
  drivers/hv/connection.c   |6 ++-
  drivers/hv/hyperv_vmbus.h |2 +-
  3 files changed, 107 insertions(+), 44 deletions(-)
   
This is a very big patch so late in the -rc cycle.  Is there some
patch that got merged in 4.0-rc1 that I should be reverting
instead to fix things up?
  
   Make that, this is a very large patch set, not just one patch.  I
   can't take all of these this late, sorry.  Please just tell me what to 
   revert.
 
  Greg,
 
  Would it be possible to pick up two patches. I could prune this down
  to two. The two I want you to pick up are (in the order of importance):
 
  [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the
  per-channel work element [PATCH 2/6] Drivers: hv: hv_balloon: keep
  locks balanced on add_memory() failure
 
  If you could pickup an additional patch that would be:
 
  [PATCH 6/6] Drivers: hv: vmbus: Fix a bug in rescind processing in
  vmbus_close_internal()
 
  The first one is the most important one and if you can only pickup one, the
 first one is the one I want you to pick up.
 
 You aren't answering my question, what happened that caused these to
 become an error and break the 4.0-rc tree?  Shouldn't I just revert a recent
 change here?  Or has things always been broken and no one has noticed it
 before?

commit 2dd37cb81580dce6dfb8c5a7d5c37b904a188ae7

introduced the bug (committed on Feb 28th). This patch cleaned up
the rescind handling code.

The patches I sent a few days later:

Drivers: hv: vmbus: Perform device register in the
per-channel work element fixed it.

Drivers: hv: vmbus: Fix a bug in rescind processing in 
vmbus_close_internal()
 
Fixed the bugs.

 
 I need a lot more information here please.
 
 Oh, and also, please wrap your email lines :)
 
  The third one fixes a memory leak issue that occurs only under certain
  conditions.
 
 You need to describe those certian conditions better.

When a channel that has been rescinded is closed, we will leak memory.
This bug was also introduced by:
commit 2dd37cb81580dce6dfb8c5a7d5c37b904a188ae7

 
  We may have to revert more patches than applying the two patches that
  would fix the most important issues.
 
 I can easly revert everything recently applied, which is much safer than
 adding more patches on top of things.  In fact, I prefer to do that, so what 
 git
 commit ids should I revert?

If you revert commit 2dd37cb81580dce6dfb8c5a7d5c37b904a188ae7
we should be fine in that we will have all the issues we have had
for a while with regards to rescind handling. 

Regards,

K. Y

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


[PATCHv2 0/5] ft1000 driver checkpatch.pl fixes

2015-03-12 Thread Janakarajan Natarajan
Minor changes to fix ft1000 driver checkpatch.pl warnings

Janakarajan Natarajan (5):
  Drivers: Staging: ft1000: Single line if-statement changes
  Drivers: Staging: ft1000: Fix extra parenthesis warnings
  Drivers: Staging: ft1000: Refactoring if-else statement
  Drivers: Staging: ft1000: Fix blank line after declartion warning
  Drivers: Staging: ft1000: checkpatch.pl header file warning fix

v2: if-else refactored as suggested by Joe Perches j...@perches.co
Variable reworked as suggested by Giedrius Statkevicius 
giedrius.statkevic...@gmail.com

 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 16 +++-
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c |  6 ++
 2 files changed, 9 insertions(+), 13 deletions(-)

-- 
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

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


[PATCHv2 5/5] Drivers: Staging: ft1000: checkpatch.pl header file warning fix

2015-03-12 Thread Janakarajan Natarajan
Replaces asm/io.h and asm/bitops.h with linux/io.h and linux/bitops.h

Signed-off-by: Janakarajan Natarajan janakaraj...@gmail.com
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c 
b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index b43a6fd..a93eaf5 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -28,8 +28,8 @@
 #include linux/timer.h
 #include linux/interrupt.h
 #include linux/in.h
-#include asm/io.h
-#include asm/bitops.h
+#include linux/io.h
+#include linux/bitops.h
 
 #include linux/netdevice.h
 #include linux/etherdevice.h
-- 
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

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


[PATCHv2 1/5] Drivers: Staging: ft1000: Single line if-statement changes

2015-03-12 Thread Janakarajan Natarajan
Minor change to remove {} for single line if statements

Signed-off-by: Janakarajan Natarajan janakaraj...@gmail.com
---
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index c8d2782..8fb0f5a 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -317,9 +317,8 @@ static int ft1000_open(struct inode *inode, struct file 
*file)
 
/* Search for available application info block */
for (i = 0; i  MAX_NUM_APP; i++) {
-   if ((dev-app_info[i].fileobject == NULL)) {
+   if ((dev-app_info[i].fileobject == NULL))
break;
-   }
}
 
/* Fail due to lack of application info block */
@@ -575,9 +574,8 @@ static long ft1000_ioctl(struct file *file, unsigned int 
command,
} else {
/* Check if this message came from a registered 
application */
for (i = 0; i  MAX_NUM_APP; i++) {
-   if (ft1000dev-app_info[i].fileobject 
== file-f_owner) {
+   if (ft1000dev-app_info[i].fileobject 
== file-f_owner)
break;
-   }
}
if (i == MAX_NUM_APP) {
pr_debug(No matching application 
fileobject\n);
-- 
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

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


[PATCHv2 4/5] Drivers: Staging: ft1000: Fix blank line warning

2015-03-12 Thread Janakarajan Natarajan
Merges variable declaration and definition.

Signed-off-by: Janakarajan Natarajan janakaraj...@gmail.com
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c 
b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index 973bfbf..b43a6fd 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -2006,8 +2006,7 @@ void stop_ft1000_card(struct net_device *dev)
 static void ft1000_get_drvinfo(struct net_device *dev,
   struct ethtool_drvinfo *info)
 {
-   struct ft1000_info *ft_info;
-   ft_info = netdev_priv(dev);
+   struct ft1000_info *ft_info = netdev_priv(dev);
 
strlcpy(info-driver, ft1000, sizeof(info-driver));
snprintf(info-bus_info, sizeof(info-bus_info), PCMCIA 0x%lx,
-- 
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

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


[PATCHv2 2/5] Drivers: Staging: ft1000: Fix extra parenthesis warnings

2015-03-12 Thread Janakarajan Natarajan
Minor changes to remove extra parenthesis

Signed-off-by: Janakarajan Natarajan janakaraj...@gmail.com
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +-
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c 
b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index 017c3b9..d4006a4 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -911,7 +911,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 
*pbuffer,
tempword = *ppseudohdr++;
for (i = 1; i  7; i++)
tempword ^= *ppseudohdr++;
-   if ((tempword != *ppseudohdr)) {
+   if (tempword != *ppseudohdr) {
pr_debug(Pseudo header checksum mismatch\n);
/* Drop this message */
return false;
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index 8fb0f5a..8c1e5fc 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -317,7 +317,7 @@ static int ft1000_open(struct inode *inode, struct file 
*file)
 
/* Search for available application info block */
for (i = 0; i  MAX_NUM_APP; i++) {
-   if ((dev-app_info[i].fileobject == NULL))
+   if (!dev-app_info[i].fileobject)
break;
}
 
-- 
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

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


Re: [PATCH] staging: sm750fb: braces, indents, spaces fix

2015-03-12 Thread Sudip Mukherjee
On Thu, Mar 12, 2015 at 08:43:33PM -0700, Ragavendra BN wrote:
 Signed-off-by: Ragavendra BN ragavendra...@gmail.com
 
 This patch removes the braces for the single line if statement. It fixes
 the indent positions correctly. It fixes the spaces appropriately making the 
 code give no
 warnings by the checkpath.pl script check.
 
Signed-off-by line should come here before the ---

 ---

not at the top like you are giving.
Greg has told you once, I am telling now for the second time.

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


Re: [PATCH] staging: sm750fb: braces, indents, spaces fix

2015-03-12 Thread Sudip Mukherjee
On Thu, Mar 12, 2015 at 10:14:36PM -0700, Ragavendra BN wrote:
 This patch removes the braces for the single line if statement. It fixes
 the indent positions correctly. It fixes the spaces appropriately making the 
 code give no
 warnings by the checpath.pl script check.

your From: is still having [user] in your email address.
and you are doing too many things in a single patch. one patch should
do only one type of change.

 
 
 Signed-off-by: Ragavendra BN ragavendra...@gmail.com
 
this extra blank line is not necessary here.

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


[PATCHv2 3/5] Drivers: Staging: ft1000: Refactoring if-else statement

2015-03-12 Thread Janakarajan Natarajan
Minor change to convert if-else to if statement

Signed-off-by: Janakarajan Natarajan janakaraj...@gmail.com
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c 
b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index d4006a4..973bfbf 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -1948,11 +1948,10 @@ static irqreturn_t ft1000_interrupt(int irq, void 
*dev_id)
ft1000_read_reg(dev,

FT1000_REG_MAG_DFSR);
}
-   if (tempword  0x1f) {
-   ft1000_copy_up_pkt(dev);
-   } else {
+   if (!(tempword  0x1f))
break;
-   }
+
+   ft1000_copy_up_pkt(dev);
cnt++;
} while (cnt  MAX_RCV_LOOP);
 
-- 
1.9.1


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

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


RE: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread KY Srinivasan


 -Original Message-
 From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On
 Behalf Of KY Srinivasan
 Sent: Thursday, March 12, 2015 7:29 AM
 To: Olaf Hering
 Cc: a...@canonical.com; gre...@linuxfoundation.org; linux-
 ker...@vger.kernel.org; de...@linuxdriverproject.org
 Subject: RE: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the
 per-channel work element
 
 
 
  -Original Message-
  From: Olaf Hering [mailto:o...@aepfle.de]
  Sent: Thursday, March 12, 2015 3:44 AM
  To: KY Srinivasan
  Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
  de...@linuxdriverproject.org; a...@canonical.com; vkuzn...@redhat.com
  Subject: Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register
  in the per-channel work element
 
  On Wed, Mar 11, K. Y. Srinivasan wrote:
 
   The current Linux 4.0 RC3 tree is broken and this patch fixes the problem.
 
  This does not seem to apply to master. What it is based on?
 
 They were based on Greg's tree.

Olaf,

I don't know exactly what Greg will do. If he reverts the previous commits, 
I don't know If it will be on  4.0 branch or from 4.1 as well. I can rebase 
these patches on linux-next and give them to you if you want.

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


Re: [PATCH RESEND 0/3] memory_hotplug: hyperv: fix deadlock between memory adding and onlining

2015-03-12 Thread Michal Hocko
On Mon 09-03-15 09:40:43, Vitaly Kuznetsov wrote:
 Michal Hocko mho...@suse.cz writes:
 
  [Sorry for the late response]
 
  This is basically the same code posted by KY Srinivasan posted late last
  year (http://marc.info/?l=linux-mmm=141782228129426w=2). I had
  objections to the implementation
  http://marc.info/?l=linux-mmm=141805109216700w=2
 
 Np, David's alternative fix is already in -mm:
 
 https://lkml.org/lkml/2015/2/12/655

Thanks for the pointer. I have missed this one. This is definitely a
better approach than cluttering around exporting device lock.
-- 
Michal Hocko
SUSE Labs
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] dgnc: Don't save boards in memory that have failed to initialize

2015-03-12 Thread Giedrius Statkevičius
On 2015.03.12 12:08, Greg KH wrote:
 On Mon, Mar 09, 2015 at 06:29:38PM +0200, Giedrius Statkevičius wrote:
 Remove BOARD_FAILED and don't save dgnc_boards which failed to
 initialize.

 Assign the result of kzalloc() to brd in dgnc_found_board() and only put
 it in the dgnc_Board[] if it successfully initializes. Also, remove
 BOARD_FAILED enum and all ifs that check for it. Finally, remove one
 final place where state was set to BOARD_FAILED which was even redundant
 before this patch.

 Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
 ---
 v2: Remove brd = dgnc_Board[dgnc_NumBoards]; line which I forgot to do
 in the first version

  drivers/staging/dgnc/dgnc_driver.c | 20 ++--
  drivers/staging/dgnc/dgnc_driver.h |  3 +--
  drivers/staging/dgnc/dgnc_mgmt.c   |  5 +
  drivers/staging/dgnc/dgnc_tty.c|  8 
  4 files changed, 4 insertions(+), 32 deletions(-)

 diff --git a/drivers/staging/dgnc/dgnc_driver.c 
 b/drivers/staging/dgnc/dgnc_driver.c
 index fa1ee79..075727d 100644
 --- a/drivers/staging/dgnc/dgnc_driver.c
 +++ b/drivers/staging/dgnc/dgnc_driver.c
 @@ -401,8 +401,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
  unsigned long flags;
  
  /* get the board structure and prep it */
 -dgnc_Board[dgnc_NumBoards] = kzalloc(sizeof(*brd), GFP_KERNEL);
 -brd = dgnc_Board[dgnc_NumBoards];
 +brd = kzalloc(sizeof(*brd), GFP_KERNEL);
 
 You've done a great job here, but...
 
 Yeah, sorry...
 
 I really want to see this whole static list of boards/cards go away.
 There should not be any need for that in any in-kernel driver.  Your
 patch here is a sign that things are really wrong with this whole static
 array mess.
 
 So could you do that instead?  I don't want to take patches around this
 whole board state mess anymore, as it should all not be needed at all.
 
 If you need pointers on what needs to be done here, just let me know.
 
 thanks,
 
 greg k-h
 

I can try :) But my main concern is the lack of dgnc driver maintainers
activity and that I don't own the hardware this driver is written for as
it's quite expensive (cheapest cards I've found start at 300$~) and I
can't afford it ATM. But I guess if I keep the patches small and logical
everything will be okay.

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


Re: [patch 1/2] staging: dgnc: some off by one bugs

2015-03-12 Thread Dan Carpenter
On Thu, Mar 12, 2015 at 08:07:39PM +0300, Dan Carpenter wrote:
 dgnc_NumBoards is the number of filled out elements in the
 dgnc_Board[] array.  -nasync and -maxports are the value.

I meant the *same* value.  I'll resend.

regards,
dan carpenter

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


[PATCH v2 3/4] staging: unisys: remove comparison

2015-03-12 Thread Sudip Mukherjee
MAJOR(majordev) is 0 when dynamic major number is used, and it is
greater than 0 when static major number is used. Considering both the
cases the expression is always true.

Signed-off-by: Sudip Mukherjee su...@vectorindia.org
---

v2: changed commit log

 drivers/staging/unisys/visorchipset/file.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c 
b/drivers/staging/unisys/visorchipset/file.c
index e9459af..e88a215 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -82,10 +82,8 @@ visorchipset_file_cleanup(void)
cdev_del(file_cdev);
file_cdev.ops = NULL;
if (registered) {
-   if (MAJOR(majordev) = 0) {
-   unregister_chrdev_region(majordev, 1);
-   majordev = MKDEV(0, 0);
-   }
+   unregister_chrdev_region(majordev, 1);
+   majordev = MKDEV(0, 0);
registered = FALSE;
}
 }
-- 
1.8.1.2

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


[PATCH] staging: lustre: Use kmemdup rather than duplicating its implementation

2015-03-12 Thread Ravindran, Madhusudhanan (M.)
The semantic patch that makes this change is available
in scriptcoccinelle/api/memdup.cocci.

Signed-off-by: Madhusudhanan Ravindran mravi...@visteon.com
---
 drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c 
b/drivers/staging/lustre/lustre/llite/xattr_cache.c
index 7e2fcfe..da190f9 100644
--- a/drivers/staging/lustre/lustre/llite/xattr_cache.c
+++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c
@@ -132,11 +132,10 @@ static int ll_xattr_cache_add(struct list_head *cache,
   xattr-xe_namelen);
goto err_name;
}
-   xattr-xe_value = kzalloc(xattr_val_len, GFP_NOFS);
+   xattr-xe_value = kmemdup(xattr_val, xattr_val_len, GFP_NOFS);
if (!xattr-xe_value)
goto err_value;
 
-   memcpy(xattr-xe_value, xattr_val, xattr_val_len);
xattr-xe_vallen = xattr_val_len;
list_add(xattr-xe_list, cache);
 
-- 
1.9.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[patch 1/2] staging: dgnc: some off by one bugs

2015-03-12 Thread Dan Carpenter
dgnc_NumBoards is the number of filled out elements in the
dgnc_Board[] array.  -nasync and -maxports are the value.  They
are the number of channels in the -channels[] array so these tests
should be = instead of  so we avoid reading past the end of the
arrays.

I cleaned up the conditions in dgnc_mgmt_ioctl() a bit.  There was a
work around for the off by one bug in the case where there were no
boards which is no longer needed.  channel is unsigned so it can't be
negative.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index bedc522..0d8f154 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
@@ -406,7 +406,7 @@ static inline void cls_parse_isr(struct dgnc_board *brd, 
uint port)
 * verified in the interrupt routine.
 */
 
-   if (port  brd-nasync)
+   if (port = brd-nasync)
return;
 
ch = brd-channels[port];
diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c
index 5544a8e..01b290e 100644
--- a/drivers/staging/dgnc/dgnc_mgmt.c
+++ b/drivers/staging/dgnc/dgnc_mgmt.c
@@ -196,11 +196,11 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, 
unsigned long arg)
channel = ni.channel;
 
/* Verify boundaries on board */
-   if ((board  dgnc_NumBoards) || (dgnc_NumBoards == 0))
+   if (board = dgnc_NumBoards)
return -ENODEV;
 
/* Verify boundaries on channel */
-   if ((channel  0) || (channel  dgnc_Board[board]-nasync))
+   if (channel = dgnc_Board[board]-nasync)
return -ENODEV;
 
ch = dgnc_Board[board]-channels[channel];
diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 1268aa9..921e463 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -407,7 +407,7 @@ static inline void neo_parse_isr(struct dgnc_board *brd, 
uint port)
if (!brd || brd-magic != DGNC_BOARD_MAGIC)
return;
 
-   if (port  brd-maxports)
+   if (port = brd-maxports)
return;
 
ch = brd-channels[port];
@@ -537,7 +537,7 @@ static inline void neo_parse_lsr(struct dgnc_board *brd, 
uint port)
if (!brd || brd-magic != DGNC_BOARD_MAGIC)
return;
 
-   if (port  brd-maxports)
+   if (port = brd-maxports)
return;
 
ch = brd-channels[port];
@@ -1019,7 +1019,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
 */
 
/* Verify the port is in range. */
-   if (port  brd-nasync)
+   if (port = brd-nasync)
continue;
 
ch = brd-channels[port];
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 8179342..4507d4a 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1060,7 +1060,7 @@ static int dgnc_tty_open(struct tty_struct *tty, struct 
file *file)
spin_lock_irqsave(brd-bd_lock, flags);
 
/* If opened device is greater than our number of ports, bail. */
-   if (PORT_NUM(minor)  brd-nasync) {
+   if (PORT_NUM(minor) = brd-nasync) {
spin_unlock_irqrestore(brd-bd_lock, flags);
return -ENXIO;
}
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[patch 2/2] serial: jsm: some off by one bugs

2015-03-12 Thread Dan Carpenter
brd-nasync amd brd-maxports are the same.  They hold the number of
filled out channels in the brd-channels[] array.  These tests should
be = instead of  so that we don't read one element past the end.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c
index bfb0681..4eb12a9 100644
--- a/drivers/tty/serial/jsm/jsm_cls.c
+++ b/drivers/tty/serial/jsm/jsm_cls.c
@@ -570,7 +570,7 @@ static inline void cls_parse_isr(struct jsm_board *brd, 
uint port)
 * verified in the interrupt routine.
 */
 
-   if (port  brd-nasync)
+   if (port = brd-nasync)
return;
 
ch = brd-channels[port];
diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
index 7291c21..f413ef0 100644
--- a/drivers/tty/serial/jsm/jsm_neo.c
+++ b/drivers/tty/serial/jsm/jsm_neo.c
@@ -840,7 +840,7 @@ static inline void neo_parse_lsr(struct jsm_board *brd, u32 
port)
if (!brd)
return;
 
-   if (port  brd-maxports)
+   if (port = brd-maxports)
return;
 
ch = brd-channels[port];
@@ -1180,7 +1180,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
 */
 
/* Verify the port is in range. */
-   if (port  brd-nasync)
+   if (port = brd-nasync)
continue;
 
ch = brd-channels[port];
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[patch 1/2 v2] staging: dgnc: some off by one bugs

2015-03-12 Thread Dan Carpenter
dgnc_NumBoards is the number of filled out elements in the
dgnc_Board[] array.  -nasync and -maxports are the same value.
They are the number of channels in the -channels[] array so these tests
should be = instead of  so we avoid reading past the end of the
arrays.

I cleaned up the conditions in dgnc_mgmt_ioctl() a bit.  There was a
work around for the off by one bug in the case where there were no
boards which is no longer needed.  channel is unsigned so it can't be
negative.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
v2: fix changelog

diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index bedc522..0d8f154 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
@@ -406,7 +406,7 @@ static inline void cls_parse_isr(struct dgnc_board *brd, 
uint port)
 * verified in the interrupt routine.
 */
 
-   if (port  brd-nasync)
+   if (port = brd-nasync)
return;
 
ch = brd-channels[port];
diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c
index 5544a8e..01b290e 100644
--- a/drivers/staging/dgnc/dgnc_mgmt.c
+++ b/drivers/staging/dgnc/dgnc_mgmt.c
@@ -196,11 +196,11 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, 
unsigned long arg)
channel = ni.channel;
 
/* Verify boundaries on board */
-   if ((board  dgnc_NumBoards) || (dgnc_NumBoards == 0))
+   if (board = dgnc_NumBoards)
return -ENODEV;
 
/* Verify boundaries on channel */
-   if ((channel  0) || (channel  dgnc_Board[board]-nasync))
+   if (channel = dgnc_Board[board]-nasync)
return -ENODEV;
 
ch = dgnc_Board[board]-channels[channel];
diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 1268aa9..921e463 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -407,7 +407,7 @@ static inline void neo_parse_isr(struct dgnc_board *brd, 
uint port)
if (!brd || brd-magic != DGNC_BOARD_MAGIC)
return;
 
-   if (port  brd-maxports)
+   if (port = brd-maxports)
return;
 
ch = brd-channels[port];
@@ -537,7 +537,7 @@ static inline void neo_parse_lsr(struct dgnc_board *brd, 
uint port)
if (!brd || brd-magic != DGNC_BOARD_MAGIC)
return;
 
-   if (port  brd-maxports)
+   if (port = brd-maxports)
return;
 
ch = brd-channels[port];
@@ -1019,7 +1019,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
 */
 
/* Verify the port is in range. */
-   if (port  brd-nasync)
+   if (port = brd-nasync)
continue;
 
ch = brd-channels[port];
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 8179342..4507d4a 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1060,7 +1060,7 @@ static int dgnc_tty_open(struct tty_struct *tty, struct 
file *file)
spin_lock_irqsave(brd-bd_lock, flags);
 
/* If opened device is greater than our number of ports, bail. */
-   if (PORT_NUM(minor)  brd-nasync) {
+   if (PORT_NUM(minor) = brd-nasync) {
spin_unlock_irqrestore(brd-bd_lock, flags);
return -ENXIO;
}
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 4/4] staging: unisys: remove forward declarations

2015-03-12 Thread Sudip Mukherjee
rearranged the functions to remove the forward declarations.

Signed-off-by: Sudip Mukherjee su...@vectorindia.org
---

v2: it was not in v1

 drivers/staging/unisys/visorchipset/file.c | 78 ++
 1 file changed, 36 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c 
b/drivers/staging/unisys/visorchipset/file.c
index e88a215..b74a0f2 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -33,48 +33,6 @@ static struct visorchannel **file_controlvm_channel;
 static dev_t majordev; /** indicates major num for device */
 static BOOL registered = FALSE;
 
-static int visorchipset_open(struct inode *inode, struct file *file);
-static int visorchipset_release(struct inode *inode, struct file *file);
-static int visorchipset_mmap(struct file *file, struct vm_area_struct *vma);
-static long visorchipset_ioctl(struct file *file, unsigned int cmd,
-   unsigned long arg);
-
-static const struct file_operations visorchipset_fops = {
-   .owner = THIS_MODULE,
-   .open = visorchipset_open,
-   .read = NULL,
-   .write = NULL,
-   .unlocked_ioctl = visorchipset_ioctl,
-   .release = visorchipset_release,
-   .mmap = visorchipset_mmap,
-};
-
-int
-visorchipset_file_init(dev_t major_dev, struct visorchannel 
**controlvm_channel)
-{
-   int rc = 0;
-
-   file_controlvm_channel = controlvm_channel;
-   majordev = major_dev;
-   cdev_init(file_cdev, visorchipset_fops);
-   file_cdev.owner = THIS_MODULE;
-   if (MAJOR(majordev) == 0) {
-   /* dynamic major device number registration required */
-   if (alloc_chrdev_region(majordev, 0, 1, MYDRVNAME)  0)
-   return -1;
-   registered = TRUE;
-   } else {
-   /* static major device number registration required */
-   if (register_chrdev_region(majordev, 1, MYDRVNAME)  0)
-   return -1;
-   registered = TRUE;
-   }
-   rc = cdev_add(file_cdev, MKDEV(MAJOR(majordev), 0), 1);
-   if (rc   0)
-   return -1;
-   return 0;
-}
-
 void
 visorchipset_file_cleanup(void)
 {
@@ -169,3 +127,39 @@ static long visorchipset_ioctl(struct file *file, unsigned 
int cmd,
return -EFAULT;
}
 }
+
+static const struct file_operations visorchipset_fops = {
+   .owner = THIS_MODULE,
+   .open = visorchipset_open,
+   .read = NULL,
+   .write = NULL,
+   .unlocked_ioctl = visorchipset_ioctl,
+   .release = visorchipset_release,
+   .mmap = visorchipset_mmap,
+};
+
+int
+visorchipset_file_init(dev_t major_dev, struct visorchannel 
**controlvm_channel)
+{
+   int rc = 0;
+
+   file_controlvm_channel = controlvm_channel;
+   majordev = major_dev;
+   cdev_init(file_cdev, visorchipset_fops);
+   file_cdev.owner = THIS_MODULE;
+   if (MAJOR(majordev) == 0) {
+   /* dynamic major device number registration required */
+   if (alloc_chrdev_region(majordev, 0, 1, MYDRVNAME)  0)
+   return -1;
+   registered = TRUE;
+   } else {
+   /* static major device number registration required */
+   if (register_chrdev_region(majordev, 1, MYDRVNAME)  0)
+   return -1;
+   registered = TRUE;
+   }
+   rc = cdev_add(file_cdev, MKDEV(MAJOR(majordev), 0), 1);
+   if (rc   0)
+   return -1;
+   return 0;
+}
-- 
1.8.1.2

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


[PATCH v2 1/4] staging: unisys: remove unused variables

2015-03-12 Thread Sudip Mukherjee
these variable were being assigned some values but never reused.

Signed-off-by: Sudip Mukherjee su...@vectorindia.org
---

v2: no change

 drivers/staging/unisys/virthba/virthba.c | 18 ++
 drivers/staging/unisys/virtpci/virtpci.c | 22 +++---
 2 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/unisys/virthba/virthba.c 
b/drivers/staging/unisys/virthba/virthba.c
index e5b0dd8..655db2f 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -333,16 +333,14 @@ static inline void
 send_disk_add_remove(struct diskaddremove *dar)
 {
struct scsi_device *sdev;
-   int error;
 
sdev = scsi_device_lookup(dar-shost, dar-channel, dar-id, dar-lun);
if (sdev) {
if (!(dar-add))
scsi_remove_device(sdev);
} else if (dar-add) {
-   error =
-   scsi_add_device(dar-shost, dar-channel, dar-id,
-   dar-lun);
+   scsi_add_device(dar-shost, dar-channel, dar-id,
+   dar-lun);
}
kfree(dar);
 }
@@ -401,7 +399,6 @@ virthba_isr(int irq, void *dev_id)
struct channel_header __iomem *channel_header;
struct signal_queue_header __iomem *pqhdr;
u64 mask;
-   unsigned long long rc1;
 
if (virthbainfo == NULL)
return IRQ_NONE;
@@ -414,7 +411,8 @@ virthba_isr(int irq, void *dev_id)
0)) {
virthbainfo-interrupts_disabled++;
mask = ~ULTRA_CHANNEL_ENABLE_INTS;
-   rc1 = uisqueue_interlocked_and(virthbainfo-flags_addr, mask);
+   uisqueue_interlocked_and(virthbainfo-flags_addr,
+mask);
}
if (spar_signalqueue_empty(channel_header, IOCHAN_FROM_IOPART)) {
virthbainfo-interrupts_notme++;
@@ -807,7 +805,6 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
 {
struct scsi_device *scsidev = scsicmd-device;
int insert_location;
-   unsigned char op;
unsigned char *cdb = scsicmd-cmnd;
struct Scsi_Host *scsihost = scsidev-host;
struct uiscmdrsp *cmdrsp;
@@ -890,7 +887,6 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
cmdrsp-scsi.guest_phys_entries = scsi_sg_count(scsicmd);
}
 
-   op = cdb[0];
i = uisqueue_put_cmdrsp_with_lock_client(virthbainfo-chinfo.queueinfo,
 cmdrsp, IOCHAN_TO_IOPART,
 virthbainfo-chinfo.
@@ -984,11 +980,9 @@ do_scsi_linuxstat(struct uiscmdrsp *cmdrsp, struct 
scsi_cmnd *scsicmd)
 {
struct virtdisk_info *vdisk;
struct scsi_device *scsidev;
-   struct sense_data *sd;
 
scsidev = scsicmd-device;
memcpy(scsicmd-sense_buffer, cmdrsp-scsi.sensebuf, MAX_SENSE_SIZE);
-   sd = (struct sense_data *)scsicmd-sense_buffer;
 
/* Do not log errors for disk-not-present inquiries */
if ((cmdrsp-scsi.cmnd[0] == INQUIRY) 
@@ -1178,7 +1172,6 @@ process_incoming_rsps(void *v)
struct uiscmdrsp *cmdrsp = NULL;
const int SZ = sizeof(struct uiscmdrsp);
u64 mask;
-   unsigned long long rc1;
 
UIS_DAEMONIZE(vhba_incoming);
/* alloc once and reuse */
@@ -1197,7 +1190,8 @@ process_incoming_rsps(void *v)
atomic_set(virthbainfo-interrupt_rcvd, 0);
/* drain queue */
drain_queue(virthbainfo, dc, cmdrsp);
-   rc1 = uisqueue_interlocked_or(virthbainfo-flags_addr, mask);
+   uisqueue_interlocked_or(virthbainfo-flags_addr,
+   mask);
}
 
kfree(cmdrsp);
diff --git a/drivers/staging/unisys/virtpci/virtpci.c 
b/drivers/staging/unisys/virtpci/virtpci.c
index 43b5736..e0d38d5 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -546,7 +546,6 @@ static void delete_all(void)
 static int delete_all_virt(enum virtpci_dev_type devtype,
   struct del_vbus_guestpart *delparams)
 {
-   int i;
unsigned char busid[BUS_ID_SIZE];
struct device *vbus;
 
@@ -561,7 +560,7 @@ static int delete_all_virt(enum virtpci_dev_type devtype,
return 0;
 
/* delete all vhbas/vnics */
-   i = virtpci_device_del(vbus, devtype, NULL, NULL);
+   virtpci_device_del(vbus, devtype, NULL, NULL);
return 1;
 }
 
@@ -797,7 +796,6 @@ static int virtpci_device_add(struct device *parentbus, int 
devtype,
struct virtpci_dev *tmpvpcidev = NULL, *prev;
unsigned long flags;
int ret;
-   struct spar_io_channel_protocol __iomem *io_chan = NULL;
struct device *dev;
 
POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
@@ -831,10 +829,6 @@ 

[PATCH v2 2/4] staging: unisys: dev_t initialization

2015-03-12 Thread Sudip Mukherjee
dev_t is defined to be of unsigned int type, no use initializing
it to -1.

Signed-off-by: Sudip Mukherjee su...@vectorindia.org
---
v2: it was not in v1

 drivers/staging/unisys/visorchipset/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorchipset/file.c 
b/drivers/staging/unisys/visorchipset/file.c
index 9ca7f1e..e9459af 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -30,7 +30,7 @@
 
 static struct cdev file_cdev;
 static struct visorchannel **file_controlvm_channel;
-static dev_t majordev = -1; /** indicates major num for device */
+static dev_t majordev; /** indicates major num for device */
 static BOOL registered = FALSE;
 
 static int visorchipset_open(struct inode *inode, struct file *file);
-- 
1.8.1.2

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


[PATCH 2/6] dgnc: get rid of dpacompat.h, move remaining stuff to digi.h

2015-03-12 Thread Giedrius Statkevičius
Dpacompat.h contained a lot of unused #defines and only few things are
used from it so since we've trimmed down digi.h, now we can delete
dpacompat.h and move remaining stuff into digi.h.

Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
---
 drivers/staging/dgnc/dgnc_driver.c |   1 -
 drivers/staging/dgnc/dgnc_mgmt.c   |   1 -
 drivers/staging/dgnc/dgnc_tty.c|   1 -
 drivers/staging/dgnc/digi.h|  36 
 drivers/staging/dgnc/dpacompat.h   | 109 -
 5 files changed, 36 insertions(+), 112 deletions(-)
 delete mode 100644 drivers/staging/dgnc/dpacompat.h

diff --git a/drivers/staging/dgnc/dgnc_driver.c 
b/drivers/staging/dgnc/dgnc_driver.c
index 9ae9014..805dc61 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -21,7 +21,6 @@
 #include linux/sched.h
 #include dgnc_driver.h
 #include dgnc_pci.h
-#include dpacompat.h
 #include dgnc_mgmt.h
 #include dgnc_tty.h
 #include dgnc_cls.h
diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c
index 5781406..1a00eac 100644
--- a/drivers/staging/dgnc/dgnc_mgmt.c
+++ b/drivers/staging/dgnc/dgnc_mgmt.c
@@ -32,7 +32,6 @@
 #include dgnc_pci.h
 #include dgnc_kcompat.h  /* Kernel 2.4/2.6 compat includes */
 #include dgnc_mgmt.h
-#include dpacompat.h
 
 
 /* Our in use variables, to enforce 1 open only */
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 8445f84..1085d4c 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -39,7 +39,6 @@
 #include dgnc_types.h
 #include dgnc_neo.h
 #include dgnc_cls.h
-#include dpacompat.h
 #include dgnc_sysfs.h
 #include dgnc_utils.h
 
diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 7e5e6b0..277648f 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -44,6 +44,11 @@
 #define DIGI_SETA  (('e'8) | 95) /* Set params   */
 #define DIGI_SETAW (('e'8) | 96) /* Drain  set params   */
 #define DIGI_SETAF (('e'8) | 97) /* Drain, flush  set params */
+#define DIGI_GET_NI_INFO (('d'8) | 250) /* Non-intelligent state info */
+#define DIGI_LOOPBACK (('d'8) | 252) /*
+   * Enable/disable UART
+   * internal loopback
+   */
 #define DIGI_FAST  0x0002  /* Fast baud rates  */
 #define RTSPACE0x0004  /* RTS input flow control   
*/
 #define CTSPACE0x0008  /* CTS output flow control  
*/
@@ -171,4 +176,35 @@ struct digi_getcounter {
 #define EV_IPS 0x0020  /* !Input paused by high/low water 
marks */
 #define EV_TXB 0x0040  /* !Transmit break pending */
 
+/*
+ * This structure holds data needed for the intelligent -- nonintelligent
+ * DPA translation
+ */
+struct ni_info {
+   int board;
+   int channel;
+   int dtr;
+   int rts;
+   int cts;
+   int dsr;
+   int ri;
+   int dcd;
+   int curtx;
+   int currx;
+   unsigned short iflag;
+   unsigned short oflag;
+   unsigned short cflag;
+   unsigned short lflag;
+   unsigned int mstat;
+   unsigned char hflow;
+   unsigned char xmit_stopped;
+   unsigned char recv_stopped;
+   unsigned int baud;
+};
+
+#define T_CLASSIC 0002
+#define T_PCIBUS 0400
+#define T_NEO_EXPRESS 0001
+#define T_NEO 
+
 #endif /* DIGI_H */
diff --git a/drivers/staging/dgnc/dpacompat.h b/drivers/staging/dgnc/dpacompat.h
deleted file mode 100644
index f41a0e1..000
--- a/drivers/staging/dgnc/dpacompat.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2003 Digi International (www.digi.com)
- *  Scott H Kilau Scott_Kilau at digi dot com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- */
-
-
-/*
- * This structure holds data needed for the intelligent -- nonintelligent
- * DPA translation
- */
-struct ni_info {
-   int board;
-   int channel;
-   int dtr;
-   int rts;
-   int cts;
-   int dsr;
-   int ri;
-   int dcd;
-   int curtx;
-   int currx;
-   unsigned short iflag;
-   unsigned short oflag;
-   unsigned short cflag;
-   unsigned short lflag;
-
-   unsigned int mstat;
-   unsigned char hflow;
-
-   unsigned char xmit_stopped;
-   unsigned char recv_stopped;
-
-   unsigned int baud;

[PATCH 1/6] dgnc: clean up digi.h

2015-03-12 Thread Giedrius Statkevičius
Remove a lot of unused #defines and struct definitions from digi.h.  In
dgnc_mgmt.c, termios.h is included before that defines it's own TIOCM_LE
and others protected under #ifndef in digi.h so we can't delete them
yet. Also, be careful with TIOCMSET and TIOCMBIC since
include/uapi/asm-generic/ioctls.h defines them too.

Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
---
 drivers/staging/dgnc/digi.h | 235 
 1 file changed, 235 deletions(-)

diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 554fbeb..7e5e6b0 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -16,25 +16,6 @@
 #ifndef __DIGI_H
 #define __DIGI_H
 
-/
- ***   Definitions for Digi ditty(1) command.
- /
-
-
-/*
- * Copyright (c) 1988-96 Digi International Inc., All Rights Reserved.
- */
-
-/
- * This module provides application access to special Digi
- * serial line enhancements which are not standard UNIX(tm) features.
- /
-
-#if !defined(TIOCMODG)
-
-#defineTIOCMODG(('d'8) | 250)/* get modem ctrl state 
*/
-#defineTIOCMODS(('d'8) | 251)/* set modem ctrl state 
*/
-
 #ifndef TIOCM_LE
 #defineTIOCM_LE0x01/* line enable  
*/
 #defineTIOCM_DTR   0x02/* data terminal ready  
*/
@@ -49,8 +30,6 @@
 #defineTIOCM_CDTIOCM_CAR   /* carrier detect (alt) 
*/
 #endif
 
-#endif
-
 #if !defined(TIOCMSET)
 #defineTIOCMSET(('d'8) | 252)/* set modem ctrl state 
*/
 #defineTIOCMGET(('d'8) | 253)/* set modem ctrl state 
*/
@@ -61,83 +40,19 @@
 #defineTIOCMBIS(('d'8) | 255)/* set modem ctrl state 
*/
 #endif
 
-
-#if !defined(TIOCSDTR)
-#defineTIOCSDTR(('e'8) | 0)  /* set DTR  
*/
-#defineTIOCCDTR(('e'8) | 1)  /* clear DTR
*/
-#endif
-
-/
- * Ioctl command arguments for DIGI parameters.
- /
 #define DIGI_GETA  (('e'8) | 94) /* Read params  */
-
 #define DIGI_SETA  (('e'8) | 95) /* Set params   */
 #define DIGI_SETAW (('e'8) | 96) /* Drain  set params   */
 #define DIGI_SETAF (('e'8) | 97) /* Drain, flush  set params */
-
-#define DIGI_KME   (('e'8) | 98) /* Read/Write Host  */
-   /* Adapter Memory   */
-
-#defineDIGI_GETFLOW(('e'8) | 99) /* Get startc/stopc 
flow */
-   /* control characters*/
-#defineDIGI_SETFLOW(('e'8) | 100)/* Set startc/stopc 
flow */
-   /* control characters*/
-#defineDIGI_GETAFLOW   (('e'8) | 101)/* Get Aux. 
startc/stopc */
-   /* flow control chars*/
-#defineDIGI_SETAFLOW   (('e'8) | 102)/* Set Aux. 
startc/stopc */
-   /* flow control chars*/
-
-#define DIGI_GEDELAY   (('d'8) | 246)/* Get edelay */
-#define DIGI_SEDELAY   (('d'8) | 247)/* Set edelay */
-
-struct digiflow_t {
-   unsigned char   startc; /* flow cntl start char 
*/
-   unsigned char   stopc;  /* flow cntl stop char  
*/
-};
-
-
-#ifdef FLOW_2200
-#defineF2200_GETA  (('e'8) | 104)/* Get 2x36 flow cntl 
flags */
-#defineF2200_SETAW (('e'8) | 105)/* Set 2x36 flow cntl 
flags */
-#defineF2200_MASK  0x03/* 2200 flow cntl bit 
mask  */
-#defineFCNTL_2200  0x01/* 2x36 terminal flow 
cntl  */
-#definePCNTL_2200  0x02/* 2x36 printer flow 
cntl   */
-#defineF2200_XON   0xf8
-#defineP2200_XON   0xf9
-#defineF2200_XOFF  0xfa
-#defineP2200_XOFF  0xfb
-
-#defineFXOFF_MASK  0x03/* 2200 flow status 
mask*/
-#defineRCVD_FXOFF  0x01/* 2x36 Terminal XOFF 
rcvd  */
-#defineRCVD_PXOFF  0x02/* 2x36 Printer XOFF 
rcvd   */
-#endif
-
-/
- * Values for digi_flags
- /
-#define DIGI_IXON  

[PATCH 5/6] dgnc: remove unused stuff from dgnc_cls.h

2015-03-12 Thread Giedrius Statkevičius
Remove unused defines from dgnc_cls.h

Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
---
 drivers/staging/dgnc/dgnc_cls.h | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
index 85042bd..2597e36 100644
--- a/drivers/staging/dgnc/dgnc_cls.h
+++ b/drivers/staging/dgnc/dgnc_cls.h
@@ -51,15 +51,9 @@ struct cls_uart_struct {
 
 #define UART_EXAR654_ENHANCED_REGISTER_SET 0xBF
 
-#define UART_16654_FCR_TXTRIGGER_8 0x0
 #define UART_16654_FCR_TXTRIGGER_160x10
-#define UART_16654_FCR_TXTRIGGER_320x20
-#define UART_16654_FCR_TXTRIGGER_560x30
-
-#define UART_16654_FCR_RXTRIGGER_8 0x0
 #define UART_16654_FCR_RXTRIGGER_160x40
 #define UART_16654_FCR_RXTRIGGER_560x80
-#define UART_16654_FCR_RXTRIGGER_60 0xC0
 
 /* Received CTS/RTS change of state */
 #define UART_IIR_CTSRTS0x20
@@ -76,13 +70,6 @@ struct cls_uart_struct {
 #define UART_EXAR654_EFR_IXOFF0x8 /* Transmit Xon1/Xoff1 */
 #define UART_EXAR654_EFR_RTSDTR   0x40/* Auto RTS/DTR Flow Control Enable 
*/
 #define UART_EXAR654_EFR_CTSDSR   0x80/* Auto CTS/DSR Flow COntrol Enable 
*/
-
-/* Indicates whether chip saw an incoming XOFF char  */
-#define UART_EXAR654_XOFF_DETECT  0x1
-
-/* Indicates whether chip saw an incoming XON char */
-#define UART_EXAR654_XON_DETECT   0x2
-
 #define UART_EXAR654_IER_XOFF 0x20/* Xoff Interrupt Enable */
 #define UART_EXAR654_IER_RTSDTR   0x40/* Output Interrupt Enable */
 #define UART_EXAR654_IER_CTSDSR   0x80/* Input Interrupt Enable */
-- 
2.3.2

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


[PATCH 4/6] dgnc: remove old 2.4-2.6 compat kernel defines

2015-03-12 Thread Giedrius Statkevičius
dgnc_kcompat.h contains some old legacy defines in case the kernel
doesn't have __user defined but for current kernel versions these
defines don't make sense and are useless so remove them. Move the
TTY_FLIPBUF_SIZE define to digi.h because it's used in the code.

Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
---
 drivers/staging/dgnc/dgnc_driver.h  |  1 -
 drivers/staging/dgnc/dgnc_kcompat.h | 40 -
 drivers/staging/dgnc/dgnc_mgmt.c|  1 -
 drivers/staging/dgnc/digi.h |  1 +
 4 files changed, 1 insertion(+), 42 deletions(-)
 delete mode 100644 drivers/staging/dgnc/dgnc_kcompat.h

diff --git a/drivers/staging/dgnc/dgnc_driver.h 
b/drivers/staging/dgnc/dgnc_driver.h
index f28329d..cf472a3 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -26,7 +26,6 @@
 #include linux/interrupt.h   /* For irqreturn_t type */
 
 #include digi.h  /* Digi specific ioctl header */
-#include dgnc_kcompat.h  /* Kernel 2.4/2.6 compat includes */
 #include dgnc_sysfs.h/* Support for SYSFS */
 
 /*
diff --git a/drivers/staging/dgnc/dgnc_kcompat.h 
b/drivers/staging/dgnc/dgnc_kcompat.h
deleted file mode 100644
index 2206038..000
--- a/drivers/staging/dgnc/dgnc_kcompat.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2004 Digi International (www.digi.com)
- *  Scott H Kilau Scott_Kilau at digi dot com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- *
- *
- * This file is intended to contain all the kernel differences between the
- * various kernels that we support.
- *
- */
-
-#ifndef __DGNC_KCOMPAT_H
-#define __DGNC_KCOMPAT_H
-
-#if !defined(TTY_FLIPBUF_SIZE)
-# define TTY_FLIPBUF_SIZE 512
-#endif
-
-
-/* Sparse stuff */
-# ifndef __user
-#  define __user
-#  define __kernel
-#  define __safe
-#  define __force
-#  define __chk_user_ptr(x) (void)0
-# endif
-
-
-#endif /* ! __DGNC_KCOMPAT_H */
diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c
index 1a00eac..d0e22c1 100644
--- a/drivers/staging/dgnc/dgnc_mgmt.c
+++ b/drivers/staging/dgnc/dgnc_mgmt.c
@@ -30,7 +30,6 @@
 
 #include dgnc_driver.h
 #include dgnc_pci.h
-#include dgnc_kcompat.h  /* Kernel 2.4/2.6 compat includes */
 #include dgnc_mgmt.h
 
 
diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h
index 277648f..9611dd5 100644
--- a/drivers/staging/dgnc/digi.h
+++ b/drivers/staging/dgnc/digi.h
@@ -207,4 +207,5 @@ struct ni_info {
 #define T_NEO_EXPRESS 0001
 #define T_NEO 
 
+#define TTY_FLIPBUF_SIZE 512
 #endif /* DIGI_H */
-- 
2.3.2

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


[PATCH 6/6] dgnc: Clean up dgnc_sysfs.h

2015-03-12 Thread Giedrius Statkevičius
Remove redundant blank lines, move absolute include after relative
include.

Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
---
 drivers/staging/dgnc/dgnc_sysfs.h | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_sysfs.h 
b/drivers/staging/dgnc/dgnc_sysfs.h
index 2758914..be0f90a 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.h
+++ b/drivers/staging/dgnc/dgnc_sysfs.h
@@ -16,9 +16,8 @@
 #ifndef __DGNC_SYSFS_H
 #define __DGNC_SYSFS_H
 
-#include dgnc_driver.h
-
 #include linux/device.h
+#include dgnc_driver.h
 
 struct dgnc_board;
 struct channel_t;
@@ -38,6 +37,4 @@ extern int dgnc_tty_class_destroy(void);
 extern void dgnc_create_tty_sysfs(struct un_t *un, struct device *c);
 extern void dgnc_remove_tty_sysfs(struct device *c);
 
-
-
 #endif
-- 
2.3.2

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


[PATCH 3/6] dgnc: convert TRUE/FALSE #defines to 1/0

2015-03-12 Thread Giedrius Statkevičius
TRUE/FALSE defined in dgnc_types.h are only used in dgnc_tty.c thus it
would be better to just use 1/0 to avoid unnecessary extra files and
includes.

Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
---
 drivers/staging/dgnc/dgnc_cls.h|  3 ---
 drivers/staging/dgnc/dgnc_driver.h |  1 -
 drivers/staging/dgnc/dgnc_neo.h|  1 -
 drivers/staging/dgnc/dgnc_tty.c|  9 -
 drivers/staging/dgnc/dgnc_types.h  | 27 ---
 5 files changed, 4 insertions(+), 37 deletions(-)
 delete mode 100644 drivers/staging/dgnc/dgnc_types.h

diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
index 2398514..85042bd 100644
--- a/drivers/staging/dgnc/dgnc_cls.h
+++ b/drivers/staging/dgnc/dgnc_cls.h
@@ -16,9 +16,6 @@
 #ifndef __DGNC_CLS_H
 #define __DGNC_CLS_H
 
-#include dgnc_types.h
-
-
 /
  * Per channel/port Classic UART structure *
  
diff --git a/drivers/staging/dgnc/dgnc_driver.h 
b/drivers/staging/dgnc/dgnc_driver.h
index 15c4d95..f28329d 100644
--- a/drivers/staging/dgnc/dgnc_driver.h
+++ b/drivers/staging/dgnc/dgnc_driver.h
@@ -25,7 +25,6 @@
 #include linux/tty.h   /* To pick up the various tty structs/defines */
 #include linux/interrupt.h   /* For irqreturn_t type */
 
-#include dgnc_types.h/* Additional types needed by the Digi 
header files */
 #include digi.h  /* Digi specific ioctl header */
 #include dgnc_kcompat.h  /* Kernel 2.4/2.6 compat includes */
 #include dgnc_sysfs.h/* Support for SYSFS */
diff --git a/drivers/staging/dgnc/dgnc_neo.h b/drivers/staging/dgnc/dgnc_neo.h
index d7e764a..c528df5 100644
--- a/drivers/staging/dgnc/dgnc_neo.h
+++ b/drivers/staging/dgnc/dgnc_neo.h
@@ -16,7 +16,6 @@
 #ifndef __DGNC_NEO_H
 #define __DGNC_NEO_H
 
-#include dgnc_types.h
 #include dgnc_driver.h
 
 /
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 1085d4c..f8f9374 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -36,7 +36,6 @@
 #include linux/pci.h
 #include dgnc_driver.h
 #include dgnc_tty.h
-#include dgnc_types.h
 #include dgnc_neo.h
 #include dgnc_cls.h
 #include dgnc_sysfs.h
@@ -220,7 +219,7 @@ int dgnc_tty_register(struct dgnc_board *brd)
Can't register tty device (%d)\n, rc);
return rc;
}
-   brd-dgnc_Major_Serial_Registered = TRUE;
+   brd-dgnc_Major_Serial_Registered = 1;
}
 
/*
@@ -270,7 +269,7 @@ int dgnc_tty_register(struct dgnc_board *brd)
rc);
return rc;
}
-   brd-dgnc_Major_TransparentPrint_Registered = TRUE;
+   brd-dgnc_Major_TransparentPrint_Registered = 1;
}
 
dgnc_BoardsByMajor[brd-SerialDriver.major] = brd;
@@ -408,7 +407,7 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
tty_unregister_device(brd-SerialDriver, i);
}
tty_unregister_driver(brd-SerialDriver);
-   brd-dgnc_Major_Serial_Registered = FALSE;
+   brd-dgnc_Major_Serial_Registered = 0;
}
 
if (brd-dgnc_Major_TransparentPrint_Registered) {
@@ -419,7 +418,7 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
tty_unregister_device(brd-PrintDriver, i);
}
tty_unregister_driver(brd-PrintDriver);
-   brd-dgnc_Major_TransparentPrint_Registered = FALSE;
+   brd-dgnc_Major_TransparentPrint_Registered = 0;
}
 
kfree(brd-SerialDriver.ttys);
diff --git a/drivers/staging/dgnc/dgnc_types.h 
b/drivers/staging/dgnc/dgnc_types.h
deleted file mode 100644
index 2853d16..000
--- a/drivers/staging/dgnc/dgnc_types.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2003 Digi International (www.digi.com)
- * Scott H Kilau Scott_Kilau at digi dot com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- */
-
-#ifndef __DGNC_TYPES_H
-#define __DGNC_TYPES_H
-
-#ifndef TRUE
-# define TRUE 1
-#endif
-
-#ifndef FALSE
-# define FALSE 0
-#endif
-
-#endif
-- 
2.3.2

___
devel mailing list
de...@linuxdriverproject.org

Re: [PATCH 3/6] dgnc: convert TRUE/FALSE #defines to 1/0

2015-03-12 Thread Dan Carpenter
On Thu, Mar 12, 2015 at 08:14:25PM +0200, Giedrius Statkevičius wrote:
 TRUE/FALSE defined in dgnc_types.h are only used in dgnc_tty.c thus it
 would be better to just use 1/0 to avoid unnecessary extra files and
 includes.
 

Use true/false.  I don't care much about this personally but true/false
is kernel style these days.

regards,
dan carpenter

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


Re: [PATCH 3/6] dgnc: convert TRUE/FALSE #defines to 1/0

2015-03-12 Thread Giedrius Statkevičius
On 2015.03.12 20:59, Dan Carpenter wrote:
 On Thu, Mar 12, 2015 at 08:14:25PM +0200, Giedrius Statkevičius wrote:
 TRUE/FALSE defined in dgnc_types.h are only used in dgnc_tty.c thus it
 would be better to just use 1/0 to avoid unnecessary extra files and
 includes.

 
 Use true/false.  I don't care much about this personally but true/false
 is kernel style these days.
 
 regards,
 dan carpenter
 

After researching more this whole dgnc_Major_Serial_Registered and
dgnc_Major_TransparentPrint_Registered seem pretty pointless because
they only get set to true or false depending on if those boards are
initialised or not and we won't initialise them two or more times -
dgnc_init_one() is a probe method and it's never called anywhere else.
This seems like a way better solution - redundant stuff will be removed
from the struct and a unnecessary header will be removed (types.h is for
bools) :) I'll fix this up in v2 but now I'll wait for more comments on
other patches (if there will be any) for a bit.

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


Re: [PATCH v3 1/6] staging: rtl8192e: fix coding style issues (merge broken strings)

2015-03-12 Thread Joe Perches
On Fri, 2015-03-13 at 00:53 +0100, Mateusz Kulikowski wrote:
[]
 diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c 
 b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
 index 0e6bdd2..01d2201 100644
 --- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
 +++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
 @@ -47,8 +47,8 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev,
   0x0e, bMask12Bits, 0x021);
  
   } else {
 - RT_TRACE(COMP_ERR, PHY_SetRF8256Bandwidth(): 
 -  unknown hardware version\n);
 + RT_TRACE(COMP_ERR,
 +  PHY_SetRF8256Bandwidth(): unknown 
 hardware version\n);

Another thing you might consider is to change these
embedded function names in another patch to use
%s: , __func__

RT_TRACE(COMP_ERR,
 %s: unknown hardware version\n,
 __func__)

There's a cocci script for that.
http://cocci.systeme.lip6.narkive.com/nKXf6Bmy/finding-embedded-function-names



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


Re: [PATCH v6 13/22] power_supply: Change ownership from driver to core

2015-03-12 Thread Rafael J. Wysocki
On Tuesday, March 10, 2015 09:27:17 AM Krzysztof Kozlowski wrote:
 Change the ownership of power_supply structure from each driver
 implementing the class to the power supply core.
 
 The patch changes power_supply_register() function thus all drivers
 implementing power supply class are adjusted.
 
 Each driver provides the implementation of power supply. However it
 should not be the owner of power supply class instance because it is
 exposed by core to other subsystems with power_supply_get_by_name().
 These other subsystems have no knowledge when the driver will unregister
 the power supply. This leads to several issues when driver is unbound -
 mostly because user of power supply accesses freed memory.
 
 Instead let the core own the instance of struct 'power_supply'.  Other
 users of this power supply will still access valid memory because it
 will be freed when device reference count reaches 0. Currently this
 means it will leak but power_supply_put() call in next patches will
 solve it.
 
 This solves invalid memory references in following race condition
 scenario:
 
 Thread 1: charger manager
 Thread 2: power supply driver, used by charger manager
 
 THREAD 1 (charger manager) THREAD 2 (power supply driver)
 == ==
 psy = power_supply_get_by_name()
Driver unbind, .remove
  power_supply_unregister()
  Device fully removed
 psy-get_property()
 
 The 'get_property' call is executed in invalid context because the driver was
 unbound and struct 'power_supply' memory was freed.
 
 This could be observed easily with charger manager driver (here compiled
 with max17040 fuel gauge):
 
 $ cat /sys/devices/virtual/power_supply/cm-battery/capacity 
 $ echo 1-0036  /sys/bus/i2c/drivers/max17040/unbind
 [   55.725123] Unable to handle kernel NULL pointer dereference at virtual 
 address 
 [   55.732584] pgd = d98d4000
 [   55.734060] [] *pgd=5afa2831, *pte=, *ppte=
 [   55.740318] Internal error: Oops: 8007 [#1] PREEMPT SMP ARM
 [   55.746210] Modules linked in:
 [   55.749259] CPU: 1 PID: 2936 Comm: cat Tainted: GW   
 3.19.0-rc1-next-20141226-00048-gf79f475f3c44-dirty #1496
 [   55.760190] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
 [   55.766270] task: d9b76f00 ti: daf54000 task.ti: daf54000
 [   55.771647] PC is at 0x0
 [   55.774182] LR is at charger_get_property+0x2f4/0x36c
 [   55.779201] pc : []lr : [c034b0b4]psr: 6013
 [   55.779201] sp : daf55e90  ip : 0003  fp : 
 [   55.790657] r10:   r9 : c06e2878  r8 : d9b26c68
 [   55.795865] r7 : dad81610  r6 : daec7410  r5 : daf55ebc  r4 : 
 [   55.802367] r3 :   r2 : daf55ebc  r1 : 002a  r0 : d9b26c68
 [   55.808879] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment 
 user
 [   55.815994] Control: 10c5387d  Table: 598d406a  DAC: 0015
 [   55.821723] Process cat (pid: 2936, stack limit = 0xdaf54210)
 [   55.827451] Stack: (0xdaf55e90 to 0xdaf56000)
 [   55.831795] 5e80: 6013 c01459c4 
 002a c06f8ef8
 [   55.839956] 5ea0: db651000 c06f8ef8 daebac00 c04cb668 daebac08 c0346864 
  c01459c4
 [   55.848115] 5ec0: d99eaa80 c06f8ef8 0fff 1000 db651000 c027f25c 
 c027f240 d99eaa80
 [   55.856274] 5ee0: d9a06c00 c0146218 daf55f18 1000 d99eaa80 db4c18c0 
 0001 0001
 [   55.864468] 5f00: daf55f80 c0144c78 c0144c54 c0107f90 00015000 d99eaab0 
  
 [   55.872603] 5f20: 51c7  db4c18c0 c04a9370 00015000 1000 
 daf55f80 1000
 [   55.880763] 5f40: daf54000 00015000  c00e53dc db4c18c0 c00e548c 
 000d 8124
 [   55.888937] 5f60: 0001   db4c18c0 db4c18c0 1000 
 00015000 c00e5550
 [   55.897099] 5f80:   1000 1000 00015000 0003 
 0003 c000f364
 [   55.905239] 5fa0:  c000f1a0 1000 00015000 0003 00015000 
 1000 0001333c
 [   55.913399] 5fc0: 1000 00015000 0003 0003 0002  
  
 [   55.921560] 5fe0: 7fffe000 be999850 a225 b6f3c19c 6010 0003 
  
 [   55.929744] [c034b0b4] (charger_get_property) from [c0346864] 
 (power_supply_show_property+0x48/0x20c)
 [   55.939286] [c0346864] (power_supply_show_property) from [c027f25c] 
 (dev_attr_show+0x1c/0x48)
 [   55.948130] [c027f25c] (dev_attr_show) from [c0146218] 
 (sysfs_kf_seq_show+0x84/0x104)
 [   55.956298] [c0146218] (sysfs_kf_seq_show) from [c0144c78] 
 (kernfs_seq_show+0x24/0x28)
 [   55.964536] [c0144c78] (kernfs_seq_show) from [c0107f90] 
 (seq_read+0x1b0/0x484)
 [   55.972172] [c0107f90] (seq_read) from [c00e53dc] 
 (__vfs_read+0x18/0x4c)
 [   55.979188] [c00e53dc] (__vfs_read) from [c00e548c] 
 (vfs_read+0x7c/0x100)
 [   55.986304] [c00e548c] (vfs_read) from [c00e5550] 

Re: [PATCH v2] dgnc: Don't save boards in memory that have failed to initialize

2015-03-12 Thread Greg KH
On Mon, Mar 09, 2015 at 06:29:38PM +0200, Giedrius Statkevičius wrote:
 Remove BOARD_FAILED and don't save dgnc_boards which failed to
 initialize.
 
 Assign the result of kzalloc() to brd in dgnc_found_board() and only put
 it in the dgnc_Board[] if it successfully initializes. Also, remove
 BOARD_FAILED enum and all ifs that check for it. Finally, remove one
 final place where state was set to BOARD_FAILED which was even redundant
 before this patch.
 
 Signed-off-by: Giedrius Statkevičius giedrius.statkevic...@gmail.com
 ---
 v2: Remove brd = dgnc_Board[dgnc_NumBoards]; line which I forgot to do
 in the first version
 
  drivers/staging/dgnc/dgnc_driver.c | 20 ++--
  drivers/staging/dgnc/dgnc_driver.h |  3 +--
  drivers/staging/dgnc/dgnc_mgmt.c   |  5 +
  drivers/staging/dgnc/dgnc_tty.c|  8 
  4 files changed, 4 insertions(+), 32 deletions(-)
 
 diff --git a/drivers/staging/dgnc/dgnc_driver.c 
 b/drivers/staging/dgnc/dgnc_driver.c
 index fa1ee79..075727d 100644
 --- a/drivers/staging/dgnc/dgnc_driver.c
 +++ b/drivers/staging/dgnc/dgnc_driver.c
 @@ -401,8 +401,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
   unsigned long flags;
  
   /* get the board structure and prep it */
 - dgnc_Board[dgnc_NumBoards] = kzalloc(sizeof(*brd), GFP_KERNEL);
 - brd = dgnc_Board[dgnc_NumBoards];
 + brd = kzalloc(sizeof(*brd), GFP_KERNEL);

You've done a great job here, but...

Yeah, sorry...

I really want to see this whole static list of boards/cards go away.
There should not be any need for that in any in-kernel driver.  Your
patch here is a sign that things are really wrong with this whole static
array mess.

So could you do that instead?  I don't want to take patches around this
whole board state mess anymore, as it should all not be needed at all.

If you need pointers on what needs to be done here, just let me know.

thanks,

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


Re: [PATCH 00/56] staging: comedi: introduce comedi_pci.h header

2015-03-12 Thread Ian Abbott

On 10/03/15 16:25, Joe Perches wrote:

On Tue, 2015-03-10 at 16:10 +, Ian Abbott wrote:

comedidev.h includes PCI-specific stuff that gets included by all
comedi drivers including non-PCI ones.  Separate it out into its own
header comedi_pci.h.  Make the new header include linux/pci.h and
comedidev.h so that comedi PCI drivers do not need to include them
explicitly.


Isn't the kernel progressing to avoid indirect includes?


I could do it that way if you think it would help.  Better to redo it 
before it is committed than after.


--
-=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/6] Drivers: hv: vmbus: Perform device register in the per-channel work element

2015-03-12 Thread Olaf Hering
On Wed, Mar 11, K. Y. Srinivasan wrote:

 The current Linux 4.0 RC3 tree is broken and this patch fixes the problem.

This does not seem to apply to master. What it is based on?

checking file drivers/hv/channel_mgmt.c
Hunk #3 FAILED at 139.
Hunk #4 succeeded at 194 (offset -31 lines).
Hunk #5 succeeded at 303 (offset -18 lines).
Hunk #6 succeeded at 355 (offset -15 lines).
Hunk #7 FAILED at 471.
Hunk #8 FAILED at 634.
3 out of 8 hunks FAILED
checking file drivers/hv/connection.c
Hunk #1 succeeded at 263 (offset -7 lines).
Hunk #2 succeeded at 275 (offset -7 lines).
Hunk #3 succeeded at 287 (offset -7 lines).
checking file drivers/hv/hyperv_vmbus.h
Hunk #1 succeeded at 685 (offset -13 lines).

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


Re: [PATCH] staging: sm750fb: if else block checkpath warnings

2015-03-12 Thread Greg KH
On Thu, Mar 12, 2015 at 03:33:19AM -0700, Ragavendra BN wrote:
 Signed-off-by: Ragavendra BN ragavendra...@gmail.com
 

This goes on the bottom of the changelog text.


 This patch fixes the coding style warnings found by checkpath.pl for
 the if else block

It also does something else, so I have to reject this.  Please be very
specific as to what you are doing here.

thanks,

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


Re: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-03-12 Thread Olaf Hering
On Thu, Mar 12, Vitaly Kuznetsov wrote:

 My Drivers: hv: hv_balloon: eliminate the trylock path in
 acquire/release_region_mutex (b05d8d9ef5ef21d1b18440430f950304836e1aaa
 in char-misc-next) removed these wrappers.

I see now. There are many changes in char-misc-next. The description
gives the impression that mainline is broken. Not sure if thats true,
perhaps its just char-misc-next which is affected.

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


Re: [PATCH v6 18/22] x86/olpc/xo15/sci: Use newly added power_supply_put API

2015-03-12 Thread Ingo Molnar

* Krzysztof Kozlowski k.kozlow...@samsung.com wrote:

 Replace direct usage of put_device() with new API: power_supply_put().
 
 Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
 Acked-by: Pavel Machek pa...@ucw.cz
 Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
 Reviewed-by: Sebastian Reichel s...@kernel.org
 ---
  arch/x86/platform/olpc/olpc-xo15-sci.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c 
 b/arch/x86/platform/olpc/olpc-xo15-sci.c
 index 186634e9021d..55130846ac87 100644
 --- a/arch/x86/platform/olpc/olpc-xo15-sci.c
 +++ b/arch/x86/platform/olpc/olpc-xo15-sci.c
 @@ -83,7 +83,7 @@ static void battery_status_changed(void)
  
   if (psy) {
   power_supply_changed(psy);
 - put_device(psy-dev);
 + power_supply_put(psy);
   }
  }
  
 @@ -93,7 +93,7 @@ static void ac_status_changed(void)
  
   if (psy) {
   power_supply_changed(psy);
 - put_device(psy-dev);
 + power_supply_put(psy);
   }
  }

Acked-by: Ingo Molnar mi...@kernel.org

Thanks,

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


Re: [PATCH v6 17/22] x86/olpc/xo1/sci: Use newly added power_supply_put API

2015-03-12 Thread Ingo Molnar

* Krzysztof Kozlowski k.kozlow...@samsung.com wrote:

 Replace direct usage of put_device() with new API: power_supply_put().
 
 Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
 Acked-by: Pavel Machek pa...@ucw.cz
 Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
 Reviewed-by: Sebastian Reichel s...@kernel.org
 ---
  arch/x86/platform/olpc/olpc-xo1-sci.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c 
 b/arch/x86/platform/olpc/olpc-xo1-sci.c
 index e4ed28bbf79d..7fa8b3b53bc0 100644
 --- a/arch/x86/platform/olpc/olpc-xo1-sci.c
 +++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
 @@ -61,7 +61,7 @@ static void battery_status_changed(void)
  
   if (psy) {
   power_supply_changed(psy);
 - put_device(psy-dev);
 + power_supply_put(psy);
   }
  }
  
 @@ -71,7 +71,7 @@ static void ac_status_changed(void)
  
   if (psy) {
   power_supply_changed(psy);
 - put_device(psy-dev);
 + power_supply_put(psy);
   }
  }

Acked-by: Ingo Molnar mi...@kernel.org

Thanks,

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


Re: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-03-12 Thread Dan Carpenter
On Thu, Mar 12, 2015 at 12:14:28PM +0100, Olaf Hering wrote:
 On Thu, Mar 12, Vitaly Kuznetsov wrote:
 
  My Drivers: hv: hv_balloon: eliminate the trylock path in
  acquire/release_region_mutex (b05d8d9ef5ef21d1b18440430f950304836e1aaa
  in char-misc-next) removed these wrappers.
 
 I see now. There are many changes in char-misc-next. The description
 gives the impression that mainline is broken. Not sure if thats true,
 perhaps its just char-misc-next which is affected.

Mainline is broken.  We only found these when we removed the wrapper and
then static checkers were able to catch the bug.

regards,
dan carpenter

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


Re: [PATCH] staging: sm750fb: moved open brace next to declaration

2015-03-12 Thread Sudip Mukherjee
On Thu, Mar 12, 2015 at 02:31:55AM -0700, Ragavendra BN wrote:
 Signed-off-by: Ragavendra BN ragavendra...@gmail.com [user]

what is [user] in your email address?

 
 This patch fixes the coding style warning found by checkpath.pl for the
 open braces next to declaration.

Signed-off-by line should be here after your commit log.

always test your patch using checkpatch before sending.

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


Re: [PATCH] staging: sm750fb: moved open brace next to declaration

2015-03-12 Thread Dan Carpenter
On Thu, Mar 12, 2015 at 02:31:55AM -0700, Ragavendra BN wrote:
 Signed-off-by: Ragavendra BN ragavendra...@gmail.com [user]

Don't include this.  Fix your From header so it has your legal name.
Remover the [user] part.

 
 This patch fixes the coding style warning found by checkpath.pl for the
 open braces next to declaration.

No signed-off.

 ---
  drivers/staging/sm750fb/ddk750_chip.c |3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
 b/drivers/staging/sm750fb/ddk750_chip.c
 index b71169e..2c12dd0 100644
 --- a/drivers/staging/sm750fb/ddk750_chip.c
 +++ b/drivers/staging/sm750fb/ddk750_chip.c
 @@ -11,8 +11,7 @@ typedef struct _pllcalparam{
  pllcalparam;
  
  
 -logical_chip_type_t getChipType()
 -{
 +logical_chip_type_t getChipType(){

This is not correct.  The braces were better in the original.

regards,
dan carpenter

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


Re: [PATCH 2/6] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-03-12 Thread Vitaly Kuznetsov
Olaf Hering o...@aepfle.de writes:

 On Wed, Mar 11, K. Y. Srinivasan wrote:

 +++ b/drivers/hv/hv_balloon.c
 @@ -652,6 +652,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned 
 long size,
  }
  has-ha_end_pfn -= HA_CHUNK;
  has-covered_end_pfn -=  processed_pfn;
 +mutex_lock(dm_device.ha_region_mutex);
  break;
  }

 Should it call the wrapper instead of doing mutex_lock directly?
 Like 'acquire_region_mutex(false);'.

My Drivers: hv: hv_balloon: eliminate the trylock path in
acquire/release_region_mutex (b05d8d9ef5ef21d1b18440430f950304836e1aaa
in char-misc-next) removed these wrappers.


 Olaf

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


[PATCH v3 2/6] staging: rtl8192e: fix coding style issues (replace min with min_t)

2015-03-12 Thread Mateusz Kulikowski
Fix checkpatch.pl warning 'min() should probably be min_t()'.

Signed-off-by: Mateusz Kulikowski mateusz.kulikow...@gmail.com
---
 drivers/staging/rtl8192e/rtllib_rx.c | 16 +++-
 drivers/staging/rtl8192e/rtllib_wx.c |  4 ++--
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c 
b/drivers/staging/rtl8192e/rtllib_rx.c
index 1664040..be0debe 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1908,7 +1908,9 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
   info_element-data[2] == 0x4c 
   info_element-data[3] == 0x033) {
 
-   tmp_htcap_len = 
min(info_element-len, (u8)MAX_IE_LEN);
+   tmp_htcap_len = min_t(u8,
+ info_element-len,
+ MAX_IE_LEN);
if (tmp_htcap_len != 0) {

network-bssht.bdHTSpecVer = HT_SPEC_VER_EWC;

network-bssht.bdHTCapLen = tmp_htcap_len  sizeof(network-bssht.bdHTCapBuf) ?
@@ -1932,7 +1934,9 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
info_element-data[1] == 0x90 
info_element-data[2] == 0x4c 
info_element-data[3] == 0x034) {
-   tmp_htinfo_len = min(info_element-len, 
(u8)MAX_IE_LEN);
+   tmp_htinfo_len = min_t(u8,
+  
info_element-len,
+  MAX_IE_LEN);
if (tmp_htinfo_len != 0) {
network-bssht.bdHTSpecVer = 
HT_SPEC_VER_EWC;
if (tmp_htinfo_len) {
@@ -1953,7 +1957,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
info_element-data[1] == 0xe0 
info_element-data[2] == 0x4c 
info_element-data[3] == 0x02) {
-   ht_realtek_agg_len = 
min(info_element-len, (u8)MAX_IE_LEN);
+   ht_realtek_agg_len = min_t(u8, 
info_element-len, MAX_IE_LEN);
memcpy(ht_realtek_agg_buf, 
info_element-data, info_element-len);
}
if (ht_realtek_agg_len = 5) {
@@ -2083,7 +2087,8 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
case MFIE_TYPE_HT_CAP:
RTLLIB_DEBUG_SCAN(MFIE_TYPE_HT_CAP: %d bytes\n,
 info_element-len);
-   tmp_htcap_len = min(info_element-len, (u8)MAX_IE_LEN);
+   tmp_htcap_len = min_t(u8, info_element-len,
+ MAX_IE_LEN);
if (tmp_htcap_len != 0) {
network-bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
network-bssht.bdHTCapLen = tmp_htcap_len  
sizeof(network-bssht.bdHTCapBuf) ?
@@ -2110,7 +2115,8 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
case MFIE_TYPE_HT_INFO:
RTLLIB_DEBUG_SCAN(MFIE_TYPE_HT_INFO: %d bytes\n,
 info_element-len);
-   tmp_htinfo_len = min(info_element-len, (u8)MAX_IE_LEN);
+   tmp_htinfo_len = min_t(u8, info_element-len,
+  MAX_IE_LEN);
if (tmp_htinfo_len) {
network-bssht.bdHTSpecVer = HT_SPEC_VER_IEEE;
network-bssht.bdHTInfoLen = tmp_htinfo_len 
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c 
b/drivers/staging/rtl8192e/rtllib_wx.c
index 6349d47..3a049e1 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -74,7 +74,7 @@ static inline char *rtl819x_translate_scan(struct 
rtllib_device *ieee,
iwe.cmd = SIOCGIWESSID;
iwe.u.data.flags = 1;
if (network-ssid_len  0) {
-   iwe.u.data.length = min(network-ssid_len, (u8)32);
+   iwe.u.data.length = min_t(u8, network-ssid_len, 32);
start = iwe_stream_add_point_rsl(info, start, stop, iwe,
 network-ssid);
} else if (network-hidden_ssid_len == 0) 

[PATCH v3 0/6] staging: rtl8192e: fix coding style issues

2015-03-12 Thread Mateusz Kulikowski
Various coding style fixes for rtl8192e driver.
This series of patches includes v2 (changes to rtllib_wx.c), 
but also includes similar fixes for other files.

checkpatch.pl still complains about some of patches - this will be fixed
in further commits (warnings were mostly already there):

1/6: 
- usage of subsystem messages instead of printk
- line over 80 characters
2/6:
- line over 80 characters (fix would need re-indentation)
3/6:
- line over 80 characters (split will need code refactoring)

Mateusz Kulikowski (6):
  staging: rtl8192e: fix coding style issues (merge broken strings)
  staging: rtl8192e: fix coding style issues (replace min with min_t)
  staging: rtl8192e: fix coding style issues (spaces before semicolon)
  staging: rtl8192e: fix coding style errors (macros in parentheses)
  staging: rtl8192e: rtllib_wx: fix coding style (printk - netdev_*)
  staging: rtl8192e: rtllib_wx: remove duplicate messages

 drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c |  51 +++---
 drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c  |  30 +--
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 124 +++--
 .../staging/rtl8192e/rtl8192e/r8192E_firmware.c|  27 +--
 drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h   |  14 +-
 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 201 +++--
 drivers/staging/rtl8192e/rtl8192e/rtl_cam.c|  22 +--
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   | 142 ---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h   |   4 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c |  52 +++---
 drivers/staging/rtl8192e/rtl8192e/rtl_pci.c|  18 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_pm.c |  12 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c |  24 +--
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c |  35 ++--
 drivers/staging/rtl8192e/rtl819x_BAProc.c  |  77 
 drivers/staging/rtl8192e/rtl819x_HT.h  |   6 +-
 drivers/staging/rtl8192e/rtl819x_HTProc.c  |  44 ++---
 drivers/staging/rtl8192e/rtl819x_TSProc.c  |  53 +++---
 drivers/staging/rtl8192e/rtllib.h  |   4 +-
 drivers/staging/rtl8192e/rtllib_crypt.c|  14 +-
 drivers/staging/rtl8192e/rtllib_crypt_ccmp.c   |  24 +--
 drivers/staging/rtl8192e/rtllib_crypt_tkip.c   |  62 +++
 drivers/staging/rtl8192e/rtllib_crypt_wep.c|  12 +-
 drivers/staging/rtl8192e/rtllib_rx.c   |  18 +-
 drivers/staging/rtl8192e/rtllib_softmac.c  |  63 ---
 drivers/staging/rtl8192e/rtllib_softmac_wx.c   |   5 +-
 drivers/staging/rtl8192e/rtllib_tx.c   |   8 +-
 drivers/staging/rtl8192e/rtllib_wx.c   |  37 ++--
 28 files changed, 616 insertions(+), 567 deletions(-)

-- 
1.8.4.1

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


[PATCH v3 4/6] staging: rtl8192e: fix coding style errors (macros in parentheses)

2015-03-12 Thread Mateusz Kulikowski
Fix checkpatch.pl errors 'Macros with complex values should be enclosed in 
parentheses'.

Signed-off-by: Mateusz Kulikowski mateusz.kulikow...@gmail.com
---
 drivers/staging/rtl8192e/rtl819x_HT.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h 
b/drivers/staging/rtl8192e/rtl819x_HT.h
index 13f4105..193c872 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -78,7 +78,7 @@ enum chnl_op {
 };
 
 #define CHHLOP_IN_PROGRESS(_pHTInfo)   \
-   ((_pHTInfo)-ChnlOp  CHNLOP_NONE) ? true : false
+   (((_pHTInfo)-ChnlOp  CHNLOP_NONE) ? true : false)
 
 /*
 union ht_capability {
@@ -385,8 +385,8 @@ extern u8 MCS_FILTER_1SS[16];
 #defineLEGACY_WIRELESS_MODEIEEE_MODE_MASK
 
 #define CURRENT_RATE(WirelessMode, LegacyRate, HTRate) \
-   ((WirelessMode  (LEGACY_WIRELESS_MODE)) != 0) ? \
-   (LegacyRate) : (PICK_RATE(LegacyRate, HTRate))
+   (((WirelessMode  (LEGACY_WIRELESS_MODE)) != 0) ? \
+   (LegacyRate) : (PICK_RATE(LegacyRate, HTRate)))
 
 
 
-- 
1.8.4.1

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


[PATCH v3 6/6] staging: rtl8192e: rtllib_wx: remove duplicate messages

2015-03-12 Thread Mateusz Kulikowski
Some messages were reported with netdev_* macros and internal
driver-specific macro.

Signed-off-by: Mateusz Kulikowski mateusz.kulikow...@gmail.com
---
 drivers/staging/rtl8192e/rtllib_wx.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_wx.c 
b/drivers/staging/rtl8192e/rtllib_wx.c
index 9f3a8f2..7dc68d7 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -421,8 +421,6 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
 NULL, (*crypt)-priv);
if (len == 0) {
/* Set a default key of all 0 */
-   RTLLIB_DEBUG_WX(Setting key %d to all zero.\n,
-  key);
netdev_info(dev, Setting key %d to all zero.\n, key);
memset(sec.keys[key], 0, 13);
(*crypt)-ops-set_key(sec.keys[key], 13, NULL,
@@ -604,8 +602,6 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
ops = lib80211_get_crypto_ops(alg);
}
if (ops == NULL) {
-   RTLLIB_DEBUG_WX(%s: unknown crypto alg %d\n,
-  dev-name, ext-alg);
netdev_info(dev, unknown crypto alg %d\n, ext-alg);
ret = -EINVAL;
goto done;
@@ -637,7 +633,6 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
if (ext-key_len  0  (*crypt)-ops-set_key 
(*crypt)-ops-set_key(ext-key, ext-key_len, ext-rx_seq,
   (*crypt)-priv)  0) {
-   RTLLIB_DEBUG_WX(%s: key setting failed\n, dev-name);
netdev_info(dev, key setting failed\n);
ret = -EINVAL;
goto done;
-- 
1.8.4.1

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


[PATCH v3 1/6] staging: rtl8192e: fix coding style issues (merge broken strings)

2015-03-12 Thread Mateusz Kulikowski
Fix checkpatch.pl warnings:
- 'WARNING: quoted string split across lines'
- 'WARNING: break quoted strings at a space character'

Signed-off-by: Mateusz Kulikowski mateusz.kulikow...@gmail.com
---
 drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c |  51 +++---
 drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c  |  28 +--
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 124 +++--
 .../staging/rtl8192e/rtl8192e/r8192E_firmware.c|  25 +--
 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 201 +++--
 drivers/staging/rtl8192e/rtl8192e/rtl_cam.c|  20 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   | 140 +++---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c |  36 ++--
 drivers/staging/rtl8192e/rtl8192e/rtl_pci.c|  18 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_pm.c |  12 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_ps.c |  24 +--
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c |  35 ++--
 drivers/staging/rtl8192e/rtl819x_BAProc.c  |  77 
 drivers/staging/rtl8192e/rtl819x_HTProc.c  |  44 ++---
 drivers/staging/rtl8192e/rtl819x_TSProc.c  |  53 +++---
 drivers/staging/rtl8192e/rtllib_crypt.c|  14 +-
 drivers/staging/rtl8192e/rtllib_crypt_ccmp.c   |  24 +--
 drivers/staging/rtl8192e/rtllib_crypt_tkip.c   |  62 +++
 drivers/staging/rtl8192e/rtllib_crypt_wep.c|  12 +-
 drivers/staging/rtl8192e/rtllib_softmac.c  |  61 ---
 drivers/staging/rtl8192e/rtllib_softmac_wx.c   |   5 +-
 drivers/staging/rtl8192e/rtllib_tx.c   |   8 +-
 drivers/staging/rtl8192e/rtllib_wx.c   |   7 +-
 23 files changed, 566 insertions(+), 515 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c 
b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index 0e6bdd2..01d2201 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -47,8 +47,8 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev,
0x0e, bMask12Bits, 0x021);
 
} else {
-   RT_TRACE(COMP_ERR, PHY_SetRF8256Bandwidth(): 
-unknown hardware version\n);
+   RT_TRACE(COMP_ERR,
+PHY_SetRF8256Bandwidth(): unknown 
hardware version\n);
}
 
break;
@@ -66,15 +66,16 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev,
 0x0e, bMask12Bits, 0x0e1);
 
} else {
-   RT_TRACE(COMP_ERR, PHY_SetRF8256Bandwidth(): 
-unknown hardware version\n);
+   RT_TRACE(COMP_ERR,
+PHY_SetRF8256Bandwidth(): unknown 
hardware version\n);
}
 
 
break;
default:
-   RT_TRACE(COMP_ERR, PHY_SetRF8256Bandwidth(): unknown 
-Bandwidth: %#X\n, Bandwidth);
+   RT_TRACE(COMP_ERR,
+PHY_SetRF8256Bandwidth(): unknown Bandwidth: 
%#X\n,
+Bandwidth);
break;
 
}
@@ -138,8 +139,9 @@ bool phy_RF8256_Config_ParaFile(struct net_device *dev)
rtStatus = rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF,
(enum rf90_radio_path)eRFPath);
if (!rtStatus) {
-   RT_TRACE(COMP_ERR, PHY_RF8256_Config():Check 
-Radio[%d] Fail!!\n, eRFPath);
+   RT_TRACE(COMP_ERR,
+PHY_RF8256_Config():Check Radio[%d] Fail!!\n,
+eRFPath);
goto phy_RF8256_Config_ParaFile_Fail;
}
 
@@ -155,9 +157,10 @@ bool phy_RF8256_Config_ParaFile(struct net_device *dev)
 (enum rf90_radio_path)eRFPath,
 RegOffSetToBeCheck,
 bMask12Bits);
-   RT_TRACE(COMP_RF, RF %d %d register final 
-value: %x\n, eRFPath,
-RegOffSetToBeCheck, RF3_Final_Value);
+   RT_TRACE(COMP_RF,
+RF %d %d register final value: %x\n,
+eRFPath, RegOffSetToBeCheck,
+RF3_Final_Value);
RetryTimes--;
}
break;
@@ -170,9 +173,10 @@ bool 

[PATCH v3 3/6] staging: rtl8192e: fix coding style issues (spaces before semicolon)

2015-03-12 Thread Mateusz Kulikowski
Fix checkpatch.pl warning 'space prohibited before semicolon'.

Signed-off-by: Mateusz Kulikowski mateusz.kulikow...@gmail.com
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c   |  2 +-
 drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c |  2 +-
 drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h| 14 +++---
 drivers/staging/rtl8192e/rtl8192e/rtl_cam.c |  2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c|  2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h|  4 ++--
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c  | 16 
 drivers/staging/rtl8192e/rtllib.h   |  4 ++--
 drivers/staging/rtl8192e/rtllib_rx.c|  2 +-
 drivers/staging/rtl8192e/rtllib_softmac.c   |  2 +-
 10 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c 
b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
index 43d0cfa..e2ef0a3 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_cmdpkt.c
@@ -46,7 +46,7 @@ bool cmpk_message_handle_tx(
 
do {
if ((buffer_len - frag_offset)  frag_threshold) {
-   frag_length = frag_threshold ;
+   frag_length = frag_threshold;
bLastIniPkt = 0;
 
} else {
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c 
b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
index e6dbbca..b89f5bc 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
@@ -51,7 +51,7 @@ static bool fw_download_code(struct net_device *dev, u8 
*code_virtual_address,
frag_threshold = pfirmware-cmdpacket_frag_thresold;
do {
if ((buffer_len - frag_offset)  frag_threshold) {
-   frag_length = frag_threshold ;
+   frag_length = frag_threshold;
bLastIniPkt = 0;
 
} else {
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h 
b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h
index 019836b..d804876 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h
@@ -34,18 +34,18 @@ extern u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLengthPciE];
 #define PHY_REG_1T2RArrayLengthPciE 296
 extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE];
 #define RadioA_ArrayLengthPciE 246
-extern u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE] ;
+extern u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE];
 #define RadioB_ArrayLengthPciE 78
-extern u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] ;
+extern u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE];
 #define RadioC_ArrayLengthPciE 2
-extern u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE] ;
+extern u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE];
 #define RadioD_ArrayLengthPciE 2
-extern u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE] ;
+extern u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE];
 #define MACPHY_ArrayLengthPciE 18
-extern u32 Rtl8192PciEMACPHY_Array[MACPHY_ArrayLengthPciE] ;
+extern u32 Rtl8192PciEMACPHY_Array[MACPHY_ArrayLengthPciE];
 #define MACPHY_Array_PGLengthPciE 30
-extern u32 Rtl8192PciEMACPHY_Array_PG[MACPHY_Array_PGLengthPciE] ;
+extern u32 Rtl8192PciEMACPHY_Array_PG[MACPHY_Array_PGLengthPciE];
 #define AGCTAB_ArrayLengthPciE 384
-extern u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLengthPciE] ;
+extern u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLengthPciE];
 
 #endif
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
index 9476de5..7598c99 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
@@ -115,7 +115,7 @@ void setKey(struct net_device *dev, u8 EntryNo, u8 
KeyIndex, u16 KeyType,
if (priv-rtllib-RfOffReason  RF_CHANGE_BY_IPS) {
RT_TRACE(COMP_ERR, %s(): RF is OFF.\n,
__func__);
-   return ;
+   return;
} else {
down(priv-rtllib-ips_sem);
IPSLeave(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 9a45ae7..5fd4f68 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2987,7 +2987,7 @@ err_pci_disable:
 static void rtl8192_pci_disconnect(struct pci_dev *pdev)
 {
struct net_device *dev = pci_get_drvdata(pdev);
-   struct r8192_priv *priv ;
+   struct r8192_priv *priv;
u32 i;
 
if (dev) {
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h 
b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 

[PATCH v3 5/6] staging: rtl8192e: rtllib_wx: fix coding style (printk - netdev_*)

2015-03-12 Thread Mateusz Kulikowski
Use netdev_*() functions to print diagnostic messages.

Signed-off-by: Mateusz Kulikowski mateusz.kulikow...@gmail.com
---
 drivers/staging/rtl8192e/rtllib_wx.c | 21 +
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_wx.c 
b/drivers/staging/rtl8192e/rtllib_wx.c
index 3a049e1..9f3a8f2 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -389,9 +389,8 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
kfree(new_crypt);
new_crypt = NULL;
 
-   printk(KERN_WARNING %s: could not initialize WEP: 
-  load module rtllib_crypt_wep\n,
-  dev-name);
+   netdev_warn(dev,
+   could not initialize WEP: load module 
rtllib_crypt_wep\n);
return -EOPNOTSUPP;
}
*crypt = new_crypt;
@@ -422,11 +421,9 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
 NULL, (*crypt)-priv);
if (len == 0) {
/* Set a default key of all 0 */
-   printk(KERN_INFO Setting key %d to all zero.\n,
-  key);
-
RTLLIB_DEBUG_WX(Setting key %d to all zero.\n,
   key);
+   netdev_info(dev, Setting key %d to all zero.\n, key);
memset(sec.keys[key], 0, 13);
(*crypt)-ops-set_key(sec.keys[key], 13, NULL,
   (*crypt)-priv);
@@ -468,7 +465,7 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
if (ieee-reset_on_keychange 
ieee-iw_mode != IW_MODE_INFRA 
ieee-reset_port  ieee-reset_port(dev)) {
-   printk(KERN_DEBUG %s: reset_port failed\n, dev-name);
+   netdev_dbg(dev, reset_port failed\n);
return -EINVAL;
}
return 0;
@@ -595,7 +592,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
ret = -EINVAL;
goto done;
}
-   printk(KERN_INFO alg name:%s\n, alg);
+   netdev_info(dev, alg name:%s\n, alg);
 
ops = lib80211_get_crypto_ops(alg);
if (ops == NULL) {
@@ -609,7 +606,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
if (ops == NULL) {
RTLLIB_DEBUG_WX(%s: unknown crypto alg %d\n,
   dev-name, ext-alg);
-   printk(KERN_INFO unknown crypto alg %d\n, ext-alg);
+   netdev_info(dev, unknown crypto alg %d\n, ext-alg);
ret = -EINVAL;
goto done;
}
@@ -641,7 +638,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
(*crypt)-ops-set_key(ext-key, ext-key_len, ext-rx_seq,
   (*crypt)-priv)  0) {
RTLLIB_DEBUG_WX(%s: key setting failed\n, dev-name);
-   printk(KERN_INFO key setting failed\n);
+   netdev_info(dev, key setting failed\n);
ret = -EINVAL;
goto done;
}
@@ -758,9 +755,9 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee,
 
case IW_MLME_DISASSOC:
if (deauth)
-   printk(KERN_INFO disauth packet !\n);
+   netdev_warn(ieee-dev, disauth packet !\n);
else
-   printk(KERN_INFO dis associate packet!\n);
+   netdev_warn(ieee-dev, dis associate packet!\n);
 
ieee-cannot_notify = true;
 
-- 
1.8.4.1

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


[PATCH 23/56] staging: comedi: amplc_dio200_pci: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/amplc_dio200_pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_dio200_pci.c 
b/drivers/staging/comedi/drivers/amplc_dio200_pci.c
index b83d1f5..d9850c9 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200_pci.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200_pci.c
@@ -221,10 +221,9 @@
  */
 
 #include linux/module.h
-#include linux/pci.h
 #include linux/interrupt.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 #include amplc_dio200.h
 
-- 
2.1.4

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


[PATCH 06/56] staging: comedi: addi_apci_1516: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/addi_apci_1516.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c 
b/drivers/staging/comedi/drivers/addi_apci_1516.c
index d841041..c3505a5 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1516.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1516.c
@@ -23,9 +23,8 @@
  */
 
 #include linux/module.h
-#include linux/pci.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 #include addi_watchdog.h
 #include comedi_fc.h
 
-- 
2.1.4

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


[PATCH 14/56] staging: comedi: adl_pci6208: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/adl_pci6208.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c 
b/drivers/staging/comedi/drivers/adl_pci6208.c
index cc75281..7ed3fd6 100644
--- a/drivers/staging/comedi/drivers/adl_pci6208.c
+++ b/drivers/staging/comedi/drivers/adl_pci6208.c
@@ -33,9 +33,8 @@
 
 #include linux/module.h
 #include linux/delay.h
-#include linux/pci.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 /*
  * PCI-6208/6216-GL register map
-- 
2.1.4

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


[PATCH 39/56] staging: comedi: icp_multi: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/icp_multi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/icp_multi.c 
b/drivers/staging/comedi/drivers/icp_multi.c
index ddcb25d..1e104eb 100644
--- a/drivers/staging/comedi/drivers/icp_multi.c
+++ b/drivers/staging/comedi/drivers/icp_multi.c
@@ -43,11 +43,10 @@ Configuration options: not applicable, uses PCI auto config
 */
 
 #include linux/module.h
-#include linux/pci.h
 #include linux/delay.h
 #include linux/interrupt.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 #define ICP_MULTI_ADC_CSR  0   /* R/W: ADC command/status register */
 #define ICP_MULTI_AI   2   /* R:   Analogue input data */
-- 
2.1.4

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


[PATCH 26/56] staging: comedi: amplc_pci236: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/amplc_pci236.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pci236.c 
b/drivers/staging/comedi/drivers/amplc_pci236.c
index ad1e93d..31cc38b 100644
--- a/drivers/staging/comedi/drivers/amplc_pci236.c
+++ b/drivers/staging/comedi/drivers/amplc_pci236.c
@@ -42,10 +42,9 @@
  */
 
 #include linux/module.h
-#include linux/pci.h
 #include linux/interrupt.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 #include amplc_pc236.h
 #include plx9052.h
-- 
2.1.4

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


[PATCH 11/56] staging: comedi: addi_apci_3120: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/addi_apci_3120.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c 
b/drivers/staging/comedi/drivers/addi_apci_3120.c
index c65f940..5822f1fe 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3120.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3120.c
@@ -22,10 +22,9 @@
  */
 
 #include linux/module.h
-#include linux/pci.h
 #include linux/interrupt.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 #include comedi_fc.h
 #include amcc_s5933.h
 
-- 
2.1.4

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


[PATCH 30/56] staging: comedi: cb_pcidda: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/cb_pcidda.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c 
b/drivers/staging/comedi/drivers/cb_pcidda.c
index 2b2cfcd..1e232b1 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -36,9 +36,8 @@
  */
 
 #include linux/module.h
-#include linux/pci.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 #include comedi_fc.h
 #include 8255.h
-- 
2.1.4

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


[PATCH 37/56] staging: comedi: dyna_pci10xx: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/dyna_pci10xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c 
b/drivers/staging/comedi/drivers/dyna_pci10xx.c
index c241d92..c9eb26f 100644
--- a/drivers/staging/comedi/drivers/dyna_pci10xx.c
+++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c
@@ -34,10 +34,9 @@
 
 #include linux/module.h
 #include linux/delay.h
-#include linux/pci.h
 #include linux/mutex.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 #define READ_TIMEOUT 50
 
-- 
2.1.4

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


[PATCH 27/56] staging: comedi: amplc_pci263: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/amplc_pci263.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pci263.c 
b/drivers/staging/comedi/drivers/amplc_pci263.c
index 0d2224b..b6768aa 100644
--- a/drivers/staging/comedi/drivers/amplc_pci263.c
+++ b/drivers/staging/comedi/drivers/amplc_pci263.c
@@ -33,9 +33,8 @@ The state of the outputs can be read.
 */
 
 #include linux/module.h
-#include linux/pci.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 static int pci263_do_insn_bits(struct comedi_device *dev,
   struct comedi_subdevice *s,
-- 
2.1.4

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


[PATCH 32/56] staging: comedi: cb_pcimdda: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/cb_pcimdda.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c 
b/drivers/staging/comedi/drivers/cb_pcimdda.c
index e834be9..a4781db 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdda.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdda.c
@@ -75,9 +75,8 @@ Configuration Options: not applicable, uses PCI auto config
  */
 
 #include linux/module.h
-#include linux/pci.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 #include 8255.h
 
-- 
2.1.4

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


[PATCH 09/56] staging: comedi: addi_apci_2032: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/addi_apci_2032.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c 
b/drivers/staging/comedi/drivers/addi_apci_2032.c
index eebf4f1..86abb72 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2032.c
@@ -23,11 +23,10 @@
  */
 
 #include linux/module.h
-#include linux/pci.h
 #include linux/interrupt.h
 #include linux/slab.h
 
-#include ../comedidev.h
+#include ../comedi_pci.h
 #include addi_watchdog.h
 #include comedi_fc.h
 
-- 
2.1.4

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


[PATCH 46/56] staging: comedi: mite.h: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/mite.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/mite.h 
b/drivers/staging/comedi/drivers/mite.h
index b2b1204..b3ca7fc 100644
--- a/drivers/staging/comedi/drivers/mite.h
+++ b/drivers/staging/comedi/drivers/mite.h
@@ -19,10 +19,9 @@
 #ifndef _MITE_H_
 #define _MITE_H_
 
-#include linux/pci.h
 #include linux/log2.h
 #include linux/slab.h
-#include ../comedidev.h
+#include ../comedi_pci.h
 
 #define PCIMIO_COMPAT
 
-- 
2.1.4

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


[PATCH 44/56] staging: comedi: mf6x4: include new comedi_pci.h header

2015-03-12 Thread Ian Abbott
Include the new ../comedi_pci.h header instead of linux/pci.h and
../comedidev.h, which will now get included indirectly.

Signed-off-by: Ian Abbott abbo...@mev.co.uk
---
 drivers/staging/comedi/drivers/mf6x4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/mf6x4.c 
b/drivers/staging/comedi/drivers/mf6x4.c
index e9a74ca..a675e2e 100644
--- a/drivers/staging/comedi/drivers/mf6x4.c
+++ b/drivers/staging/comedi/drivers/mf6x4.c
@@ -26,9 +26,9 @@
  */
 
 #include linux/module.h
-#include linux/pci.h
 #include linux/delay.h
-#include ../comedidev.h
+
+#include ../comedi_pci.h
 
 /* Registers present in BAR0 memory region */
 #define MF624_GPIOC_R  0x54
-- 
2.1.4

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