[PATCH] scripts/gdb: fix lx-version for gdb 7.3-

2018-10-16 Thread Du Changbin
For gdb version less than 7.3, lx-version only one character. (gdb) lx-version L(gdb) This can be fixed by casting 'linux_banner' as (char *). (gdb) lx-version Linux version 4.19.0-rc1+ (changbin@acer) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21 SMP Sat Sep 1 21:43:30 CST 2018 gdb 7.4 seems

Re: [PATCH] mmc: sdhci: use goto rather than return directly

2018-10-16 Thread Chunyan Zhang
On Tue, 16 Oct 2018 at 16:30, Adrian Hunter wrote: > > On 16/10/18 11:19 AM, Chunyan Zhang wrote: > > The driver should clean resources requested in the function before > > unnormal return. > > > > CC: Linus Walleij > > Signed-off-by: Chunyan Zhang > > Fixes: bd9b902798ab ("mmc: sdhci: Implement

Re: [PATCH v3 1/2] sysctl: handle overflow in proc_get_long

2018-10-16 Thread Kees Cook
On Tue, Oct 16, 2018 at 5:24 PM, Christian Brauner wrote: > Right, but if you write a value that exceeds the buffer of 22 chars that is > used > to parse you already get EINVAL back on current kernels. > So it didn't feel like returning EOVERFLOW or ERANGE might make sense. > I saw a change in 4.

Re: [Ksummit-discuss] [PATCH v3 1/3] code-of-conduct: Fix the ambiguity about collecting email addresses

2018-10-16 Thread Frank Rowand
On 10/16/18 07:58, James Bottomley wrote: > The current code of conduct has an ambiguity in the it considers publishing > private information such as email addresses unacceptable behaviour. Since > the Linux kernel collects and publishes email addresses as part of the patch > process, add an excep

Re: [PATCH] mm/thp: Correctly differentiate between mapped THP and PMD migration entry

2018-10-16 Thread Andrea Arcangeli
Hello Zi, On Sun, Oct 14, 2018 at 08:53:55PM -0400, Zi Yan wrote: > Hi Andrea, what is the purpose/benefit of making x86’s pmd_present() returns > true > for a THP under splitting? Does it cause problems when ARM64’s pmd_present() > returns false in the same situation? !pmd_present means it's a

Re: [RFC 00/60] Coscheduling for Linux

2018-10-16 Thread Frederic Weisbecker
On Fri, Sep 07, 2018 at 11:39:47PM +0200, Jan H. Schönherr wrote: > C) How does it work? > > > This patch series introduces hierarchical runqueues, that represent larger > and larger fractions of the system. By default, there is one runqueue per > scheduling domain. These addi

[PATCH v6 0/2] spi: Add Macronix controller driver

2018-10-16 Thread masonccyang
From: Mason Yang Hi Mark & Boris, I patched v6 spi-mxic.c based on Boris's comments of v5. Thanks for your review. best regards, Mason Mason Yang (2): spi: Add MXIC controller driver dt-binding: spi: Document Macronix controller bindings Documentation/devicetree/bindings/spi/spi-mxic.tx

[PATCH v6 1/2] spi: Add MXIC controller driver

2018-10-16 Thread masonccyang
From: Mason Yang Add a driver for Macronix SPI controller IP. Signed-off-by: Mason Yang --- drivers/spi/Kconfig| 6 + drivers/spi/Makefile | 1 + drivers/spi/spi-mxic.c | 619 + 3 files changed, 626 insertions(+) create mode 100644 dri

[PATCH v6 2/2] dt-binding: spi: Document Macronix controller bindings

2018-10-16 Thread masonccyang
From: Mason Yang Document the bindings used by the Macronix controller. Signed-off-by: Mason Yang --- Documentation/devicetree/bindings/spi/spi-mxic.txt | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-mxic.txt diff --

[PATCH 2/2] arm64: dts: tegra186: Enable IOMMU for SDHCI

2018-10-16 Thread Krishna Reddy
Enable IOMMU for all SDHCI controllers in Tegra186. Signed-off-by: Krishna Reddy --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index 230c0c8..996997e 100644

RE: [PATCH v3 1/2] mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories

2018-10-16 Thread Yogesh Narayan Gaur
Hi Tudor, > -Original Message- > From: Cyrille Pitchen [mailto:cyrille.pitc...@wedev4u.fr] > Sent: Tuesday, October 16, 2018 10:04 PM > To: Tudor Ambarus ; Yogesh Narayan Gaur > ; marek.va...@gmail.com; > dw...@infradead.org; computersforpe...@gmail.com; > boris.brezil...@bootlin.com; rich

[PATCH 1/2] arm64: dts: tegra186: Add dma-ranges to avoid using bounce buffers

2018-10-16 Thread Krishna Reddy
Add dma-ranges to avoid using DMA bounce buffers unnecessarily for the devices that can address the physcial memory and don't have SMMU enabled. This also resolves the failures in attaching devices to IOMMU. The following error is caused by the check in io-pgtable-arm.c, where the dma address is e

Re: protected pins and debugfs

