staging: sm750fb: rename camelCase macro
Subsystems (2)
PATCH v2 1/1 staging: sm750fb: rename camelCase macro
This patch renames a camelcase macro roundedDiv to rounded_div. Error found by checkpatch.
---
Changes in v2:
- Revise commit message and description
drivers/staging/sm750fb/ddk750_chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +3 -3
@@ -7,7 +7,7 @@#include "ddk750_power.h" /* n / d + 1 / 2 = (2n + d) / 2d */ -#define roundedDiv (num, denom) ((2 * (num) + (denom)) / (2 * (denom))) +#define rounded_div (num, denom) ((2 * (num) + (denom)) / (2 * (denom)))#define MHz (x) ((x) * 1000000)logical_chip_type_t getChipType (void )
@@ -102,7 +102,7 @@ static void setMemoryClock(unsigned int frequency) frequency =MHz (336 );/* Calculate the divisor */ - divisor =roundedDiv (get_mxclk_freq (), frequency); + divisor =rounded_div (get_mxclk_freq (), frequency);/* Set the corresponding divisor in the register. */ reg =PEEK32 (CURRENT_GATE ) & ~CURRENT_GATE_M2XCLK_MASK ;
@@ -152,7 +152,7 @@ static void setMasterClock(unsigned int frequency) frequency =MHz (190 );/* Calculate the divisor */ - divisor =roundedDiv (get_mxclk_freq (), frequency); + divisor =rounded_div (get_mxclk_freq (), frequency);/* Set the corresponding divisor in the register. */ reg =PEEK32 (CURRENT_GATE ) & ~CURRENT_GATE_MCLK_MASK ;
Signature · 1 line
2.1.4
Greg KH
maintainerQuoted 1 line · Elizabeth Ferdman
This patch renames a camelcase macro roundedDiv to
rounded_div. Error found by checkpatch.
please wrap your changelog comments at 72 columns.
Quoted 14 lines
Signed-off-by Elizabeth Ferdman <[email protected]>---
Changes in v2:
- Revise commit message and descriptiondrivers/staging/sm750fb/ddk750_chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/sm750fb/ddk750_chip.c +0
-0
drivers/staging/sm750fb/ddk750_chip.c line 10
Quoted 5 lines
drivers/staging/sm750fb/ddk750_chip.c +1
-1@@ -7,7 +7,7 @@#include "ddk750_power.h" /* n / d + 1 / 2 = (2n + d) / 2d */ -#define roundedDiv (num, denom) ((2 * (num) + (denom)) / (2 * (denom))) +#define rounded_div (num, denom) ((2 * (num) + (denom)) / (2 * (denom)))
Ick, now it looks like a function, which it isn't :(
I think the kernel already has this function somewhere, can you just use a built-in one instead? Dig around in the include/linux/ directory.
And if not, can you change this to an inline function, that way you don't accidentally evaluate denom twice, potentially causing bad problems.
thanks,
greg k-h