Re: [PATCH 0/6] lib/crc32: treewide: Use existing define with polynomial

2018-07-17 Thread Krzysztof Kozlowski
On 18 July 2018 at 02:12, Eric Biggers wrote: > Hi Krzysztof, > > On Tue, Jul 17, 2018 at 06:05:35PM +0200, Krzysztof Kozlowski wrote: >> Hi, >> >> Kernel defines same polynomial for CRC-32 in few places. >> This is unnecessary duplication of the same value. Also this might >> be error-prone for f

[PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required

2018-07-17 Thread Baoquan He
For kexec_file loading, if kexec_buf.top_down is 'true', the memory which is used to load kernel/initrd/purgatory is supposed to be allocated from top to down. This is what we have been doing all along in the old kexec loading interface and the kexec loading is still default setting in some distrib

[PATCH v7 3/4] resource: add walk_system_ram_res_rev()

2018-07-17 Thread Baoquan He
This function, being a variant of walk_system_ram_res() introduced in commit 8c86e70acead ("resource: provide new functions to walk through resources"), walks through a list of all the resources of System RAM in reversed order, i.e., from higher to lower. It will be used in kexec_file code. Signe

[PATCH v7 2/4] resource: Use list_head to link sibling resource

2018-07-17 Thread Baoquan He
The struct resource uses singly linked list to link siblings, implemented by pointer operation. Replace it with list_head for better code readability. Based on this list_head replacement, it will be very easy to do reverse iteration on iomem_resource's sibling list in later patch. Besides, type o

[PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-17 Thread Baoquan He
reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c so that it's shared. Reviewed-by: Andy Shevchenko Signed-off-by: Baoquan He Cc: Michal Simek Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael E

[PATCH v7 0/4] resource: Use list_head to link sibling resource

2018-07-17 Thread Baoquan He
This patchset is doing: 1) Move reparent_resources() to kernel/resource.c to clean up duplicated code in arch/microblaze/pci/pci-common.c and arch/powerpc/kernel/pci-common.c . 2) Replace struct resource's sibling list from singly linked list to list_head. Clearing out those pointer operat

Re: [PATCH 0/6] lib/crc32: treewide: Use existing define with polynomial

2018-07-17 Thread Eric Biggers
Hi Krzysztof, On Tue, Jul 17, 2018 at 06:05:35PM +0200, Krzysztof Kozlowski wrote: > Hi, > > Kernel defines same polynomial for CRC-32 in few places. > This is unnecessary duplication of the same value. Also this might > be error-prone for future code - every driver will define the > polynomial a

[PATCH 09/32] staging: gasket: convert gasket_mmap_has_permissions to bool return

2018-07-17 Thread Todd Poynor
From: Todd Poynor gasket_mmap_has_permissions() should return a boolean value. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/gasket/gasket_core.c b

[PATCH 22/32] staging: gasket: don't treat no device reset callback as an error

2018-07-17 Thread Todd Poynor
From: Todd Poynor It is not an error for a device to not have a reset callback registered. Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gasket/gasket_core

[PATCH 24/32] staging: gasket: apex_clock_gating simplify logic, reduce indentation

2018-07-17 Thread Todd Poynor
From: Todd Poynor Collapse together two checks and return immediately, avoid conditional indentation for most of function code. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 43 +--- 1 file ch

[PATCH 23/32] staging: gasket: gasket_mmap return error instead of valid BAR index

2018-07-17 Thread Todd Poynor
From: Todd Poynor When offset to be mapped matches both a BAR region and a coherent mapped region return an error as intended, not the BAR index. Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 27/32] staging: gasket: remove else clause after return in if clause

2018-07-17 Thread Todd Poynor
From: Todd Poynor Else after return is unnecessary and may cause static code checkers to complain. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --gi

[PATCH 17/32] staging: gasket: annotate ioctl arg with __user

