Re: [PATCH] vsprintf: drop comment claiming %n is ignored

2013-09-13 Thread Joe Perches
On Sat, 2013-09-14 at 05:53 +0100, Al Viro wrote: > The bottom line: most of these guys could as well return void; we have > few overflow checks and those could be made explicit. As it is, > "return -1 on overflow" had been a mistake. What do you think of adding last_ret and last_len to struct se

[PATCH] checkpatch: add rules to check init attribute and const defects

2013-09-15 Thread Joe Perches
People get this regularly wrong and it breaks the LTO builds, as it causes a section attribute conflict. Original-patch-by: Andi Kleen Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/scripts

[PATCH v2] checkpatch: add rules to check init attribute and const defects

2013-09-15 Thread Joe Perches
People get this regularly wrong and it breaks the LTO builds, as it causes a section attribute conflict. Add --fix capability too. Original-patch-by: Andi Kleen Signed-off-by: Joe Perches --- V2: Move it closer to the other attribute check and add the --fix options too. scripts

[untested checkpatch patch] treewide: Convert __initdata and __initconst misuses

2013-09-15 Thread Joe Perches
Hey Andi. I ran the updated checkpatch tests against the -next tree and get this patch below: There are slightly suspicious conversions of from: static const char *foo __initdata = { "bar", "baz" }; to: static const char *foo __initconst = { "bar", "baz" }; Maybe these should be

Re: [PATCH 1/2] remove all uses of printf's %n

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 07:59 -0700, Kees Cook wrote: > Perhaps instead of seq->count, there should be an access function? > seq_get_count(seq) or something? My thought was to add a seq_last_len() -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: [PATCH] gpu: host1x: use %pa to print dma_addr_t

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 08:46 -0700, Olof Johansson wrote: > On Mon, Sep 16, 2013 at 8:17 AM, Thierry Reding > wrote: > > On Wed, Sep 11, 2013 at 09:41:49PM -0700, Olof Johansson wrote: > >> This removes two warnings where dma_addr_t variables were printed using > >> %x when built with CONFIG_ARM_LP

Re: [PATCH 1/2] remove all uses of printf's %n

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 08:25 -0700, Kees Cook wrote: > On Mon, Sep 16, 2013 at 8:09 AM, Joe Perches wrote: > > On Mon, 2013-09-16 at 07:59 -0700, Kees Cook wrote: > >> Perhaps instead of seq->count, there should be an access function? > >> seq_get_count(seq) or someth

Re: [PATCH 1/2] remove all uses of printf's %n

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 12:07 -0400, George Spelvin wrote: > it gave me an idea. We could put this padding logic straight > into vsprintf and clean up all the callers. [] > Since the only pad character currently used is space, we could omit the > argument and use something like %127%, but gcc gets e

Re: [PATCH 1/2] remove all uses of printf's %n

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 13:21 -0400, George Spelvin wrote: > > My thought was to add a seq_last_len() > > In addition to adding per-call overhead to support a rarely-used feature > (while ->pos comes for free), this has the downside that it matters how > many separate calls are used to generate the

Re: [PATCH 1/2] remove all uses of printf's %n

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 12:39 -0400, George Spelvin wrote: > > %*p (space assumed if not existing) > > Yes, that's the fallback, but it requires an ugly dummy pointer argument. > And some extra kludgery in the code because pointer() doesn't have access > to the start-of-buffer address. > > I'd prefe

Re: [PATCH 1/2] remove all uses of printf's %n

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 15:15 -0400, George Spelvin wrote: > > It'd be consistent with all the other %p types. > > > > vsnprintf is already weird enough with %p uses, > > there's absolutely no reason to stretch it further > > with yet another odd access/format style. > > Well, all the other %p types

Re: [PATCH] dvb: fix potential format string leak

