Re: [PATCH] staging/wilc: fix Kconfig dependencies, second try

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 16:54:23 Tony Cho wrote: > Hi Arnd Bergmann, > > When I apply this patch, I cannot make WILC1000 module (wilc1000.ko) because > CONFIG_WILC1000 is y and also I can see some link errors for the cfg80211 > APIs. > > Can you consider this patch? Ah,

Re: [PATCH] staging/wilc: fix Kconfig dependencies, second try

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 11:39:31 Arnd Bergmann wrote: > On Monday 19 October 2015 16:54:23 Tony Cho wrote: > > Hi Arnd Bergmann, > > > > When I apply this patch, I cannot make WILC1000 module (wilc1000.ko) > > because CONFIG_WILC1000 is y and also I can s

Re: [PATCH] staging/wilc: fix Kconfig dependencies, second try

2015-10-20 Thread Arnd Bergmann
On Monday 19 October 2015 11:53:40 Arnd Bergmann wrote: > On Monday 19 October 2015 11:39:31 Arnd Bergmann wrote: > > On Monday 19 October 2015 16:54:23 Tony Cho wrote: > > > Hi Arnd Bergmann, > > > > > > When I apply this patch, I cannot make WILC1000

[PATCH 06/19] staging/wilc1000: avoid static definitions in header

2015-10-20 Thread Arnd Bergmann
are also not needed here. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 84 +++ drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 83 -- 2 files changed, 84 insertions(+), 83 deletions(-) diff --git a/drivers/staging

[PATCH 05/19] staging/wilc1000: use NO_SECURITY instead of NO_ENCRYPT

2015-10-20 Thread Arnd Bergmann
first changes over the only other user. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 50477d70eb24..d3cc255cd91b 100644

[PATCH 01/19] staging/wilc1000: remove unused functions

2015-10-20 Thread Arnd Bergmann
A number of symbols in the wilc1000 driver are completely unused and can be removed. This includes two variables that are only written but not read. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/host_interface.c | 311 -- drivers/staging/wilc1000

[PATCH 15/19] staging/wilc1000: turn enable_irq/disable_irq into callbacks

2015-10-20 Thread Arnd Bergmann
wilc1000_ops. We also change arguments slightly to pass the device, as we are already touching those lines and the change will be needed later to remove the global variables. The linux_wlan_sdio.h file is now unused and gets deleted. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c

[PATCH 10/19] staging/wilc1000: unify device pointer

2015-10-20 Thread Arnd Bergmann
struct wilc has two pointers to store the device, one for sdio_func and one for spi_device. By changing the pointer to a 'struct device', we can simplify the logic and avoid a few #ifdefs. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c

[PATCH 00/19] staging/wilc1000 cleanups

2015-10-20 Thread Arnd Bergmann
and sdio backends into separate drivers that can be built independent of one another. The last patch is more experimental than the others, hence the [RFC] annotation. Please review and test. Arnd Arnd Bergmann (19): staging/wilc1000: remove unused functions staging/wilc1000: make

[PATCH 07/19] staging/wilc1000: remove linux_wlan_{device_power, device_detection}

2015-10-20 Thread Arnd Bergmann
cribe the respective hardware specifics using device tree or platform data and make the driver handle this is a more general way. This removes the empty stubs. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 62 --- 1 file changed, 62 dele

[PATCH 08/19] staging/wilc1000: move wilc_wlan_inp_t into struct wilc

2015-10-20 Thread Arnd Bergmann
wilc_wlan_inp_t is an unnecessary indirection and requires linux_wlan.c to have knowledge of the specific sdio and spi front-ends. This removes the structure and places the members with a constant 'struct wilc1000_ops' pointer inside of 'struct wilc'. Signed-off-by: Arnd Be

[PATCH 19/19] [RFC] staging/wilc1000: use more regular probing

2015-10-20 Thread Arnd Bergmann
i_dev variables in favor of retrieving them from the wilc1000_dev variable that will eventually get passed through all functions instead of using a global. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 30 drivers/staging/wilc1000/linux_wlan_sdio.c

[PATCH 17/19] staging/wilc1000: pass hif operations through initialization

2015-10-20 Thread Arnd Bergmann
separate modules. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 4 ++- drivers/staging/wilc1000/linux_wlan_sdio.c| 3 ++- drivers/staging/wilc1000/linux_wlan_spi.c | 3 ++- drivers/staging/wilc1000/wilc_sdio.c | 35

[PATCH 04/19] staging/wilc1000: move extern declarations to headers

2015-10-20 Thread Arnd Bergmann
'extern' declarations belong into a header file rather than a .c file, to ensure that the definition matches the declaration. This moves all declarations into a header file that seems most appropriate for it. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/host_i