2018-07-17 Thread Todd Poynor
From: Todd Poynor For sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor Reviewed-by: Dmitry Torokhov --- drivers/staging/gasket/apex_driver.c | 11 ++-- drivers/staging/gasket/gasket_core.c | 6 ++- drivers/staging/gasket/gasket_core.h |

[PATCH 10/32] staging: gasket: fix gasket_wait_with_reschedule timeout return code

2018-07-17 Thread Todd Poynor
From: Todd Poynor Return -ETIMEDOUT, not -EINVAL, on timeout, including callers. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 8 drivers/staging/gasket/gasket_core.c | 2 +- 2 files changed, 5 insertions

[PATCH 28/32] staging: gasket: fix comment syntax in apex.h

2018-07-17 Thread Todd Poynor
From: Todd Poynor Use kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/apex.h b/drivers/st

[PATCH 11/32] staging: gasket: gasket_wait_with_reschedule use msleep

2018-07-17 Thread Todd Poynor
From: Todd Poynor Replace schedule_timeout() call with msleep() for simplicity. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gas

[PATCH 20/32] staging: gasket: fix class create bug handling

2018-07-17 Thread Todd Poynor
From: Todd Poynor class_create() never returns NULL, and this driver should never return PTR_ERR(NULL) anyway. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor Reviewed-by: Dmitry Torokhov --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 in

[PATCH 25/32] staging: gasket: apex_ioctl_check_permissions use bool return type

2018-07-17 Thread Todd Poynor
From: Todd Poynor Convert from int return to bool. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/apex_driver.c b/drivers

[PATCH 19/32] staging: gasket: remove code for no physical device

2018-07-17 Thread Todd Poynor
From: Todd Poynor gasket_enable_dev code for enabling a gasket device with no physical PCI device registered shouldn't be necessary. Reported-by: Greg Kroah-Hartman Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deleti

[PATCH 31/32] staging: gasket: remove extra parens in gasket_write_mappable_regions

2018-07-17 Thread Todd Poynor
From: Todd Poynor Remove unneeded parentheses around subexpressions. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.

[PATCH 07/32] staging: gasket: Return EBUSY on mapping create when already in use

2018-07-17 Thread Todd Poynor
From: Todd Poynor gasket_sysfs_create_mapping() return EBUSY if sysfs mapping already in use, as a more appropriate error code than the current return of EINVAL, which would indicate invalid parameters. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sys

[PATCH 32/32] staging: gasket: fix multi-line comment syntax in gasket_core.h

2018-07-17 Thread Todd Poynor
From: Todd Poynor Use consistent kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket

[PATCH 18/32] staging: gasket: gasket_enable_dev remove unnecessary variable

2018-07-17 Thread Todd Poynor
From: Todd Poynor Remove unnecessary variable, pass constant param instead. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/gaske

[PATCH 14/32] staging: gasket: bail out of reset sequence on device callback error

2018-07-17 Thread Todd Poynor
From: Todd Poynor If device reset callback returns an error, error out at the gasket level. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH 12/32] staging: gasket: gasket_wait_with_reschedule simplify logic

2018-07-17 Thread Todd Poynor
From: Todd Poynor gasket_wait_with_reschedule() is a little more clear if we just return directly when the waited-for condition is hit. This also allows the following condition check to be removed and identation of the conditionally-executed code to be reduced. Reported-by: Dmitry Torokhov Sig

[PATCH 15/32] staging: gasket: drop gasket_cdev_get_info, use container_of

2018-07-17 Thread Todd Poynor
From: Todd Poynor Remove gasket_cdev_get_info(), use container_of() directly instead, drop unnecessary NULL checks. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 26 -- 1 file changed, 4 in

[PATCH 29/32] staging: gasket: remove unnecessary parens in page table code

2018-07-17 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory() extra parentheses in statement. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/g

[PATCH 30/32] staging: gasket: gasket_mmap use PAGE_MASK