2018-10-16 Thread Sodagudi Prasad
On 2018-10-10 12:40, Sodagudi Prasad wrote: On 2018-10-07 23:04, Stephen Boyd wrote: Quoting Sodagudi Prasad (2018-10-03 05:38:24) for (i = 0; i < chip->ngpio; i++, gpio++) { + label = gpiochip_is_requested(chip, i); + if (!label) + co

Re: [PATCH v9 00/11] Introduce the Counter subsystem

2018-10-16 Thread William Breathitt Gray
On Sun, Jul 22, 2018 at 06:49:49PM -0400, William Breathitt Gray wrote: > Changes in v9: > - Prefix exported symbols with "counter_" to make counter namespace >explicit and clear > - Replace scnprintf and snprintf lines with sprintf in 104-quad-8.c >since we're dealing with sysfs files >

[PATCH] arm64/pvpanic-mmio : add pvpanic mmio device

2018-10-16 Thread Peng Hao
Add a platform device driver, pvpanic-mmio that is similar to x86's pvpanic device. Signed-off-by: Peng Hao --- drivers/platform/Kconfig| 3 + drivers/platform/Makefile | 1 + drivers/platform/arm/Kconfig| 6 ++ drivers/platform/arm/Makefile | 6 ++ dr

Re: [PATCH V13 0/4] C-SKY(csky) Linux Intc Driver

2018-10-16 Thread Guo Ren
Hi Marc, On Tue, Oct 16, 2018 at 03:41:05PM +0100, Marc Zyngier wrote: > Guo, > > On 16/10/18 15:08, Guo Ren wrote: > > This is about 13th patchset for C-SKY linux intc drivers and it should pair > > with 9th kernel patchset. Timer drivers are seperated according to > > requirements. > > > > Thi

RE: [PATCH v3 1/2] mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories

2018-10-16 Thread Yogesh Narayan Gaur
Hi Boris, > -Original Message- > From: Boris Brezillon [mailto:boris.brezil...@bootlin.com] > Sent: Tuesday, October 16, 2018 5:48 PM > To: Yogesh Narayan Gaur > Cc: Tudor Ambarus ; marek.va...@gmail.com; > dw...@infradead.org; computersforpe...@gmail.com; rich...@nod.at; > linux-kernel@v

Re: [RESEND PATCH v4 3/8] gpio: 104-dio-48e: Utilize for_each_set_clump macro

2018-10-16 Thread William Breathitt Gray
On Mon, Oct 15, 2018 at 01:59:33PM +0200, Rasmus Villemoes wrote: > On 2018-10-14 06:19, William Breathitt Gray wrote: > > > a bit value of 0 in the > > bits array does not necessarily mean the input was not requested, but > > may instead mean that the value at the input is 0; > > sure enough, bu

Re: [PATCH 4/6] mm: introduce page->dma_pinned_flags, _count

2018-10-16 Thread John Hubbard
On 10/16/18 1:51 AM, Jan Kara wrote: > On Sun 14-10-18 10:01:24, Dave Chinner wrote: >> On Sat, Oct 13, 2018 at 12:34:12AM -0700, John Hubbard wrote: >>> On 10/12/18 8:55 PM, Dave Chinner wrote: On Thu, Oct 11, 2018 at 11:00:12PM -0700, john.hubb...@gmail.com wrote: > From: John Hubbard >

Re: [RFC PATCH for 4.21 06/16] cpu_opv: Provide cpu_opv system call (v8)

2018-10-16 Thread Sergey Senozhatsky
Hi Mathieu, On (10/16/18 15:17), Mathieu Desnoyers wrote: > > Therefore, only an internal kernel bug between vm_map_user_ram() and > vm_unmap_user_ram() should trigger the BUG_ON(). No user input is passed > to vm_unmap_user_ram(). > > Now, let's look at vm_map_user_ram(). It calls alloc_vmap_area

[RESEND PATCH V7 1/3] MAINTAINERS: da7280 updates to the Dialog Semiconductor search terms

2018-10-16 Thread Roy Im
This patch adds the da7280 bindings doc and driver to the Dialog Semiconductor support list. Signed-off-by: Roy Im --- v7: No changes. v6: No changes. v5: No changes. v4: No changes. v3: No changes. v2: No changes. MAINTAINERS |2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAI

[RESEND PATCH V7 3/3] Input: new da7280 haptic driver

2018-10-16 Thread Roy Im
Adds support for the Dialog DA7280 LRA/ERM Haptic Driver with multiple mode and integrated waveform memory and wideband support. It communicates via an I2C bus to the device. Signed-off-by: Roy Im --- v7: - Added more attributes to handle one value per file. - Replaced and upd

[RESEND PATCH V7 0/3] da7280: haptic driver submission

2018-10-16 Thread Roy Im
This patch adds support for the Dialog DA7280 Haptic driver IC. In this patch set the following is provided: [PATCH V7 1/3] MAINTAINERS file update for DA7280 [PATCH V7 2/3] DA7280 DT Binding [PATCH V7 3/3] DA7280 Driver This patch applies against linux-next and v4.19-rc6 Thank you, Roy Im, Dia

[RESEND PATCH V7 2/3] dt-bindings: input: Add document bindings for DA7280

2018-10-16 Thread Roy Im
Add device tree binding information for DA7280 haptic driver. Example bindings for DA7280 are added. Reviewed-by: Rob Herring . Signed-off-by: Roy Im --- v7: No changes. v6: No changes. v5: Updated descriptions and fixed errors. v4: Fixed commit message, properties. v3: Fixed subject format.

[PATCH] cacheinfo: Keep the old value if of_property_read_u32 fails

2018-10-16 Thread Huacai Chen
Commit 448a5a552f336bd7b847b1951 ("drivers: base: cacheinfo: use OF property_read_u32 instead of get_property,read_number") makes cache size and number_of_sets be 0 if DT doesn't provide there values. I think this is unreasonable so make them keep the old values, which is the same as old kernels.

Re: [RFC PATCH 00/30] softirq: Make softirqs soft-interruptible (+ per vector disablement)

2018-10-16 Thread Frederic Weisbecker
On Tue, Oct 16, 2018 at 04:03:59PM -0600, Jonathan Corbet wrote: > On Thu, 11 Oct 2018 01:11:47 +0200 > Frederic Weisbecker wrote: > > > 945 files changed, 13857 insertions(+), 9767 deletions(-) > > Impressive :) In the wrong way :) > > I have to ask a dumb question, though. Might it not be

