[PATCH v3] staging: xgifb: remove macros with hidden variable

2017-12-01 Thread Joshua Abraham
This patch removes macros in XGI_main.h that contain a xgifb_info variable. These macros hurt readability by hiding said variable behind a define. It also uses a temporary variable to keep the replaced code from getting too long. Signed-off-by: Joshua Abraham --- drivers/staging/xgifb/XGI_main

Re: [PATCH 8/8] [media] staging: imx: use ktime_t for timestamps

2017-12-01 Thread Steve Longerbeam
Hi Arnd, This looks fine to me, except for a couple things... On 11/27/2017 05:20 AM, Arnd Bergmann wrote: The imx media driver passes around monotonic timestamps in the deprecated 'timespec' format. This is not a problem for the driver, as they won't overflow, but moving to either timespec64 o

Re: [PATCH v4 3/8] MIPS: Octeon: Add a global resource manager.

2017-12-01 Thread Philippe Ombredanne
On Fri, Dec 1, 2017 at 9:56 PM, David Daney wrote: > On 12/01/2017 12:41 PM, Philippe Ombredanne wrote: >> >> David, >> >> On Fri, Dec 1, 2017 at 9:01 PM, David Daney >> wrote: >>> >>> On 12/01/2017 11:49 AM, Philippe Ombredanne wrote: David, Greg, On Fri, Dec 1, 2017 at

Re: [PATCH v4 3/8] MIPS: Octeon: Add a global resource manager.

2017-12-01 Thread David Daney
On 12/01/2017 12:41 PM, Philippe Ombredanne wrote: David, On Fri, Dec 1, 2017 at 9:01 PM, David Daney wrote: On 12/01/2017 11:49 AM, Philippe Ombredanne wrote: David, Greg, On Fri, Dec 1, 2017 at 6:42 PM, David Daney wrote: On 11/30/2017 11:53 PM, Philippe Ombredanne wrote: [...] ---

Re: [PATCH v4 3/8] MIPS: Octeon: Add a global resource manager.

2017-12-01 Thread Philippe Ombredanne
David, On Fri, Dec 1, 2017 at 9:01 PM, David Daney wrote: > On 12/01/2017 11:49 AM, Philippe Ombredanne wrote: >> >> David, Greg, >> >> On Fri, Dec 1, 2017 at 6:42 PM, David Daney >> wrote: >>> >>> On 11/30/2017 11:53 PM, Philippe Ombredanne wrote: >> >> [...] >> >> --- /dev/null >>

[PATCH] staging: wilc1000: Fix problems reported by checkpatch

2017-12-01 Thread Aditya Shankar
This commit fixes below style problems in multiple lines Fix checkpatch WARNING: line over 80 characters Fix CHECK: Lines should not end with a '(' Signed-off-by: Aditya Shankar --- drivers/staging/wilc1000/linux_mon.c | 30 ++ 1 file changed, 18 insertions(+), 12 del

Re: [PATCH v4 3/8] MIPS: Octeon: Add a global resource manager.

2017-12-01 Thread David Daney
On 12/01/2017 11:49 AM, Philippe Ombredanne wrote: David, Greg, On Fri, Dec 1, 2017 at 6:42 PM, David Daney wrote: On 11/30/2017 11:53 PM, Philippe Ombredanne wrote: [...] --- /dev/null +++ b/arch/mips/cavium-octeon/resource-mgr.c @@ -0,0 +1,371 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +

Re: [PATCH v4 3/8] MIPS: Octeon: Add a global resource manager.

2017-12-01 Thread Philippe Ombredanne
David, Greg, On Fri, Dec 1, 2017 at 6:42 PM, David Daney wrote: > On 11/30/2017 11:53 PM, Philippe Ombredanne wrote: [...] --- /dev/null +++ b/arch/mips/cavium-octeon/resource-mgr.c @@ -0,0 +1,371 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Resource manager for O

[PATCH net-next 5/6] hv_netvsc: optimize initialization of RNDIS header

2017-12-01 Thread Stephen Hemminger
The memset of the whole maximum possible RNDIS header is unnecessary. For the main part of the header use a structure assignment. No need to memset the whole per packet info. Instead rely on caller to set what it wants. Also get rid of cast to void and signed/unsigned conversion. Now return pointe

[PATCH net-next 6/6] vmbus: make hv_get_ringbuffer_availbytes local

2017-12-01 Thread Stephen Hemminger
The last use of hv_get_ringbuffer_availbytes in drivers is now gone. Only used by the debug info routine so make it static. Also, add READ_ONCE() to avoid any possible issues with potentially volatile index values. Signed-off-by: Stephen Hemminger --- drivers/hv/ring_buffer.c | 23 ++

[PATCH net-next 2/6] hv_netvsc: don't need local xmit_more

