[PATCH] staging: lustre: fix gfp_t/int coercion

2014-09-26 Thread Omar Sandoval
Fix a few implicit casts between int and gfp_t which were caught by sparse.

Signed-off-by: Omar Sandoval 
---
This patch applies to v3.17-rc6.
 drivers/staging/lustre/lustre/llite/lloop.c| 4 ++--
 drivers/staging/lustre/lustre/ptlrpc/client.c  | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/lloop.c 
b/drivers/staging/lustre/lustre/llite/lloop.c
index 8086638..b0d8de5 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -126,7 +126,7 @@ struct lloop_device {
struct block_device *lo_device;
unsigned lo_blocksize;
 
-   int   old_gfp_mask;
+   gfp_t old_gfp_mask;
 
spinlock_t  lo_lock;
struct bio  *lo_bio;
@@ -546,7 +546,7 @@ static int loop_clr_fd(struct lloop_device *lo, struct 
block_device *bdev,
   int count)
 {
struct file *filp = lo->lo_backing_file;
-   int gfp = lo->old_gfp_mask;
+   gfp_t gfp = lo->old_gfp_mask;
 
if (lo->lo_state != LLOOP_BOUND)
return -ENXIO;
diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c 
b/drivers/staging/lustre/lustre/ptlrpc/client.c
index 4146e8b..c4debbc 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
@@ -394,7 +394,7 @@ void ptlrpc_request_cache_fini(void)
kmem_cache_destroy(request_cache);
 }
 
-struct ptlrpc_request *ptlrpc_request_cache_alloc(int flags)
+struct ptlrpc_request *ptlrpc_request_cache_alloc(gfp_t flags)
 {
struct ptlrpc_request *req;
 
diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h 
b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
index f7be007..7fe2e58 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
+++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
@@ -57,7 +57,7 @@ struct ptlrpc_bulk_desc *ptlrpc_new_bulk(unsigned npages, 
unsigned max_brw,
 unsigned type, unsigned portal);
 int ptlrpc_request_cache_init(void);
 void ptlrpc_request_cache_fini(void);
-struct ptlrpc_request *ptlrpc_request_cache_alloc(int flags);
+struct ptlrpc_request *ptlrpc_request_cache_alloc(gfp_t flags);
 void ptlrpc_request_cache_free(struct ptlrpc_request *req);
 void ptlrpc_init_xid(void);
 
-- 
2.1.0

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


Re: Time keeps on slipping... on Hyper-V

2014-09-26 Thread Mike Surcouf
> We still recommend user to configure NTP in the guest VM. With the new time 
> sync feature in this patch,
> you could have one more option to enable the guest-host sync, if the NTP 
> didn't work in the environment.
> For example the guest VM didn't have network connection.

Microsoft used to use host time-samples in their older drivers but
this was dropped (when I don't know).
Now we must use NTP to correct hyperv_clocksource which suffers from
the usual problems associated with virtual environment  cpu loading.

Host time-samples in conjunction with an effective clock stability
algorithm with slews rather than steps should be the default.
NTP is a workaround and should not be the primary solution.

I have seen a lots of posts for RHEL CENTOS  Linux that have a
FAST.hyper_clocksource confirmed by myself on CENTOS 6.5 and 7.0
(also confirmed by Olaf on SLES).

If this patch steps the clock once in a while without any form of
slewing then it has the potential to break things as files and logs
travel BACK in time.

Apologies Thomas could you send me the patch via email as lkml.org
does not have it in the archives.

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


RE: Time keeps on slipping... on Hyper-V

2014-09-26 Thread Thomas Shao


> -Original Message-
> From: Mike Surcouf [mailto:mps.surcouf.l...@gmail.com]
> Sent: Friday, September 26, 2014 5:24 PM
> To: Thomas Shao
> Cc: Sitsofe Wheeler; Olaf Hering; gre...@linuxfoundation.org; linux-
> ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org;
> a...@canonical.com; jasow...@redhat.com; KY Srinivasan; Haiyang Zhang
> Subject: Re: Time keeps on slipping... on Hyper-V
> 
> > We still recommend user to configure NTP in the guest VM. With the new
> > time sync feature in this patch, you could have one more option to enable
> the guest-host sync, if the NTP didn't work in the environment.
> > For example the guest VM didn't have network connection.
> 
> Microsoft used to use host time-samples in their older drivers but this was
> dropped (when I don't know).
> Now we must use NTP to correct hyperv_clocksource which suffers from the
> usual problems associated with virtual environment  cpu loading.
> 
> Host time-samples in conjunction with an effective clock stability algorithm
> with slews rather than steps should be the default.
> NTP is a workaround and should not be the primary solution.
> 
> I have seen a lots of posts for RHEL CENTOS  Linux that have a
> FAST.hyper_clocksource confirmed by myself on CENTOS 6.5 and 7.0 (also
> confirmed by Olaf on SLES).
> 
> If this patch steps the clock once in a while without any form of slewing then
> it has the potential to break things as files and logs travel BACK in time.
> 
> Apologies Thomas could you send me the patch via email as lkml.org does
> not have it in the archives.
> 
Sure. I'll send the package again. It's strange that this patch didn't in the 
archives. And in my patch, it will slew the time, if the time drift is less 
than 1 s. It only steps the clock if the drift is larger than 1 s.

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


[PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Thomas Shao
In current hyper-v time sync service,it only gets the initial clock time
from the host. It didn't process the following time samples. This change
introduced a module parameter called host_time_sync. If it is set to true,
the guest will periodically sychronize it's time with the host clock using
host time sample. By default it is disabled, because we still recommend
user to configure NTP for time synchronization.

Signed-off-by: Thomas Shao 
Reviewed-by: K. Y. Srinivasan 
---
 drivers/hv/hv_util.c |  133 +++---
 1 files changed, 125 insertions(+), 8 deletions(-)

diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index 3b9c9ef..9b167c6 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -51,11 +51,30 @@
 #define HB_WS2008_MAJOR1
 #define HB_WS2008_VERSION  (HB_WS2008_MAJOR << 16 | HB_MINOR)
 
+#define  TIMESAMPLE_INTERVAL 50L  /* 5s in nanosecond */
+
+/*host sends time sample for every 5s.So the max polling interval
+ *is 128*5 = 640s.
+*/
+#define  TIME_ADJ_MAX_INTERVAL 128 /*Max polling interval */
+
 static int sd_srv_version;
 static int ts_srv_version;
 static int hb_srv_version;
 static int util_fw_version;
 
+/*host sends time sample for every 5s.So the initial polling interval
+ *is 5s.
+*/
+static s32 adj_interval = 1;
+
+/*The host_time_sync module parameter is used to control the time
+  sync between host and guest.
+*/
+static bool host_time_sync;
+module_param(host_time_sync, bool, (S_IRUGO | S_IWUSR));
+MODULE_PARM_DESC(host_time_sync, "If the guest sync time with host");
+
 static void shutdown_onchannelcallback(void *context);
 static struct hv_util_service util_shutdown = {
.util_cb = shutdown_onchannelcallback,
@@ -160,18 +179,83 @@ static void shutdown_onchannelcallback(void *context)
schedule_work(&shutdown_work);
 }
 
+/* helper function to call adjtimex command in user mode */
+static void run_adjtimex_cmd(s64 tickvalue)
+{
+   char *argv[4], *envp[3];
+   char str_tickvalue[20];
+
+   sprintf(str_tickvalue, "%lld", tickvalue);
+
+   argv[0] = "/sbin/adjtimex";
+   argv[1] = "-t";
+   argv[2] = str_tickvalue;
+   argv[3] = NULL;
+
+   envp[0] = "HOME=/";
+   envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
+   envp[2] = NULL;
+
+   call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
+}
+
 /*
  * Set guest time to host UTC time.
  */
-static inline void do_adj_guesttime(u64 hosttime)
+static inline void do_adj_guesttime(u64 hosttime, bool forceSync)
 {
-   s64 host_tns;
-   struct timespec host_ts;
+   s64 host_tns, guest_tns, diff;
+   struct timespec host_ts, guest_ts;
+   s64 tickchg, tickval;
+   int diff_sign;
 
host_tns = (hosttime - WLTIMEDELTA) * 100;
host_ts = ns_to_timespec(host_tns);
 
-   do_settimeofday(&host_ts);
+   if (forceSync) {
+   do_settimeofday(&host_ts);
+   } else {
+   /* for the first time, reset the tick value */
+   if (adj_interval == 1) {
+   run_adjtimex_cmd(TICK_USEC);
+   adj_interval = adj_interval * 2;
+   do_settimeofday(&host_ts);
+   return;
+   }
+
+   guest_ts = CURRENT_TIME;
+   guest_tns = timespec_to_ns(&guest_ts);
+   diff = host_tns - guest_tns;
+   if (diff >= 0) {
+   diff_sign = 1;
+   } else {
+   diff_sign = -1;
+   diff = -diff;
+   }
+
+   /*1s in nanosecond */
+   if (diff > 10 || diff < -10) {
+   do_settimeofday(&host_ts);
+   return;
+   }
+
+   /*1ms in nanosecond */
+   if (diff > 100 || diff < -100) {
+   tickchg = diff * TICK_USEC /
+   (TIMESAMPLE_INTERVAL * adj_interval);
+
+   if (tickchg > TICK_USEC/10)
+   tickchg = TICK_USEC/10;
+
+   tickval = TICK_USEC + diff_sign * tickchg;
+   run_adjtimex_cmd(tickval);
+
+   } else {
+   /* double the polling interval*/
+   if (adj_interval < TIME_ADJ_MAX_INTERVAL)
+   adj_interval = adj_interval * 2;
+   }
+   }
 }
 
 /*
@@ -179,8 +263,9 @@ static inline void do_adj_guesttime(u64 hosttime)
  */
 
 struct adj_time_work {
-   struct work_struct work;
+   struct  work_struct work;
u64 host_time;
+   boolforceSync;
 };
 
 static void hv_set_host_time(struct work_struct *work)
@@ -188,7 +273,7 @@ static void hv_set_host_time(struct work_struct *work)
struct adj_time_work*wrk;
 
wrk = container_of(work, struct adj_time_work, 

[PATCH] drivers: staging: wlan-ng: fix sparse warnings

2014-09-26 Thread Cheng-Wei Lee
This patch fix the sparse warnings in wlan-ng/cfg80211.c
The following functions were only used in this file, so done by
declaring them into static.

drivers/staging/wlan-ng/cfg80211.c:710:6: warning: symbol
'prism2_connect_result' was not declared. Should it be static?
drivers/staging/wlan-ng/cfg80211.c:719:6: warning: symbol
'prism2_disconnected' was not declared. Should it be static?
drivers/staging/wlan-ng/cfg80211.c:725:6: warning: symbol
'prism2_roamed' was not declared. Should it be static?

Signed-off-by: Quentin Lee 
---
 drivers/staging/wlan-ng/cfg80211.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c
b/drivers/staging/wlan-ng/cfg80211.c
index 723319e..9e65429 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -707,7 +707,7 @@ exit:


 /* Interface callback functions, passing data back up to the cfg80211 layer */
-void prism2_connect_result(wlandevice_t *wlandev, u8 failed)
+static void prism2_connect_result(wlandevice_t *wlandev, u8 failed)
 {
u16 status = failed ?
 WLAN_STATUS_UNSPECIFIED_FAILURE : WLAN_STATUS_SUCCESS;
@@ -716,13 +716,13 @@ void prism2_connect_result(wlandevice_t
*wlandev, u8 failed)
NULL, 0, NULL, 0, status, GFP_KERNEL);
 }

-void prism2_disconnected(wlandevice_t *wlandev)
+static void prism2_disconnected(wlandevice_t *wlandev)
 {
cfg80211_disconnected(wlandev->netdev, 0, NULL,
0, GFP_KERNEL);
 }

-void prism2_roamed(wlandevice_t *wlandev)
+static void prism2_roamed(wlandevice_t *wlandev)
 {
cfg80211_roamed(wlandev->netdev, NULL, wlandev->bssid,
NULL, 0, NULL, 0, GFP_KERNEL);
-- 
1.7.9.5
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: wlan-ng: fix sparse warnings

2014-09-26 Thread Dan Carpenter
Patch is corrupt.  Read the first paragraph of
Documentation/email-clients.txt

regards,
dan carpenter

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


Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Mike Surcouf
> +/* helper function to call adjtimex command in user mode */
> +static void run_adjtimex_cmd(s64 tickvalue)
> +{
> +   char *argv[4], *envp[3];
> +   char str_tickvalue[20];
> +
> +   sprintf(str_tickvalue, "%lld", tickvalue);
> +
> +   argv[0] = "/sbin/adjtimex";
> +   argv[1] = "-t";
> +   argv[2] = str_tickvalue;
> +   argv[3] = NULL;
> +
> +   envp[0] = "HOME=/";
> +   envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
> +   envp[2] = NULL;
> +
> +   call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
> +}


What happens when adjtimex is not present?
Is there no kernel space function for that?
Does this patch affect "not setting correct time on restore" or "not
setting correct time on  live migration" bug?

Thanks

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


RE: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Thomas Shao

> -Original Message-
> From: Mike Surcouf [mailto:mps.surcouf.l...@gmail.com]
> Sent: Friday, September 26, 2014 7:53 PM
> To: Thomas Shao
> Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
> driverdev-devel@linuxdriverproject.org; Olaf Hering; Robo Bot;
> jasow...@redhat.com; KY Srinivasan; Haiyang Zhang
> Subject: Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using
> host time sample
> 
> > +/* helper function to call adjtimex command in user mode */ static
> > +void run_adjtimex_cmd(s64 tickvalue) {
> > +   char *argv[4], *envp[3];
> > +   char str_tickvalue[20];
> > +
> > +   sprintf(str_tickvalue, "%lld", tickvalue);
> > +
> > +   argv[0] = "/sbin/adjtimex";
> > +   argv[1] = "-t";
> > +   argv[2] = str_tickvalue;
> > +   argv[3] = NULL;
> > +
> > +   envp[0] = "HOME=/";
> > +   envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
> > +   envp[2] = NULL;
> > +
> > +   call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC); }
> 
> 
> What happens when adjtimex is not present?
> Is there no kernel space function for that?
> Does this patch affect "not setting correct time on restore" or "not setting
> correct time on  live migration" bug?
> 

If adjtimex is not present, then the slew time part didn't take effect.
There is a kernel space do_adjtmex, but it's only for sys call and not exposed 
to module. So I didn't use it in my patch.
With this patch, it will step the clock if the time drift is larger than 1 
seconds, so it can solve
the issue your mentioned. And on the other hand, "setting correct time on 
restore" is already fixed
in other patch, which is already in upstream.


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


Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Mike Surcouf
>> What happens when adjtimex is not present?
>> Is there no kernel space function for that?
>> Does this patch affect "not setting correct time on restore" or "not setting
>> correct time on  live migration" bug?
>>
>
> If adjtimex is not present, then the slew time part didn't take effect.
> There is a kernel space do_adjtmex, but it's only for sys call and not 
> exposed to module. So I didn't use it in my patch.
> With this patch, it will step the clock if the time drift is larger than 1 
> seconds, so it can solve
> the issue your mentioned. And on the other hand, "setting correct time on 
> restore" is already fixed
> in other patch, which is already in upstream.
>

AFAIK  CENTOS and RHEL stopped providing adjtimex for a while now (since V5?).
Even went as far as removing references from there man page for hwclock. in V6

On CENTOS 6.5

yum provides */adjtimex

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centosc6.centos.org
 * extras: centosb5.centos.org
 * updates: centosb6.centos.org
No Matches found

So the end user will have to go searching the internet rpmfind or
something to install an unofficial package on an enterprise product.
So by default you will be stepping time on CENTOS/RHEL 6 and above:
with the result of an unstable clock.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Mike Surcouf
In CENTOS and RHEL 6 and upwards the official way would be to use

/usr/sbin/tickadj

which is provided by ntp/chrony package

This dependency on user space packages that may or may not be
installed is going to cause a lot of confusion in an already confused
space.
Are we sure theres no other way?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: vt6655: fix sparse warning for static declaration

2014-09-26 Thread naszar
From: "Vladimir A. Nazarenko" 

This patch fixes the following sparse warning:
drivers/staging/vt6655/ioctl.c:44:12: warning: symbol 'wpa_Result'
was not declared. Should it be static?

'wpa_Result' can't be static because it used not only in file where
declared (ioctl.c). To resolve this I introduce new function
clear_wpa_Result(), which complitly satisfy external (and part of
internal) needs for 'wpa_Result'. Patch by steps:
* New function clear_wpa_Result() to set all fields of clear_wpa_Result()
to zero.
* Add prototipe of clear_wpa_Result() to ioctl.h
* Replace code that set 'wpa_Result' fields to zero with  new function.
* Declare 'wpa_Result' as static.

Signed-off-by: Vladimir A. Nazarenko 
---
 drivers/staging/vt6655/device_main.c |  9 +
 drivers/staging/vt6655/ioctl.c   | 17 +++--
 drivers/staging/vt6655/ioctl.h   |  1 +
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c 
b/drivers/staging/vt6655/device_main.c
index 76d5454..598e7ec 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1553,9 +1553,6 @@ static int  device_open(struct net_device *dev)
 {
struct vnt_private *pDevice = netdev_priv(dev);
int i;
-#ifdef WPA_SM_Transtatus
-   extern SWPAResult wpa_Result;
-#endif
 
pDevice->rx_buf_sz = PKT_BUF_SZ;
if (!device_init_rings(pDevice))
@@ -1567,11 +1564,7 @@ static int  device_open(struct net_device *dev)
return i;
 
 #ifdef WPA_SM_Transtatus
-   memset(wpa_Result.ifname, 0, sizeof(wpa_Result.ifname));
-   wpa_Result.proto = 0;
-   wpa_Result.key_mgmt = 0;
-   wpa_Result.eap_type = 0;
-   wpa_Result.authenticated = false;
+   clear_wpa_result();
pDevice->fWPA_Authened = false;
 #endif
pr_debug("call device init rd0 ring\n");
diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c
index 970e80d..06084ee 100644
--- a/drivers/staging/vt6655/ioctl.c
+++ b/drivers/staging/vt6655/ioctl.c
@@ -39,7 +39,16 @@
 #include "rf.h"
 
 #ifdef WPA_SM_Transtatus
-SWPAResult wpa_Result;
+static SWPAResult wpa_Result;
+
+void  clear_wpa_result(void)
+{
+   memset(wpa_Result.ifname, 0, sizeof(wpa_Result.ifname));
+   wpa_Result.proto = 0;
+   wpa_Result.key_mgmt = 0;
+   wpa_Result.eap_type = 0;
+   wpa_Result.authenticated = false;
+}
 #endif
 
 int private_ioctl(struct vnt_private *pDevice, struct ifreq *rq)
@@ -620,11 +629,7 @@ int private_ioctl(struct vnt_private *pDevice, struct 
ifreq *rq)
 
 #ifdef WPA_SM_Transtatus
case 0xFF:
-   memset(wpa_Result.ifname, 0, sizeof(wpa_Result.ifname));
-   wpa_Result.proto = 0;
-   wpa_Result.key_mgmt = 0;
-   wpa_Result.eap_type = 0;
-   wpa_Result.authenticated = false;
+   clear_wpa_result();
pDevice->fWPA_Authened = false;
if (copy_from_user(&wpa_Result, pReq->data, 
sizeof(wpa_Result))) {
result = -EFAULT;
diff --git a/drivers/staging/vt6655/ioctl.h b/drivers/staging/vt6655/ioctl.h
index 2dc5a574..5695017 100644
--- a/drivers/staging/vt6655/ioctl.h
+++ b/drivers/staging/vt6655/ioctl.h
@@ -32,5 +32,6 @@
 #include "device.h"
 
 int private_ioctl(struct vnt_private *, struct ifreq *rq);
+void clear_wpa_result(void);
 
 #endif // __IOCTL_H__
-- 
2.1.0

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


RE: [PATCH] Drivers: hv: util: Implement Time Synchronization using host time sample

2014-09-26 Thread Thomas Shao


> -Original Message-
> From: Mike Surcouf [mailto:mps.surcouf.l...@gmail.com]
> Sent: Friday, September 26, 2014 9:52 PM
> To: Thomas Shao
> Cc: gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
> driverdev-devel@linuxdriverproject.org; Olaf Hering; Robo Bot;
> jasow...@redhat.com; KY Srinivasan; Haiyang Zhang
> Subject: Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using
> host time sample
> 
> In CENTOS and RHEL 6 and upwards the official way would be to use
> 
> /usr/sbin/tickadj
> 
> which is provided by ntp/chrony package
> 
> This dependency on user space packages that may or may not be installed is
> going to cause a lot of confusion in an already confused space.
> Are we sure theres no other way?

Thanks Mike.
I think another way is to expose the do_adjtimex to kernel module. I'm not sure 
if there is any concerns. I'll investigate that.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: vt6655: fix sparse warning for static declaration

2014-09-26 Thread Dan Carpenter
Ugh...  No.  It doesn't need this.  It's only used in private_ioctl()
for the 0xFF ioctl().  We only check wpa_Result.authenticated.  The
SndEvt_ToAPI define is never set so we can ignore that code.  In other
words we can simplify the code to look like:

if (copy_from_user(&wpa_Result, pReq->data, sizeof(wpa_Result)))
return -EFAULT;
if (wpa_Result.authenticated == true)
pDevice->fWPA_Authened = true; /* is successful peer */

The ->fWPA_Authened flag is only used in BSSvSecondTxData() to decide if
we can call:

PSbSendNullPacket(pDevice);

Very puzzling...  It looks to me like this is left over debug code which
should have never been merged, so we can just delete wpa_Result and the
custom 0xFF ioctl.  At least let's not built it up and add more support
functions.

On Sat, Sep 27, 2014 at 02:08:33AM +1100, naszar wrote:
> From: "Vladimir A. Nazarenko" 

Just fix your email client so this isn't needed.

regards,
dan carpenter

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


Re: mmotm 2014-09-25-16-28 uploaded (media/platform/vivid)

2014-09-26 Thread Randy Dunlap
On 09/25/14 16:28, a...@linux-foundation.org wrote:
> The mm-of-the-moment snapshot 2014-09-25-16-28 has been uploaded to
> 
>http://www.ozlabs.org/~akpm/mmotm/
> 
> mmotm-readme.txt says
> 
> README for mm-of-the-moment:
> 
> http://www.ozlabs.org/~akpm/mmotm/
> 
> This is a snapshot of my -mm patch queue.  Uploaded at random hopefully
> more than once a week.


on i386, when CONFIG_FB is not enabled:


ERROR: "cfb_fillrect" [drivers/media/platform/vivid/vivid.ko] undefined!
ERROR: "cfb_imageblit" [drivers/media/platform/vivid/vivid.ko] undefined!
ERROR: "fb_alloc_cmap" [drivers/media/platform/vivid/vivid.ko] undefined!
ERROR: "register_framebuffer" [drivers/media/platform/vivid/vivid.ko] undefined!
ERROR: "fb_dealloc_cmap" [drivers/media/platform/vivid/vivid.ko] undefined!
ERROR: "cfb_copyarea" [drivers/media/platform/vivid/vivid.ko] undefined!
ERROR: "unregister_framebuffer" [drivers/media/platform/vivid/vivid.ko] 
undefined!


I guess that VIDEO_VIVID should depend on FB.

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