[PATCH V2 7/8] pktcdvd: Convert pr_info to pkt_info

2013-05-31 Thread Joe Perches
Add a new pkt_info macro to prefix the name to the logging output. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 3815f01..995d688 100644 --- a

[PATCH V2 4/8] pktcdvd: Add struct pktcdvd_device * to pkt_dbg

2013-05-31 Thread Joe Perches
Add pd->name to output for these debugging messages. Remove normally compiled out pkt_dbg(2, ...) function entry tracing equivalents as it's better done via the function tracer. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 90 +++-

[PATCH V2 6/8] pktcdvd: Convert pr_notice to pkt_notice

2013-05-31 Thread Joe Perches
Add a new pkt_notice macro to prefix the name to the logging output. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 07ff878

[PATCH V2 3/8] pktcdvd: Consolidate DPRINTK and VPRINTK macros

2013-05-31 Thread Joe Perches
Use the more common pkt_dbg(level, fmt, ...) form. These messages are emitted at KERN_NOTICE. Always emit function name with pkt_dbg(2, ...) uses and remove the sometimes abbreviated embedded function name. This form always verifies the format and arguments. Signed-off-by: Joe Perches

Re: [PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Joe Perches
On Sat, 2013-06-01 at 20:02 +0200, Emil Goode wrote: > This patch makes use of the new format specifier %pa that was introduced > by the following commit. > > 7d7992108d02aa92ad4c77e5d9ce14088c942e75 > ("lib/vsprintf.c: add %pa format specifier for phys_addr_t types") [] > diff --git a/drivers/usb

Re: [PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Joe Perches
def CONFIG_ARCH_DMA_ADDR_T_64BIT typedef u64 dma_addr_t; #else typedef u32 dma_addr_t; #endif /* dma_addr_t */ [] #ifdef CONFIG_PHYS_ADDR_T_64BIT typedef u64 phys_addr_t; #else typedef u32 phys_addr_t; #endif On Sat, Jun 01, 2013 at 11:29:10AM -0700, Joe Perches wrote: > On Sat, 2013-06-01 at

Re: [PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Joe Perches
On Sat, 2013-06-01 at 14:56 -0700, Randy Dunlap wrote: > It's a bit of a shame that this > comment was deleted from include/asm-generic/types.h in commit > 3e50594e8e72932ad4cfcb0b3cbdf58fc3bce416: > > -/* > - * DMA addresses may be very different from physical addresses > - * and pointers. i386 a

Re: [PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Joe Perches
On Sun, 2013-06-02 at 01:06 +0200, Emil Goode wrote: > Maybe there should be another format specifier %da and Randy's > clarifying comment maybe %pad but I think the whole thing isn't much necessary. It seems there are a grand total of 3 uses of %pa today. Maybe: --- Documentation/printk-formats

Re: [PATCH V2 6/8] pktcdvd: Convert pr_notice to pkt_notice

2013-06-02 Thread Joe Perches
On Sun, 2013-06-02 at 15:12 +0300, Andy Shevchenko wrote: > On Sat, Jun 1, 2013 at 7:11 AM, Joe Perches wrote: > > Add a new pkt_notice macro to prefix the name to the logging output. > > One nitpick below. > > > --- a/drivers/block/pktcdvd.c [] >

Re: [PATCH 3/4] sys/reboot: boolize C_A_D

2013-06-02 Thread Joe Perches
On Fri, 2013-05-31 at 16:02 -0700, Andrew Morton wrote: > there's no rule > which states that sizeof(bool) must equal sizeof(int). For gcc, sizeof(_Bool) isn't sizeof(int) so it would work for one endian but not the other. gcc has sizeof(_Bool) == sizeof(unsigned char) -- To unsubscribe from thi

Re: [PATCH v1.1] gpiolib: append SFI helpers for GPIO API

2013-06-02 Thread Joe Perches
On Mon, 2013-06-03 at 11:59 +1000, Ryan Mallon wrote: > On 31/05/13 19:27, Andy Shevchenko wrote: > Some trivial coding style comment below. [] > > + for (i = 0; i < sfi_gpio_num_entry; i++, pentry++) { > > + if (!strncmp(name, pentry->pin_name, SFI_NAME_LEN)) > > + re

Re: [PATCH V2 2/8] pktcdvd: Convert printk to pr_

2013-06-03 Thread Joe Perches
On Mon, 2013-06-03 at 12:57 +0300, Dan Carpenter wrote: > On Fri, May 31, 2013 at 09:11:23PM -0700, Joe Perches wrote: > > +static const char *sense_key_string(__u8 index) > > +{ > > + static const char *info[9] = { > > + "No sense

Re: [PATCH v1.1] gpiolib: append SFI helpers for GPIO API

2013-06-03 Thread Joe Perches
On Mon, 2013-06-03 at 11:16 +0300, Andy Shevchenko wrote: > On Sun, 2013-06-02 at 19:06 -0700, Joe Perches wrote: > > On Mon, 2013-06-03 at 11:59 +1000, Ryan Mallon wrote: > > > On 31/05/13 19:27, Andy Shevchenko wrote: > > > > + sfi_gpio_table = kmalloc(num

Re: [PATCH V2 2/8] pktcdvd: Convert printk to pr_

2013-06-03 Thread Joe Perches
On Mon, 2013-06-03 at 15:50 +0300, Dan Carpenter wrote: > Read it again. ;) In the original code, 8 was valid. Right, I stuffed it up. Thanks, I'll resubmit later. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

[PATCH V3 1/8] pktcdvd: Convert ZONE macro to static function get_zone()

2013-06-03 Thread Joe Perches
Macros should be converted to functions where feasible to verify arguments and the like. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index

[PATCH V3 0/8] pktcdvd: More neatenings

2013-06-03 Thread Joe Perches
ns to print pd->name in logging macros. Joe Perches (8): pktcdvd: Convert ZONE macro to static function get_zone() pktcdvd: Convert printk to pr_ pktcdvd: Consolidate DPRINTK and VPRINTK macros pktcdvd: Add struct pktcdvd_device * to pkt_dbg pktcdvd: Add struct pktcdvd_device.name t

[PATCH V3 2/8] pktcdvd: Convert printk to pr_

2013-06-03 Thread Joe Perches
Use a more current logging style and add messages levels to the logging messages. Simplify pkt_dump_sense by using %*ph and adding a simple function to emit the sense string. Signed-off-by: Joe Perches Improved-by: Andy Shevchenko Improved-by: Dan Carpenter --- V3: Fixed sense_string array

[PATCH V3 7/8] pktcdvd: Convert pr_info to pkt_info

2013-06-03 Thread Joe Perches
Add a new pkt_info macro to prefix the name to the logging output. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index faae94c..f81648c 100644 --- a

[PATCH V3 4/8] pktcdvd: Add struct pktcdvd_device * to pkt_dbg

2013-06-03 Thread Joe Perches
Add pd->name to output for these debugging messages. Remove normally compiled out pkt_dbg(2, ...) function entry tracing equivalents as it's better done via the function tracer. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 90 +++-

[PATCH V3 6/8] pktcdvd: Convert pr_notice to pkt_notice

2013-06-03 Thread Joe Perches
Add a new pkt_notice macro to prefix the name to the logging output. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index e71e23d..faae94c

[PATCH V3 3/8] pktcdvd: Consolidate DPRINTK and VPRINTK macros

2013-06-03 Thread Joe Perches
Use the more common pkt_dbg(level, fmt, ...) form. These messages are emitted at KERN_NOTICE. Always emit function name with pkt_dbg(2, ...) uses and remove the sometimes abbreviated embedded function name. This form always verifies the format and arguments. Signed-off-by: Joe Perches

[PATCH V3 5/8] pktcdvd: Add struct pktcdvd_device.name to pr_err logging where possible

2013-06-03 Thread Joe Perches
Add a new pkt_err macro to prefix the name to the logging output. Convert pr_err where there is a non-null struct pktcdvd_device. Signed-off-by: Joe Perches Improved-by: Andy Shevchenko --- V3: Moved pkt_err location to proper place drivers/block/pktcdvd.c | 44

[PATCH V3 8/8] pktcdvd: Add struct pktcdvd_device * to pkt_dump_sense()

2013-06-03 Thread Joe Perches
Allow the device name to be emitted with pkt_err when logging the sense data. Signed-off-by: Joe Perches --- drivers/block/pktcdvd.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index

Re: [PATCH] MAINTAINERS: Remove Hans J. Koch entries

2013-06-20 Thread Joe Perches
On Fri, 2013-06-21 at 04:50 +0200, Hans J. Koch wrote: > Does each little driver really need a MAINTAINERS entry? Hi Hans. I think a lot of those driver MAINTAINERS entries are maybe a little useful when the driver is just written but are progressively less useful after a few months. I once wrot

[PATCH V2] checkpatch: Ignore existing CamelCase uses from include/...

2013-06-20 Thread Joe Perches
uses. That's about 4x the time for a similar git grep. This preseeding is only done once when using --strict and only when there is a CamelCase use found. If a .git directory is found, it uses 'git ls-files include' If not, it uses 'find $root/include -name "*.h&quo

Re: [PATCH v7] ethernet/arc/arc_emac - Add new driver

2013-06-21 Thread Joe Perches
On Fri, 2013-06-21 at 11:20 +0400, Alexey Brodkin wrote: > Driver for non-standard on-chip ethernet device ARC EMAC 10/100, > instantiated in some legacy ARC (Synopsys) FPGA Boards such as > ARCAngel4/ML50x. Looks fine to me. One nit you could fix later and a question. > diff --git a/drivers/net

Re: [PATCH v7] ethernet/arc/arc_emac - Add new driver

2013-06-21 Thread Joe Perches
On Fri, 2013-06-21 at 10:53 +, Alexey Brodkin wrote: > On 06/21/2013 02:32 PM, Joe Perches wrote: > > On Fri, 2013-06-21 at 11:20 +0400, Alexey Brodkin wrote: > >> Driver for non-standard on-chip ethernet device ARC EMAC 10/100, > >> instantiated in some legacy ARC

Re: [PATCH v7] ethernet/arc/arc_emac - Add new driver

2013-06-21 Thread Joe Perches
On Fri, 2013-06-21 at 17:58 +0200, Arnd Bergmann wrote: > On Friday 21 June 2013, Joe Perches wrote: > > On Fri, 2013-06-21 at 10:53 +, Alexey Brodkin wrote: > > > On 06/21/2013 02:32 PM, Joe Perches wrote: > > > > On Fri, 2013-06-21 at 11:20 +0400, Alexey Brod

Re: [PATCH 1/2] ext2: Reduce object size when !CONFIG_PRINTK

2013-06-21 Thread Joe Perches
On Fri, 2013-06-21 at 18:50 +0200, Jan Kara wrote: > On Tue 18-06-13 10:14:39, Joe Perches wrote: > > Reducing the object size ~5kb/15% could be useful for embedded > > systems. > > > > Add #ifdef CONFIG_PRINTK #else #endif blocks > > to hold formats and argume

Re: [PATCH] net: fec: Fix multicast list setup in fec_restart().

2013-06-21 Thread Joe Perches
On Fri, 2013-06-21 at 18:40 +0200, Christoph Müllner wrote: > Setup the multicast list of the net_device instead of > clearing it blindly. This restores the multicast groups > in case of a link down/up event. > > Signed-off-by: Christoph Muellner Theobroma? food of the gods or does your company

Re: [PATCHv v3] power: Include additional information in pm_print_times

2013-06-21 Thread Joe Perches
On Sat, 2013-06-22 at 02:24 +0200, Rafael J. Wysocki wrote: > Namely, there are tools that use these messages to create suspend/resume time > charts and they will stop working after the proposed changes. dmesg output isn't guaranteed to be stable. -- To unsubscribe from this list: send the line

Re: [PATCHv v3] power: Include additional information in pm_print_times

2013-06-22 Thread Joe Perches
On Sat, 2013-06-22 at 21:52 +0200, Rafael J. Wysocki wrote: > On Friday, June 21, 2013 07:27:22 PM Joe Perches wrote: > > On Sat, 2013-06-22 at 02:24 +0200, Rafael J. Wysocki wrote: > > > Namely, there are tools that use these messages to create suspend/resume > > >

Re: [PATCH] x86, tboot: provide debugfs interfaces to access TXT log

2013-06-23 Thread Joe Perches
On Sun, 2013-06-23 at 15:54 +0800, Qiaowei Ren wrote: > These logs come from tboot (Trusted Boot, an open source, > pre-kernel/VMM module that uses Intel TXT to perform a > measured and verified launch of an OS kernel/VMM.). [] > diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c [] > +

Re: [PATCHv v3] power: Include additional information in pm_print_times

2013-06-23 Thread Joe Perches
On Sun, 2013-06-23 at 12:07 +0200, Rafael J. Wysocki wrote: > On Saturday, June 22, 2013 06:05:50 PM Joe Perches wrote: > > If any script needs something stable it should > > depend on information available through other > > sources like trace or proc or sysfs. > > Th

Re: [PATCHv v3] power: Include additional information in pm_print_times

2013-06-23 Thread Joe Perches
On Sun, 2013-06-23 at 12:22 +0200, Rafael J. Wysocki wrote: > On Sunday, June 23, 2013 03:03:31 AM Joe Perches wrote: > > On Sun, 2013-06-23 at 12:07 +0200, Rafael J. Wysocki wrote: > > > On Saturday, June 22, 2013 06:05:50 PM Joe Perches wrote: > > > > If any sc

Re: [PATCHv v3] power: Include additional information in pm_print_times

2013-06-23 Thread Joe Perches
On Sun, 2013-06-23 at 12:35 +0200, Rafael J. Wysocki wrote: > On Sunday, June 23, 2013 03:16:30 AM Joe Perches wrote: > > On Sun, 2013-06-23 at 12:22 +0200, Rafael J. Wysocki wrote: > > > On Sunday, June 23, 2013 03:03:31 AM Joe Perches wrote: > > > > On Sun, 2013-

Re: [PATCHv v3] power: Include additional information in pm_print_times

2013-06-23 Thread Joe Perches
On Sun, 2013-06-23 at 13:36 +0200, Rafael J. Wysocki wrote: > Please keep the existing format as is literally and append any > new information to the end of the line. Hi Shuah. Perhaps the better long-term approach would be to add a new tracepoint too. -- To unsubscribe from this list: send the

[PATCH] iommu: Use %zx instead %lx and cast to unsigned long

2013-06-23 Thread Joe Perches
printf support size_t hex type %zx so use that instead of %lx and a cast to unsigned long. Other miscellaneous changes around this: Always use 0x%zx for size instead of one use of decimal. Coalesce format and align arguments. Signed-off-by: Joe Perches --- drivers/iommu/iommu.c | 24

Re: [PATCH 25/45] staging/octeon: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Joe Perches
On Mon, 2013-06-24 at 00:25 +0530, Srivatsa S. Bhat wrote: > On 06/23/2013 11:47 PM, Greg Kroah-Hartman wrote: > > On Sun, Jun 23, 2013 at 07:13:33PM +0530, Srivatsa S. Bhat wrote: [] > >> diff --git a/drivers/staging/octeon/ethernet-rx.c > >> b/drivers/staging/octeon/ethernet-rx.c [] > Honestly,

[PATCH V2] iommu: Use %pa and %zx instead of casting

2013-06-23 Thread Joe Perches
printk supports using %pa for phys_addr_t and %zx for size_t so use those instead of %lx and casts to unsigned long. Other miscellaneous changes around this: Always use 0x%zx for size instead of one use of decimal. Coalesce format and align arguments. Signed-off-by: Joe Perches --- > Wh

Re: [PATCH 01/32] init.h: remove __cpuinit sections from the kernel

2013-06-24 Thread Joe Perches
On Mon, 2013-06-24 at 15:30 -0400, Paul Gortmaker wrote: > The __cpuinit type of throwaway sections might have made sense > some time ago when RAM was more constrained, but now the savings > do not offset the cost and complications. For example, the fix in > commit 5e427ec2d0 ("x86: Fix bit corrup

Re: [PATCH 01/32] init.h: remove __cpuinit sections from the kernel

2013-06-24 Thread Joe Perches
On Mon, 2013-06-24 at 12:51 -0700, Joe Perches wrote: > On Mon, 2013-06-24 at 15:30 -0400, Paul Gortmaker wrote: > > The __cpuinit type of throwaway sections might have made sense > > some time ago when RAM was more constrained, but now the savings > > do not offset the c

Re: [PATCH 25/32] cpufreq: delete __cpuinit usage from all cpufreq files

2013-06-24 Thread Joe Perches
On Tue, 2013-06-25 at 09:01 +0530, Viresh Kumar wrote: > On 25 June 2013 01:00, Paul Gortmaker wrote: > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c [] > > -static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb, > > - uns

Re: [PATCH 25/32] cpufreq: delete __cpuinit usage from all cpufreq files

2013-06-25 Thread Joe Perches
On Tue, 2013-06-25 at 12:14 +0530, Viresh Kumar wrote: > On 25 June 2013 09:45, Joe Perches wrote: > > Viresh, there's no absolute "right" way to do this. > > Yeah Joe, but I thought its better to keep it consistent within a file. > So, while writing new

Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()

2013-06-25 Thread Joe Perches
On Tue, 2013-06-25 at 17:30 +0100, Rupesh Gujare wrote: > convert all debug messages from printk to dev_dbg() & add kernel config to > enable/disable these messages during compilation. [] > -#define oz_trace(...) printk(TRACE_PREFIX __VA_ARGS__) > +#define oz_trace(fmt, ...) dev_dbg(g_oz_wpan_dev,

Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()

2013-06-25 Thread Joe Perches
On Tue, 2013-06-25 at 10:02 -0700, Greg KH wrote: > On Tue, Jun 25, 2013 at 05:30:02PM +0100, Rupesh Gujare wrote: > > convert all debug messages from printk to dev_dbg() & add kernel config to > > enable/disable these messages during compilation. > No, just use the built-in dynamic debug code in

Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()

2013-06-25 Thread Joe Perches
On Tue, 2013-06-25 at 10:38 -0700, Greg KH wrote: > On Tue, Jun 25, 2013 at 10:29:50AM -0700, Joe Perches wrote: > > a long needed extension to dev_dbg is to enable classes > > of messages by level or mask. > > > > There are many existing macros like > >

Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()

2013-06-25 Thread Joe Perches
(Using Jason Baron's most current email address) On Tue, 2013-06-25 at 10:56 -0700, Joe Perches wrote: > On Tue, 2013-06-25 at 10:38 -0700, Greg KH wrote: > > On Tue, Jun 25, 2013 at 10:29:50AM -0700, Joe Perches wrote: > > > a long needed extension to dev_dbg is to

Re: [PATCH v2] ethernet/arc/arc_emac - Add new driver

2013-06-07 Thread Joe Perches
On Fri, 2013-06-07 at 19:07 +0400, Alexey Brodkin wrote: > Driver for non-standard on-chip ethernet device ARC EMAC 10/100, > instantiated in some legacy ARC (Synopsys) FPGA Boards such as > ARCAngel4/ML50x. trivial comments only: > diff --git a/drivers/net/ethernet/arc/arc_emac_main.c > b/drive

Re: [PATCH] non-swapcache pages in end_swap_bio_read()

2013-06-07 Thread Joe Perches
On Fri, 2013-06-07 at 13:43 -0700, Andrew Morton wrote: > On Sat, 8 Jun 2013 00:23:18 +0400 Artem Savkov > wrote: [] > +++ a/mm/page_io.c [] > + /* > + * There is no guarantee that the page is in swap cache - the software > + * suspend code (at least) uses end_swap_bio_read() again

Re: [PATCH 0/7] irq: fix checkpatch errors and warnings

2013-06-07 Thread Joe Perches
On Fri, 2013-06-07 at 22:42 +0200, Thomas Gleixner wrote: > On Thu, 6 Jun 2013, Kefeng Wang wrote: > > > Fix all the checkpath errors in kernel/irq dir, and some warnings > > also fixed. > > Sorry, I'm not really interested in this kind of patches. To be > honest, it would be way more exciting if

[PATCH 04/12] checkpatch: Warn on comparisons to jiffies

2013-06-10 Thread Joe Perches
Comparing jiffies is almost always wrong and time_before and time_after should be used instead. Warn on any comparison to jiffies. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index

[PATCH 00/12] checkpatch: collection of neatenings and new "--fix"

2013-06-10 Thread Joe Perches
A few neatenings and cleanups and an EXPERIMENTAL option to fix various whitespace/formatting defects in patches. Joe Perches (12): checkpatch: Remove quote from CamelCase test checkpatch: Improve network block comment test and message checkpatch: Warn when networking block comment lines

[PATCH 02/12] checkpatch: Improve network block comment test and message

2013-06-10 Thread Joe Perches
Show the first line of the comment after a line with just /* to better show where the defective comment style is in the file. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts

[PATCH 03/12] checkpatch: Warn when networking block comment lines don't start with *

2013-06-10 Thread Joe Perches
ly emitted on the second line of a block comment. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 8 1 file changed, 8 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a3922d0..576139a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl

[PATCH 07/12] checkpatch: Add a placeholder to check blank lines before declarations

2013-06-10 Thread Joe Perches
Figure out first how to determine if this is in a struct declaration or in a function body before enabling this. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 8 1 file changed, 8 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 93b8e66..4ad4052

[PATCH 09/12] checkpatch: Add a --strict test for comparison to true/false

2013-06-10 Thread Joe Perches
Comparing to true or false is error prone. Add tests for the various forms of (foo == true) && (false != bar) that are only reported with --strict. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 27 +++ 1 file changed, 27 insertions(+) diff --git a

[PATCH 08/12] checkpatch: Don't warn on blank lines before/after braces as often

2013-06-10 Thread Joe Perches
Check to make sure the blank lines aren't comment lines like: bool foo(bool bar) { /* Don't warn on a leading comment */ return !bar; /* Don't warn on a trailing comment either */ } Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 4 ++-- 1

[PATCH 11/12] checkpatch: Create an EXPERIMENTAL --fix option to correct patches

2013-06-10 Thread Joe Perches
inst using this file without verifying the changes. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 442 -- 1 file changed, 354 insertions(+), 88 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ab39ceb..9696

[PATCH 10/12] checkpatch: Improve "no space after cast" test

2013-06-10 Thread Joe Perches
Arithmetic convenience variable. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c2d223c..ab39ceb 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -241,

[PATCH 06/12] checkpatch: Reduce false positive rate of "complex macros"

2013-06-10 Thread Joe Perches
Allow "#define foo struct.member" without bleating a warning. This also allows "#define foo bar.baz->qux" and so on. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scri

[PATCH 05/12] checkpatch: Warn on comparisons to get_jiffies_64()

2013-06-10 Thread Joe Perches
Comparing get_jiffies_64() is almost always wrong and time_before64 and time_after64 should be used instead. Warn on any comparison to get_jiffies_64(). Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b

[PATCH 12/12] checkpatch: Move test for space before semicolon after operator spacing

2013-06-10 Thread Joe Perches
Moving this test allows the --fix option to work better. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9696be5..5989415 100755 --- a/scripts

[PATCH 01/12] checkpatch: Remove quote from CamelCase test

2013-06-10 Thread Joe Perches
commit be987d9f80 ("checkpatch: improve CamelCase test for Page") added it but it shouldn't be there. Must have been my fault. Make sure that the tested variable doesn't contain a constant. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 4 ++-- 1 file changed

Re: [RFC] is it time to split up the MAINTAINERS file?

2013-06-11 Thread Joe Perches
On Mon, 2013-06-10 at 23:49 -0500, Rob Landley wrote: > Quite possibly the answer is "no", but the MAINTAINERS file is > approaching 10,000 lines. Getting a bit unwieldy. I think it hasn't been much of a bottleneck problem. > The question is: would this be an improvement? (And worth the changes

Re: [RFC] is it time to split up the MAINTAINERS file?

2013-06-11 Thread Joe Perches
On Tue, 2013-06-11 at 12:10 -0500, Rob Landley wrote: > On 06/11/2013 02:13:45 AM, Joe Perches wrote: > > On Mon, 2013-06-10 at 23:49 -0500, Rob Landley wrote: > > > You could either have the same entry in more than one MAINTAINERS > > file > > > or keep it

Re: [checkpatch] - Confusion

2013-06-11 Thread Joe Perches
On Tue, 2013-06-11 at 17:54 -0700, Sören Brinkmann wrote: > Hi Pintu, > > On Mon, Jun 10, 2013 at 11:49:00AM -0700, PINTU KUMAR wrote: > > > > > > From: anish singh > > >To: PINTU KUMAR > > >Cc: "linux-kernel@vger.kernel.org" ; > > >"linux...@kvack.org" > > >S

Re: [checkpatch] - Confusion

2013-06-11 Thread Joe Perches
On Tue, 2013-06-11 at 21:15 -0700, Joe Perches wrote: > > typedef struct ctl_table ctl_table; (include/linux/sysctl.h) > > is not correctly picked up by checkpatch. > > checkpatch isn't a c compiler. > It assumes any _t is a typedef. > > > So, I assum

Re: [PATCH] m68k/setup: Use pr_*() instead of plain printk()

2013-07-01 Thread Joe Perches
On Mon, 2013-07-01 at 23:02 +0200, Geert Uytterhoeven wrote: > On Mon, Jul 1, 2013 at 12:22 AM, Joe Perches wrote: > >> diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c > > > >> @@ -161,7 +161,7 @@ static void __init m68k_parse_bootinfo(const str

Re: [PATCH] MAINTAINERS: x...@oss.sgi.com is a list

2013-07-03 Thread Joe Perches
On Wed, 2013-07-03 at 11:36 +0200, Yann Droneaud wrote: > In the output of ./scripts/get_maintainer.pl: > > Ben Myers (supporter:XFS FILESYSTEM) > Alex Elder (supporter:XFS FILESYSTEM) > x...@oss.sgi.com (supporter:XFS FILESYSTEM) > linux-kernel@vger.kernel.org (open list) > > [If having the ma

[PATCH] checkpatch: Make the CamelCase cache work for non-git trees too

2013-07-03 Thread Joe Perches
. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 54 +-- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5cf6608..a220104 100755 --- a/scripts/checkpatch.pl +++ b/scripts

Re: [PATCH v2 0/5] Replace debug macro

2013-07-04 Thread Joe Perches
On Thu, 2013-07-04 at 13:35 +0100, Rupesh Gujare wrote: > This patch series splits earlier patch from Joe, into smaller patches. Please add commit messages to the patches that are slightly more than trivial. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body o

Re: [PATCH 4/4] checkpatch: only allow COMPILE_TEST in Kconfig dependency lines

2013-07-04 Thread Joe Perches
with "#ifdef CONFIG_COMPILE_TEST" etc. However there > will (and already has been) instances of people thinking this is > an OK practice[2]. So teach checkpatch to spot them as an error. > > [1] https://lkml.org/lkml/2013/3/7/456 > [2] https://lkml.org/lkml/2013/7/1/641 >

Re: [RFC] mm: Honor min_free_kbytes set by user

2013-07-04 Thread Joe Perches
On Thu, 2013-07-04 at 18:07 +0200, Michal Hocko wrote: > A warning is printed when the new value is ignored. [] > + printk(KERN_WARNING "min_free_kbytes is not updated to %d" > + "because user defined value %d is preferred\n", > +

Re: [PATCH] lib: One less subtraction in binary search iterations.

2013-07-06 Thread Joe Perches
On Sat, 2013-07-06 at 16:07 -0700, Wedson Almeida Filho wrote: > There is no functional change, but this change eliminates a subtraction that > the compiler doesn't optimize out (as of gcc 4.7.3). Not correct. > diff --git a/lib/bsearch.c b/lib/bsearch.c [] > @@ -37,7 +37,7 @@ void *bsearch(const

Re: [v9fs:for-linus 7/7] ERROR: code indent should use tabs where possible

2013-07-07 Thread Joe Perches
On Mon, 2013-07-08 at 11:30 +0800, Fengguang Wu wrote: > In long run I'd like to disable > the check types that tend to have false positives. As for now, these > checks are disabled in my checkpatch robot: Are you using a .checkpatch.conf file? > PATCH_PREFIX > LONG_LINE > CAMELCASE That's a --

Re: [v9fs:for-linus 7/7] ERROR: code indent should use tabs where possible

2013-07-07 Thread Joe Perches
On Mon, 2013-07-08 at 12:45 +0800, Fengguang Wu wrote: > On Sun, Jul 07, 2013 at 08:54:04PM -0700, Joe Perches wrote: > > On Mon, 2013-07-08 at 11:30 +0800, Fengguang Wu wrote: > > > In long run I'd like to disable > > > the check types that tend to have fal

Re: [PATCH] staging: ozwpan: Use normal Makefile, convert oz_trace to oz_dbg

2013-06-26 Thread Joe Perches
On Wed, 2013-06-26 at 12:53 +0100, Rupesh Gujare wrote: > On 26/06/13 02:00, Joe Perches wrote: > > Use a normal Makefile. > > Convert oz_trace and oz_trace2 to a more normal oz_dbg. > > Consolidate oztrace and ozconfig files to ozdbg.h > > Update #include files. > &

Re: [PATCH] staging: ozwpan: Use normal Makefile, convert oz_trace to oz_dbg

2013-06-26 Thread Joe Perches
On Wed, 2013-06-26 at 06:56 -0700, Joe Perches wrote: > On Wed, 2013-06-26 at 12:53 +0100, Rupesh Gujare wrote: > > Above macros look good, however Greg have objection to define new macros > > & he had suggested to use dev_dbg() & pr_debug(). These macros already use

Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()

2013-06-26 Thread Joe Perches
On Wed, 2013-06-26 at 13:46 -0400, Jason Baron wrote: > echo "grouping control_var level N +p" > /debugfs/dynamic_debug/control > > or > > echo "grouping control_var mask 0xN +p" > /debugfs/dynamic_debug/control > > So we can think of the 'control_var' as 'grouping' debug statements > together.

Re: [PATCH v3] staging: usbip: replace pr_warning() with dev_warn().

2013-06-26 Thread Joe Perches
On Thu, 2013-06-27 at 10:05 +0530, navin patidar wrote: > dev_warn() is preferred over pr_warning(). [] > diff --git a/drivers/staging/usbip/usbip_event.c > b/drivers/staging/usbip/usbip_event.c [] > @@ -85,7 +87,20 @@ int usbip_start_eh(struct usbip_device *ud) > > ud->eh = kthread_run(eve

Re: [PATCH v2] mm: module_alloc: check if size is 0

2013-06-27 Thread Joe Perches
On Thu, 2013-06-27 at 15:23 -0700, Andrew Morton wrote: > On Thu, 27 Jun 2013 11:39:17 +0200 Ralf Baechle wrote: [] > Veli-Pekka's original patch would be neater if we were to add a new > > void *__vmalloc_node_range_zero_size_ok() > { > if (size == 0) > return NULL; I believ

[PATCH] checkpatch: Cache last camelcase hash as .checkpatch-camelcase.

2013-06-27 Thread Joe Perches
checkpatch run time by ~12 cpu seconds on my little netbook. Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 26 ++ 1 file changed, 26 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 70e7f7c..5cf6608 100755 --- a/scripts/checkpatc

[PATCH next] xen: Use more current logging styles

2013-06-27 Thread Joe Perches
Instead of mixing printk and pr_ forms, just use pr_ Miscellaneous changes around these conversions: Add a missing newline to avoid message interleaving, coalesce formats, reflow modified lines to 80 columns. Signed-off-by: Joe Perches --- drivers/net/xen-netback/netback.c | 7

[PATCH next] xen: Convert printks to pr_

2013-06-28 Thread Joe Perches
_NAME from formats as pr_fmt adds the same content This does change some of the prefixes of these messages but it also does make them more consistent. Signed-off-by: Joe Perches --- On Fri, 2013-06-28 at 09:02 +0100, Wei Liu wrote: > Do you also need to replace other printk occurences in xen-netbac

Re: [PATCH next] xen: Convert printks to pr_

2013-06-28 Thread Joe Perches
On Fri, 2013-06-28 at 11:36 +0100, Wei Liu wrote: > I can clean up the rest in xen-netback after your previous patch goes > in. Here's a suggested change for drivers/net Convert printk to pr_ Add missing newlines to pr_debug Remove duplicate "s: " __func__ Reflow to 80 columns --- drivers/net/

Re: [PATCH net-next v3 1/2] lib: vsprintf: add IPv4/v6 generic %p[Ii]S[pfs] format specifier

2013-06-28 Thread Joe Perches
On Fri, 2013-06-28 at 14:05 +0200, Daniel Borkmann wrote: > In order to avoid making code that deals with printing both, IPv4 and > IPv6 addresses, unnecessary complicated as for example ... Thanks Daniel, seems sensible. Just trivial comments... [] > diff --git a/lib/vsprintf.c b/lib/vsprintf.

Re: [PATCH net-next v3 1/2] lib: vsprintf: add IPv4/v6 generic %p[Ii]S[pfs] format specifier

2013-06-28 Thread Joe Perches
On Fri, 2013-06-28 at 17:53 +0200, Daniel Borkmann wrote: > On 06/28/2013 05:44 PM, Joe Perches wrote: > > On Fri, 2013-06-28 at 14:05 +0200, Daniel Borkmann wrote: > >> In order to avoid making code that deals with printing both, IPv4 and > >> IPv6 addresses, unn

Re: [PATCH net-next v3 1/2] lib: vsprintf: add IPv4/v6 generic %p[Ii]S[pfs] format specifier

2013-06-28 Thread Joe Perches
On Fri, 2013-06-28 at 14:05 +0200, Daniel Borkmann wrote: > +static noinline_for_stack > +char *ip4_addr_string_sa(char *buf, char *end, const struct sockaddr_in *sa, > + struct printf_spec spec, const char *fmt) > +{ > + bool have_p = (fmt[2] && fmt[2] == 'p'); b

Re: [PATCH net-next v4 1/2] lib: vsprintf: add IPv4/v6 generic %p[Ii]S[pfs] format specifier

2013-06-28 Thread Joe Perches
On Fri, 2013-06-28 at 19:49 +0200, Daniel Borkmann wrote: > In order to avoid making code that deals with printing both, IPv4 and > IPv6 addresses, unnecessary complicated as for example ... Looks good to me. Thanks Daniel for keeping at it. -- To unsubscribe from this list: send the line "unsub

Re: [PATCH] m68k/setup: Use pr_*() instead of plain printk()

2013-06-30 Thread Joe Perches
On Sun, 2013-06-30 at 11:48 +0200, Geert Uytterhoeven wrote: > Signed-off-by: Geert Uytterhoeven Hi Geert, just trivial comments... > diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c > @@ -161,7 +161,7 @@ static void __init m68k_parse_bootinfo(const struct > bi_record *re

[PATCH 02/12] cdrom: Remove unused CHECKAUDIO macro

2013-06-30 Thread Joe Perches
It's unused, make it disappear. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 4239a69..3aa51a7 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -339,9 +339,6

[PATCH 00/12] cdrom: neatening

2013-06-30 Thread Joe Perches
Joe Perches (12): cdrom: convert cdinfo to cd_dbg cdrom: Remove unused CHECKAUDIO macro cdrom: Remove obfuscating IOCTL_IN and IOCTL_OUT macros cdrom: Remove prototype for open_for_data cdrom: Remove unnecessary check_for_audio_disc prototype cdrom: Remove unnecessary sanitize_format

[PATCH 03/12] cdrom: Remove obfuscating IOCTL_IN and IOCTL_OUT macros

2013-06-30 Thread Joe Perches
Macros with hidden control flow aren't nice. Just use copy_to/from_user directly instead. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 48 +++- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/dr

[PATCH 01/12] cdrom: convert cdinfo to cd_dbg

2013-06-30 Thread Joe Perches
It's a debugging message, mark it so. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 243 +- 1 file changed, 122 insertions(+), 121 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 8a3aff7..4239a69 1

[PATCH 09/12] cdrom: Remove cdrom_get_next_writeable prototype

2013-06-30 Thread Joe Perches
Move the function to the right spot instead. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 101 +- 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 4fb9ad5..8af1307 100644

[PATCH 10/12] cdrom: Remove cdrom_count_tracks prototype

2013-06-30 Thread Joe Perches
Move function to proper location instead. Fix whitespace and embedded if too. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 94 +-- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom

[PATCH 04/12] cdrom: Remove prototype for open_for_data

2013-06-30 Thread Joe Perches
Move static function to the appropriate place to remove the now unnecessary prototype. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 114 +- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers

[PATCH 08/12] cdrom: Remove cdrom_get_last_written prototype

2013-06-30 Thread Joe Perches
Move the function instead. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 193 +- 1 file changed, 97 insertions(+), 96 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 5148547..4fb9ad5 100644 --- a/drivers

[PATCH 05/12] cdrom: Remove unnecessary check_for_audio_disc prototype

2013-06-30 Thread Joe Perches
The actual static is defined below it but not used until later. Signed-off-by: Joe Perches --- drivers/cdrom/cdrom.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 72720d7..546b97e 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom

<    5   6   7   8   9   10   11   12   13   14   >