2018-07-17 Thread Todd Poynor
From: Todd Poynor gasket_mmap use PAGE_MASK, instead of performing math on PAGE_SIZE, for simplicity and clarity. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 21/32] staging: gasket: remove unnecessary code in coherent allocator

2018-07-17 Thread Todd Poynor
From: Todd Poynor Remove extraneous statement in gasket_config_coherent_allocator() Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/stagi

[PATCH 26/32] staging: gasket: gasket page table functions use bool return type

2018-07-17 Thread Todd Poynor
From: Todd Poynor Convert from int to bool return type for gasket page table functions that return values used as booleans. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 58 +++--- drivers/stagi

[PATCH 06/32] staging: gasket: hold mutex on gasket driver unregistration

2018-07-17 Thread Todd Poynor
From: Todd Poynor Take the global mutex on driver unregistration updates for proper ordering of updates and consistent access procedures. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drive

[PATCH 00/32 v3] staging: gasket: sundry fixes and fixups

2018-07-17 Thread Todd Poynor
From: Todd Poynor Various fixes mainly from the chromium review of the gasket and apex drivers. More to come. Todd Poynor (32): staging: gasket: remove X86 Kconfig restriction staging: gasket: fix typo in apex_enter_reset staging: gasket: fix typo in gasket_core.h comments staging: gask

[PATCH 05/32] staging: gasket: remove driver registration on class creation failure

2018-07-17 Thread Todd Poynor
From: Todd Poynor If class_create() fails, remove the gasket driver from the global registration table. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/g

[PATCH 13/32] staging: gasket: gasket_wait_with_reschedule use 32 bits of retry count

2018-07-17 Thread Todd Poynor
From: Todd Poynor Don't need a 64-bit retry counter. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 ++-- drivers/staging/gasket/gasket_core.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 16/32] staging: gasket: always allow root open for write

2018-07-17 Thread Todd Poynor
From: Todd Poynor Always allow root to open device for writing. Drop special-casing of ioctl permissions for root vs. owner. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 9 + drivers/staging/gasket/gas

[PATCH 08/32] staging: gasket: Remove stale pointers on error allocating attr array

2018-07-17 Thread Todd Poynor
From: Todd Poynor If gasket_sysfs_create_mapping() hits errors allocating the attribute array, remove stale pointers to device info from the mapping object. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH 04/32] staging: gasket: whitespace fix in gasket_page_table_init

2018-07-17 Thread Todd Poynor
From: Todd Poynor Tab replaced with space. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_page_table.c b/drivers/staging/gasket/gasket_page_t

[PATCH 01/32] staging: gasket: remove X86 Kconfig restriction

2018-07-17 Thread Todd Poynor
From: Todd Poynor The gasket and apex drivers are to be used on other architectures besides X86. Signed-off-by: Todd Poynor --- drivers/staging/gasket/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/Kconfig b/drivers/staging/gasket/Kconfig ind

[PATCH 02/32] staging: gasket: fix typo in apex_enter_reset

2018-07-17 Thread Todd Poynor
From: Todd Poynor Fix typo in log message. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c index cca4c

[PATCH 03/32] staging: gasket: fix typo in gasket_core.h comments

2018-07-17 Thread Todd Poynor
From: Todd Poynor Grammar fixup in gasket_core.h comments describing struct gasket_interrupt_desc. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.h b/drivers/staging/gas

Re: [PATCH 12/32] staging: gasket: gasket_wait_with_reschedule return when condition hit

2018-07-17 Thread Todd Poynor
On Tue, Jul 17, 2018 at 4:12 AM, Dan Carpenter wrote: > On Tue, Jul 17, 2018 at 01:13:29PM +0300, Dan Carpenter wrote: >> On Mon, Jul 16, 2018 at 07:09:06PM -0700, Todd Poynor wrote: >> > From: Todd Poynor >> > >> > Return right away instead of break out of while and then return. >> > >> > > Btw,

Re: [PATCH 12/32] staging: gasket: gasket_wait_with_reschedule return when condition hit