Re: [PATCH] selftests/ftrace: Use colored output when available

2018-10-16 Thread Masami Hiramatsu
On Tue, 16 Oct 2018 13:09:56 -0400 Steven Rostedt wrote: > > Masami, > > Does this fix the issues you reported? Yes, a half. We still need to strip out the escape sequences from log file even if the terminal accepts colors. Anyway, this fixes the "black character" issue for me :) Thanks Danie

Re: [RFC 4/4] gpio: sifive: Add GPIO driver for SiFive SoCs

2018-10-16 Thread Atish Patra
On 10/10/18 5:35 AM, Linus Walleij wrote: Hi Atish, thanks for your patch! On Tue, Oct 9, 2018 at 8:51 PM Atish Patra wrote: From: "Wesley W. Terpstra" Adds the GPIO driver for SiFive RISC-V SoCs. Signed-off-by: Wesley W. Terpstra [Atish: Various fixes and code cleanup] Signed-off-by: At

Re: [RFC PATCH 12/30] rcu: Prepare rcu_read_[un]lock_bh() for handling softirq mask

2018-10-16 Thread Joel Fernandes
On Wed, Oct 17, 2018 at 02:44:19AM +0200, Frederic Weisbecker wrote: > On Mon, Oct 15, 2018 at 10:28:44PM -0700, Joel Fernandes wrote: > > > diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c > > > index f8ec3d4..490358c 100644 > > > --- a/crypto/pcrypt.c > > > +++ b/crypto/pcrypt.c > > > @@ -73,12 +73

Re: [PATCH] KVM: VMX: enable nested virtualization by default

