[PATCH v2 1/2] timekeeping: add EXPORT_SYMBOL_GPL for do_adjtimex()
Export do_adjtimex function for hyper-v Time Synchronization component Signed-off-by: Thomas Shao --- kernel/time/timekeeping.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index ec1791f..205a4b3 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1786,6 +1786,7 @@ int do_adjtimex(struct timex *txc) return ret; } +EXPORT_SYMBOL_GPL(do_adjtimex); #ifdef CONFIG_NTP_PPS /** -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/2] hyperv: Implement Time Synchronization using host time sample
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 | 117 ++--- 1 files changed, 109 insertions(+), 8 deletions(-) diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index 3b9c9ef..1665ce0 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -51,11 +51,33 @@ #define HB_WS2008_MAJOR1 #define HB_WS2008_VERSION (HB_WS2008_MAJOR << 16 | HB_MINOR) +#define TIMESAMPLE_INTERVAL (5 * NSEC_PER_SEC) + +/* + * 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 int 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, "Synchronize time with the host"); + static void shutdown_onchannelcallback(void *context); static struct hv_util_service util_shutdown = { .util_cb = shutdown_onchannelcallback, @@ -163,15 +185,61 @@ static void shutdown_onchannelcallback(void *context) /* * Set guest time to host UTC time. */ -static inline void do_adj_guesttime(u64 hosttime) +static inline void do_adj_guesttime(u64 hosttime, bool force_sync) { - s64 host_tns; - struct timespec host_ts; + s64 host_tns, guest_tns, diff; + struct timespec host_ts, guest_ts; + struct timex txc; + s64 tickchg; + int diff_sign; host_tns = (hosttime - WLTIMEDELTA) * 100; host_ts = ns_to_timespec(host_tns); - do_settimeofday(&host_ts); + if (force_sync) { + do_settimeofday(&host_ts); + } else { + 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) { + /* get the current tick value */ + txc.modes = 0; + do_adjtimex(&txc); + + tickchg = diff * TICK_USEC / + (TIMESAMPLE_INTERVAL * adj_interval); + + if (tickchg > TICK_USEC/10) + tickchg = TICK_USEC/10; + + if (txc.tick == TICK_USEC + diff_sign * tickchg) + return; + + txc.modes = ADJ_TICK; + txc.tick = TICK_USEC + diff_sign * tickchg; + + do_adjtimex(&txc); + } else { + /* double the polling interval*/ + if (adj_interval < TIME_ADJ_MAX_INTERVAL) + adj_interval = adj_interval * 2; + } + } } /* @@ -179,8 +247,9 @@ static inline void do_adj_guesttime(u64 hosttime) */ struct adj_time_work { - struct work_struct work; + struct work_struct work; u64 host_time; + boolforce_sync; }; static void hv_set_host_time(struct work_struct *work) @@ -188,7 +257,7 @@ static void hv_set_host_time(struct work_struct *work) struct adj_time_work*wrk; wrk = container_of(work, struct adj_time_work, work); - do_adj_guesttime(wrk->host_time); + do_adj_guesttime(wrk->host_time, wrk->force_sync); kfree(wrk); } @@ -202,11 +271,14 @@ static void hv_set_host_time(struct work_struct *work) * thing is, systime is automatically set to emulated hardware clock which may * not be UTC time or in the same time zone. So, to override these effects, we * use the first 50 time samples for initial system time setting. + * If the host_time_sync module parameter is set, we will use the host time + * samples to adjust guest time after the first 50 samples. */
Re: [PATCH 0/5] staging: comedi: usbdux drivers: tidy up urb completion
On 14/10/14 20:14, H Hartley Sweeten wrote: Tidy up the usb completion functions in the usbdux drivers by introducing some helper functions to handle and resubmit the successful urbs. This allows a common exit path to be used in the completion handler to stop the async command, if necessary, and handle the events. This series applies after: [PATCH 0/2] staging: comedi: tidy up the async event defines H Hartley Sweeten (5): staging: comedi: usbdux: introduce usbduxsub_ao_handle_urb() staging: comedi: usbdux: introduce usbduxsub_ai_handle_urb() staging: comedi: usbduxfast: introduce usbduxfast_ai_handle_urb() staging: comedi: usbduxsigma: introduce usbduxsigma_ao_handle_urb() staging: comedi: usbduxsigma: introduce usbduxsigma_ai_handle_urb() drivers/staging/comedi/drivers/usbdux.c | 304 +- drivers/staging/comedi/drivers/usbduxfast.c | 131 +--- drivers/staging/comedi/drivers/usbduxsigma.c | 305 +-- 3 files changed, 345 insertions(+), 395 deletions(-) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 2/2] hyperv: Implement Time Synchronization using host time sample
You really need to put John Stultz onto CC. Thanks, Richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 00/34] staging: comedi: addi-data: remove "common" code bloat
On 14/10/14 18:44, H Hartley Sweeten wrote: The ADDI-DATA drivers all originally use some "common" code to provide the comedi driver attach/detach. This "common" code added a lot of bloat to the drivers due to the boardinfo and private data definitions. Most of the ADDI-DATA drivers have been separated from this "commont" code and now have private definitions for the boardinfo, if it's even needed, and the private data used by the driver. They also have private attach/detach functions and the bloat has been removed. This series separates the remaining ADDI-DATA drivers from the "common" code and removes the "common" code completely. It also removes the unneeded boardinfo from the addi_apci_035 and addi_apci_1500 drivers and trims down the boardinfo in the addi_apci_3120 driver. H Hartley Sweeten (34): staging: comedi: addi_common.c: remove i_ADDI_Detach() staging: comedi: addi_common.c: remove i_ADDI_Reset() staging: comedi: addi_common.c: remove addi_auto_attach() staging: comedi: addi_common.c: remove v_ADDI_Interrupt() staging: comedi: addi_common.c: remove included source file staging: comedi: addi_apci_035: remove subdevice callbacks from boardinfo staging: comedi: addi_apci_1500: remove subdevice callbacks from boardinfo staging: comedi: addi_common.h: remove subdevice callbacks from struct addi_board staging: comedi: addi_apci_035: remove unnecessary subdevice initialization staging: comedi: addi_apci_035: remove unused subdevices staging: comedi: addi_apci_1500: remove unnecessary subdevice initialization staging: comedi: addi_apci_1500: remove unused subdevices staging: comedi: addi_common.h: rename boardinfo 'pc_DriverName' staging: comedi: addi_common.h: remove boardinfo 'i_IorangeBase1' staging: comedi: addi_apci_1500: remove eeprom support staging: comedi: addi_apci_035: board has eeprom staging: comedi: addi_common.h: remove boardinfo member 'i_PCIEeprom' staging: comedi: addi_apci_1500: remove boardinfo staging: comedi: addi_apci_035: remove boardinfo staging: comedi: addi_eeprom: remove source file staging: comedi: hwdrv_apci3120: remove need for boardinfo access staging: comedi: addi_common.h: remove boardinfo definition staging: comedi: addi_common.h: remove unused members from addi_private staging: comedi: addi_apci_3120: remove boardinfo 'i_DoMaxdata' staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDoChannel' staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDiChannel' staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrAiChannel' staging: comedi: addi_apci_3120: remove boardinfo 'i_AiChannelList' staging: comedi: addi_apci_3120: simplify analog output boardinfo staging: comedi: addi_apci_3120: simplify analog input boardinfo staging: comedi: addi_apci_035: separate from addi_common.h staging: comedi: addi_apci_1500: separate from addi_common.h staging: comedi: addi_apci_3120: separate from addi_common.h staging: comedi: addi_common.h: remove file .../staging/comedi/drivers/addi-data/addi_common.c | 274 .../staging/comedi/drivers/addi-data/addi_common.h | 144 - .../staging/comedi/drivers/addi-data/addi_eeprom.c | 360 - .../comedi/drivers/addi-data/hwdrv_apci035.c | 18 +- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 28 +- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 60 ++-- drivers/staging/comedi/drivers/addi_apci_035.c | 112 +-- drivers/staging/comedi/drivers/addi_apci_1500.c| 118 +-- drivers/staging/comedi/drivers/addi_apci_3120.c| 109 --- 9 files changed, 279 insertions(+), 944 deletions(-) delete mode 100644 drivers/staging/comedi/drivers/addi-data/addi_common.c delete mode 100644 drivers/staging/comedi/drivers/addi-data/addi_common.h delete mode 100644 drivers/staging/comedi/drivers/addi-data/addi_eeprom.c Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: Fix a possible crash when the class_create fails
On Mon, Oct 13, 2014 at 10:26:54PM +0530, devendrana...@gmail.com wrote: > From: Devendra Naga > Just fix your email client, so the from header is correct. These From headers should be for when you forward an email from someone else. > The class_create function can return a pointer with an error code > stuffed inside it if it fails. Handled it to make sure > device_register doesn't get an invalid pointer. > > Also removed assignment of rc to 0 in the beginning of function > because it gets changed after the call to register_chrdev function. > > Signed-off-by: Devendra Naga > --- > drivers/staging/dgnc/dgnc_driver.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/dgnc/dgnc_driver.c > b/drivers/staging/dgnc/dgnc_driver.c > index 2154665..72bfb29 100644 > --- a/drivers/staging/dgnc/dgnc_driver.c > +++ b/drivers/staging/dgnc/dgnc_driver.c > @@ -248,7 +248,7 @@ module_exit(dgnc_cleanup_module); > */ > static int dgnc_start(void) > { > - int rc = 0; > + int rc; Well done. :) Removing this was the right thing. > unsigned long flags; > > /* make sure that the globals are init'd before we do anything else */ > @@ -271,6 +271,12 @@ static int dgnc_start(void) > dgnc_Major = rc; > > dgnc_class = class_create(THIS_MODULE, "dgnc_mgmt"); > + if (IS_ERR(dgnc_class)) { > + rc = PTR_ERR(dgnc_class); > + APR(("Can't creat dgnc class (%d)\n", rc)); No need for an error message here. The lower levels handle this. > + goto bad; > + } > + > device_create(dgnc_class, NULL, > MKDEV(dgnc_Major, 0), > NULL, "dgnc_mgmt"); > @@ -297,6 +303,10 @@ static int dgnc_start(void) > add_timer(&dgnc_poll_timer); > > return rc; This should be "return 0;" Add a goto after dgnc_tty_preinit() while you are at it. Call the patch "fix error handling in dgnc_start()". > + > +bad: This label is not as useful as could be. We already know it's "bad" when class_create() failed so it doesn't add any new information. Call is something like: "err_unregister:". > + unregister_chrdev(dgnc_Major, "dgnc"); > + return rc; regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 2/2] hyperv: Implement Time Synchronization using host time sample
On Wed, Oct 15, 2014 at 01:40:04AM -0700, Thomas Shao wrote: > 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 > --- Um, what changed in V2? Thanks, Richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH v2 2/2] hyperv: Implement Time Synchronization using host time sample
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Richard Cochran > Sent: Wednesday, October 15, 2014 5:13 PM > To: Thomas Shao > Cc: t...@linutronix.de; gre...@linuxfoundation.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com; KY Srinivasan > Subject: Re: [PATCH v2 2/2] hyperv: Implement Time Synchronization using > host time sample > > You really need to put John Stultz onto CC. Will do that next time. Thanks for the reminder. > > Thanks, > Richard > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the > body of a message to majord...@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH v2 2/2] hyperv: Implement Time Synchronization using host time sample
> -Original Message- > From: Richard Cochran [mailto:richardcoch...@gmail.com] > Sent: Wednesday, October 15, 2014 5:18 PM > To: Thomas Shao > Cc: t...@linutronix.de; gre...@linuxfoundation.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com; KY Srinivasan > Subject: Re: [PATCH v2 2/2] hyperv: Implement Time Synchronization using > host time sample > > On Wed, Oct 15, 2014 at 01:40:04AM -0700, Thomas Shao wrote: > > 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 > > --- > > Um, what changed in V2? In V2, I address all the Dan's comments. > > Thanks, > Richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 2/2] hyperv: Implement Time Synchronization using host time sample
On Wed, Oct 15, 2014 at 09:21:33AM +, Thomas Shao wrote: > > In V2, I address all the Dan's comments. It is customary to detail the changes in each patch series revision, in order to make things easier for the reviewers. Thanks, Richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH v2 2/2] hyperv: Implement Time Synchronization using host time sample
> -Original Message- > From: Richard Cochran [mailto:richardcoch...@gmail.com] > Sent: Wednesday, October 15, 2014 5:43 PM > To: Thomas Shao > Cc: t...@linutronix.de; gre...@linuxfoundation.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com; KY Srinivasan > Subject: Re: [PATCH v2 2/2] hyperv: Implement Time Synchronization using > host time sample > > On Wed, Oct 15, 2014 at 09:21:33AM +, Thomas Shao wrote: > > > > In V2, I address all the Dan's comments. > > It is customary to detail the changes in each patch series revision, in order > to > make things easier for the reviewers. > OK. Thanks for pointing that out, Richard. > Thanks, > Richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] bcm/CmHost.c: Fix noisy compile warnings
The Beceem WIMAX was generating compile warnings on 64bit machines, which were: drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (struct bcm_connect_mgr_params *) ntohl( ^ drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (struct bcm_connect_mgr_params *) ntohl( ^ drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (struct bcm_connect_mgr_params *) ntohl( This resolves the issue by generating 64bit friendly code. Signed-off-by: Jeff Kirsher --- drivers/staging/bcm/CmHost.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index adca0ce..29fa05d 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -1499,9 +1499,15 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, } /* this can't possibly be right */ +#ifdef CONFIG_32BIT pstAddIndication->psfAuthorizedSet = (struct bcm_connect_mgr_params *) ntohl( (ULONG)pstAddIndication->psfAuthorizedSet); +#else + pstAddIndication->psfAuthorizedSet = + (struct bcm_connect_mgr_params *)(u64)ntohl( + (ULONG)pstAddIndication->psfAuthorizedSet); +#endif if (pstAddIndicationAlt->u8Type == DSA_REQ) { struct bcm_add_request AddRequest; @@ -1542,9 +1548,15 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, return 0; } +#ifdef CONFIG_32BIT pstAddIndication->psfAdmittedSet = (struct bcm_connect_mgr_params *) ntohl( (ULONG) pstAddIndication->psfAdmittedSet); +#else + pstAddIndication->psfAdmittedSet = + (struct bcm_connect_mgr_params *)(u64)ntohl( + (ULONG) pstAddIndication->psfAdmittedSet); +#endif /* ACTIVE SET */ pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *) @@ -1560,9 +1572,15 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, return 0; } +#ifdef CONFIG_32BIT pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *) ntohl( (ULONG)pstAddIndication->psfActiveSet); +#else + pstAddIndication->psfActiveSet = + (struct bcm_connect_mgr_params *)(u64)ntohl( + (ULONG)pstAddIndication->psfActiveSet); +#endif (*puBufferLength) = sizeof(struct bcm_add_indication); *(struct bcm_add_indication *)pvBuffer = *pstAddIndication; -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 05:26 -0700, Jeff Kirsher wrote: > The Beceem WIMAX was generating compile warnings on 64bit machines, > which were: > > drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: > drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( >^ [] > diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c [] > @@ -1499,9 +1499,15 @@ ULONG StoreCmControlResponseMessage(struct > bcm_mini_adapter *Adapter, > } > > /* this can't possibly be right */ > +#ifdef CONFIG_32BIT > pstAddIndication->psfAuthorizedSet = > (struct bcm_connect_mgr_params *) ntohl( > (ULONG)pstAddIndication->psfAuthorizedSet); > +#else > + pstAddIndication->psfAuthorizedSet = > + (struct bcm_connect_mgr_params *)(u64)ntohl( > + (ULONG)pstAddIndication->psfAuthorizedSet); > +#endif no ifdefs necessary (void *)(unsigned long) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, Oct 15, 2014 at 05:26:39AM -0700, Jeff Kirsher wrote: > The Beceem WIMAX was generating compile warnings on 64bit machines, > which were: > > drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: > drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( >^ > drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( >^ > drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( > > This resolves the issue by generating 64bit friendly code. > As far as I can tell this isn't a bugfix, it just hides a real 64 bit bug. Let's leave the bug how it is so it's easy to see from a long way away. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
Or we could fix it but add a multi-line comment with lots of capital letters and exclamation marks. I guess we would need to make a function since this cast is in several places. void *silence_buggy_casting(u32 pointer) { /* * DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! * FIXME!!! We know this cast is totally buggy. The BCM driver * doesn't work on 64 bits. But no one knows how to make this * work. Oh well. Let's silence the GCC warning. * DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! * */ return (void *)(long)pointer; } Something really ugly and gnarly like that would be hard to ignore. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 15:59 +0300, Dan Carpenter wrote: > Or we could fix it but add a multi-line comment with lots of capital > letters and exclamation marks. I guess we would need to make a > function > since this cast is in several places. > > void *silence_buggy_casting(u32 pointer) > { > /* > * DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! > * FIXME!!! We know this cast is totally buggy. The BCM > driver > * doesn't work on 64 bits. But no one knows how to make this > * work. Oh well. Let's silence the GCC warning. > * DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! > * > */ > return (void *)(long)pointer; > } > > Something really ugly and gnarly like that would be hard to ignore. I thought I remember Greg saying something about getting rid of this driver anyway, but I could be wrong. If Greg decides to keep this driver around, then I think we should something like your suggestion above. signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 06:03 -0700, Jeff Kirsher wrote: [] > I thought I remember Greg saying something about getting rid of this > driver anyway, but I could be wrong. If Greg decides to keep this > driver around, then I think we should something like your suggestion > above. Or maybe just make the Kconfig depend on X86_32 --- drivers/staging/bcm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig index 8acf4b2..fa5a3a4 100644 --- a/drivers/staging/bcm/Kconfig +++ b/drivers/staging/bcm/Kconfig @@ -1,6 +1,6 @@ config BCM_WIMAX tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" - depends on USB && NET + depends on USB && NET && X86_32 help This is an experimental driver for the Beceem WIMAX chipset used by Sprint 4G. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 09:11 -0700, Joe Perches wrote: > On Wed, 2014-10-15 at 06:03 -0700, Jeff Kirsher wrote: > [] > > I thought I remember Greg saying something about getting rid of this > > driver anyway, but I could be wrong. If Greg decides to keep this > > driver around, then I think we should something like your suggestion > > above. > > Or maybe just make the Kconfig depend on X86_32 I like the idea, but won't this exclude other 32 bit systems like MIPS and I am sure there might be others. I could assume that Beceem WIMAX was intended for x86 arch's that are 32 bit only, which may be a safe bet. The only thing we know for sure is that is broken on 64bit. > --- > drivers/staging/bcm/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig > index 8acf4b2..fa5a3a4 100644 > --- a/drivers/staging/bcm/Kconfig > +++ b/drivers/staging/bcm/Kconfig > @@ -1,6 +1,6 @@ > config BCM_WIMAX > tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" > - depends on USB && NET > + depends on USB && NET && X86_32 > help > This is an experimental driver for the Beceem WIMAX chipset used >by Sprint 4G. > > signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, Oct 15, 2014 at 2:42 PM, Jeff Kirsher wrote: > I like the idea, but won't this exclude other 32 bit systems like MIPS > and I am sure there might be others. I could assume that Beceem WIMAX > was intended for x86 arch's that are 32 bit only, which may be a safe > bet. The only thing we know for sure is that is broken on 64bit. What about this? diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig index 8acf4b2..fa5a3a4 100644 --- a/drivers/staging/bcm/Kconfig +++ b/drivers/staging/bcm/Kconfig @@ -1,6 +1,6 @@ config BCM_WIMAX tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" - depends on USB && NET + depends on USB && NET && !64BIT help This is an experimental driver for the Beceem WIMAX chipset used by Sprint 4G. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 15:24 -0300, Fabio Estevam wrote: > On Wed, Oct 15, 2014 at 2:42 PM, Jeff Kirsher > wrote: > > > I like the idea, but won't this exclude other 32 bit systems like MIPS > > and I am sure there might be others. I could assume that Beceem WIMAX > > was intended for x86 arch's that are 32 bit only, which may be a safe > > bet. The only thing we know for sure is that is broken on 64bit. > > What about this? That works for me. I am putting together a v2 patch now, since you came up with the change, I will put you as the author Fabio, ok? > > diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig > index 8acf4b2..fa5a3a4 100644 > --- a/drivers/staging/bcm/Kconfig > +++ b/drivers/staging/bcm/Kconfig > @@ -1,6 +1,6 @@ > config BCM_WIMAX > tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" > - depends on USB && NET > + depends on USB && NET && !64BIT > help > This is an experimental driver for the Beceem WIMAX chipset used > by Sprint 4G. signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, Oct 15, 2014 at 3:54 PM, Jeff Kirsher wrote: > On Wed, 2014-10-15 at 15:24 -0300, Fabio Estevam wrote: >> On Wed, Oct 15, 2014 at 2:42 PM, Jeff Kirsher >> wrote: >> >> > I like the idea, but won't this exclude other 32 bit systems like MIPS >> > and I am sure there might be others. I could assume that Beceem WIMAX >> > was intended for x86 arch's that are 32 bit only, which may be a safe >> > bet. The only thing we know for sure is that is broken on 64bit. >> >> What about this? > > That works for me. I am putting together a v2 patch now, since you came > up with the change, I will put you as the author Fabio, ok? That's OK, Jeff. Please use: Fabio Estevam Thanks ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
From: Fabio Estevam The Beceem WIMAX was generating compile warnings on 64bit machines, which were: drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (struct bcm_connect_mgr_params *) ntohl( ^ drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (struct bcm_connect_mgr_params *) ntohl( ^ drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (struct bcm_connect_mgr_params *) ntohl( This resolves the issue by preventing the driver to compile if CONFIG_64BIT is enabled, since the driver is known to be broken for 64 bit arch's. CC: Dan Carpenter CC: Joe Perches Signed-off-by: Fabio Estevam Signed-off-by: Jeff Kirsher --- v2: change fix from using typecast u64 in the code to altering Kconfig to prevent the driver from compiling on 64 bit arch's based on feedback drivers/staging/bcm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig index 8acf4b2..273b328 100644 --- a/drivers/staging/bcm/Kconfig +++ b/drivers/staging/bcm/Kconfig @@ -1,6 +1,6 @@ config BCM_WIMAX tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" - depends on USB && NET + depends on USB && NET && !64BIT help This is an experimental driver for the Beceem WIMAX chipset used by Sprint 4G. -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 11:54 -0700, Jeff Kirsher wrote: > On Wed, 2014-10-15 at 15:24 -0300, Fabio Estevam wrote: > > On Wed, Oct 15, 2014 at 2:42 PM, Jeff Kirsher > > wrote: > > > > > I like the idea, but won't this exclude other 32 bit systems like MIPS > > > and I am sure there might be others. I could assume that Beceem WIMAX > > > was intended for x86 arch's that are 32 bit only, which may be a safe > > > bet. The only thing we know for sure is that is broken on 64bit. > > > > What about this? > > That works for me. I am putting together a v2 patch now, since you came > up with the change, I will put you as the author Fabio, ok? Good idea. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, Oct 15, 2014 at 09:11:36AM -0700, Joe Perches wrote: > On Wed, 2014-10-15 at 06:03 -0700, Jeff Kirsher wrote: > [] > > I thought I remember Greg saying something about getting rid of this > > driver anyway, but I could be wrong. If Greg decides to keep this > > driver around, then I think we should something like your suggestion > > above. > > Or maybe just make the Kconfig depend on X86_32 What I like about your patches is that they are pure theoretical work and I don't have to think about them like regular proper patches with a signed off by etc. All the fun, none of the responsibility. > config BCM_WIMAX > tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" > - depends on USB && NET > + depends on USB && NET && X86_32 And also COMPILE_TEST. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
On Wed, Oct 15, 2014 at 12:01:41PM -0700, Jeff Kirsher wrote: > From: Fabio Estevam > > The Beceem WIMAX was generating compile warnings on 64bit machines, > which were: > > drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: > drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( >^ > drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( >^ > drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( > > This resolves the issue by preventing the driver to compile if CONFIG_64BIT > is enabled, since the driver is known to be broken for 64 bit arch's. > Oops. Someone turned a Joe patch into a real patch. Please enable COMPILE_TEST for this. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 22:53 +0300, Dan Carpenter wrote: > On Wed, Oct 15, 2014 at 09:11:36AM -0700, Joe Perches wrote: > > On Wed, 2014-10-15 at 06:03 -0700, Jeff Kirsher wrote: > > [] > > > I thought I remember Greg saying something about getting rid of this > > > driver anyway, but I could be wrong. If Greg decides to keep this > > > driver around, then I think we should something like your suggestion > > > above. > > > > Or maybe just make the Kconfig depend on X86_32 > > What I like about your patches is that they are pure theoretical work > and I don't have to think about them like regular proper patches with a > signed off by etc. All the fun, none of the responsibility. I've sent a lot of signed-off patches. These are simple suggestions. I think COMPILE_TEST isn't useful here. I doubt very much beceem has been tested on anything other than an x86_32 board. I once spent a few hours fixing up a bunch of defects in this directory a few years ago. Now I will not submit any more patches for cmhost or anything else in that directory. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 22:55 +0300, Dan Carpenter wrote: > On Wed, Oct 15, 2014 at 12:01:41PM -0700, Jeff Kirsher wrote: > > From: Fabio Estevam > > > > The Beceem WIMAX was generating compile warnings on 64bit machines, > > which were: > > > > drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: > > drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer > > of different size [-Wint-to-pointer-cast] > >(struct bcm_connect_mgr_params *) ntohl( > >^ > > drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer > > of different size [-Wint-to-pointer-cast] > >(struct bcm_connect_mgr_params *) ntohl( > >^ > > drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer > > of different size [-Wint-to-pointer-cast] > >(struct bcm_connect_mgr_params *) ntohl( > > > > This resolves the issue by preventing the driver to compile if CONFIG_64BIT > > is enabled, since the driver is known to be broken for 64 bit arch's. > > > > Oops. Someone turned a Joe patch into a real patch. Please enable > COMPILE_TEST for this. I agree with Joe, that COMPILE_TEST is not useful for this driver. > > regards, > dan carpenter > signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: comedi: ii_pci20kc: add CONFIG_HAS_IOMEM dependence
ii_pci20kc uses io memory which makes it not compilable on architectures without HAS_IOMEM such as UML: CC drivers/net/wireless/ti/wl1251/main.o drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’: drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] dev->mmio = ioremap(membase, II20K_SIZE); ^ drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment makes pointer from integer without a cast dev->mmio = ioremap(membase, II20K_SIZE); ^ drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’: drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(dev->mmio); ^ Signed-off-by: David Cohen --- drivers/staging/comedi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index a8bc2b567789..56be2112c731 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -425,6 +425,7 @@ config COMEDI_AIO_IIRO_16 called aio_iiro_16. config COMEDI_II_PCI20KC + depends on HAS_IOMEM tristate "Intelligent Instruments PCI-20001C carrier support" ---help--- Enable support for Intelligent Instruments PCI-20001C carrier -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On 15-10-2014 06:03:33, Jeff Kirsher wrote: > > I thought I remember Greg saying something about getting rid of this > driver anyway, but I could be wrong. If Greg decides to keep this > driver around, then I think we should something like your suggestion > above. Let me throw in my comment here: Yes, Greg stated in several places that this whole driver should be removed. I was about to ask when this will happen, so let me add a suggestion: Lets delete this _now_!!1!1! If you care, I can search the statements where Greg stated that this should be removed, but I guess this some effort... I can barely remember that one time was on the linuxnewbies ML and one or two times here. -- Mit freundlichen Grüßen, Kind regards, Matthias Beyer Proudly sent with mutt. Happily signed with gnupg. pgpDoaPTkE6mR.pgp Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: ii_pci20kc: add CONFIG_HAS_IOMEM dependence
On 15/10/14 22:25, David Cohen wrote: ii_pci20kc uses io memory which makes it not compilable on architectures without HAS_IOMEM such as UML: CC drivers/net/wireless/ti/wl1251/main.o drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’: drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] dev->mmio = ioremap(membase, II20K_SIZE); ^ drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment makes pointer from integer without a cast dev->mmio = ioremap(membase, II20K_SIZE); ^ drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’: drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(dev->mmio); ^ Signed-off-by: David Cohen --- drivers/staging/comedi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index a8bc2b567789..56be2112c731 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -425,6 +425,7 @@ config COMEDI_AIO_IIRO_16 called aio_iiro_16. config COMEDI_II_PCI20KC + depends on HAS_IOMEM tristate "Intelligent Instruments PCI-20001C carrier support" ---help--- Enable support for Intelligent Instruments PCI-20001C carrier The same fix was already submitted by Chen Gang: https://lkml.org/lkml/2014/10/2/318 Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: ii_pci20kc: add CONFIG_HAS_IOMEM dependence
On Wed, Oct 15, 2014 at 10:57:00PM +0100, Ian Abbott wrote: > On 15/10/14 22:25, David Cohen wrote: > >ii_pci20kc uses io memory which makes it not compilable on architectures > >without HAS_IOMEM such as UML: > > > > CC drivers/net/wireless/ti/wl1251/main.o > >drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’: > >drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit > >declaration of function ‘ioremap’ > >[-Werror=implicit-function-declaration] > > dev->mmio = ioremap(membase, II20K_SIZE); > > ^ > >drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment > >makes pointer from integer without a cast > > dev->mmio = ioremap(membase, II20K_SIZE); > > ^ > >drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’: > >drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit > >declaration of function ‘iounmap’ > >[-Werror=implicit-function-declaration] > >iounmap(dev->mmio); > >^ > > > >Signed-off-by: David Cohen > >--- > > drivers/staging/comedi/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > > > >diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig > >index a8bc2b567789..56be2112c731 100644 > >--- a/drivers/staging/comedi/Kconfig > >+++ b/drivers/staging/comedi/Kconfig > >@@ -425,6 +425,7 @@ config COMEDI_AIO_IIRO_16 > > called aio_iiro_16. > > > > config COMEDI_II_PCI20KC > >+depends on HAS_IOMEM > > tristate "Intelligent Instruments PCI-20001C carrier support" > > ---help--- > > Enable support for Intelligent Instruments PCI-20001C carrier > > > > The same fix was already submitted by Chen Gang: > > https://lkml.org/lkml/2014/10/2/318 Thanks. I sent this patch based on today's linux-next's "make ARCH=um allyesconfig". But nevermind if it was already sent. Br, David > > Reviewed-by: Ian Abbott > > -- > -=( Ian Abbott @ MEV Ltd.E-mail: )=- > -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 23:41 +0200, Matthias Beyer wrote: > On 15-10-2014 06:03:33, Jeff Kirsher wrote: > > > > I thought I remember Greg saying something about getting rid of this > > driver anyway, but I could be wrong. If Greg decides to keep this > > driver around, then I think we should something like your suggestion > > above. > > Let me throw in my comment here: Yes, Greg stated in several places > that this whole driver should be removed. I was about to ask when this > will happen, so let me add a suggestion: > > Lets delete this _now_!!1!1! > > If you care, I can search the statements where Greg stated that this > should be removed, but I guess this some effort... I can barely > remember that one time was on the linuxnewbies ML and one or two times > here. No need to dig up where and when Greg stated that it should be removed, I was pretty sure he mentioned it on several lists. I think the most recent was on the linuxnewbies ML. I will just go ahead and create a patch to remove the driver. Greg can then decide to either accept the patch to fix the Kconfig or accept the patch to remove the driver. signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On 15-10-2014 15:19:44, Jeff Kirsher wrote: > I will just go ahead and create a patch to remove the driver. Greg can > then decide to either accept the patch to fix the Kconfig or accept the > patch to remove the driver. Don't forget the maintainers file :-) -- Mit freundlichen Grüßen, Kind regards, Matthias Beyer Proudly sent with mutt. Happily signed with gnupg. pgpofqv10LZdl.pgp Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] bcm/CmHost.c: Fix noisy compile warnings
On Thu, 2014-10-16 at 00:24 +0200, Matthias Beyer wrote: > On 15-10-2014 15:19:44, Jeff Kirsher wrote: > > I will just go ahead and create a patch to remove the driver. Greg > can > > then decide to either accept the patch to fix the Kconfig or accept > the > > patch to remove the driver. > > Don't forget the maintainers file :-) Yep, got it. Thanks for the reminder. signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] bcm/CmHost.c: Fix noisy compile warnings
On Wed, 2014-10-15 at 12:01 -0700, Jeff Kirsher wrote: > From: Fabio Estevam > > The Beceem WIMAX was generating compile warnings on 64bit machines, > which were: > > drivers/staging/bcm/CmHost.c: In function ‘StoreCmControlResponseMessage’: > drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( >^ > drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( >^ > drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of > different size [-Wint-to-pointer-cast] >(struct bcm_connect_mgr_params *) ntohl( > > This resolves the issue by preventing the driver to compile if CONFIG_64BIT > is enabled, since the driver is known to be broken for 64 bit arch's. > > CC: Dan Carpenter > CC: Joe Perches > Signed-off-by: Fabio Estevam > Signed-off-by: Jeff Kirsher Greg- I have also submitted a patch to remove this driver entirely. So if you choose to apply the patch to remove the driver, then you can disregard this patch. > --- > v2: change fix from using typecast u64 in the code to altering Kconfig to > prevent the driver from compiling on 64 bit arch's based on feedback > > drivers/staging/bcm/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/bcm/Kconfig b/drivers/staging/bcm/Kconfig > index 8acf4b2..273b328 100644 > --- a/drivers/staging/bcm/Kconfig > +++ b/drivers/staging/bcm/Kconfig > @@ -1,6 +1,6 @@ > config BCM_WIMAX > tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support" > - depends on USB && NET > + depends on USB && NET && !64BIT > help > This is an experimental driver for the Beceem WIMAX chipset used >by Sprint 4G. signature.asc Description: This is a digitally signed message part ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] drivers: staging: imx-drm Fix checkpatch warning
Fix line over 80 characters in imx-tve.c Signed-off-by: Gaston Gonzalez --- drivers/staging/imx-drm/imx-tve.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c index 3e8b0a1..a46905f 100644 --- a/drivers/staging/imx-drm/imx-tve.c +++ b/drivers/staging/imx-drm/imx-tve.c @@ -665,7 +665,8 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data) ret = regmap_read(tve->regmap, TVE_COM_CONF_REG, &val); if (ret < 0) { - dev_err(dev, "failed to read configuration register: %d\n", ret); + dev_err(dev, "failed to read configuration register: %d\n", + ret); return ret; } if (val != 0x0010) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel