Re: [PATCH] Cpufreq: ARM IMX6Q: Select PM_OPP
El 14/07/14 09:43, Ezequiel Garcia escribió: Thanks for the patch. I have just a very minor nitpick to comment; if you run a git log, you'll see the subject should be: "cpufreq: imx6q: Select PM_OPP" In general, it's better to see the recent commits to find out how to write the commit title; each driver can have its own style. Thanks for the advice Eze! I'll do it next time. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Cpufreq: ARM IMX6Q: Select PM_OPP
PM_OPP is a library used by several of the existing cpufreq drivers. ARM IMX6Q cpufreq driver uses this library for its functionality. Thus, it should be selected in Kconfig. Reported-by: Ezequiel Garcia Signed-off-by: Nicolas Del Piano --- drivers/cpufreq/Kconfig.arm |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index ebac671..8c5cf4b 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -104,6 +104,7 @@ config ARM_IMX6Q_CPUFREQ tristate "Freescale i.MX6 cpufreq support" depends on ARCH_MXC depends on REGULATOR_ANATOP + select PM_OPP help This adds cpufreq driver support for Freescale i.MX6 series SoCs. -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: vt6655: tether: fixed a brace coding style issue
Fixed a coding style issue. Signed-off-by: Nicolas Del Piano --- drivers/staging/vt6655/tether.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/tether.c b/drivers/staging/vt6655/tether.c index a5dc3c09..1e7d3e2 100644 --- a/drivers/staging/vt6655/tether.c +++ b/drivers/staging/vt6655/tether.c @@ -98,8 +98,8 @@ bool ETHbIsBufferCrc32Ok(unsigned char *pbyBuffer, unsigned int cbFrameLength) unsigned long dwCRC; dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4); - if (cpu_to_le32(*((unsigned long *)(pbyBuffer + cbFrameLength - 4))) != dwCRC) { + if (cpu_to_le32(*((unsigned long *)(pbyBuffer + cbFrameLength - 4))) != dwCRC) return false; - } + return true; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: octeon-usb: fixed a macro coding style issue
Fixed a coding style error, macros with complex values should be enclosed in parentheses. Signed-off-by: Nicolas Del Piano --- drivers/staging/octeon-usb/octeon-hcd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 8b8ce72..ef3a8ce 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -246,7 +246,7 @@ enum cvmx_usb_pipe_flags { }; /* Normal prefetch that use the pref instruction. */ -#define CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0)) +#define CVMX_PREFETCH(address, offset) (asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0))) /* Maximum number of times to retry failed transactions */ #define MAX_RETRIES3 -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: octeon-usb: fixed a macro coding style issue
Fixed a coding style error, macros with comples values should be enclosed in parenthesis. Signed-off-by: Nicolas Del Piano --- drivers/staging/octeon-usb/octeon-hcd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 8b8ce72..475ecc4 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -246,7 +246,7 @@ enum cvmx_usb_pipe_flags { }; /* Normal prefetch that use the pref instruction. */ -#define CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0)) +#define (CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0))) /* Maximum number of times to retry failed transactions */ #define MAX_RETRIES3 -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: comedi: drivers: fixed a coding style issue.
>From 38e0d5778bd97062115e7d8a8ca40d18f3d71707 Mon Sep 17 00:00:00 2001 From: Nicolas Del Piano Date: Thu, 24 Apr 2014 18:46:49 -0300 Subject: [PATCH] Staging: comedi: drivers: fixed a missing blank line after a declaration coding style. Fixed a coding style issue. Signed-off-by: Nicolas Del Piano --- drivers/staging/comedi/drivers.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index cb5d214..71569bc 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -439,6 +439,7 @@ static void *comedi_recognize(struct comedi_driver *driv, const char *name) static void comedi_report_boards(struct comedi_driver *driv) { unsigned int i; + const char *const *name_ptr; pr_info("comedi: valid board names for %s driver are:\n", -- 1.7.9.5
[PATCH] octeon-usb/octeon-hcd.c
Subject: [PATCH] coding style errors fix From: Nicolas Del Piano Fixed all the coding style errors. There are some warnings that may be fixed. Signed-off-by: Nicolas Del Piano --- --- linux-next/drivers/staging/octeon-usb/octeon-hcd.c.orig 2014-04-19 02:31:31.626040005 -0300 +++ linux-next/drivers/staging/octeon-usb/octeon-hcd.c 2014-04-19 02:18:49.282259735 -0300 @@ -159,13 +159,13 @@ enum cvmx_usb_complete { * status call. */ struct cvmx_usb_port_status { - uint32_t reserved : 25; - uint32_t port_enabled : 1; - uint32_t port_over_current : 1; - uint32_t port_powered : 1; - enum cvmx_usb_speed port_speed : 2; - uint32_t connected : 1; - uint32_t connect_change : 1; + uint32_t reserved:25; + uint32_t port_enabled:1; + uint32_t port_over_current:1; + uint32_t port_powered:1; + enum cvmx_usb_speed port_speed:2; + uint32_t connected:1; + uint32_t connect_change:1; }; /** @@ -181,11 +181,11 @@ struct cvmx_usb_port_status { union cvmx_usb_control_header { uint64_t u64; struct { - uint64_t request_type : 8; - uint64_t request: 8; - uint64_t value : 16; - uint64_t index : 16; - uint64_t length : 16; + uint64_t request_type:8; + uint64_t request:8; + uint64_t value:16; + uint64_t index:16; + uint64_t length:16; } s; }; @@ -246,7 +246,7 @@ enum cvmx_usb_pipe_flags { }; /* Normal prefetch that use the pref instruction. */ -#define CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0)) +#define (CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : ([rbase] "d" (address), [off] "I" (offset), [type] "n" (0 /* Maximum number of times to retry failed transactions */ #define MAX_RETRIES3 @@ -437,7 +437,7 @@ struct octeon_hcd { type c; \ while (1) { \ c.u32 = __cvmx_usb_read_csr32(usb, address);\ - if (c.s.field op (value)) { \ + if (c.s.field op(value)) { \ result = 0; \ break; \ } else if (cvmx_get_cycle() > done) { \ @@ -465,112 +465,6 @@ struct octeon_hcd { #define USB_FIFO_ADDRESS(channel, usb_index) (CVMX_USBCX_GOTGCTL(usb_index) + ((channel)+1)*0x1000) /** - * struct octeon_temp_buffer - a bounce buffer for USB transfers - * @temp_buffer: the newly allocated temporary buffer (including meta-data) - * @orig_buffer: the original buffer passed by the USB stack - * @data: the newly allocated temporary buffer (excluding meta-data) - * - * Both the DMA engine and FIFO mode will always transfer full 32-bit words. If - * the buffer is too short, we need to allocate a temporary one, and this struct - * represents it. - */ -struct octeon_temp_buffer { - void *temp_buffer; - void *orig_buffer; - u8 data[0]; -}; - -/** - * octeon_alloc_temp_buffer - allocate a temporary buffer for USB transfer - *(if needed) - * @urb: URB. - * @mem_flags: Memory allocation flags. - * - * This function allocates a temporary bounce buffer whenever it's needed - * due to HW limitations. - */ -static int octeon_alloc_temp_buffer(struct urb *urb, gfp_t mem_flags) -{ - struct octeon_temp_buffer *temp; - - if (urb->num_sgs || urb->sg || - (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP) || - !(urb->transfer_buffer_length % sizeof(u32))) - return 0; - - temp = kmalloc(ALIGN(urb->transfer_buffer_length, sizeof(u32)) + - sizeof(*temp), mem_flags); - if (!temp) - return -ENOMEM; - - temp->temp_buffer = temp; - temp->orig_buffer = urb->transfer_buffer; - if (usb_urb_dir_out(urb)) - memcpy(temp->data, urb->transfer_buffer, - urb->transfer_buffer_length); - urb->transfer_buffer = temp->data; - urb->transfer_flags |= URB_ALIGNED_TEMP_BUFFER; - - return 0; -} - -/** - * octeon_free_temp_buffer - free a temporary buffer used by USB transfers. - * @urb: URB. - * - * Frees a buffer allocated by octeon_alloc_temp_buffer(). - */ -static void octeon_free_
Fwd: [PATCH] octeon-usb/octeon-hcd.c
Hello, this is a patch that I made for the Eudyptula Challenge. Please let me know if there are any mistakes! I send it to the list because the maintainer does not respond. Regards, Nicolas Subject: [PATCH] coding style errors fix From: Nicolas Del Piano Fixed all the coding style errors. There are some warnings that may be fixed. Signed-off-by: Nicolas Del Piano --- --- linux-next/drivers/staging/octeon-usb/octeon-hcd.c.orig 2014-04-19 02:31:31.626040005 -0300 +++ linux-next/drivers/staging/octeon-usb/octeon-hcd.c 2014-04-19 02:18:49.282259735 -0300 @@ -159,13 +159,13 @@ enum cvmx_usb_complete { * status call. */ struct cvmx_usb_port_status { - uint32_t reserved : 25; - uint32_t port_enabled : 1; - uint32_t port_over_current : 1; - uint32_t port_powered : 1; - enum cvmx_usb_speed port_speed : 2; - uint32_t connected : 1; - uint32_t connect_change : 1; + uint32_t reserved:25; + uint32_t port_enabled:1; + uint32_t port_over_current:1; + uint32_t port_powered:1; + enum cvmx_usb_speed port_speed:2; + uint32_t connected:1; + uint32_t connect_change:1; }; /** @@ -181,11 +181,11 @@ struct cvmx_usb_port_status { union cvmx_usb_control_header { uint64_t u64; struct { - uint64_t request_type : 8; - uint64_t request: 8; - uint64_t value : 16; - uint64_t index : 16; - uint64_t length : 16; + uint64_t request_type:8; + uint64_t request:8; + uint64_t value:16; + uint64_t index:16; + uint64_t length:16; } s; }; @@ -246,7 +246,7 @@ enum cvmx_usb_pipe_flags { }; /* Normal prefetch that use the pref instruction. */ -#define CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0)) +#define (CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : ([rbase] "d" (address), [off] "I" (offset), [type] "n" (0 /* Maximum number of times to retry failed transactions */ #define MAX_RETRIES3 @@ -437,7 +437,7 @@ struct octeon_hcd { type c; \ while (1) { \ c.u32 = __cvmx_usb_read_csr32(usb, address);\ - if (c.s.field op (value)) { \ + if (c.s.field op(value)) { \ result = 0; \ break; \ } else if (cvmx_get_cycle() > done) { \ @@ -465,112 +465,6 @@ struct octeon_hcd { #define USB_FIFO_ADDRESS(channel, usb_index) (CVMX_USBCX_GOTGCTL(usb_index) + ((channel)+1)*0x1000) /** - * struct octeon_temp_buffer - a bounce buffer for USB transfers - * @temp_buffer: the newly allocated temporary buffer (including meta-data) - * @orig_buffer: the original buffer passed by the USB stack - * @data: the newly allocated temporary buffer (excluding meta-data) - * - * Both the DMA engine and FIFO mode will always transfer full 32-bit words. If - * the buffer is too short, we need to allocate a temporary one, and this struct - * represents it. - */ -struct octeon_temp_buffer { - void *temp_buffer; - void *orig_buffer; - u8 data[0]; -}; - -/** - * octeon_alloc_temp_buffer - allocate a temporary buffer for USB transfer - *(if needed) - * @urb: URB. - * @mem_flags: Memory allocation flags. - * - * This function allocates a temporary bounce buffer whenever it's needed - * due to HW limitations. - */ -static int octeon_alloc_temp_buffer(struct urb *urb, gfp_t mem_flags) -{ - struct octeon_temp_buffer *temp; - - if (urb->num_sgs || urb->sg || - (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP) || - !(urb->transfer_buffer_length % sizeof(u32))) - return 0; - - temp = kmalloc(ALIGN(urb->transfer_buffer_length, sizeof(u32)) + - sizeof(*temp), mem_flags); - if (!temp) - return -ENOMEM; - - temp->temp_buffer = temp; - temp->orig_buffer = urb->transfer_buffer; - if (usb_urb_dir_out(urb)) - memcpy(temp->data, urb->transfer_buffer, - urb->transfer_buffer_length); - urb->transfer_buffer = temp->data; - urb->transfer_flags |= URB_ALIGNED_TEMP_BUFFER; - - return 0; -}