[PATCH 14/19] staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO

2015-10-20 Thread Arnd Bergmann
. All other locations that check for the interrupt method are turned into runtime checks based on the gpio number (>=0) or the interrupt number (>0). Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/Makefile | 1 - drivers/staging/wilc1000/linux_wlan.c

[PATCH 18/19] staging/wilc1000: split out bus specific modules

2015-10-20 Thread Arnd Bergmann
The SPI and SDIO specific code is now separate enough that we just need to restructure the Makefile and Kconfig logic a bit and export a couple of symbols from the common module to have separate bus glue drivers. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/Kconfig | 66

[PATCH 02/19] staging/wilc1000: make symbols static if possible

2015-10-20 Thread Arnd Bergmann
All symbols that are only referenced in the file that defines them can be declared 'static' to avoid namespace pollution, to produce better object code, and to make the source more readable. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/Makefile | 3 +

[PATCH 16/19] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros

2015-10-20 Thread Arnd Bergmann
The last remaining user of WILC_SDIO macro checks for the correct time to wait in an interrupt for the PLL to settle. We can replace this with a runtime check and remove both WILC_SDIO and WILC_SPI, as we no longer need conditional compilation based on the hardware type. Signed-off-by: Arnd

[PATCH 12/19] staging/wilc1000: use device pointer for phy creation

2015-10-20 Thread Arnd Bergmann
wilc_create_wiphy tries to get a pointer to a device from the global wilc1000_sdio_func variable. This is a layering violation and we can use the wilc1000_dev->dev pointer instead. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/stag

[PATCH 13/19] staging/wilc1000: move COMPLEMENT_BOOT code to linux_wlan_sdio.c

2015-10-20 Thread Arnd Bergmann
The COMPLEMENT_BOOT code is used only for SDIO and is aware of details of the SDIO implementation that don't belong into the common linux_wlan.c file. This moves the functions to linux_wlan_sdio.c to get them out of the way. Signed-off-by: Arnd Bergmann --- drivers/staging/wil

[PATCH 09/19] staging/wilc1000: move init/exit functions to driver files

2015-10-20 Thread Arnd Bergmann
The driver interfaces are in linux_wlan_sdio.c and linux_wlan_spi.c, so this is where the init and exit functions should be. Splitting this up enables further cleanups, including eventually allowing both modules to be built together. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000

[PATCH 11/19] staging/wilc1000: move wilc1000_ops to drivers

2015-10-20 Thread Arnd Bergmann
The two instances of struct wilc1000_ops reference functions that are defined in just one file each. By moving the operations there, we can mark all those functions as 'static' and avoid a number of #ifdefs. Signed-off-by: Arnd Bergmann --- drivers/staging/wilc1000/linux_wlan.c

Re: [PATCH 00/19] staging/wilc1000 cleanups

2015-10-21 Thread Arnd Bergmann
On Wednesday 21 October 2015 19:06:52 glen lee wrote: > Hi arnd, > > Thanks for the all the patches. > About the patch ( use proper naming for global symbols ), > We are planning to use this driver not only for wilc1000 but also for > other atmel wireless driver. I'd appreciate if you could use w

[PATCH] fixup! staging/wilc1000: split out bus specific modules

2015-10-21 Thread Arnd Bergmann
The patch to split out bus modules causes new valid build warnings without this. Signed-off-by: Arnd Bergmann diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 8a5f4673c5d0..fe3b464f0d5c 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b

Re: [Outreachy kernel] [PATCH 0/2] Staging: lustre: Remove unused functions

2015-10-22 Thread Arnd Bergmann
On Thursday 22 October 2015 14:50:18 Shraddha Barke wrote: > These patches remove the definitions of functions which are not used. > > Shraddha Barke (2): > Staging: lustre: ptlrpc: Remove unused functions > Staging: lustre: obdclass: Remove unused functions > > .../lustre/lustre/obdclass/lp

Re: [Outreachy kernel] [PATCH 0/2] Staging: lustre: Remove unused functions

2015-10-22 Thread Arnd Bergmann
On Thursday 22 October 2015 15:16:39 Shraddha Barke wrote: > On Thu, 22 Oct 2015, Arnd Bergmann wrote: > > > On Thursday 22 October 2015 14:50:18 Shraddha Barke wrote: > >> These patches remove the definitions of functions which are not used. > >> > >> Shr

Re: [Outreachy kernel] [PATCH 0/2] Staging: lustre: Remove unused functions