2013-09-16 Thread Joe Perches
On Mon, 2013-09-16 at 16:37 -0700, Kees Cook wrote: > Make sure that a format string cannot accidentally leak into the printk > buffer. [] > diff --git a/drivers/media/dvb-frontends/dib9000.c > b/drivers/media/dvb-frontends/dib9000.c [] > @@ -649,7 +649,7 @@ static int dib9000_risc_debug_buf(struc

Re: [PATCH] ahci: Changing two module params with static and __read_mostly

2013-09-17 Thread Joe Perches
On Wed, 2013-09-18 at 00:48 +0800, Chuansheng Liu wrote: > Here module parameters ahci_em_messages and devslp_idle_timeout can > be set as static and __read_mostly. > > Signed-off-by: Liu, Chuansheng > --- > drivers/ata/libahci.c |5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >

Re: [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err

2013-09-17 Thread Joe Perches
On Mon, 2013-09-16 at 15:43 +0200, Iker Pedrosa wrote: > The previously used printk lacked the warning level, now we've got a more > accurate way to know the error. [] > diff --git a/drivers/staging/winbond/wb35tx.c > b/drivers/staging/winbond/wb35tx.c [] > @@ -32,7 +32,7 @@ static void Wb35Tx_co

Re: [PATCH 2/2] x86: Useless inode var and Coding style fixes

2013-09-17 Thread Joe Perches
On Tue, 2013-09-17 at 23:54 -0300, Geyslan G. Bem wrote: > Coding style and printk strings fixes. [] > diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c [] > @@ -299,12 +301,12 @@ static int load_aout_binary(struct linux_binprm * bprm) > > if ((fd_offset & ~PAGE_MASK) != 0 && printk_

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-17 Thread Joe Perches
On Tue, 2013-09-17 at 18:08 -0500, danielfsan...@att.net wrote: > This adds an extension for the integral format specifier suffix of 'e', > so that the format %[duxXo]e will result in printing an number (as > before) in addition to a name and descrption for an error code, if such > support is enabl

Re: [PATCH 002/007] WAN Drivers: Update farsync driver and introduce fsflex driver

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 11:11 +0100, Kevin Curtis wrote: > Farsite Communications FarSync driver update [] > diff -uprN -X linux-3.10.1/Documentation/dontdiff > linux-3.10.1/drivers/net/wan/uss_cmn.h > linux-3.10.1_new/drivers/net/wan/uss_cmn.h > +typedef enum _USS_COMMANDS { I think this code wo

Re: [PATCH 003/007] WAN Drivers: Update farsync driver and introduce fsflex driver

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 11:12 +0100, Kevin Curtis wrote: > Farsite Communications FarSync driver update > diff -uprN -X linux-3.10.1/Documentation/dontdiff > linux-3.10.1/drivers/net/wan/fscmn.h linux-3.10.1_new/drivers/net/wan/fscmn.h [] > +#ifdef UINT32 > +#define u32 UINT32 > +#define u16 UINT16

Re: [PATCH 005/007] WAN Drivers: Update farsync driver and introduce fsflex driver

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 11:12 +0100, Kevin Curtis wrote: > Farsite Communications FarSync driver update > > Patch 5 of 7 Please run your patches through checkpatch total: 4178 errors, 6155 warnings, 9910 lines checked -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [RFC PATCH] fpga: Introduce new fpga subsystem

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 17:56 +0200, Michal Simek wrote: > This new subsystem should unify all fpga drivers which > do the same things. Load configuration data to fpga > or another programmable logic through common interface. > It doesn't matter if it is MMIO device, gpio bitbanging, > etc. connectio

Re: [PATCHv3 02/16] drivers: thermal: introduce device tree parser

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 15:02 -0400, Eduardo Valentin wrote: > This patch introduces a device tree bindings for > describing the hardware thermal behavior and limits. > Also a parser to read and interpret the data and feed > it in the thermal framework is presented. trivial notes: > diff --git a/dr

Re: [PATCHv3 02/16] drivers: thermal: introduce device tree parser

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 15:44 -0400, Eduardo Valentin wrote: > Hello Joe, Hello Eduardo. > 18-09-2013 15:11, Joe Perches wrote: > > On Wed, 2013-09-18 at 15:02 -0400, Eduardo Valentin wrote: > >> This patch introduces a device tree bindings for > >> describing the

Re: [PATCH 1/2] hwrng: OMAP3 ROM Random Number Generator support

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 22:05 +0200, Pali Rohár wrote: > This driver provides kernel-side support for the Random Number > Generator hardware found on OMAP34xx processors. [] > diff --git a/drivers/char/hw_random/omap3-rom-rng.c > b/drivers/char/hw_random/omap3-rom-rng.c trivial note: It produces

Re: [PATCHv4 02/16] drivers: thermal: introduce device tree parser

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 16:31 -0400, Eduardo Valentin wrote: > +/** > + * of_parse_thermal_zones - parse device tree thermal data > + * > + * Initialization function that can be called by machine initialization > + * code to parse thermal data and populate the thermal framework > + * with hardware t

Re: [PATCHv4 02/16] drivers: thermal: introduce device tree parser

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 16:52 -0400, Eduardo Valentin wrote: > On 18-09-2013 16:44, Joe Perches wrote: > > On Wed, 2013-09-18 at 16:31 -0400, Eduardo Valentin wrote: > > > >> +/** > >> + * of_parse_thermal_zones - parse device tree thermal data > >> + * &g

Re: [PATCHv5 02/16] drivers: thermal: introduce device tree parser

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 16:57 -0400, Eduardo Valentin wrote: > This patch introduces a device tree bindings for > describing the hardware thermal behavior and limits. > Also a parser to read and interpret the data and feed > it in the thermal framework is presented. [] > +int __init of_parse_thermal_

Re: [PATCH v2 2/4] gcov: add support for gcc 4.7 gcov format

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 14:22 -0700, Andrew Morton wrote: > On Wed, 4 Sep 2013 16:42:54 +0200 Frantisek Hrbata > wrote: > > The gcov in-memory format changed in gcc 4.7. The biggest change, which > > requires this special implementation, is that gcov_info no longer contains > > array of counters f

Re: [PATCH v2] clk: si570: Add a driver for SI570 oscillators

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 15:43 -0700, Soren Brinkmann wrote: > Add a driver for SILabs 570, 571, 598, 599 programmable oscillators. > The devices generate low-jitter clock signals and are reprogrammable via > an I2C interface. [] > v2: [] > - use 1 as MIN and MAX value in usleep_range [] > diff -

Re: [PATCH v2] clk: si570: Add a driver for SI570 oscillators

2013-09-18 Thread Joe Perches
On Wed, 2013-09-18 at 16:09 -0700, Sören Brinkmann wrote: > On Wed, Sep 18, 2013 at 04:02:41PM -0700, Joe Perches wrote: > > On Wed, 2013-09-18 at 15:43 -0700, Soren Brinkmann wrote: > > > Add a driver for SILabs 570, 571, 598, 599 programmable oscillators. > > > The

Re: [PATCH v1 5/6] bitops: Introduce BIT_ULL

2013-09-19 Thread Joe Perches
On Thu, 2013-09-19 at 19:28 +0200, Borislav Petkov wrote: > On Thu, Sep 19, 2013 at 10:07:35AM -0700, Srinivas Pandruvada wrote: > > The current definition for BIT_64 is in arch/x86/include/asm/bitops.h. > > I feel it should be applicable for all architectures and move to some > > common file. > >

[PATCH] stable_kernel_rules.txt: Exclude networking from stable rules

2013-09-19 Thread Joe Perches
Networking is once again "special", so at least document how it's working today in the hope that doing so makes less work for all that actually read the documentation. Signed-off-by: Joe Perches --- On Thu, 19 Sep 2013, David Miller wrote: > Secondly, CC:'ing stable is

Re: [PATCH v1 5/6] bitops: Introduce BIT_ULL

2013-09-19 Thread Joe Perches
On Thu, 2013-09-19 at 11:34 -0700, Srinivas Pandruvada wrote: > Let's do in two steps: > - In the next patcheset I will add BIT_ULL_MASK and BIT_ULL_WORD in > addition to BIT_ULL > - Once this series is approved, submit a separate patch to change BIT_64 > to BIT_ULL Fine by me. -- To unsubscr

Re: [PATCH] stable_kernel_rules.txt: Exclude networking from stable rules

2013-09-19 Thread Joe Perches
On Thu, 2013-09-19 at 23:32 +0200, Francois Romieu wrote: > Joe Perches : > [...] > > diff --git a/Documentation/stable_kernel_rules.txt > > b/Documentation/stable_kernel_rules.txt > > index b0714d8..a2d6da0 100644 > > --- a/Documentation/stable_kernel_rul

Re: [PATCH 2/10] xtensa: Cocci spatch "noderef"

2013-09-19 Thread Joe Perches
On Thu, 2013-09-19 at 23:42 +0200, Thomas Meyer wrote: > sizeof when applied to a pointer typed expression gives the size of the > pointer. Hi Thomas, thanks for doing the series... > diff -u -p a/arch/xtensa/platforms/iss/network.c > b/arch/xtensa/platforms/iss/network.c [] > @@ -737,7 +737,7 @

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-19 Thread Joe Perches
On Wed, 2013-09-18 at 20:27 -0500, Daniel Santos wrote: > if I use ERR_PTR() on a signed int on a x86_64 where pointer > is 64 bits and int is 32, wouldn't that mean a signed conversion > instruction where the sign bit has to be moved from bit 31 to 63? No. It's cast to long static inline void

[PATCH 2/2] framebuffer: Use fb_

2013-09-19 Thread Joe Perches
Neaten and shorten the code using the new fb_ macros. Signed-off-by: Joe Perches --- drivers/auxdisplay/cfag12864bfb.c| 3 +- drivers/video/68328fb.c | 9 +++--- drivers/video/amifb.c| 4 +-- drivers/video/arcfb.c| 8 ++--- drivers/video

[PATCH 1/2] framebuffer: Add fb_ convenience logging macros

2013-09-19 Thread Joe Perches
Add fb_ convenience macros for emitting the "fb%d: ", struct fb_info->node value. Neatens and shortens the code a bit. Signed-off-by: Joe Perches --- include/linux/fb.h | 12 1 file changed, 12 insertions(+) diff --git a/include/linux/fb.h b/include/linux/fb.h

[PATCH 1/2] framebuffer: arkfb: Fix framebugger typo

2013-09-19 Thread Joe Perches
s/framebugger/framebuffer/ Signed-off-by: Joe Perches --- drivers/video/arkfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index ee0f1a1..b13f3f2 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c @@ -1048,7

[PATCH 2/2] framebuffer: Remove pmag-aa-fb

2013-09-19 Thread Joe Perches
This driver apparently hasn't compiled since 2.5 days as it uses a #define that isn't around anymore. Remove it. Signed-off-by: Joe Perches --- drivers/video/Kconfig | 10 - drivers/video/Makefile | 1 - drivers/video/pmag-aa-

[PATCH 2/2] framebuffer: Fix int cast to pointer warnings

2013-09-19 Thread Joe Perches
Casts of int to pointer need additional casts to (unsigned long) when compiled for x86-64 to silence the compiler. Signed-off-by: Joe Perches --- drivers/video/arkfb.c| 2 +- drivers/video/vt8623fb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video

Re: [PATCH 1/2] remove all uses of printf's %n

2013-09-19 Thread Joe Perches
On Fri, 2013-09-20 at 13:09 +0900, Tetsuo Handa wrote: > Hello. Tetsuo-san: > We are discussing about removal of %n support from vsnprintf() at > https://lkml.org/lkml/2013/9/16/52 , and you are using %n in seq_printf(). Well, I'm not using (mere alcohol isn't using, right?) but I still have the

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-20 Thread Joe Perches
On Fri, 2013-09-20 at 00:21 -0500, Daniel Santos wrote: [nice example about bloat] > Yeah, I do agree, I just don't see how to do it without introducing > unnecessary bloat. I think the code size cost of %pE is pretty trivial compared to the log size/runtime cost. I would not want to see it us

Re: [PATCH] stable_kernel_rules.txt: Exclude networking from stable rules

2013-09-20 Thread Joe Perches
On Thu, 2013-09-19 at 11:31 -0700, Joe Perches wrote: > Networking is once again "special", so at least document > how it's working today in the hope that doing so makes > less work for all that actually read the documentation. David, why did you mark this N/A is patchw

[PATCH 10/11] genetlink.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/genetlink.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 8e0b6c8..9b787b6 100644 --- a/include/net/genetlink.h

[PATCH 01/11] compat.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/compat.h | 48 +++- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/include/net/compat.h b/include/net/compat.h index 6e95653..3b603b1 100644 --- a/includ

[PATCH 07/11] flow.h/flow_keys.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/flow.h | 11 ++- include/net/flow_keys.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/net/flow.h b/include/net/flow.h index 628e11b..65ce471 100644 --- a/include/net/f

[PATCH 05/11] esp.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/esp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/esp.h b/include/net/esp.h index d584513..1356dda 100644 --- a/include/net/esp.h +++ b/include/net/esp.h @@ -13,7 +13,7 @@ struct esp

[PATCH 06/11] fib_rules.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/fib_rules.h | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 4b2b557..e584de1 100644 --- a/include/net/fib_rules.h +++ b/in

[PATCH 09/11] gen_stats.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/gen_stats.h | 51 - 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index cf8439b..ea4271d 100644

[PATCH 11/11] icmp.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/icmp.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/net/icmp.h b/include/net/icmp.h index 081439f..970028e 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h @@ -39,10 +

Re: [PATCH 2/2] framebuffer: Remove pmag-aa-fb

2013-09-20 Thread Joe Perches
On Fri, 2013-09-20 at 19:18 +0100, Maciej W. Rozycki wrote: > Joe, Geert -- Hi Maciej > Can we please wait with that a few days? I've been reviving DECstation > bits recently but the generic stuff took priority (thankfully little > bitrot there, the port generally works, except from the 64-bit

[PATCH 02/11] dcbevent.h: Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/dcbevent.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/dcbevent.h b/include/net/dcbevent.h index 443626e..d2f3041 100644 --- a/include/net/dcbevent.h +++ b/include/net/dcbev

[PATCH 03/11] decnet (dn*.h): Remove extern from function prototypes

2013-09-20 Thread Joe Perches
clare automatic/local variables in a block. Signed-off-by: Joe Perches --- include/net/dn.h | 20 +++- include/net/dn_dev.h | 30 +++--- include/net/dn_fib.h | 47 ++- include/net/dn_neigh.h | 12 ++-- in

Re: [PATCH net-next v2 1/2] random: add prandom_u32_range and prandom_u32_max helpers

2013-09-04 Thread Joe Perches
On Wed, 2013-09-04 at 14:37 +0200, Daniel Borkmann wrote: > We have implemented the same function over and over, so introduce > generic helpers that unify these implementations in order to migrate > such code to use them. Make the API similarly to randomize_range() > for consistency. prandom_u32_ra

Re: [PATCH] Add an entry in MAINTAINERS for VMware's hypervisor interface

2013-09-04 Thread Joe Perches
On Wed, 2013-09-04 at 14:23 +0530, Alok Kataria wrote: > Hey, > > This change adds an entry to the maintainers file to explicitly state > that any changes to vmware.c should be sent to the authors of the file > as well. It never hurts to add MAINTAINER entries. > If you are thinking why do this

Re: [PATCH] checkpatch: Extend CamelCase types and ignore existing CamelCase uses in a patch

2013-09-04 Thread Joe Perches
(sending for 3rd time, odd dns problems today, apologies for dupes) On Wed, 2013-09-04 at 08:58 -0700, Sarah Sharp wrote: > On Tue, Sep 03, 2013 at 10:25:21AM -0700, Joe Perches wrote: > > Extend the CamelCase words found to include structure members. > > > > In https://l

Re: [PATCH] Fix missing braces in ncpfs:ncp_lookup

2013-09-04 Thread Joe Perches
(adding Petr Vandrovec to cc's) > diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c [] > @@ -857,10 +857,11 @@ static struct dentry *ncp_lookup(struct inode *dir, > struct dentry *dentry, unsig > if (ncp_is_server_root(dir)) { > res = ncp_io2vol(server, __name, &len, dentry->d_name

Re: [PATCH] ALSA: emu10k1: casting (void *) value returned by kcalloc is useless

2013-09-04 Thread Joe Perches
On Thu, 2013-09-05 at 13:57 +0800, Duan Jiong wrote: > From: Duan Jiong > > Casting (void *) value returned by kcalloc is useless > as mentioned in Documentation/CodingStyle, Chap 14. __user is an important marker that is lost here. > diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/e

Re: [PATCH] ALSA: emu10k1: casting (void *) value returned by kcalloc is useless

2013-09-05 Thread Joe Perches
On Thu, 2013-09-05 at 18:10 +0800, Duan Jiong wrote: > 于 2013年09月05日 14:12, Joe Perches 写道: > > On Thu, 2013-09-05 at 13:57 +0800, Duan Jiong wrote: > >> From: Duan Jiong > >> > >> Casting (void *) value returned by kcalloc is useless > >> as me

Re: [PATCH RESEND v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.

2013-09-05 Thread Joe Perches
Whitespace neatening... Multiline statement argument alignment. Argument wrapping. Use kmalloc_array instead of kmalloc. --- drivers/misc/mic/card/mic_virtio.c | 17 --- drivers/misc/mic/card/mic_x100.c| 4 +- drivers/misc/mic/host/mic_debugfs.c | 91 ++

Re: [PATCH] kernel-doc: Update script to find more "Return:" sections

2013-09-08 Thread Joe Perches
On Sun, 2013-09-08 at 20:05 -0500, Rob Landley wrote: > On 09/03/2013 07:34:28 PM, Joe Perches wrote: > > Many kernel-doc return description sections headers > > use variants of the "Return:" section prefix. > > > > (some or maybe even most of these aren&#x

Re: [checkpatch.pl] runtime error by version dependency.

2013-09-09 Thread Joe Perches
On Mon, 2013-09-09 at 21:16 +0900, Tetsuo Handa wrote: > Hello. > > Commit d1fe9c09 "checkpatch: add some --strict coding style checks" > introduced dependency on perl >= 5.10.0 . > > While the comment says that "Any use must be runtime checked with $^V", > it is not runtime checked when running

Re: [PATCH] mei: Don't dev_err() on suspend

2013-09-10 Thread Joe Perches
On Tue, 2013-09-10 at 11:54 -0400, Adam Jackson wrote: > Suspend isn't an error condition, and I'm sick of seeing this (and only > this) on the console when I suspend with quiet boot enabled. [] > diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c [] > @@ -262,7 +262,7 @@ static int

Re: [PATCH] mei: Don't dev_err() on suspend

2013-09-10 Thread Joe Perches
On Tue, 2013-09-10 at 16:37 +, Winkler, Tomas wrote: > From: Joe Perches [mailto:j...@perches.com] > > On Tue, 2013-09-10 at 11:54 -0400, Adam Jackson wrote: > > > Suspend isn't an error condition, and I'm sick of seeing this (and only > > > this) on the c

[PATCH] slab: Make allocations with GFP_ZERO slightly more efficient

2013-09-10 Thread Joe Perches
Use the likely mechanism already around valid pointer tests to better choose when to memset to 0 allocations with __GFP_ZERO Signed-off-by: Joe Perches --- mm/slab.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 2580db0..94e7e54

Re: slab: krealloc with GFP_ZERO defect

2013-09-10 Thread Joe Perches
ping? On Thu, 2013-08-29 at 14:47 -0700, Joe Perches wrote: > This sequence can return non-zeroed memory from the > padding area of the original allocation. > > ptr = kzalloc(foo, GFP_KERNEL); > if (!ptr) > ... > new_ptr = krealloc(ptr,

Re: Resend: [PATCH 2/2] s390: provide hardware randomness from zcrypt card to /dev/random

2013-09-10 Thread Joe Perches
On Wed, 2013-09-04 at 10:48 +0200, Torsten Duwe wrote: [] > +++ b/drivers/s390/crypto/zcrypt_api.c > @@ -1141,6 +1144,36 @@ static struct hwrng zcrypt_rng_dev = { ][ > +static int zcrypt_hwrng_fillfn(void *unused) > +{ > + long rc; > + > + while (!kthread_should_stop()) { > +

Re: [PATCH] staging: dgnc: fix potential format string flaw

2013-09-10 Thread Joe Perches
On Tue, 2013-09-10 at 21:41 -0700, Kees Cook wrote: > Make sure that format strings cannot leak into printk() calls from the > msgbuf string. printf(string); vs printf("%s", string); How does this help? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

Re: [PATCH] staging: dgnc: fix potential format string flaw

2013-09-11 Thread Joe Perches
On Wed, 2013-09-11 at 11:19 -0700, Kees Cook wrote: > On Wed, Sep 11, 2013 at 2:31 AM, Dan Carpenter > wrote: > > On Tue, Sep 10, 2013 at 10:19:17PM -0700, Kees Cook wrote: > >> In the former case, format characters will get processed by the > >> sprintf logic. In the latter, they are printed as-

Re: [PATCH] staging: dgnc: fix potential format string flaw

2013-09-11 Thread Joe Perches
On Wed, 2013-09-11 at 12:25 -0700, Kees Cook wrote: > On Wed, Sep 11, 2013 at 12:09 PM, Joe Perches wrote: > > On Wed, 2013-09-11 at 11:19 -0700, Kees Cook wrote: > >> On Wed, Sep 11, 2013 at 2:31 AM, Dan Carpenter > >> wrote: > >> > On Tue, Sep 10, 20

Re: [PATCH] vsprintf: drop comment claiming %n is ignored

2013-09-11 Thread Joe Perches
On Wed, 2013-09-11 at 13:18 -0700, Kees Cook wrote: > On Wed, Sep 11, 2013 at 1:06 PM, Joe Perches wrote: > > On Wed, 2013-09-11 at 12:30 -0700, Kees Cook wrote: > >> The %n format is not ignored, so remove the incorrect comment about it. > > > > I think it ma

Re: [PATCH] vsprintf: drop comment claiming %n is ignored

2013-09-11 Thread Joe Perches
On Wed, 2013-09-11 at 12:30 -0700, Kees Cook wrote: > The %n format is not ignored, so remove the incorrect comment about it. I think it may be better to reimplement the ignoring. Maybe: --- lib/vsprintf.c | 18 +--- net/ipv4/fib_trie.c | 30 +-- net/ipv4/ping.c

Re: [PATCH] vsprintf: drop comment claiming %n is ignored

2013-09-11 Thread Joe Perches
On Wed, 2013-09-11 at 13:18 -0700, Kees Cook wrote: > I think Dan's idea of a WARN_ON_ONCE() here is a good idea to help > anyone accidentally trying to use it. Maybe WARN_ONCE so it's easier to emit the format too. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in th

[RFC PATCH] vsnprintf: Remove use of %n and convert existing uses

2013-09-11 Thread Joe Perches
urn length from vsnprintf or its derivatives. Signed-off-by: Joe Perches Acked-by: KOSAKI Motohiro (proc bits) cc: Kees Cook cc: Frederic Weisbecker --- Not particularly well tested... fs/proc/consoles.c | 2 +- fs/proc/nommu.c | 20 ++--- fs/proc/task_mmu.c | 18 +-

Re: [RFC PATCH] vsnprintf: Remove use of %n and convert existing uses

2013-09-11 Thread Joe Perches
On Wed, 2013-09-11 at 16:29 -0700, Kees Cook wrote: > On Wed, Sep 11, 2013 at 4:22 PM, Joe Perches wrote: > > Using vsnprintf or its derivatives with %n can have security > > vulnerability implications. > > > > Prior to commit fef20d9c1380 > > ("vsprintf: uni

Re: [RFC PATCH] vsnprintf: Remove use of %n and convert existing uses

2013-09-11 Thread Joe Perches
On Thu, 2013-09-12 at 08:40 +0900, Tetsuo Handa wrote: > Joe Perches wrote: > > - seq_printf(m, "%s%d%n", con->name, con->index, &len); > > + len = seq_printf(m, "%s%d", con->name, con->index); > > Isn't len always 0 or -1 ? Righ

Re: [RFC PATCH] vsnprintf: Remove use of %n and convert existing uses

2013-09-11 Thread Joe Perches
On Thu, 2013-09-12 at 01:19 +0100, Al Viro wrote: > On Wed, Sep 11, 2013 at 05:04:17PM -0700, Joe Perches wrote: > > On Thu, 2013-09-12 at 08:40 +0900, Tetsuo Handa wrote: > > > Joe Perches wrote: > > > > - seq_printf(m, "%s%d%n", con->n

Re: [RFC PATCH] vsnprintf: Remove use of %n and convert existing uses

2013-09-12 Thread Joe Perches
On Thu, 2013-09-12 at 09:06 +0100, David Laight wrote: > > On Wed, Sep 11, 2013 at 05:04:17PM -0700, Joe Perches wrote: > > > On Thu, 2013-09-12 at 08:40 +0900, Tetsuo Handa wrote: > > > > Joe Perches wrote: > > > > > - seq_printf(m, "%s%d%n"

Re: [PATCH] dma: use %pa to print dma_addr_t

2013-09-12 Thread Joe Perches
On Thu, 2013-09-12 at 10:05 -0700, Randy Dunlap wrote: > On 09/11/13 21:38, Olof Johansson wrote: > > This resolves some warnings seen when building with CONFIG_ARM_LPAE=y, since > > dma_addr_t might then be 64-bit: > > > > drivers/dma/imx-sdma.c:1092:3: warning: format '%x' expects argument of

Re: linux-next: manual merge of the wireless-next tree

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 10:48 -0500, Larry Finger wrote: > On 10/07/2013 10:18 AM, Thierry Reding wrote: > > Today's linux-next merge of the wireless-next tree got conflicts in: > > > > drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h > > drivers/net/wireless/rtlwifi/rtl8188ee/phy.h > >

Re: linux-next: manual merge of the wireless-next tree

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 11:09 -0500, Larry Finger wrote: > On 10/07/2013 10:56 AM, Joe Perches wrote: > > On Mon, 2013-10-07 at 10:48 -0500, Larry Finger wrote: > >> On 10/07/2013 10:18 AM, Thierry Reding wrote: > >>> Today's linux-next merge of the

Re: [RFC PATCH] checkpatch: Make the 80-character limit a --strict check only

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 12:18 -0700, Josh Triplett wrote: > The 80-character limit is not a hard-and-fast rule, nor should it be > applied blindly by people running checkpatch and fixing its warnings. > Sometimes it's better to violate the 80-character "limit" in the name of > readability, and when i

Re: [RFC PATCH] checkpatch: Make the 80-character limit a --strict check only

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 12:34 -0700, Josh Triplett wrote: > On Mon, Oct 07, 2013 at 12:28:26PM -0700, Joe Perches wrote: > > On Mon, 2013-10-07 at 12:18 -0700, Josh Triplett wrote: > > > The 80-character limit is not a hard-and-fast rule, nor should it be > > > applie

Re: [RFC PATCH] checkpatch: Make the 80-character limit a --strict check only

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 22:23 +0100, Al Viro wrote: > On Mon, Oct 07, 2013 at 12:34:33PM -0700, Josh Triplett wrote: > > > I've seen far more examples of the 80-column limit making code less > > readable rather than more. It's only really helpful when it forces code > > restructuring, *not* when it

Re: [RFC PATCH] checkpatch: Make the 80-character limit a --strict check only

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 14:33 -0700, Joe Perches wrote: > On Mon, 2013-10-07 at 22:23 +0100, Al Viro wrote: > > On Mon, Oct 07, 2013 at 12:34:33PM -0700, Josh Triplett wrote: > > > > > I've seen far more examples of the 80-column limit making code less > > >

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 19:19 -0300, Geyslan G. Bem wrote: > Changes the sign type to unsigned, avoiding the possibility of > wrap when ORing the p9 or unix bit modes. [] > diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c [] > @@ -144,7 +144,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_i

[PATCH] iscsi_iser: Add missing newlines to logging messages

2013-10-07 Thread Joe Perches
Logging messages need terminating newlines to avoid possible message interleaving. Add them. Signed-off-by: Joe Perches --- drivers/infiniband/ulp/iser/iscsi_iser.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers

[PATCH] checkpatch: Add check for sscanf without return use

2013-10-07 Thread Joe Perches
Naked use sscanf can be troublesome. Add a warning when the sscanf return value is not used. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 17 + 1 file changed, 17 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 23d55bf..ba8af49 100755

Re: [PATCH] checkpatch: Add check for sscanf without return use

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 16:56 -0700, Andrew Morton wrote: > On Mon, 07 Oct 2013 16:45:23 -0700 Joe Perches wrote: > > > Naked use sscanf can be troublesome. > > It would be helpful to expand on "troublesome"? Dunno, you either know or the couple of paragraphs it ta

Re: [PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 21:09 -0300, Geyslan Gregório Bem wrote: > Joe, > > Thank you for reply. > > What do you think about: > > strncpy(ext, stat->extension, sizeof(ext)); > + if (sscanf(ext, "%c %u %u", &type, &major, &minor) < 3) { > +

Re: [PATCH] checkpatch: Add check for sscanf without return use

2013-10-07 Thread Joe Perches
On Mon, 2013-10-07 at 18:10 -0600, Bjorn Helgaas wrote: > On Mon, Oct 7, 2013 at 6:03 PM, Joe Perches wrote: > > On Mon, 2013-10-07 at 16:56 -0700, Andrew Morton wrote: > >> On Mon, 07 Oct 2013 16:45:23 -0700 Joe Perches wrote: > >> > >> > Naked use sscanf

Re: [PATCH] core: Catch overflows in do_div() function

2013-10-08 Thread Joe Perches
On Tue, 2013-10-08 at 09:10 -0700, Anatol Pomozov wrote: > If second parameter passed to this function was 64 then it silently > truncates to 32 bits. Catch such situation. [] > diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h [] > @@ -25,6 +26,7 @@ > # define do_div(n,base)

Re: [PATCH] core: Catch overflows in do_div() function

2013-10-08 Thread Joe Perches
On Tue, 2013-10-08 at 18:45 +0200, Richard Weinberger wrote: > On Tue, Oct 8, 2013 at 6:18 PM, Joe Perches wrote: > > On Tue, 2013-10-08 at 09:10 -0700, Anatol Pomozov wrote: > >> If second parameter passed to this function was 64 then it silently > >> truncates to 32

[Trivial PATCH] sound: Remove unnecessary semicolons

2013-10-08 Thread Joe Perches
These aren't necessary after switch and if blocks. Signed-off-by: Joe Perches --- sound/oss/sb_ess.c | 2 +- sound/pci/au88x0/au88x0_pcm.c | 2 +- sound/soc/atmel/atmel_ssc_dai.c | 2 +- sound/soc/codecs/ak4641.c | 2 +- sound/soc/codecs/mc13783.c | 2 +- soun

[Trivial PATCH] usb: Remove unnecessary semicolons

2013-10-08 Thread Joe Perches
These aren't necessary after switch and if blocks. Signed-off-by: Joe Perches --- drivers/usb/core/hcd.c | 2 +- drivers/usb/core/hub.c | 2 +- drivers/usb/dwc3/ep0.c | 6 +++--- drivers/usb/gadget/composite.c | 2 +- drivers/usb/gadget/dummy_

[Trivial PATCH] infiniband: Remove unnecessary semicolons

2013-10-08 Thread Joe Perches
These aren't necessary after switch blocks. Signed-off-by: Joe Perches --- drivers/infiniband/hw/amso1100/c2_ae.c | 2 +- drivers/infiniband/hw/mthca/mthca_eq.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_hw.c| 6 +++--- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- dr

[Trivial PATCH] tty: Remove unnecessary semicolons

2013-10-08 Thread Joe Perches
These aren't necessary after switch and while blocks. Signed-off-by: Joe Perches --- drivers/tty/nozomi.c| 6 +++--- drivers/tty/serial/bfin_uart.c | 4 ++-- drivers/tty/serial/ip22zilog.c | 2 +- drivers/tty/serial/max310x.c| 2 +- drivers/tty/serial/pmac_zilog.

[Trivial PATCH] video: Remove unnecessary semicolons

2013-10-08 Thread Joe Perches
These aren't necessary after switch, for, and if blocks. Signed-off-by: Joe Perches --- drivers/video/cfbimgblt.c | 2 +- drivers/video/cg14.c| 4 ++-- drivers/video/cg6.c | 2 +- drivers/video/e

[Trivial PATCH] media: Remove unnecessary semicolons

2013-10-08 Thread Joe Perches
These aren't necessary after switch and while statements. Signed-off-by: Joe Perches --- drivers/media/common/b2c2/flexcop-sram.c | 6 +++--- drivers/media/dvb-frontends/cx24110.c| 2 +- drivers/media/dvb-frontends/cx24123.c| 2 +- drivers/media/dvb-fron

Re: [PATCH v2] vsprintf: Check real user/group id for %pK

2013-10-08 Thread Joe Perches
On Wed, 2013-10-09 at 11:15 +1100, Ryan Mallon wrote: > Some setuid binaries will allow reading of files which have read > permission by the real user id. This is problematic with files which > use %pK because the file access permission is checked at open() time, > but the kptr_restrict setting is

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