2018-07-17 Thread Todd Poynor
On Tue, Jul 17, 2018 at 3:13 AM, Dan Carpenter wrote: > On Mon, Jul 16, 2018 at 07:09:06PM -0700, Todd Poynor wrote: >> From: Todd Poynor >> >> Return right away instead of break out of while and then return. >> > > You could remove the (retries == max_retries) condition since that's > always tru

Re: [PATCH 27/32] staging: gasket: remove else clause after return in if clause

2018-07-17 Thread Todd Poynor
On Tue, Jul 17, 2018 at 3:37 AM, Dan Carpenter wrote: > On Mon, Jul 16, 2018 at 07:09:21PM -0700, Todd Poynor wrote: >> From: Todd Poynor >> >> Else after return is unnecessary and may cause static code checkers to >> complain. >> >> Reported-by: Guenter Roeck >> Signed-off-by: Simon Que >> Sig

Re: [PATCH 16/32] staging: gasket: always allow root open for write

2018-07-17 Thread Todd Poynor
On Tue, Jul 17, 2018 at 11:50 AM, Joe Perches wrote: > On Tue, 2018-07-17 at 13:22 +0300, Dan Carpenter wrote: >> On Mon, Jul 16, 2018 at 07:09:10PM -0700, Todd Poynor wrote: >> > --- a/drivers/staging/gasket/apex_driver.c >> > +++ b/drivers/staging/gasket/apex_driver.c >> > @@ -630,13 +630,10 @@

Re: [PATCH 16/32] staging: gasket: always allow root open for write