2015-10-22 Thread Arnd Bergmann
On Thursday 22 October 2015 16:59:01 Shraddha Barke wrote: > On Thu, 22 Oct 2015, Arnd Bergmann wrote: > > > On Thursday 22 October 2015 15:16:39 Shraddha Barke wrote: > >> On Thu, 22 Oct 2015, Arnd Bergmann wrote: > >> > >>> On Thursday 22 October 2015 1

Re: [PATCH 00/19] staging/wilc1000 cleanups

2015-10-22 Thread Arnd Bergmann
On Wednesday 21 October 2015 19:06:52 glen lee wrote: > Hi arnd, > > Thanks for the all the patches. > About the patch ( use proper naming for global symbols ), > We are planning to use this driver not only for wilc1000 but also for > other atmel wireless driver. I'd appreciate if you could use w

Re: [PATCH 00/19] staging/wilc1000 cleanups

2015-11-02 Thread Arnd Bergmann
On Friday 23 October 2015 16:51:13 Tony Cho wrote: > Hi Arnd, > First of all, I would like to say "thank you" for your efforts and > contributions. > We are updating the driver because new revision came up and making new > patches > to make it stable and elegant as Linux driver. In these days, we

Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings

2013-11-20 Thread Arnd Bergmann
On Friday 15 November 2013, Stephen Warren wrote: > This series implements a common reset framework driver for Tegra, and > updates all relevant Tegra drivers to use it. It also removes the custom > DMA bindings and replaced them with the standard DMA DT bindings. The series is rather long, so I m

Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings

2013-11-20 Thread Arnd Bergmann
On Wednesday 20 November 2013, Stephen Warren wrote: > > +- #iommu-cells : Must be <1>. This dictates the length of DMA specifiers in > > + client nodes' dmas properties. The specifier represents the DMA request > > + select value for the peripheral. For more details, consult the Tegra > > TRM's

[PATCH, RFC 00/30] sleep_on removal

2014-01-02 Thread Arnd Bergmann
carefully. I'm definitely happy for any patches to go into maintainer trees right away. Obviously the final patch cannot go in until everything else gets merged first and I suspect there will be a series of patches for maintainerless drivers that will go along with it. Arnd Ar

[PATCH, RFC 09/30] staging: serqt_usb2: don't use sleep_on

2014-01-02 Thread Arnd Bergmann
avoid a small race. Both call sites still look fishy and need more work. Signed-off-by: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: de...@driverdev.osuosl.org Cc: Bill Pemberton --- drivers/staging/serqt_usb2/serqt_usb2.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff

[PATCH, RFC 10/30] staging: gdm72xx: fix interruptible_sleep_on race

2014-01-02 Thread Arnd Bergmann
interruptible_sleep_on is racy and going away. This replaces the use in the gdm72xx driver with the appropriate wait_event_interruptible_lock_irq. Signed-off-by: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: de...@driverdev.osuosl.org --- drivers/staging/gdm72xx/gdm_usb.c | 5 +++-- 1 file changed

[PATCH, RFC 11/30] staging: panel: fix interruptible_sleep_on race

2014-01-02 Thread Arnd Bergmann
interruptible_sleep_on is racy and going away. This replaces the one caller in the panel driver with the appropriate wait_event_interruptible variant. Signed-off-by: Arnd Bergmann Cc: de...@driverdev.osuosl.org Cc: Willy Tarreau Cc: Greg Kroah-Hartman --- drivers/staging/panel/panel.c | 4

[PATCH] mmc: rtsx: usb backend needs LED support