2017-12-01 Thread Stephen Hemminger
Since skb is always non-NULL in the copy portion of netvsc_send do not need local variable. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index bfc79

[PATCH net-next 4/6] hv_netvsc: use reciprocal divide to speed up percent calculation

2017-12-01 Thread Stephen Hemminger
Every packet sent checks the available ring space. The calculation can be sped up by using reciprocal divide which is multiplication. Since ring_size can only be configured by module parameter, so it doesn't have to be passed around everywhere. Also it should be unsigned since it is number of page

[PATCH net-next 3/6] hv_netvsc: replace divide with mask when computing padding

2017-12-01 Thread Stephen Hemminger
Packet alignment is always a power of 2 therefore modulus can be replaced with a faster and operation Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c i

[PATCH net-next 1/6] hv_netvsc: drop unused macros

2017-12-01 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index 88ddfb92122b..7226230561de 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b

[PATCH net-next 0/6] hv_netvsc: minor optimizations

2017-12-01 Thread Stephen Hemminger
These are a set of local optimizations the Hyper-V networking driver. Also include a vmbus patch in this set, because it depends on the netvsc that last used that function. Stephen Hemminger (6): hv_netvsc: drop unused macros hv_netvsc: don't need local xmit_more hv_netvsc: replace divide wi

Re: [PATCH RFC 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously

2017-12-01 Thread Paolo Bonzini
On 01/12/2017 18:29, Stephen Hemminger wrote: >> +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page >> *tsc_pg, >> + u64 *cur_tsc) >> +{ >> +*cur_tsc = rdtsc(); >> + >> +return cur_tsc; > Why do return and setting by reference. Looks l

Re: [PATCH RFC 5/6] x86/kvm: pass stable clocksource to guests when running nested on Hyper-V

2017-12-01 Thread Radim Krčmář
2017-12-01 14:13+0100, Vitaly Kuznetsov: > Currently, KVM is able to work in 'masterclock' mode passing > PVCLOCK_TSC_STABLE_BIT to guests when the clocksource we use on the host > is TSC. When running nested on Hyper-V we normally use a different one: > TSC page which is resistant to TSC frequency

Re: [PATCH v4 3/8] MIPS: Octeon: Add a global resource manager.

2017-12-01 Thread David Daney
On 11/30/2017 11:53 PM, Philippe Ombredanne wrote: Carlos, On Thu, Nov 30, 2017 at 11:53 PM, James Hogan wrote: On Tue, Nov 28, 2017 at 04:55:35PM -0800, David Daney wrote: From: Carlos Munoz Add a global resource manager to manage tagged pointers within bootmem allocated memory. This is us

Re: [PATCH v2 2/3] media: atomisp: delete zero-valued struct members.

2017-12-01 Thread Alan Cox
> --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h > +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h > @@ -152,14 +152,6 @@ struct ia_css_pipe_config { > }; > Thani you that's a really good cleanup. Alan

Re: [PATCH RFC 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously

2017-12-01 Thread Stephen Hemminger
On Fri, 1 Dec 2017 14:13:17 +0100 Vitaly Kuznetsov wrote: > + > +static inline u64 hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page > *tsc_pg, > +u64 *cur_tsc) > +{ > + *cur_tsc = rdtsc(); > + > + return cur_tsc; Why do return and setting by refe

[PATCH] staging: dgnc: add identifiers to function parameters

2017-12-01 Thread Ashish Kalra
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ashish Kalra --- drivers/staging/dgnc/dgnc_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h b/driver

[PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-01 Thread Jeremy Sowden
The CSS API uses a lot of nested anonymous structs defined in object macros to assign default values to its data-structures. These have been changed to use compound-literals and designated initializers to make them more comprehensible and less fragile. The compound-literals can also be used in as

[PATCH v2 3/3] media: atomisp: delete empty default struct values.

2017-12-01 Thread Jeremy Sowden
Removing zero-valued struct-members left a number of the default struct-values empty. These values have now been removed. Signed-off-by: Jeremy Sowden --- .../atomisp/pci/atomisp2/css2400/ia_css_pipe.h | 1 - .../atomisp/pci/atomisp2/css2400/ia_css_types.h| 1 - .../isp/kernels/s3a/s3

[PATCH v2 2/3] media: atomisp: delete zero-valued struct members.

2017-12-01 Thread Jeremy Sowden
A lot of the members of the default struct values used by the CSS API were explicitly initialized to zero values. Designated initializers have allowed these members to be removed. Signed-off-by: Jeremy Sowden --- .../hive_isp_css_common/input_formatter_global.h | 17 .../pci/atomisp2/cs

[PATCH v2 0/3] media: atomisp: clean up of data-structure initialization in the CSS API

2017-12-01 Thread Jeremy Sowden
v2. Fixed a couple of bugs and addressed checkpatch errors. v1. The CSS API uses a lot of nested anonymous structs defined in object macros to assign default values to its data-structures. These have been changed to use compound-literals and designated initializers to make them more c

Re: [PATCH RFC 0/6] x86/kvm/hyperv: stable clocksorce for L2 guests when running nested KVM on Hyper-V

2017-12-01 Thread Paolo Bonzini
On 01/12/2017 14:13, Vitaly Kuznetsov wrote: > Currently, KVM passes PVCLOCK_TSC_STABLE_BIT to its guests when running in > so called 'masterclock' mode and this is only possible when the clocksource > on the host is TSC. When running nested on Hyper-V we're using a different > clocksource in L1 (H

Re: [PATCH 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-01 Thread Jeremy Sowden
On 2017-12-01, at 18:07:25 +0300, Dan Carpenter wrote: > I can't apply this (to today's linux-next) but does this really work: > > > +(struct ia_css_3a_grid_info) { \ > > + .ae_enable = 0, \ > > + .ae_grd_info= (struct ae_public_config_grid_config) { \ > > +

Re: [PATCH 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-01 Thread Dan Carpenter
I can't apply this (to today's linux-next) but does this really work: > +(struct ia_css_3a_grid_info) { \ > + .ae_enable = 0, \ > + .ae_grd_info= (struct ae_public_config_grid_config) { \ > + width = 0, \ > +

Re: [PATCH] staging: pi433: pi433_if.c Fix SET_CHECKED style issues

2017-12-01 Thread Dan Carpenter
Also it's not a style issue, it's a bug. We double call the failing function on error. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: pi433: pi433_if.c Fix SET_CHECKED style issues

2017-12-01 Thread Dan Carpenter
On Thu, Nov 30, 2017 at 10:40:14PM +0100, Nguyen Phan Quang Minh wrote: > Fix checkpatch warning and add result holder variable to reduce overhead > since the macro is called on functions. > > Signed-off-by: Nguyen Phan Quang Minh > --- > Since SET_CHECKED has a return statement, I'm very tempted

Re: [PATCH] staging: pi433: pi433_if.c codestyle fix in IRQ_handler

2017-12-01 Thread Dan Carpenter
On Thu, Nov 30, 2017 at 06:59:11PM +0100, Oliver Graute wrote: > This patch fixes the following checkpatch.pl errors: > > ERROR: that open brace { should be on the previous line > #344: FILE: pi433_if.c:344: > + if(retval) /* wait was interrupted */ > + { > > ERROR: space required bef

Re: [PATCH v2] staging: xgifb: remove macros with hidden variable

2017-12-01 Thread Josh Abraham
On Fri, Dec 01, 2017 at 10:12:30AM +0300, Dan Carpenter wrote: > On Thu, Nov 30, 2017 at 10:39:48AM -0500, Joshua Abraham wrote: > > diff --git a/drivers/staging/xgifb/XGI_main_26.c > > b/drivers/staging/xgifb/XGI_main_26.c > > index 6feecc55d2bc..6de66eaad96b 100644 > > --- a/drivers/staging/xgif

[PATCH RFC 6/6] x86/kvm: support Hyper-V reenlightenment

2017-12-01 Thread Vitaly Kuznetsov
When we run nested KVM on Hyper-V guests we need to update masterclocks for all guests when L1 migrates to a host with different TSC frequency. Implement the procedure in the following way: - Pause all guests. - Tell our host (Hyper-V) to stop emulating TSC accesses. - Update our gtod copy, recompu

[PATCH RFC 3/6] x86/hyper-v: reenlightenment notifications support

2017-12-01 Thread Vitaly Kuznetsov
Hyper-V supports Live Migration notification. This is supposed to be used in conjunction with TSC emulation: when we are migrated to a host with different TSC frequency for some short period host emulates our accesses to TSC and sends us an interrupt to notify about the event. When we're done updat

[PATCH RFC 0/6] x86/kvm/hyperv: stable clocksorce for L2 guests when running nested KVM on Hyper-V

2017-12-01 Thread Vitaly Kuznetsov
Currently, KVM passes PVCLOCK_TSC_STABLE_BIT to its guests when running in so called 'masterclock' mode and this is only possible when the clocksource on the host is TSC. When running nested on Hyper-V we're using a different clocksource in L1 (Hyper-V TSC Page) which can actually be used for maste

[PATCH RFC 2/6] x86/hyper-v: add a function to read both TSC and TSC page value simulateneously

2017-12-01 Thread Vitaly Kuznetsov
This is going to be used from KVM code were we need to get both TSC and TSC page value. When Hyper-V code is compiled out just return rdtsc(), this will allow us to avoid ugly ifdefs in non-Hyper-V code. Signed-off-by: Vitaly Kuznetsov --- arch/x86/include/asm/mshyperv.h | 24 ++

[PATCH RFC 4/6] x86/hyper-v: redirect reenlightment notifications on CPU offlining

2017-12-01 Thread Vitaly Kuznetsov
It is very unlikely for CPUs to get offlined when we run on Hyper-V as we have a protection in vmbus module which prevents it when we have any VMBus devices assigned. This, however, may change in future if an option to reassign an already active channel will be added. It is also possible to run wi

[PATCH RFC 5/6] x86/kvm: pass stable clocksource to guests when running nested on Hyper-V

2017-12-01 Thread Vitaly Kuznetsov
Currently, KVM is able to work in 'masterclock' mode passing PVCLOCK_TSC_STABLE_BIT to guests when the clocksource we use on the host is TSC. When running nested on Hyper-V we normally use a different one: TSC page which is resistant to TSC frequency changes on event like L1 migration. Add support

[PATCH RFC 1/6] x86/hyper-v: check for required priviliges in hyperv_init()

2017-12-01 Thread Vitaly Kuznetsov
In hyperv_init() we presume we always have access to VP index and hypercall MSRs while according to the specification we should check if we're allowed to access the corresponding MSRs before accessing them. Signed-off-by: Vitaly Kuznetsov --- arch/x86/hyperv/hv_init.c | 9 - 1 file chang

Re: [PATCH 5/5] mtd: nand: add ->exec_op() implementation

2017-12-01 Thread Boris Brezillon
On Thu, 30 Nov 2017 18:01:32 +0100 Miquel Raynal wrote: > EXPORT_SYMBOL_GPL(nand_write_data_op); > > /** > + * struct nand_op_parser_ctx - Context used by the parser > + * @instrs: array of all the instructions that must be addressed > + * @ninstrs: length of the @instrs array > + * @instr_id

Re: [PATCH 5/5] mtd: nand: add ->exec_op() implementation

2017-12-01 Thread Miquel RAYNAL
Hi Boris, On Fri, 1 Dec 2017 10:50:53 +0100 Boris Brezillon wrote: > Hi Miquel, > > On Thu, 30 Nov 2017 23:25:38 +0100 > Miquel RAYNAL wrote: > > > > > diff --git a/drivers/mtd/nand/nand_base.c > > > > b/drivers/mtd/nand/nand_base.c index 52965a8aeb2c..46bf31aff909 > > > > 100644 --- a/driver

Re: [PATCH 5/5] mtd: nand: add ->exec_op() implementation

2017-12-01 Thread Boris Brezillon
Hi Miquel, On Thu, 30 Nov 2017 23:25:38 +0100 Miquel RAYNAL wrote: > > > diff --git a/drivers/mtd/nand/nand_base.c > > > b/drivers/mtd/nand/nand_base.c index 52965a8aeb2c..46bf31aff909 > > > 100644 --- a/drivers/mtd/nand/nand_base.c > > > +++ b/drivers/mtd/nand/nand_base.c > > > @@ -689,6 +689,5

Re: [PATCH 1/5] mtd: nand: use usual return values for the ->erase() hook

2017-12-01 Thread Boris Brezillon
On Thu, 30 Nov 2017 23:02:46 +0100 Miquel RAYNAL wrote: > > > diff --git a/drivers/mtd/nand/nand_base.c > > > b/drivers/mtd/nand/nand_base.c index 630048f5abdc..4d1f2bda6095 > > > 100644 --- a/drivers/mtd/nand/nand_base.c > > > +++ b/drivers/mtd/nand/nand_base.c > > > @@ -3077,7 +3077,7 @@ int na

Re: [PATCH 4/5] mtd: nand: use a static data_interface in the nand_chip structure

2017-12-01 Thread Boris Brezillon
On Thu, 30 Nov 2017 18:01:31 +0100 Miquel Raynal wrote: > Change the nand_chip structure, to embed the nand_data_interface object. > > Also remove the nand_get_default_data_interface() function that become > useless but add the initialization of the data_interface at the very > beginning of nand

Re: [PATCH 0/5] Introduce the new NAND core interface: ->exec_op()

2017-12-01 Thread Boris Brezillon
Hi all, On Thu, 30 Nov 2017 18:01:27 +0100 Miquel Raynal wrote: > Hi, > > This series adds the implementation of the NAND framework ->exec_op() > interface with all the related hooks and helpers. The reasons for adding > it are explained in details in the commit log: > > "mtd: nand: ad

Re: [PATCH v4 3/8] MIPS: Octeon: Add a global resource manager.

2017-12-01 Thread Philippe Ombredanne
Carlos, On Thu, Nov 30, 2017 at 11:53 PM, James Hogan wrote: > On Tue, Nov 28, 2017 at 04:55:35PM -0800, David Daney wrote: >> From: Carlos Munoz >> >> Add a global resource manager to manage tagged pointers within >> bootmem allocated memory. This is used by various functional >> blocks in the