2018-07-17 Thread Joe Perches
On Tue, 2018-07-17 at 13:22 +0300, Dan Carpenter wrote: > On Mon, Jul 16, 2018 at 07:09:10PM -0700, Todd Poynor wrote: > > --- a/drivers/staging/gasket/apex_driver.c > > +++ b/drivers/staging/gasket/apex_driver.c > > @@ -630,13 +630,10 @@ static bool is_gcb_in_reset(struct gasket_dev > > *gasket_d

Re: [PATCH 17/32] staging: gasket: annotate ioctl arg with __user

2018-07-17 Thread Todd Poynor
On Tue, Jul 17, 2018 at 3:26 AM, Dan Carpenter wrote: > On Mon, Jul 16, 2018 at 07:09:11PM -0700, Todd Poynor wrote: >> @@ -629,7 +630,6 @@ static bool is_gcb_in_reset(struct gasket_dev >> *gasket_dev) >> */ >> static uint apex_ioctl_check_permissions(struct file *filp, uint cmd) >> { >> -

[PATCH net, v2] hv_netvsc: Fix napi reschedule while receive completion is busy

2018-07-17 Thread Haiyang Zhang
From: Haiyang Zhang If out ring is full temporarily and receive completion cannot go out, we may still need to reschedule napi if certain conditions are met. Otherwise the napi poll might be stopped forever, and cause network disconnect. Fixes: 7426b1a51803 ("netvsc: optimize receive completions

[PATCH 0/6] lib/crc32: treewide: Use existing define with polynomial

2018-07-17 Thread Krzysztof Kozlowski
Hi, Kernel defines same polynomial for CRC-32 in few places. This is unnecessary duplication of the same value. Also this might be error-prone for future code - every driver will define the polynomial again. This is an attempt to unify definition of polynomial. Few obvious hard-coded locations a

[PATCH 5/6] staging: rtl: Use existing define with polynomial

2018-07-17 Thread Krzysztof Kozlowski
Do not define again the polynomial but use header with existing define. Signed-off-by: Krzysztof Kozlowski --- Not tested It would be nice to get some testing. Only generic lib/crc, bunzip, xz_crc32 and Freescale's Ethernet driver were tested on HW. Rest got just different builds. drivers/sta

[PATCH 3/6] crypto: stm32_crc32 - Use existing define with polynomial

2018-07-17 Thread Krzysztof Kozlowski
Do not define again the polynomial but use header with existing define. Signed-off-by: Krzysztof Kozlowski --- Not tested It would be nice to get some testing. Only generic lib/crc, bunzip, xz_crc32 and Freescale's Ethernet driver were tested on HW. Rest got just different builds. drivers/cr

[PATCH 1/6] lib/crc: Move polynomial definition to separate header

2018-07-17 Thread Krzysztof Kozlowski
Allow other drivers and parts of kernel to use the same define for CRC32 polynomial, instead of duplicating it in many places. This code does not bring any functional changes, except moving existing code. Signed-off-by: Krzysztof Kozlowski --- include/linux/crc32poly.h | 20

[PATCH 4/6] net: ethernet: Use existing define with polynomial

2018-07-17 Thread Krzysztof Kozlowski
Do not define again the polynomial but use header with existing define. Signed-off-by: Krzysztof Kozlowski --- Only Freescale FEC was tested It would be nice to get some testing. Only generic lib/crc, bunzip, xz_crc32 and Freescale's Ethernet driver were tested on HW. Rest got just different bu

[PATCH 2/6] lib/crc: Use consistent naming for CRC-32 polynomials

2018-07-17 Thread Krzysztof Kozlowski
Header was defining CRCPOLY_LE/BE and CRC32C_POLY_LE but in fact all of them are CRC-32 polynomials so use consistent naming. Signed-off-by: Krzysztof Kozlowski --- include/linux/crc32poly.h | 4 ++-- lib/crc32.c | 10 +- lib/gen_crc32table.c | 4 ++-- 3 files change

[PATCH 6/6] lib: Use existing define with polynomial

2018-07-17 Thread Krzysztof Kozlowski
Do not define again the polynomial but use header with existing define. Signed-off-by: Krzysztof Kozlowski --- lib/decompress_bunzip2.c | 3 ++- lib/xz/xz_crc32.c| 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c in

Re: [PATCH 00/32 v2] staging: gasket: sundry fixes and fixups

2018-07-17 Thread Greg KH
On Tue, Jul 17, 2018 at 04:25:36AM -0700, Todd Poynor wrote: > On Tue, Jul 17, 2018 at 4:16 AM Greg Kroah-Hartman > wrote: > > > > On Mon, Jul 16, 2018 at 07:08:54PM -0700, Todd Poynor wrote: > > > From: Todd Poynor > > > > > > Various fixes mainly from the chromium review of the gasket and apex

Re: [RFC PATCH v2] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-17 Thread Dan Carpenter
On Tue, Jul 17, 2018 at 12:13:40PM +0300, Dan Carpenter wrote: > > +static ssize_t sysfs_read(struct device *dev, char *buf, > > + unsigned int addr_offset) > > +{ > > + struct axis_fifo *fifo = dev_get_drvdata(dev); > > + unsigned int read_val; > > + unsigned int strlen;

Re: [PATCH 00/32 v2] staging: gasket: sundry fixes and fixups

2018-07-17 Thread Todd Poynor
On Tue, Jul 17, 2018 at 4:16 AM Greg Kroah-Hartman wrote: > > On Mon, Jul 16, 2018 at 07:08:54PM -0700, Todd Poynor wrote: > > From: Todd Poynor > > > > Various fixes mainly from the chromium review of the gasket and apex > > drivers. More to come. > > I think you lost the reviewed-by tags that

Re: [PATCH 00/32 v2] staging: gasket: sundry fixes and fixups

2018-07-17 Thread Greg Kroah-Hartman
On Mon, Jul 16, 2018 at 07:08:54PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Various fixes mainly from the chromium review of the gasket and apex > drivers. More to come. I think you lost the reviewed-by tags that the v1 series had, why? thanks, greg k-h __

Re: [PATCH 00/32 v2] staging: gasket: sundry fixes and fixups

2018-07-17 Thread Greg Kroah-Hartman
On Mon, Jul 16, 2018 at 07:08:54PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Various fixes mainly from the chromium review of the gasket and apex > drivers. More to come. What changed from v1? You have to list it somewhere... thanks, greg k-h _

Re: [PATCH 12/32] staging: gasket: gasket_wait_with_reschedule return when condition hit

2018-07-17 Thread Dan Carpenter
On Tue, Jul 17, 2018 at 01:13:29PM +0300, Dan Carpenter wrote: > On Mon, Jul 16, 2018 at 07:09:06PM -0700, Todd Poynor wrote: > > From: Todd Poynor > > > > Return right away instead of break out of while and then return. > > > Btw, I wasn't going to complain about this but since Greg is being e

[PATCH v2] media: staging: tegra-vde: Replace debug messages with trace points

2018-07-17 Thread Dmitry Osipenko
Trace points are much more efficient than debug messages for extensive tracing and could be conveniently enabled / disabled dynamically, hence let's replace debug messages with the trace points. Signed-off-by: Dmitry Osipenko --- Changelog: v2: - Use __assign_str() for copying of HW sub

Re: [PATCH 30/32] staging: gasket: gasket_mmap use PAGE_MASK

2018-07-17 Thread Dan Carpenter
On Mon, Jul 16, 2018 at 07:09:24PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Instead of math on PAGE_SIZE. > The commit message is sort of distinct from the first line. The first line is like a title, not the start of a sentence. On like marc.info when you're looking at patches, the S

Re: [PATCH 27/32] staging: gasket: remove else clause after return in if clause

2018-07-17 Thread Dan Carpenter
On Mon, Jul 16, 2018 at 07:09:21PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Else after return is unnecessary and may cause static code checkers to > complain. > > Reported-by: Guenter Roeck > Signed-off-by: Simon Que > Signed-off-by: Todd Poynor > --- > drivers/staging/gasket/gasket

Re: [PATCH 17/32] staging: gasket: annotate ioctl arg with __user

2018-07-17 Thread Dan Carpenter
On Mon, Jul 16, 2018 at 07:09:11PM -0700, Todd Poynor wrote: > @@ -629,7 +630,6 @@ static bool is_gcb_in_reset(struct gasket_dev *gasket_dev) > */ > static uint apex_ioctl_check_permissions(struct file *filp, uint cmd) > { > - struct gasket_dev *gasket_dev = filp->private_data; > fmod

Re: [PATCH 16/32] staging: gasket: always allow root open for write

2018-07-17 Thread Dan Carpenter
On Mon, Jul 16, 2018 at 07:09:10PM -0700, Todd Poynor wrote: > --- a/drivers/staging/gasket/apex_driver.c > +++ b/drivers/staging/gasket/apex_driver.c > @@ -630,13 +630,10 @@ static bool is_gcb_in_reset(struct gasket_dev > *gasket_dev) > static uint apex_ioctl_check_permissions(struct file *filp,

Re: [PATCH 12/32] staging: gasket: gasket_wait_with_reschedule return when condition hit

2018-07-17 Thread Dan Carpenter
On Mon, Jul 16, 2018 at 07:09:06PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Return right away instead of break out of while and then return. > You could remove the (retries == max_retries) condition since that's always true now and pull that code in one tab. You could do it in one pat

Re: [PATCH 11/32] staging: gasket: gasket_wait_with_reschedule use msleep

2018-07-17 Thread Dan Carpenter
On Mon, Jul 16, 2018 at 07:09:05PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Replace schedule_timeout() call with msleep(). > Why does it matter? I genuinely don't know the rules here. The commit message should normally say if there is a user visible effect or if it's just a clean up

Re: [RFC PATCH v2] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-17 Thread Dan Carpenter
This version is much much better. On Sun, Jul 15, 2018 at 12:34:28PM -0400, Jacob Feder wrote: > +static ssize_t sysfs_write(struct device *dev, const char *buf, > +size_t count, unsigned int addr_offset) > +{ > + struct axis_fifo *fifo = dev_get_drvdata(dev); > + u