2018-10-16 Thread Wanpeng Li
On Wed, 17 Oct 2018 at 06:57, Paolo Bonzini wrote: > > With live migration support and finally a good solution for CR2/DR6 > exception payloads, nested VMX should finally be ready for having a stable > userspace ABI. The results of syzkaller fuzzing are not perfect but not > horrible either (and

Re: [RFC PATCH 12/30] rcu: Prepare rcu_read_[un]lock_bh() for handling softirq mask

2018-10-16 Thread Frederic Weisbecker
On Mon, Oct 15, 2018 at 10:28:44PM -0700, Joel Fernandes wrote: > > diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c > > index f8ec3d4..490358c 100644 > > --- a/crypto/pcrypt.c > > +++ b/crypto/pcrypt.c > > @@ -73,12 +73,13 @@ struct pcrypt_aead_ctx { > > static int pcrypt_do_parallel(struct padata_

Re: [PATCH] kernel/signal: Signal-based pre-coredump notification

2018-10-16 Thread Enke Chen
Hi, Oleg: On 10/16/18 7:14 AM, Oleg Nesterov wrote: > On 10/15, Enke Chen wrote: >> >>> I don't understand why we need valid_predump_signal() at all. >> >> Most of the signals have well-defined semantics, and would not be appropriate >> for this purpose. > > you are going to change the rules anyw

[PATCH v3] of: overlay: user space synchronization

2018-10-16 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs file

Re: [PATCH v3 2/2] sysctl: handle overflow for file-max

2018-10-16 Thread Al Viro
On Wed, Oct 17, 2018 at 12:33:22AM +0200, Christian Brauner wrote: > Currently, when writing > > echo 18446744073709551616 > /proc/sys/fs/file-max > > /proc/sys/fs/file-max will overflow and be set to 0. That quickly > crashes the system. > This commit sets the max and min value for file-max and

Re: [PATCH] PM / devfreq: Fix static checker warning in try_then_request_governor

2018-10-16 Thread Chanwoo Choi
Hi Enric, On 2018년 10월 16일 19:02, Enric Balletbo i Serra wrote: > The patch 23c7b54ca1cd: "PM / devfreq: Fix devfreq_add_device() when > drivers are built as modules." leads to the following static checker > warning: > > drivers/devfreq/devfreq.c:1043 governor_store() > warn: 'governor' c

Re: [RFC PATCH for 4.21 04/16] mm: Introduce vm_map_user_ram, vm_unmap_user_ram

2018-10-16 Thread Sergey Senozhatsky
On (10/16/18 14:30), Steven Rostedt wrote: > > +void vm_unmap_user_ram(const void *mem, unsigned int count) > > +{ > > + unsigned long size = (unsigned long)count << PAGE_SHIFT; > > + unsigned long addr = (unsigned long)mem; > > + struct vmap_area *va; > > + > > + might_sleep(); > > + BUG

Re: [RFC PATCH 29/30] softirq: Make softirq processing softinterruptible

2018-10-16 Thread Frederic Weisbecker
Hi Pavan, On Tue, Oct 16, 2018 at 09:45:52AM +0530, Pavan Kondeti wrote: > Hi Frederic, > > On Thu, Oct 11, 2018 at 01:12:16AM +0200, Frederic Weisbecker wrote: > > From: Frederic Weisbecker > > > > Make do_softirq() re-entrant and allow a vector, being either processed > > or disabled, to be i

Re: [PATCH v3 1/2] sysctl: handle overflow in proc_get_long

2018-10-16 Thread Christian Brauner
On Wed, Oct 17, 2018 at 1:46 AM Eric W. Biederman wrote: > > Christian Brauner writes: > > > proc_get_long() is a funny function. It uses simple_strtoul() and for a > > good reason. proc_get_long() wants to always succeed the parse and return > > the maybe incorrect value and the trailing charact

[PATCH] arm64/pvpanic-mmio : add pvpanic mmio device

2018-10-16 Thread Peng Hao
From: 彭浩10096742 Add a platform device driver, pvpanic-mmio that is similar to x86's pvpanic device. Signed-off-by: Peng Hao --- drivers/platform/Kconfig| 3 + drivers/platform/Makefile | 1 + drivers/platform/arm/Kconfig| 6 ++ drivers/platform/arm/Makefile

[PATCH] Input: synaptics - avoid using uninitialized variable when probing

2018-10-16 Thread Dmitry Torokhov
synaptics_detect() does not check whether sending commands to the device succeeds and instead relies on getting unique data from the device. Let's make sure we seed entire buffer with zeroes to make sure we not use garbage on stack that just happen to be 0x47. Reported-by: syzbot+13cb3b01d0784e4ff

Re: [PATCH] Input: xen-kbdfront - mark expected switch fall-through

2018-10-16 Thread Dmitry Torokhov
On Mon, Oct 08, 2018 at 04:07:48PM +0200, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Notice that in this particular case, I placed the "fall through" > part at the beginning of the code comment, wh

[PATCH 4/4] Changes macro usage to avoid shadowing a variable.

2018-10-16 Thread Leonardo Brás
Changes the usage of DEF_FIELD_ADDR in this function to create a reference and operate over it using an aux variable. It also changes the loop logic used to find duplicates, to avoid creating another variable. Signed-off-by: Leonardo Brás --- scripts/mod/file2alias.c | 14 -- 1 file

Re: WARNING: kmalloc bug in input_mt_init_slots

2018-10-16 Thread Dmitry Torokhov
On Thu, Sep 27, 2018 at 07:35:37AM -0700, Matthew Wilcox wrote: > On Mon, Sep 24, 2018 at 11:41:58AM -0700, Dmitry Torokhov wrote: > > > How large is the allocation? AFACIT nRequests larger than KMALLOC_MAX_SIZE > > > are larger than the maximum allowed by the page allocator. Thus the > > > warnin

[PATCH 3/4] kbuild: Removes unnecessary shadowed local variable and optimize testing.

2018-10-16 Thread Leonardo Brás
Removes an unnecessary shadowed local variable (start). Optimize test of isdigit: - If isalpha returns true, isdigit will return false, so no need to test. Signed-off-by: Leonardo Brás --- scripts/asn1_compiler.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --gi

[PATCH 2/4] Renames variable to fix shadow warning.

2018-10-16 Thread Leonardo Brás
Renames the char variable to avoid shadowing a variable previously declared on this function. Signed-off-by: Leonardo Brás --- arch/x86/entry/vdso/vdso2c.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h index fa

[PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-16 Thread Leonardo Brás
Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings on tools built for HOST. Signed-off-by: Leonardo Brás --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e8b599b4dcde..fb0a9ac195e7 100644 --- a/Makefile +++ b/Makefile @@ -36

[PATCH 0/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-16 Thread Leonardo Brás
This patchset add -Wshadow=local on KBUILD_HOSTCFLAGS and fixes all code that show this warning. The third patch was already submitted, but was not merged yet. I like to think it's part of this patchset, but if it was already merged, please ignore it. Leonardo Brás (4): Adds -Wshadow=local on

Re: [RFC v1 12/31] checkpatch: added support for struct MOCK(foo) syntax

2018-10-16 Thread Brendan Higgins
On Tue, Oct 16, 2018 at 4:59 PM Joe Perches wrote: > > On Tue, 2018-10-16 at 16:51 -0700, Brendan Higgins wrote: > > This adds struct MOCK(foo) as a NonptrType so that it is recognized > > correctly in declarations. > > I think this commit message is lacking context. Oh sorry, you are right. We a

[PATCH for-stable] dmaengine: stm32-dma: fix incomplete configuration in cyclic mode

2018-10-16 Thread Joel Fernandes (Google)
From: Pierre Yves MORDRET commit e57cb3b3f10d005410f09d4598cc6d62b833f2b0 upstream. When in cyclic mode, the configuration is updated after having started the DMA hardware (STM32_DMA_SCR_EN) leading to incomplete configuration of SMxAR registers. Signed-off-by: Pierre-Yves MORDRET Signed-off-b

Re: [RFC v1 12/31] checkpatch: added support for struct MOCK(foo) syntax

2018-10-16 Thread Joe Perches
On Tue, 2018-10-16 at 16:51 -0700, Brendan Higgins wrote: > This adds struct MOCK(foo) as a NonptrType so that it is recognized > correctly in declarations. I think this commit message is lacking context. > Signed-off-by: Brendan Higgins > --- > scripts/checkpatch.pl | 4 > 1 file changed

Re: [PATCH] staging: iio: ad7280a: Lines should not end with a '(' - style

2018-10-16 Thread Joe Perches
On Tue, 2018-10-16 at 20:29 -0300, Giuliano Augusto Faulin Belinassi wrote: > > (There is a linux-...@googlegroups.com mailing list > > that bounces when I reply, so I removed it from the > > cc list) > > Sorry. I think this may be because my HTML mode in gmail was enabled. No, it is because that

Re: [PATCH v13 8/8] clk: qcom: Add ACD path to CPU clock driver for msm8996

2018-10-16 Thread Stephen Boyd
Quoting ilia@gmail.com (2018-06-14 14:53:55) > @@ -176,6 +183,9 @@ static struct clk_alpha_pll pwrcl_alt_pll = { > }, > }; > > +void __iomem *base; > +static void qcom_cpu_clk_msm8996_acd_init(void __iomem *base); > + Why are we doing this? > @@ -393,6 +404,10 @@ qcom_cpu_clk_msm89

[RFC v1 09/31] kunit: test: added the concept of assertions

2018-10-16 Thread Brendan Higgins
Added support for assertions which are like expectations except the test terminates if the assertion is not satisfied. Signed-off-by: Brendan Higgins --- include/kunit/test.h | 272 - kunit/Makefile | 2 +- kunit/string-stream-test.c | 12

[RFC v1 21/31] kunit: mock: added support for arbitrary function mocking

2018-10-16 Thread Brendan Higgins
Up to this point KUnit only supported method style function mocking where there was some type of class or context object and the function was only accessed via a pointer. This adds support for mocking any function via the __mockable attribute. Signed-off-by: Brendan Higgins --- include/kunit/mo

[RFC v1 17/31] kunit: mock: added struct param matcher

2018-10-16 Thread Brendan Higgins
Added parameter matcher builder for matching struct values. Signed-off-by: Brendan Higgins --- include/kunit/mock.h | 56 +++ kunit/Makefile | 5 +- kunit/common-mocks.c | 116 ++ kunit/mock-test.c| 43 +++ kunit/test-

[RFC v1 12/31] checkpatch: added support for struct MOCK(foo) syntax

2018-10-16 Thread Brendan Higgins
This adds struct MOCK(foo) as a NonptrType so that it is recognized correctly in declarations. Signed-off-by: Brendan Higgins --- scripts/checkpatch.pl | 4 1 file changed, 4 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 447857ffaf6be..9806f190796de 100755

[RFC v1 23/31] kunit: mock: add parameter capturers

2018-10-16 Thread Brendan Higgins
Adds the concept of an argument capturer which, when used with a matcher in an EXPECT_CALL(...), will capture the value of the matching argument. Signed-off-by: Brendan Higgins --- include/kunit/mock.h | 83 kunit/common-mocks.c | 78 +

[RFC v1 31/31] MAINTAINERS: add entry for KUnit the unit testing framework

2018-10-16 Thread Brendan Higgins
Added myself as maintainer of KUnit, the Linux kernel's unit testing framework. Signed-off-by: Brendan Higgins --- MAINTAINERS | 15 +++ 1 file changed, 15 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 544cac829cf44..9c3d34f0062ad 100644 --- a/MAINTAINERS +++ b/MAINTAIN

[RFC v1 30/31] kunit.py: improved output from python wrapper

2018-10-16 Thread Brendan Higgins
- added colors to displayed output - added timing and summary Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit.py| 20 ++- tools/testing/kunit/kunit_parser.py | 93 - 2 files changed, 109 insertions(+), 4 deletions(-)

[RFC v1 28/31] kunit: added Python libraries for handing KUnit config and kernel

2018-10-16 Thread Brendan Higgins
kunit_config.py: - parses .config and Kconfig files kunit_kernel.py: provides helper functions to: - configure the kernel using kunitconfig - builds the kernel with the correct architecture - provides function to invoke the kernel and stream the output back The kernel invocation is wrappe

[RFC v1 29/31] kunit: added KUnit wrapper script and simple output parser

2018-10-16 Thread Brendan Higgins
The KUnit wrapper script interfaces with the two modules (kunit_config.py and kunit_kernel.py) and provides a command line interface for running KUnit tests. This interface allows the caller to specify options like test timeouts. The script handles configuring, building and running the kernel and t

[RFC v1 22/31] kunit: mock: add the concept of spyable functions

2018-10-16 Thread Brendan Higgins
Adds the concept of spying like in Mockito (http://static.javadoc.io/org.mockito/mockito-core/2.20.0/org/mockito/Mockito.html#spy-T-). This allows a function declaration to be labled as spyable which allows the function to be mocked *and* to allow the mock to invoke the original function definition

[RFC v1 26/31] arch: um: added stubs for mock iomem for KUnit

2018-10-16 Thread Brendan Higgins
This mocks out some iomem functions (functions like readl and writel), for mocking hardware interfaces. Signed-off-by: Brendan Higgins --- arch/um/Kconfig.common | 8 +- arch/um/Kconfig.um | 5 arch/um/include/asm/Kbuild | 1 - arch/um/includ

[RFC v1 25/31] kunit: added concept of platform mocking

2018-10-16 Thread Brendan Higgins
Platform mocking is the mocking of all platform specific functions that interact directly with hardware. In effect, this provides the ability to mock any hardware behavior. Signed-off-by: Brendan Higgins --- drivers/base/Makefile| 1 + drivers/base/platform-mock.c | 65 +

[RFC v1 27/31] Documentation: kunit: adds complete documentation for KUnit

2018-10-16 Thread Brendan Higgins
- Added intro and usage guide for KUnit - Added API reference Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins --- Documentation/index.rst | 1 + .../kunit/api/class-and-function-mocking.rst | 68 ++ Documentation/kunit/api/index.rst | 21 + Documen

[RFC v1 18/31] kunit: mock: added parameter formatters

2018-10-16 Thread Brendan Higgins
Added parameter formatters which provide string formatting for parameters that have no matchers to be matched against. Signed-off-by: Brendan Higgins --- include/kunit/mock.h | 49 +++ kunit/common-mocks.c | 132 +++ kunit/mock.c

[RFC v1 15/31] kunit: mock: added basic matchers and actions

2018-10-16 Thread Brendan Higgins
Added basic matchers and actions needed for any kind of mocking to be useful; these matchers and actions are how expectations for mocks are described: what calls the mocks are expected to receive, and what the mock should do under those circumstances. Signed-off-by: Brendan Higgins --- include/k

[RFC v1 14/31] kunit: mock: added internal mock infrastructure

2018-10-16 Thread Brendan Higgins
Adds the core internal mechanisms that mocks are implemented with; in particular, this adds the mechanisms by which expectation on mocks are validated and by which actions may be supplied and then executed when mocks are called. Signed-off-by: Brendan Higgins --- include/kunit/mock.h | 125 +

[RFC v1 06/31] arch: um: enabled running kunit from User Mode Linux

2018-10-16 Thread Brendan Higgins
Makes minimum number of changes outside of the KUnit directories for KUnit to build and run using UML. Signed-off-by: Brendan Higgins --- Makefile | 2 +- arch/um/Kconfig.rest | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 863f58503be

[RFC v1 05/31] kunit: test: added the concept of expectations

2018-10-16 Thread Brendan Higgins
Added support for expectations, which allow properties to be specified and then verified in tests. Signed-off-by: Brendan Higgins --- include/kunit/test.h | 259 +++ 1 file changed, 259 insertions(+) diff --git a/include/kunit/test.h b/include/kunit/test.

[RFC v1 19/31] kunit: mock: implemented nice, strict and naggy mock distinctions

2018-10-16 Thread Brendan Higgins
Nice mocks only fail when there is an expectation on a method, but none match a given call. Strict mocks only pass when there is a matching expectation for every call. Naggy mocks have the same pass/fail behavior as nice, but report a warning in any case a strict mock would fail. Signed-off-by: Fe

[RFC v1 20/31] kunit: mock: add ability to mock functions with void context

2018-10-16 Thread Brendan Higgins
Adds ability to mock functions with a void* context object. Signed-off-by: Brendan Higgins --- include/kunit/mock.h| 53 + kunit/mock-macro-test.c | 30 +++ kunit/mock.c| 9 +++ 3 files changed, 92 insertions(+) di

[RFC v1 24/31] kunit: improved sigsegv stack trace printing

2018-10-16 Thread Brendan Higgins
Sacrificed the control of printing stack trace within the crash handler in the test runner for getting a better stack trace; this is still not ideal, but much better than before. Signed-off-by: Brendan Higgins --- arch/um/kernel/trap.c | 11 ++- kunit/test.c | 13 +

[RFC v1 04/31] kunit: test: added test_stream a std::stream like logger

2018-10-16 Thread Brendan Higgins
Adds a C++ style log library for for logging test results. Signed-off-by: Brendan Higgins --- include/kunit/test-stream.h | 49 include/kunit/test.h| 2 + kunit/Makefile | 2 +- kunit/test-stream.c | 153 kunit/t

[RFC v1 16/31] kunit: mock: added class mocking support

2018-10-16 Thread Brendan Higgins
Introduces basic class mocking, the ability to automatically generate a Linux C-style class implementation whose behavior is controlled by test cases, which can also set expectations on when and how mocks are called. Signed-off-by: Brendan Higgins --- include/kunit/mock.h| 438 ++

[RFC v1 08/31] arch: um: added shim to trap to allow installing a fault catcher for tests

2018-10-16 Thread Brendan Higgins
Added context to current thread that allows a test to specify that it wants to skip the normal checks to run an installed fault catcher. Signed-off-by: Brendan Higgins --- arch/um/include/asm/processor-generic.h | 4 +++- arch/um/kernel/trap.c | 15 +++ 2 files cha

[RFC v1 07/31] kunit: test: added initial tests

2018-10-16 Thread Brendan Higgins
Added a test for string stream along with a more simple example. Signed-off-by: Brendan Higgins --- kunit/Kconfig | 12 ++ kunit/Makefile | 2 + kunit/example-test.c | 88 ++ kunit/string-stream-test.c | 61 +

[RFC v1 03/31] kunit: test: added test resource management API

2018-10-16 Thread Brendan Higgins
This creates a common API for test managed resources like memory and test objects. Signed-off-by: Brendan Higgins --- include/kunit/test.h | 109 +++ kunit/test.c | 95 + 2 files changed, 204 insertions(+) diff

[RFC v1 10/31] kunit: test: added concept of initcalls

2018-10-16 Thread Brendan Higgins
Added a way to add plugins that require a test module to be loaded during initialization. Signed-off-by: Brendan Higgins --- include/kunit/test.h | 19 +++ kunit/test.c | 29 + 2 files changed, 48 insertions(+) diff --git a/include/kunit/test.

[RFC v1 13/31] kunit: mock: added parameter list minipulation macros

2018-10-16 Thread Brendan Higgins
Adds macros for parsing and manipulating parameter lists needed for generating mocks. Signed-off-by: Brendan Higgins --- include/kunit/params.h | 305 kunit/Makefile | 2 +- kunit/mock-macro-test.c | 149 3 files changed,

[RFC v1 11/31] kunit: test: added concept of post conditions

2018-10-16 Thread Brendan Higgins
Adds a way to specify that certain conditions must be met at the end of a test case. Signed-off-by: Brendan Higgins --- include/kunit/test.h | 6 ++ kunit/test.c | 13 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/include/kunit/test.h b/include/kunit/t

[RFC v1 02/31] kunit: test: adds KUnit test runner core

2018-10-16 Thread Brendan Higgins
Adds the KUnit core, which allows test cases to be defined and associated with common initialization and cleanup logic. Signed-off-by: Brendan Higgins --- include/kunit/test.h | 165 ++ kunit/Makefile | 2 +- kunit/test.c | 168

[RFC v1 01/31] kunit: test: added string_stream a std::stream like string builder

2018-10-16 Thread Brendan Higgins
A number of test features need to do pretty complicated string printing where it may not be possible to rely on a single preallocated string with parameters. This provides a library for constructing the string as you go similar to C++'s std::string. Signed-off-by: Brendan Higgins --- include/ku

[RFC v1 00/31] kunit: Introducing KUnit, the Linux kernel unit testing framework

2018-10-16 Thread Brendan Higgins
This patch set proposes KUnit, a lightweight unit testing and mocking framework for the Linux kernel. Unlike Autotest and kselftest, KUnit is a true unit testing framework; it does not require installing the kernel on a test machine or in a VM and does not require tests to be written in userspace

Re: [PATCH v4 10/13] arch/x86: Add AMD feature bit X86_FEATURE_MBA in cpuid bits array

2018-10-16 Thread Fenghua Yu
On Mon, Oct 15, 2018 at 08:55:54PM +, Moger, Babu wrote: > From: Sherry Hurwitz > > The feature bit X86_FEATURE_MBA is detected via CPUID leaf 0x8008 > EBX Bit 06. This bit indicates the support of AMD's MBA feature. > > This feature is supported by both Intel and AMD. But they are detec

Re: [PATCH v2] clk: mvebu: armada-37xx-tbg: Switch to clk_get and balance it in probe

2018-10-16 Thread Stephen Boyd
Quoting Gregory CLEMENT (2018-10-10 11:18:38) > The parent clock is get only to have its name, and then the clock is no > more used, so we can safely free it using clk_put. Furthermore as between > the successful devm_clk_get() and the devm_clk_put() call we don't exit > the probe function in error

Re: [PATCH 0/7] NULL pointer deref fix for stm32-dma

2018-10-16 Thread Joel Fernandes
On Tue, Oct 16, 2018 at 06:11:29PM +0200, Greg KH wrote: > On Mon, Oct 08, 2018 at 10:47:45PM -0700, Joel Fernandes (Google) wrote: > > Hi Greg, > > > > While looking at android-4.14, I found a NULL pointer deref with > > stm32-dma driver using Coccicheck errors. I found that upstream had a > > bu

Re: [RESEND][PATCH] scsi: ufs: Fix hynix ufs bug with quirk on hi36xx SoC

2018-10-16 Thread John Stultz
On Tue, Oct 16, 2018 at 3:48 PM, John Stultz wrote: > On Mon, Oct 15, 2018 at 8:41 PM, Martin K. Petersen > wrote: >> >> John, >> >>> Hynix ufs has deviations on hi36xx platform which will result in ufs >>> bursts transfer failures. >> >> Is this specific to the particular implementation on hi36x

Re: [PATCH v4 08/13] arch/x86: Bring few more functions into the resource structure

2018-10-16 Thread Fenghua Yu
On Mon, Oct 15, 2018 at 08:55:49PM +, Moger, Babu wrote: > update_mba_bw : Feedback loop bandwidth update functionality is not > needed for AMD. Will you implement update_mba_bw() for AMD in future? > list_for_each_entry(crgrp, head, mon.crdtgrp_list) >

mmotm 2018-10-16-16-46 uploaded

2018-10-16 Thread akpm
The mm-of-the-moment snapshot 2018-10-16-16-46 has been uploaded to http://www.ozlabs.org/~akpm/mmotm/ mmotm-readme.txt says README for mm-of-the-moment: http://www.ozlabs.org/~akpm/mmotm/ This is a snapshot of my -mm patch queue. Uploaded at random hopefully more than once a week. You wi

Re: [PATCH v3 1/2] sysctl: handle overflow in proc_get_long

2018-10-16 Thread Eric W. Biederman
Christian Brauner writes: > proc_get_long() is a funny function. It uses simple_strtoul() and for a > good reason. proc_get_long() wants to always succeed the parse and return > the maybe incorrect value and the trailing characters to check against a > pre-defined list of acceptable trailing valu

Re: [PATCH v3 1/2] mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories

2018-10-16 Thread Cyrille Pitchen
Hi Tudor, Le 16/10/2018 à 17:14, Tudor Ambarus a écrit : > Hi, Yogesh, > > On 10/16/2018 12:51 PM, Yogesh Narayan Gaur wrote: >> Hi Tudor, >> >> This patch is breaking the 1-4-4 Read protocol for the spansion flash >> "s25fl512s". >> >> Without this patch read request command for Quad mode, 4-by

Re: [RFC PATCH 00/30] softirq: Make softirqs soft-interruptible (+ per vector disablement)

2018-10-16 Thread Richard Cochran
On Tue, Oct 16, 2018 at 04:03:59PM -0600, Jonathan Corbet wrote: > I have to ask a dumb question, though. Might it not be better to add a > new set of functions like: > > local_softirq_disable(mask); > spin_lock_softirq(lock, mask); > > Then just define the existing functions to call

Re: [PATCH] staging: iio: ad7280a: Lines should not end with a '(' - style

2018-10-16 Thread Giuliano Augusto Faulin Belinassi
>(There is a linux-...@googlegroups.com mailing list >that bounces when I reply, so I removed it from the >cc list) Sorry. I think this may be because my HTML mode in gmail was enabled. > I wrote that to encourage you to do more than > what checkpatch says. > I just moved code around and reduced

Re: [PATCH 1/3] x86/mm/pat: Disable preemption around __flush_tlb_all()

2018-10-16 Thread Andy Lutomirski
On Tue, Oct 16, 2018 at 2:39 PM Sebastian Andrzej Siewior wrote: > > On 2018-10-16 14:25:07 [-0700], Andy Lutomirski wrote: > > > diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c > > > index 51a5a69ecac9f..fe6b21f0a6631 100644 > > > --- a/arch/x86/mm/pageattr.c > > > +++ b/arch/x86/mm/

[PATCH 7/7] tty: Fix section format

2018-10-16 Thread Tobin C. Harding
Currently sections (specifically 'Return:' and 'Context:') are non-uniform and/or incorrectly labelled. We should use the format outlined in Documentation/doc-guide/kernel-doc.rst. This patch is a bit of a mash up because text is on occasions mixed up in the current comments. - Use 'Context:' (

[PATCH 4/7] tty: Fix kernel-doc variable typos

2018-10-16 Thread Tobin C. Harding
From: "Tobin C. Harding" There are a few typos in the kernel-doc variables [descriptions]. Fix these by using the correct variable name and adding a description. Fix kernel-doc variable typos. Signed-off-by: Tobin C. Harding --- drivers/tty/serial/men_z135_uart.c | 4 ++-- 1 file changed, 2

[PATCH 1/7] tty: Fix whitespace before tab warnings

2018-10-16 Thread Tobin C. Harding
This patch is whitespace only. Checkpatch emits a BUNCH of warnings of type WARNING: please, no spaces at the start of a line WARNING: please, no space before tabs While these may seem trivial they hinder further cleanup efforts because there are so many that later cleanup touche

[PATCH 6/7] tty: Remove newline after function kernel-doc

2018-10-16 Thread Tobin C. Harding
From: "Tobin C. Harding" Currently there are many places were a newline is left between the kernel-doc function comment and the function it is documenting. There should not be a newline here. Remove newline after function kernel-doc. This patch is whitespace only. Signed-off-by: Tobin C. Hard

[PATCH 0/7] drivers: tty: Fix kernel-docs comments

2018-10-16 Thread Tobin C. Harding
Hi, My first patch set using kernel.org email address. I've been so careful with this one I'm expecting some epic fail :) This set is an attempt to clean up the kernel docs comments under drivers/tty/. I do not know what time in the kernel dev cycle would be best for this set. If now is not th

<    1   2   3   4   5   6   7   8   9   10   >