2014-04-29 Thread Arnd Bergmann
[hijacking the thread since it has the right Cc list already, sorry] I stumbled over this doing randconfig builds on linux-next 8<-- >From c11f54f1e5ea0557e076867ca31c90bcb20e3e0c Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 29 Apr 2014 11:41:40 +0200 Subject: [PATC

Re: [PATCH] mmc: rtsx: usb backend needs LED support

2014-04-29 Thread Arnd Bergmann
On Tuesday 29 April 2014 13:05:15 Ulf Hansson wrote: > On 29 April 2014 11:45, Arnd Bergmann wrote: > > drivers/built-in.o: In function `rtsx_usb_sdmmc_drv_remove': > > :(.text+0x806480): undefined reference to `led_classdev_unregister' > >

Re: [PATCH] mmc: rtsx: usb backend needs LED support

2014-04-30 Thread Arnd Bergmann
x_usb_sdmmc.c:(.text+0x2a197e): undefined reference to > `led_classdev_register' > > Fix by excluding such condition when defining macro RTSX_USB_USE_LEDS_CLASS. > > Signed-off-by: Roger Tseng Yes, that should work, too. Acked-by: Arnd Bergmann > --- > drivers/mmc/host

Re: [PATCH] mmc: rtsx: usb backend needs LED support

2014-05-08 Thread Arnd Bergmann
On Thursday 08 May 2014 16:08:15 Roger wrote: > > Would this patch be merged into linux-next or Lee's mfd.git > ib-mfd-mmc-memstick-3.16 branch? It should get merged into whatever tree holds the existing patches, yes > By the way, should I resend my version? Actually I found another issue with

[PATCH v2] mmc: rtsx: fix possible linking error if built-in

2014-05-08 Thread Arnd Bergmann
S_CLASS. Signed-off-by: Roger Tseng Signed-off-by: Arnd Bergmann Acked-by: Ulf Hansson --- v2 by Arnd: change the second #ifdef as well. diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index e11fafa..5d3766e 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c ++

[PATCH 1/5] staging: lirc: remove sa1100 support

2014-06-05 Thread Arnd Bergmann
The LIRC support for sa1100 appears to have never worked because it relies on header files that have never been present in git history. Actually trying to build the driver on an ARM sa1100 kernel fails, so let's just remove the broken support. Signed-off-by: Arnd Bergmann Cc: Jarod Wilso

[PATCH 3/5] staging: sn9c102 depends on USB

2014-06-05 Thread Arnd Bergmann
If the USB code is a loadable module, this driver cannot be built-in. This adds an explicit dependency on CONFIG_USB so that Kconfig can force sn9c102 to be a module in this case. Signed-off-by: Arnd Bergmann Cc: Luca Risolia Cc: Mauro Carvalho Chehab Cc: linux-me...@vger.kernel.org Cc: linux

[PATCH 5/5] staging: rtl8712, rtl8712: avoid lots of build warnings

2014-06-05 Thread Arnd Bergmann
static but declared in inline function 'ieee80211_get_hdrlen' which is not static [enabled by default] This changes the driver to use 'static inline' instead, which happens to be the correct annotation anyway. Signed-off-by: Arnd Bergmann Cc: Larry Finger Cc: Florian Schilhab

[PATCH 2/5] staging/iio: IIO_SIMPLE_DUMMY_BUFFER neds IIO_BUFFER

2014-06-05 Thread Arnd Bergmann
An obviously missing 'select' statement, without this we get a link error Signed-off-by: Arnd Bergmann Cc: Jonathan Cameron Cc: linux-...@vger.kernel.org --- drivers/staging/iio/Kconfig | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio

[PATCH 4/5] staging: wlags49_h2: avoid PROFILE_ALL_BRANCHES warnings

2014-06-05 Thread Arnd Bergmann
ng the functions in question 'static inline' rather than 'extern inline'. Signed-off-by: Arnd Bergmann Cc: Henk de Groot --- drivers/staging/wlags49_h2/wl_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wlags49_h2/wl_inter

[PATCH 0/5] randconfig build fixes for staging

2014-06-05 Thread Arnd Bergmann
Hi Greg, Here are a couple of simple fixes from my backlog of ARM randconfig bugs. Nothing urgent, they can probably all go into next for 3.17 after the merge window, but see for yourself. Arnd Arnd Bergmann (5): staging: lirc: remove sa1100 support staging/iio

[PATCH] staging/lustre: disable virtual block device for 64K pages

2014-06-20 Thread Arnd Bergmann
The lustre virtual block device cannot handle 64K pages and fails at compile time. To avoid running into this error, let's disable the Kconfig option for this driver in cases it doesn't support. Reported-by: Dann Frazier Signed-off-by: Arnd Bergmann --- On Thursday 19 June 2014 12:

Re: [PATCH] staging: android: binder: move to the "real" part of the kernel

2014-10-20 Thread Arnd Bergmann
On Thursday 16 October 2014 14:47:41 Greg Kroah-Hartman wrote: > From: Greg Kroah-Hartman > > The Android binder code has been "stable" for many years now. No matter > what comes in the future, we are going to have to support this API, so > might as well move it to the "real" part of the kernel

Re: [PATCH] staging: android: binder: move to the "real" part of the kernel

2014-10-21 Thread Arnd Bergmann
On Tuesday 21 October 2014 12:36:22 Pavel Machek wrote: > On Fri 2014-10-17 01:12:21, Greg Kroah-Hartman wrote: > > On Thu, Oct 16, 2014 at 10:09:04AM -0700, John Stultz wrote: > > > On Thu, Oct 16, 2014 at 5:47 AM, Greg Kroah-Hartman > > > wrote: > > > > From: Greg Kroah-Hartman > > > > Are the

Re: [PATCH] staging: android: logger: fix kuid/uid in logger_entry

2014-10-30 Thread Arnd Bergmann
On Thursday 30 October 2014 10:23:31 Xiong Zhou wrote: > From: Xiong Zhou > > struct logger_entry can be returned to userspace via ioctl, > so it is wrong to have a kuid_t member, fixing it to uid_t. > This was introduced by commit bd471258f2, to pass uidguid > type checks : UIDGID_STRICT_TYPE_CH

[PATCH 05/37] staging/lustre: use 64-bit timestamps in procfs output

2015-09-23 Thread Arnd Bergmann
Some lustre procfs files contain the current time. Make sure we use a format here that does not overflow in 2038. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/osc/lproc_osc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging

[PATCH 14/37] staging/lustre: use 64-bit times for lnet_shuffle_seed

2015-09-23 Thread Arnd Bergmann
This function uses do_gettimeofday() to get a pseudo-random number. There is no bug here, but changing it to use ktime_get_ts64() gets us closer to deprecating do_gettimeofday() and makes slightly more random. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lnet/lnet/router.c

[PATCH 20/37] staging/lustre: use 64-bit time for adaptive timeout

2015-09-23 Thread Arnd Bergmann
The adaptive timeout handling stores absolute times in 32-bit time_t quantities, which will overflow in 2038. This changes it to use time64_t. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/lustre_import.h | 6 +++--- drivers/staging/lustre/lustre/obdclass

[PATCH 06/37] staging/lustre: use time64_t for l_last_activity

2015-09-23 Thread Arnd Bergmann
The l_last_activity struct member is used to keep track lock hold times, and it is printed for debugging purposes. For the elapsed time, we can use 'long' here, but it's better to use time64_t for storing the real time to avoid an overflow in 2038. Signed-off-by: Arnd Bergman

[PATCH 00/37] staging/lustre: y2038 rework

2015-09-23 Thread Arnd Bergmann
and x86 as well as 64-bit arm. Arnd Bergmann (37): staging/lustre: use jiffies for lp_last_query times staging/lustre: use 64-bit inode timestamps internally staging/lustre: obd: remove unused data structures staging/lustre: tracefile: use 64-bit seconds staging/lustre: use 64-bit timestamps

[PATCH 13/37] staging/lustre: use 64-bit ibn_incarnation computation

2015-09-23 Thread Arnd Bergmann
ibn_incarnation is a 64-bit value, but using timeval to compute it will cause an overflow in 2038. This changes it to use ktime_get_real_ts64() instead. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH 08/37] staging/lustre: change rq_at_index type

2015-09-23 Thread Arnd Bergmann
The rq_at_index member of ptlrpc_request is incorrectly declared as time_t, when it is only used as an index into an array, and assigned from a __u32 variable. This changes the type to u32, so we can kill off another use of time_t. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre

[PATCH 02/37] staging/lustre: use 64-bit inode timestamps internally

2015-09-23 Thread Arnd Bergmann
. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/cl_object.h| 6 +++--- drivers/staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 4 ++-- drivers/staging/lustre/lustre/llite/vvp_object.c | 12

[PATCH 03/37] staging/lustre: obd: remove unused data structures

2015-09-23 Thread Arnd Bergmann
We want to get rid of all uses of time_t, and it turns out that obd.h contains a bunch of them that are completely unused. This removes those structures, along with a couple of other structures and functions in the same file that also turned out to be unused. Signed-off-by: Arnd Bergmann

[PATCH 24/37] staging/lustre: use 64-bit time for selftest

2015-09-23 Thread Arnd Bergmann
The lustre selftest code has multiple time stamps that are kept as 'time_t' or 'unsigned long' and can therefore overflow on 32-bit systems. This changes the code to use time64_t instead. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lnet/selftest/brw_test.c

[PATCH 17/37] staging/lustre: use 64-bit time for pl_recalc

2015-09-23 Thread Arnd Bergmann
ebug prints. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/lustre_dlm.h | 4 +-- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 30 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lus

[PATCH 19/37] staging/lustre: use 64-bit time for procfs output

2015-09-23 Thread Arnd Bergmann
This time is only printed in procfs, and can be easily converted to 64-bit to avoid overflowing on 32-bit systems in 2038. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/lustre_import.h | 4 ++-- .../staging/lustre/lustre/obdclass/lprocfs_status.c | 19

[PATCH 25/37] staging/lustre: partially use time64_t for capa expiry

2015-09-23 Thread Arnd Bergmann
efore(), which should work as long as nothing tries to directly access lc_expiry. Signed-off-by: Arnd Bergmann --- .../staging/lustre/lustre/include/lustre/lustre_idl.h| 1 + drivers/staging/lustre/lustre/include/lustre_capa.h | 16 ++-- 2 files changed, 11 insertions(

[PATCH 37/37] staging/lustre: remove CFS_TIME_T definition

2015-09-23 Thread Arnd Bergmann
separately. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 1 - drivers/staging/lustre/lustre/mdc/mdc_reint.c | 3 +-- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 7 +++ drivers/staging/lustre/lustre/ptlrpc

[PATCH 31/37] staging/lustre: use 64-bit times for ptlrpc_sec

2015-09-23 Thread Arnd Bergmann
Here we use an unsigned long to store the timeout for gc, which is probably safe until 2106, but this patch converts it to use ktime_get_real_seconds() and time64_t for consistency. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +- drivers/staging

[PATCH 27/37] staging/lustre: use 64-bit times in debug print

2015-09-23 Thread Arnd Bergmann
This adapts the format string and get_seconds() call to not overflow in 2038 in the libcfs_debug_dumplog_internal() function. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/libcfs/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 15/37] staging/lustre: use 64-bit computation in s2dhms()

2015-09-23 Thread Arnd Bergmann
The s2dhms computes the day/hour/minute/second values from a time_t, which stops working in 2038. This changes the code to take a time64_t argument, and use div_u64_rem() to implement the first division. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/lprocfs_status.h | 6

[PATCH 01/37] staging/lustre: use jiffies for lp_last_query times

2015-09-23 Thread Arnd Bergmann
be reviewed by the folks that reviewed the original patch that introduced the unusual behavior and was itself a bug fix. Signed-off-by: Arnd Bergmann Fixes: af3fa7c71bf ("staging/lustre/lnet: peer aliveness status and NI status") Cc: Liang Zhen Cc: James Simmons Cc: Isaac Huang Cc: O

[PATCH 04/37] staging/lustre: tracefile: use 64-bit seconds

2015-09-23 Thread Arnd Bergmann
rectifies the situation by swapping out the types to have 64-bit seconds like everything else. While this constitutes an ABI change, it seems to be reasonable for a debugging interface to change and is likely what was originally intended. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre

[PATCH 36/37] staging/lustre: remove unused time handling functions

2015-09-23 Thread Arnd Bergmann
A bunch of API functions deal with time values but are now completely unused in lustre. This removes them in order to remove all references to time_t from the header files. Signed-off-by: Arnd Bergmann --- .../lustre/include/linux/libcfs/libcfs_time.h | 49

[PATCH 35/37] staging/lustre: remove wrappers for timer functions

2015-09-23 Thread Arnd Bergmann
that are defined in the same file. Signed-off-by: Arnd Bergmann --- .../staging/lustre/include/linux/libcfs/libcfs.h | 3 - .../lustre/include/linux/libcfs/libcfs_prim.h | 12 .../lustre/lustre/libcfs/linux/linux-prim.c| 64 -- drivers/staging/lustre

[PATCH 32/37] staging/lustre: use 64-bit times for exp_last_request_time

2015-09-23 Thread Arnd Bergmann
The last request time is stored as an 'unsigned long', which is good enough until 2106, but it is then converted to 'long' in some places, which overflows in 2038. This changes the type to time64_t to avoid those problems. Signed-off-by: Arnd Bergmann --- .../staging/l

[PATCH 28/37] staging/lustre: use 64-bit times in another debug print

2015-09-23 Thread Arnd Bergmann
The ll_setattr_raw() function prints the new inode timestamps along with the current time using '%lu', which overflows in 2106. This changes the printing of the current time for now, the other two will change when we migrate the VFS code to use 64-bit timestamps. Signed-off-by: Arn

[PATCH 07/37] staging/lustre: use ktime_t for calculating elapsed time

2015-09-23 Thread Arnd Bergmann
process_param2_config() tries to print how much time has passed across a call_usermodehelper() function, and uses struct timeval for that. We want to remove this structure, so this is better expressed in terms of ktime_t and ktime_us_delta(). Signed-off-by: Arnd Bergmann --- drivers/staging

[PATCH 26/37] staging/lustre: use 64-bit times in ptlrpc_enc_page_pool

2015-09-23 Thread Arnd Bergmann
ptlrpc_enc_page_pool computes time deltas using 'long' values from get_seconds(). This is probably safe beyond y2038, but it's better to go use monotonic times and 64-bit here for consistency. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/ptlrpc/

[PATCH 16/37] staging/lustre: use 64-bit timestamps for selftest

2015-09-23 Thread Arnd Bergmann
d-off-by: Arnd Bergmann --- drivers/staging/lustre/lnet/selftest/ping_test.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/ping_test.c b/drivers/staging/lustre/lnet/selftest/ping_test.c index 1dab9984c58e..3a342fded1ba 1

[PATCH 18/37] staging/lustre: use 64-bit time for obd eviction

2015-09-23 Thread Arnd Bergmann
The obd_eviction_timer will overflow in 2038 on 32-bit systems, so replace it with a 64-bit time and ktime_get_real_seconds(). Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/obd.h| 2 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 4 ++-- 2 files changed, 3

[PATCH 23/37] staging/lustre: use 64-bit time for ni_last_alive

2015-09-23 Thread Arnd Bergmann
The ni_last_alive member of lnet_ni uses a 'long' to store a timestamp, which breaks on 32-bit systems in 2038. This changes it to use time64_t and the respective functions for it. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/include/linux/lnet/lib-types.h | 2 +- drive

[PATCH 09/37] staging/lustre: avoid unnecessary timeval conversion

2015-09-23 Thread Arnd Bergmann
tween miliseconds, timeval and jiffies. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lnet/lnet/lib-eq.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c index f19ce9ae6a9a..8b843c5

[PATCH 29/37] staging/lustre: use 64-bit timestamps for mdc

2015-09-23 Thread Arnd Bergmann
These three are timestamps that are sent over the wire in mdc_lib and the obd logging 64-bit values, but are generated using the 32-bit get_seconds() function, which will eventually overflow. Changing them to use 64-bit ktime_get_real_seconds() solves the problem. Signed-off-by: Arnd Bergmann

[PATCH 30/37] staging/lustre: use 64-bit times for ptlrpc sec expiry

2015-09-23 Thread Arnd Bergmann
The exp_flvr_expire and imp_sec_expire are defined as 'unsigned long', which doesn't overflow until 2106, but to be on the safe side, this changes the code to use time64_t like we do everywhere else. Signed-off-by: Arnd Bergmann --- .../staging/lustre/lustre/include/lustre

[PATCH 33/37] staging/lustre: use 64-bit times for request times

2015-09-23 Thread Arnd Bergmann
re is used in performance critical setups on 32-bit architectures, so it seems better to optimize for correctness rather than speed here. Signed-off-by: Arnd Bergmann --- .../staging/lustre/lustre/include/lustre_import.h | 2 +- drivers/staging/lustre/lustre/include/lustre_net.h | 22 ++--- dr

[PATCH 11/37] staging/lustre: use 'long' return type for cfs_duration_sec()

2015-09-23 Thread Arnd Bergmann
eplace the time_t type with long as well. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/inc

[PATCH 34/37] staging/lustre: remove a bit of dead code

2015-09-23 Thread Arnd Bergmann
These three functions have not been in used for a long time, so lets just remove them. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/include/obd.h | 62 - 1 file changed, 62 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b

[PATCH 10/37] staging/lustre: use 64-bit time LNetCtl()

2015-09-23 Thread Arnd Bergmann
This ioctl function passes a 64-bit time argument but then performs a computation with a 32-bit get_seconds() value. In order to avoid overflow here, this changes the code to use 64-bit math and ktime_get_real_seconds(). Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lnet/lnet/api

[PATCH 22/37] staging/lustre: use 64-bit times for ksnd_connd

2015-09-23 Thread Arnd Bergmann
The connection starting/failing time stamps will overflow in 2038 on 32-bit machines, so we need to use time64_t and ktime_get_real_seconds() instead. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c| 2 +- drivers/staging/lustre/lnet/klnds/socklnd

[PATCH 12/37] staging/lustre: use jiffies_to_*() instead of cfs_duration_usec

2015-09-23 Thread Arnd Bergmann
about timeval. Signed-off-by: Arnd Bergmann --- .../lustre/include/linux/libcfs/linux/linux-time.h| 15 --- drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +- drivers/staging/lustre/lnet/selftest/framework.c | 6 +- 3 files changed, 2 insertions(+

[PATCH 21/37] staging/lustre: use 64-bit llite procfs timestamps

2015-09-23 Thread Arnd Bergmann
than printing six digits without leading zeroes. Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/llite/lproc_llite.c | 24 +++ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging

Re: [PATCH 04/37] staging/lustre: tracefile: use 64-bit seconds

2015-09-24 Thread Arnd Bergmann
On Thursday 24 September 2015 04:02:09 Drokin, Oleg wrote: > > The lustre tracefile has a timestamp defined as > > > > __u32 ph_sec; > > __u64 ph_usec; > > > > which seems completely backwards, as the microsecond portion of > > a time stamp will always fit into a __u32 value, while th

Re: [PATCH 19/37] staging/lustre: use 64-bit time for procfs output

2015-09-24 Thread Arnd Bergmann
On Thursday 24 September 2015 10:40:09 Sudip Mukherjee wrote: > On Wed, Sep 23, 2015 at 09:13:42PM +0200, Arnd Bergmann wrote: > > This time is only printed in procfs, and can be easily converted > > to 64-bit to avoid overflowing on 32-bit systems in 2038. > > > > S

Re: [PATCH 32/37] staging/lustre: use 64-bit times for exp_last_request_time

2015-09-24 Thread Arnd Bergmann
On Thursday 24 September 2015 03:55:20 Drokin, Oleg wrote: > On Sep 23, 2015, at 3:13 PM, Arnd Bergmann wrote: > > > The last request time is stored as an 'unsigned long', which is > > good enough until 2106, but it is then converted to 'long' in &g

Re: [PATCH 32/37] staging/lustre: use 64-bit times for exp_last_request_time

2015-09-24 Thread Arnd Bergmann
On Thursday 24 September 2015 16:01:40 Drokin, Oleg wrote: > > On Sep 24, 2015, at 11:18 AM, Arnd Bergmann wrote: > > > On Thursday 24 September 2015 03:55:20 Drokin, Oleg wrote: > >> On Sep 23, 2015, at 3:13 PM, Arnd Bergmann wrote: > >> > >>> Th

Re: [PATCH 32/37] staging/lustre: use 64-bit times for exp_last_request_time

2015-09-24 Thread Arnd Bergmann
On Thursday 24 September 2015 19:03:12 Drokin, Oleg wrote: > On Sep 24, 2015, at 2:54 PM, Arnd Bergmann wrote: > > On Thursday 24 September 2015 16:01:40 Drokin, Oleg wrote: > >> On Sep 24, 2015, at 11:18 AM, Arnd Bergmann wrote: > >>> On Thursday 24 September 20

Re: [lustre-devel] [PATCH 32/37] staging/lustre: use 64-bit times for exp_last_request_time

2015-09-25 Thread Arnd Bergmann
On Friday 25 September 2015 01:07:43 Drokin, Oleg wrote: > > These do seem to be working fine in my testing. > > I also noticed we can remove some more stuff in at least fid/ dir so > I created some patches on top of your tree: > https://github.com/verygreen/linux/tree/fidcleanup > > Also I've l

Re: [PATCH 04/37] staging/lustre: tracefile: use 64-bit seconds

2015-09-25 Thread Arnd Bergmann
On Friday 25 September 2015 01:52:37 Drokin, Oleg wrote: > On Sep 24, 2015, at 3:46 AM, Arnd Bergmann wrote: > > On Thursday 24 September 2015 04:02:09 Drokin, Oleg wrote: > These are all the users. > Seems to be pretty much u32 (or unsigned int when printing) everywhere. Ok, I&#x

Re: [Y2038] [PATCH 04/37] staging/lustre: tracefile: use 64-bit seconds

2015-09-25 Thread Arnd Bergmann
On Friday 25 September 2015 12:17:18 Arnd Bergmann wrote: > On Friday 25 September 2015 01:52:37 Drokin, Oleg wrote: > > On Sep 24, 2015, at 3:46 AM, Arnd Bergmann wrote: > > > On Thursday 24 September 2015 04:02:09 Drokin, Oleg wrote: > > These are all the users. > &g

Re: [lustre-devel] [PATCH 32/37] staging/lustre: use 64-bit times for exp_last_request_time

2015-09-25 Thread Arnd Bergmann
On Friday 25 September 2015 01:39:49 Drokin, Oleg wrote: > On Sep 24, 2015, at 9:07 PM, Drokin, Oleg wrote: > > > > > On Sep 24, 2015, at 4:15 PM, Arnd Bergmann wrote: > >>>>> Anyway this does remove a lot of stuff that we don't really need in the &

Re: [Y2038] [lustre-devel] [PATCH 32/37] staging/lustre: use 64-bit times for exp_last_request_time

2015-09-25 Thread Arnd Bergmann
On Friday 25 September 2015 16:53:14 Drokin, Oleg wrote: > > On Sep 25, 2015, at 12:09 PM, Arnd Bergmann wrote: > > > > I have updated the branch now to reflect our discussions so far. Can you > > handle > > forwarding the patches to Greg from there, or complain i

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-17 Thread Arnd Bergmann
On Thursday 17 July 2014 09:27:58 Chen Gang wrote: > gfp_t gfp_mask, unsigned int order); > extern void devm_free_pages(struct device *dev, unsigned long addr); > > +#ifdef CONFIG_HAS_IOMEM > void __iomem *devm_ioremap_resource(struct device *dev, struct

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-17 Thread Arnd Bergmann
On Thursday 17 July 2014 11:26:57 Richard Weinberger wrote: > Am 17.07.2014 11:20, schrieb Arnd Bergmann: > > On Thursday 17 July 2014 09:27:58 Chen Gang wrote: > >> gfp_t gfp_mask, unsigned int > >> order); > >> exter

<    1   2   3   4   5   6   7   >