[PATCH 01/25] arm: Use bool function return values of true/false not 1/0

2015-03-30 Thread Joe Perches
Use the normal return values for bool functions

Signed-off-by: Joe Perches j...@perches.com
---
 arch/arm/include/asm/dma-mapping.h |  8 
 arch/arm/include/asm/kvm_emulate.h |  2 +-
 arch/arm/mach-omap2/powerdomain.c  | 14 +++---
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index b52101d..166e1e1 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -151,18 +151,18 @@ static inline bool dma_capable(struct device *dev, 
dma_addr_t addr, size_t size)
u64 limit, mask;
 
if (!dev-dma_mask)
-   return 0;
+   return false;
 
mask = *dev-dma_mask;
 
limit = (mask + 1)  ~mask;
if (limit  size  limit)
-   return 0;
+   return false;
 
if ((addr | (addr + size - 1))  ~mask)
-   return 0;
+   return false;
 
-   return 1;
+   return true;
 }
 
 static inline void dma_mark_clean(void *addr, size_t size) { }
diff --git a/arch/arm/include/asm/kvm_emulate.h 
b/arch/arm/include/asm/kvm_emulate.h
index a9c80a2..ad200a0 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -51,7 +51,7 @@ static inline void vcpu_set_hcr(struct kvm_vcpu *vcpu, 
unsigned long hcr)
 
 static inline bool vcpu_mode_is_32bit(struct kvm_vcpu *vcpu)
 {
-   return 1;
+   return true;
 }
 
 static inline unsigned long *vcpu_pc(struct kvm_vcpu *vcpu)
diff --git a/arch/arm/mach-omap2/powerdomain.c 
b/arch/arm/mach-omap2/powerdomain.c
index 78af6d8..897f9fb 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -950,7 +950,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
  */
 bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm)
 {
-   return (pwrdm  pwrdm-flags  PWRDM_HAS_HDWR_SAR) ? 1 : 0;
+   return pwrdm  (pwrdm-flags  PWRDM_HAS_HDWR_SAR);
 }
 
 int pwrdm_state_switch_nolock(struct powerdomain *pwrdm)
@@ -1185,24 +1185,24 @@ bool pwrdm_can_ever_lose_context(struct powerdomain 
*pwrdm)
if (!pwrdm) {
pr_debug(powerdomain: %s: invalid powerdomain pointer\n,
 __func__);
-   return 1;
+   return true;
}
 
if (pwrdm-pwrsts  PWRSTS_OFF)
-   return 1;
+   return true;
 
if (pwrdm-pwrsts  PWRSTS_RET) {
if (pwrdm-pwrsts_logic_ret  PWRSTS_OFF)
-   return 1;
+   return true;
 
for (i = 0; i  pwrdm-banks; i++)
if (pwrdm-pwrsts_mem_ret[i]  PWRSTS_OFF)
-   return 1;
+   return true;
}
 
for (i = 0; i  pwrdm-banks; i++)
if (pwrdm-pwrsts_mem_on[i]  PWRSTS_OFF)
-   return 1;
+   return true;
 
-   return 0;
+   return false;
 }
-- 
2.1.2

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/25] treewide: Use bool function return values of true/false not 1/0

2015-03-30 Thread Joe Perches
Joe Perches (25):
  arm: Use bool function return values of true/false not 1/0
  arm64: Use bool function return values of true/false not 1/0
  hexagon: Use bool function return values of true/false not 1/0
  ia64: Use bool function return values of true/false not 1/0
  mips: Use bool function return values of true/false not 1/0
  powerpc: Use bool function return values of true/false not 1/0
  s390: Use bool function return values of true/false not 1/0
  sparc: Use bool function return values of true/false not 1/0
  tile: Use bool function return values of true/false not 1/0
  unicore32: Use bool function return values of true/false not 1/0
  x86: Use bool function return values of true/false not 1/0
  virtio_console: Use bool function return values of true/false not 1/0
  csiostor: Use bool function return values of true/false not 1/0
  dcache: Use bool function return values of true/false not 1/0
  nfsd: nfs4state: Use bool function return values of true/false not 1/0
  include/linux: Use bool function return values of true/false not 1/0
  sound: Use bool function return values of true/false not 1/0
  rcu: tree_plugin: Use bool function return values of true/false not 1/0
  sched: Use bool function return values of true/false not 1/0
  ftrace: Use bool function return values of true/false not 1/0
  slub: Use bool function return values of true/false not 1/0
  bridge: Use bool function return values of true/false not 1/0
  netfilter: Use bool function return values of true/false not 1/0
  security: Use bool function return values of true/false not 1/0
  sound: wm5100-tables: Use bool function return values of true/false not 1/0

 arch/arm/include/asm/dma-mapping.h   |  8 ++--
 arch/arm/include/asm/kvm_emulate.h   |  2 +-
 arch/arm/mach-omap2/powerdomain.c| 14 +++---
 arch/arm64/include/asm/dma-mapping.h |  2 +-
 arch/hexagon/include/asm/dma-mapping.h   |  2 +-
 arch/ia64/include/asm/dma-mapping.h  |  2 +-
 arch/mips/include/asm/dma-mapping.h  |  2 +-
 arch/powerpc/include/asm/dcr-native.h|  2 +-
 arch/powerpc/include/asm/dma-mapping.h   |  4 +-
 arch/powerpc/include/asm/kvm_book3s_64.h |  4 +-
 arch/powerpc/sysdev/dcr.c|  2 +-
 arch/s390/include/asm/dma-mapping.h  |  2 +-
 arch/sparc/mm/init_64.c  |  8 ++--
 arch/tile/include/asm/dma-mapping.h  |  2 +-
 arch/unicore32/include/asm/dma-mapping.h |  2 +-
 arch/x86/include/asm/archrandom.h|  2 +-
 arch/x86/include/asm/dma-mapping.h   |  2 +-
 arch/x86/include/asm/kvm_para.h  |  2 +-
 arch/x86/kvm/cpuid.h |  2 +-
 arch/x86/kvm/vmx.c   | 72 ++--
 drivers/char/virtio_console.c|  2 +-
 drivers/scsi/csiostor/csio_scsi.c|  4 +-
 fs/dcache.c  | 12 ++---
 fs/nfsd/nfs4state.c  |  2 +-
 include/linux/blkdev.h   |  2 +-
 include/linux/ide.h  |  2 +-
 include/linux/kgdb.h |  2 +-
 include/linux/mfd/db8500-prcmu.h |  2 +-
 include/linux/mm.h   |  2 +-
 include/linux/power_supply.h |  8 ++--
 include/linux/ssb/ssb_driver_extif.h |  2 +-
 include/linux/ssb/ssb_driver_gige.h  | 16 +++
 include/sound/soc.h  |  4 +-
 kernel/rcu/tree_plugin.h |  4 +-
 kernel/sched/auto_group.h|  2 +-
 kernel/sched/completion.c| 16 ---
 kernel/trace/ftrace.c| 10 ++--
 mm/slub.c| 12 ++---
 net/bridge/br_private.h  |  2 +-
 net/ipv4/netfilter/ipt_ah.c  |  2 +-
 net/netfilter/ipset/ip_set_hash_ip.c |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipmark.c |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipport.c |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipportip.c   |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipportnet.c  |  8 ++--
 net/netfilter/ipset/ip_set_hash_net.c|  8 ++--
 net/netfilter/ipset/ip_set_hash_netiface.c   |  8 ++--
 net/netfilter/ipset/ip_set_hash_netport.c|  8 ++--
 net/netfilter/ipset/ip_set_hash_netportnet.c |  8 ++--
 net/netfilter/xt_connlimit.c |  2 +-
 net/netfilter/xt_hashlimit.c |  2 +-
 net/netfilter/xt_ipcomp.c|  2 +-
 security/apparmor/file.c |  8 ++--
 security/apparmor/policy.c   | 10 ++--
 sound/soc/codecs/wm5100-tables.c | 12 ++---
 55 files changed, 178 insertions(+), 176 deletions(-)

-- 
2.1.2

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0

2015-03-30 Thread Joe Perches
On Mon, 2015-03-30 at 17:07 -0700, Casey Schaufler wrote:
 On 3/30/2015 4:45 PM, Joe Perches wrote:
  Joe Perches (25):
arm: Use bool function return values of true/false not 1/0

[etc...]

 Why, and why these in particular?

bool functions are probably better returning
bool values instead of 1 and 0.

Especially when the functions intermix returning
returning 1/0 and true/false.

(there are only a couple of those though)

These are all the remaining instances in the
kernel tree.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] treewide: Convert clockevents_notify to use int cpu

2014-12-10 Thread Joe Perches
As far as I can tell, there's no value indirecting
the cpu passed to this function via a void *.

Update all the callers and called functions from within
clockevents_notify.

Miscellanea:

Add pr_fmt and convert one printk(KERN_ERR to pr_err

Signed-off-by: Joe Perches j...@perches.com
---
 arch/arm/mach-omap2/cpuidle44xx.c  |  7 +++
 arch/arm/mach-tegra/cpuidle-tegra114.c |  4 ++--
 arch/arm/mach-tegra/cpuidle-tegra20.c  |  8 
 arch/arm/mach-tegra/cpuidle-tegra30.c  |  8 
 arch/x86/kernel/process.c  |  6 +++---
 arch/x86/xen/suspend.c |  2 +-
 drivers/acpi/acpi_pad.c|  9 +
 drivers/acpi/processor_idle.c  |  4 ++--
 drivers/cpuidle/driver.c   |  3 +--
 drivers/idle/intel_idle.c  |  7 +++
 include/linux/clockchips.h |  6 +++---
 kernel/sched/idle.c|  4 ++--
 kernel/time/clockevents.c  | 15 +++
 kernel/time/hrtimer.c  |  6 ++
 kernel/time/tick-broadcast.c   | 16 
 kernel/time/tick-common.c  | 16 
 kernel/time/tick-internal.h| 18 +-
 kernel/time/timekeeping.c  |  4 ++--
 18 files changed, 69 insertions(+), 74 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle44xx.c 
b/arch/arm/mach-omap2/cpuidle44xx.c
index 01e398a..5d50aa1 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -112,7 +112,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device 
*dev,
mpuss_can_lose_context = (cx-mpu_state == PWRDM_POWER_RET) 
 (cx-mpu_logic_state == PWRDM_POWER_OFF);
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, cpu_id);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, cpu_id);
 
/*
 * Call idle CPU PM enter notifier chain so that
@@ -169,7 +169,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device 
*dev,
if (dev-cpu == 0  mpuss_can_lose_context)
cpu_cluster_pm_exit();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, cpu_id);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, cpu_id);
 
 fail:
cpuidle_coupled_parallel_barrier(dev, abort_barrier);
@@ -184,8 +184,7 @@ fail:
  */
 static void omap_setup_broadcast_timer(void *arg)
 {
-   int cpu = smp_processor_id();
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, smp_processor_id());
 }
 
 static struct cpuidle_driver omap4_idle_driver = {
diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c 
b/arch/arm/mach-tegra/cpuidle-tegra114.c
index f2b586d..3b2fc3f 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra114.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
@@ -44,7 +44,7 @@ static int tegra114_idle_power_down(struct cpuidle_device 
*dev,
tegra_set_cpu_in_lp2();
cpu_pm_enter();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev-cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev-cpu);
 
call_firmware_op(prepare_idle);
 
@@ -52,7 +52,7 @@ static int tegra114_idle_power_down(struct cpuidle_device 
*dev,
if (call_firmware_op(do_idle, 0) == -ENOSYS)
cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev-cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev-cpu);
 
cpu_pm_exit();
tegra_clear_cpu_in_lp2();
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c 
b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 4f25a7c..ab30758 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -136,11 +136,11 @@ static bool tegra20_cpu_cluster_power_down(struct 
cpuidle_device *dev,
if (tegra20_reset_cpu_1() || !tegra_cpu_rail_off_ready())
return false;
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev-cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev-cpu);
 
tegra_idle_lp2_last();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev-cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev-cpu);
 
if (cpu_online(1))
tegra20_wake_cpu1_from_reset();
@@ -153,13 +153,13 @@ static bool tegra20_idle_enter_lp2_cpu_1(struct 
cpuidle_device *dev,
 struct cpuidle_driver *drv,
 int index)
 {
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev-cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, dev-cpu);
 
cpu_suspend(0, tegra20_sleep_cpu_secondary_finish);
 
tegra20_cpu_clear_resettable();
 
-   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev-cpu);
+   clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, dev-cpu

[PATCH 0/8] arm: Convert pr_warning to pr_warn

2014-09-13 Thread Joe Perches
pr_warn is used about 3:1 over pr_warning and is mixed use
in arch/arm.  Standardize on pr_warn.

Joe Perches (8):
  arm: Convert pr_warning to pr_warn
  arm: mach-davinci: Convert pr_warning to pr_warn
  arm: mach-ep93xx: Convert pr_warning to pr_warn
  arm: mach-imx: Convert pr_warning to pr_warn
  arm: mach-omap2: Convert pr_warning to pr_warn
  arm: mach-orion5x: Convert pr_warning to pr_warn
  arm: mach-pxa: Convert pr_warning to pr_warn
  arm: mach-u300: Convert pr_warning to pr_warn

 arch/arm/include/asm/syscall.h |  8 +--
 arch/arm/kernel/atags_parse.c  |  2 +-
 arch/arm/kernel/hw_breakpoint.c| 18 +++---
 arch/arm/kernel/irq.c  |  4 +-
 arch/arm/kernel/perf_event_cpu.c   |  4 +-
 arch/arm/kernel/smp.c  |  2 +-
 arch/arm/kernel/unwind.c   | 24 
 arch/arm/mach-davinci/board-da830-evm.c| 76 +++---
 arch/arm/mach-davinci/board-dm644x-evm.c   |  6 +-
 arch/arm/mach-davinci/board-mityomapl138.c | 38 ++---
 arch/arm/mach-davinci/board-neuros-osd2.c  |  3 +-
 arch/arm/mach-davinci/time.c   |  6 +-
 arch/arm/mach-ep93xx/core.c|  4 +-
 arch/arm/mach-imx/mach-armadillo5x0.c  |  2 +-
 arch/arm/mach-imx/mach-mx31_3ds.c  |  4 +-
 arch/arm/mach-imx/mach-mx31lite.c  |  2 +-
 arch/arm/mach-imx/mach-pcm037.c|  4 +-
 arch/arm/mach-omap2/display.c  |  2 +-
 arch/arm/mach-omap2/hdq1w.c|  4 +-
 arch/arm/mach-omap2/i2c.c  |  2 +-
 arch/arm/mach-omap2/msdi.c |  4 +-
 arch/arm/mach-omap2/mux.c  |  2 +-
 arch/arm/mach-omap2/omap_hwmod.c   | 26 -
 arch/arm/mach-omap2/pdata-quirks.c |  4 +-
 arch/arm/mach-omap2/pm34xx.c   |  2 +-
 arch/arm/mach-omap2/smartreflex-class3.c   |  4 +-
 arch/arm/mach-omap2/sr_device.c|  2 +-
 arch/arm/mach-omap2/vc.c   |  2 +-
 arch/arm/mach-omap2/voltage.c  | 22 
 arch/arm/mach-omap2/wd_timer.c |  4 +-
 arch/arm/mach-orion5x/dns323-setup.c   |  8 +--
 arch/arm/mach-orion5x/terastation_pro2-setup.c |  2 +-
 arch/arm/mach-orion5x/ts209-setup.c|  2 +-
 arch/arm/mach-orion5x/ts409-setup.c|  2 +-
 arch/arm/mach-orion5x/ts78xx-setup.c   |  4 +-
 arch/arm/mach-pxa/em-x270.c|  4 +-
 arch/arm/mach-pxa/gumstix.c|  3 +-
 arch/arm/mach-pxa/mfp-pxa2xx.c | 12 ++--
 arch/arm/mach-pxa/poodle.c |  2 +-
 arch/arm/mach-pxa/pxa3xx-ulpi.c|  6 +-
 arch/arm/mach-pxa/raumfeld.c   | 26 -
 arch/arm/mach-u300/dummyspichip.c  | 65 ++
 arch/arm/mm/idmap.c|  2 +-
 arch/arm/mm/mmu.c  |  4 +-
 44 files changed, 200 insertions(+), 229 deletions(-)

-- 
1.8.1.2.459.gbcd45b4.dirty

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/8] arm: mach-omap2: Convert pr_warning to pr_warn

2014-09-13 Thread Joe Perches
Use the more common pr_warn.

Other miscellanea:

o Realign arguments

Signed-off-by: Joe Perches j...@perches.com
---
 arch/arm/mach-omap2/display.c|  2 +-
 arch/arm/mach-omap2/hdq1w.c  |  4 ++--
 arch/arm/mach-omap2/i2c.c|  2 +-
 arch/arm/mach-omap2/msdi.c   |  4 ++--
 arch/arm/mach-omap2/mux.c|  2 +-
 arch/arm/mach-omap2/omap_hwmod.c | 26 +-
 arch/arm/mach-omap2/pdata-quirks.c   |  4 ++--
 arch/arm/mach-omap2/pm34xx.c |  2 +-
 arch/arm/mach-omap2/smartreflex-class3.c |  4 ++--
 arch/arm/mach-omap2/sr_device.c  |  2 +-
 arch/arm/mach-omap2/vc.c |  2 +-
 arch/arm/mach-omap2/voltage.c| 22 +++---
 arch/arm/mach-omap2/wd_timer.c   |  4 ++--
 13 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index bf852d7..7a050f9 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -544,7 +544,7 @@ int omap_dss_reset(struct omap_hwmod *oh)
MAX_MODULE_SOFTRESET_WAIT, c);
 
if (c == MAX_MODULE_SOFTRESET_WAIT)
-   pr_warning(dss_core: waiting for reset to finish failed\n);
+   pr_warn(dss_core: waiting for reset to finish failed\n);
else
pr_debug(dss_core: softreset done\n);
 
diff --git a/arch/arm/mach-omap2/hdq1w.c b/arch/arm/mach-omap2/hdq1w.c
index f78b4a1..f3897d8 100644
--- a/arch/arm/mach-omap2/hdq1w.c
+++ b/arch/arm/mach-omap2/hdq1w.c
@@ -67,8 +67,8 @@ int omap_hdq1w_reset(struct omap_hwmod *oh)
  MAX_MODULE_SOFTRESET_WAIT, c);
 
if (c == MAX_MODULE_SOFTRESET_WAIT)
-   pr_warning(%s: %s: softreset failed (waited %d usec)\n,
-  __func__, oh-name, MAX_MODULE_SOFTRESET_WAIT);
+   pr_warn(%s: %s: softreset failed (waited %d usec)\n,
+   __func__, oh-name, MAX_MODULE_SOFTRESET_WAIT);
else
pr_debug(%s: %s: softreset in %d usec\n, __func__,
 oh-name, c);
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index b456b44..b9d8e47 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -99,7 +99,7 @@ int omap_i2c_reset(struct omap_hwmod *oh)
MAX_MODULE_SOFTRESET_WAIT, c);
 
if (c == MAX_MODULE_SOFTRESET_WAIT)
-   pr_warning(%s: %s: softreset failed (waited %d usec)\n,
+   pr_warn(%s: %s: softreset failed (waited %d usec)\n,
__func__, oh-name, MAX_MODULE_SOFTRESET_WAIT);
else
pr_debug(%s: %s: softreset in %d usec\n, __func__,
diff --git a/arch/arm/mach-omap2/msdi.c b/arch/arm/mach-omap2/msdi.c
index 828e0db..8bdf182 100644
--- a/arch/arm/mach-omap2/msdi.c
+++ b/arch/arm/mach-omap2/msdi.c
@@ -76,8 +76,8 @@ int omap_msdi_reset(struct omap_hwmod *oh)
  MAX_MODULE_SOFTRESET_WAIT, c);
 
if (c == MAX_MODULE_SOFTRESET_WAIT)
-   pr_warning(%s: %s: softreset failed (waited %d usec)\n,
-  __func__, oh-name, MAX_MODULE_SOFTRESET_WAIT);
+   pr_warn(%s: %s: softreset failed (waited %d usec)\n,
+   __func__, oh-name, MAX_MODULE_SOFTRESET_WAIT);
else
pr_debug(%s: %s: softreset in %d usec\n, __func__,
 oh-name, c);
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index ac8a249..78064b0 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -814,7 +814,7 @@ int __init omap_mux_late_init(void)
hwmod_io, omap_mux_late_init);
 
if (ret)
-   pr_warning(mux: Failed to setup hwmod io irq %d\n, ret);
+   pr_warn(mux: Failed to setup hwmod io irq %d\n, ret);
 
return 0;
 }
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 8fd87a3..98f8ec0 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -769,8 +769,8 @@ static int _init_main_clk(struct omap_hwmod *oh)
 
oh-_clk = clk_get(NULL, oh-main_clk);
if (IS_ERR(oh-_clk)) {
-   pr_warning(omap_hwmod: %s: cannot clk_get main_clk %s\n,
-  oh-name, oh-main_clk);
+   pr_warn(omap_hwmod: %s: cannot clk_get main_clk %s\n,
+   oh-name, oh-main_clk);
return -EINVAL;
}
/*
@@ -814,8 +814,8 @@ static int _init_interface_clks(struct omap_hwmod *oh)
 
c = clk_get(NULL, os-clk);
if (IS_ERR(c)) {
-   pr_warning(omap_hwmod: %s: cannot clk_get 
interface_clk %s\n,
-  oh-name, os-clk);
+   pr_warn(omap_hwmod: %s: cannot clk_get interface_clk 
%s\n

Re: [PATCH 00/10 linux-next] drivers/usb: remove unnecessary break after goto/return

2014-07-24 Thread Joe Perches
On Thu, 2014-07-24 at 17:46 +0200, Fabian Frederick wrote:
 
  On 24 July 2014 at 13:37 Oliver Neukum oneu...@suse.de wrote:
 
 
  On Thu, 2014-07-24 at 10:18 +0200, Fabian Frederick wrote:
   Small patchset addressing break redundancy on drivers/usb branch
   (suggested by Joe Perches).
 
  Frankly, that is not a good idea. Somebody will remove a goto
  and forget to readd the break
 
 No problem ; checkpatch would give a warning anyway. See Possible switch
 case/default not preceeded by break or fallthrough comment

Generally true, but not everyone uses checkpatch.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] gpu: drm: omapdrm: Use %pad format for values of the dma_addr_t type

2014-07-24 Thread Joe Perches
On Thu, 2014-07-24 at 21:58 +0400, mat...@sai.msu.ru wrote:
 The format change is to fix the following compilation issue:

Just a trivial note:

 diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c 
 b/drivers/gpu/drm/omapdrm/omap_gem.c
[]
 @@ -791,7 +791,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj,
   omap_obj-paddr = tiler_ssptr(block);
   omap_obj-block = block;
  
 - DBG(got paddr: %08x, omap_obj-paddr);
 + DBG(got paddr: %pad, (omap_obj-paddr));

foo-bar does not need parentheses.

Most uses in the kernel do not have them.
It seems to be ~25:1 without to with.

 @@ -985,9 +985,9 @@ void omap_gem_describe(struct drm_gem_object *obj, struct 
 seq_file *m)
  
   off = drm_vma_node_start(obj-vma_node);
  
 - seq_printf(m, %08x: %2d (%2d) %08llx %08Zx (%2d) %p %4d,
 + seq_printf(m, %08x: %2d (%2d) %08llx %pad (%2d) %p %4d,
   omap_obj-flags, obj-name, 
 obj-refcount.refcount.counter,
 - off, omap_obj-paddr, omap_obj-paddr_cnt,
 + off, (omap_obj-paddr), omap_obj-paddr_cnt,

etc...


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 00/19] irqchip: crossbar: driver fixes

2014-06-13 Thread Joe Perches
On Fri, 2014-06-13 at 11:01 -0400, Jason Cooper wrote:
 Please format the subject lines like so:
 
   irqchip: crossbar: Set cb pointer ...
  ^
  |
  \-- note the capitalization

I suggest you don't make this a rule and focus
on more important stuff instead.

Nobody is going to write tools that parse the
changelogs by git log --format=%s for case
sensitivity.

As is, it's about half/half.

$ git log --format=%s --no-merges drivers/irqchip/ | \
  grep ^irqchip: | cut -f3- -d:

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 00/19] irqchip: crossbar: driver fixes

2014-06-13 Thread Joe Perches
On Fri, 2014-06-13 at 12:37 -0400, Jason Cooper wrote:
 On Fri, Jun 13, 2014 at 09:14:34AM -0700, Joe Perches wrote:
  On Fri, 2014-06-13 at 11:01 -0400, Jason Cooper wrote:
   Please format the subject lines like so:
   
 irqchip: crossbar: Set cb pointer ...
^
|
\-- note the capitalization
  
  I suggest you don't make this a rule and focus
  on more important stuff instead.
 
 It's not my rule.  ;-)

Who's rule is it then?

Documentation/SubmittingPatches simply says:

The canonical patch subject line is:

Subject: [PATCH 001/123] subsystem: summary phrase

It doesn't say anything about capitalization.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 00/19] irqchip: crossbar: driver fixes

2014-06-13 Thread Joe Perches
On Fri, 2014-06-13 at 22:38 +0200, Thomas Gleixner wrote:
 On Fri, 13 Jun 2014, Jason Cooper wrote:
  On Fri, Jun 13, 2014 at 09:48:24AM -0700, Joe Perches wrote:
   On Fri, 2014-06-13 at 12:37 -0400, Jason Cooper wrote:
On Fri, Jun 13, 2014 at 09:14:34AM -0700, Joe Perches wrote:
 On Fri, 2014-06-13 at 11:01 -0400, Jason Cooper wrote:
  Please format the subject lines like so:
  
irqchip: crossbar: Set cb pointer ...
   ^
   |
   \-- note the capitalization
 
 I suggest you don't make this a rule and focus
 on more important stuff instead.

[elided the bit that describes what a patch subject looks like]

Documentation/SubmittingPatches simply says:

The canonical patch subject line is:

Subject: [PATCH 001/123] subsystem: summary phrase

It doesn't say anything about capitalization.

 Sentences start with an upper case letter. Our brain is trained on
 that rule when parsing a line.

shrug  I don't think patch subjects are sentences.
The docs call them phrases.

 So for people who actually review patches by reading them instead of
 running a spell checker, consistent formatting more important than
 avoiding the random typo, which our brain just blends out in most of
 the cases. Unfortunately also when the typo is in actual code :(

That part about the code is truth.

Anyway, how you spend your time is certainly up to you.
Do what makes you happy.

But if you want this specific form for your patches,
please just document it somewhere in the kernel tree.

I think that relatively commit log subjects are generally
easy to parse as-is and don't need more strictures.

I think it akin to british/american spelling uses and
I and i.  I just don't care which people use.

I did propose a mechanism to nudge people when proposed
patch subjects don't fit some specific maintainer's idea
of proper.

https://lkml.org/lkml/2010/11/16/245

cheers, Joe




--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 08/19] irqchip: crossbar: fix checkpatch warning

2014-06-12 Thread Joe Perches
On Thu, 2014-06-12 at 19:05 +0530, Sricharan R wrote:
 On Thursday 12 June 2014 06:40 PM, Jason Cooper wrote:
  On Thu, Jun 12, 2014 at 05:23:16PM +0530, Sricharan R wrote:
  diff --git a/drivers/irqchip/irq-crossbar.c 
  b/drivers/irqchip/irq-crossbar.c
[]
  @@ -34,7 +34,8 @@ struct crossbar_device {
 uint *irq_map;
 void __iomem *crossbar_base;
 int *register_offsets;
  -  void (*write) (int, int);
  +
  +  void (*write)(int, int);
  
  The empty line here looks bogus to me.

Good eye.  It's unnecessary.

   Did you re-run checkpatch after
  fixing the unnecessary space to see if it still complained about having
  a 'blank line after declarations'?
  
  Yes, it still complains even after fixing unnecessary space.

It's a checkpatch defect.

It's been fixed by:
https://lkml.org/lkml/2014/6/6/426

  I'm generally opposed to these sorts of checkpatch patches, especially
  when they are just warnings.  It's great for a new driver in the staging
  tree, but it makes backporting future bugfixes that much harder when
  drivers have been live in mainline.

Blind adherence to checkpatch isn't always a great idea.

But bugfix backports haven't been much of an issue in
other subsystems with fairly active whitespace/style
changes.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 08/19] irqchip: crossbar: fix checkpatch warning

2014-06-12 Thread Joe Perches
On Thu, 2014-06-12 at 11:32 -0400, Jason Cooper wrote:

Hi Jason.

  But bugfix backports haven't been much of an issue in
  other subsystems with fairly active whitespace/style
  changes.
 
 Most of the mvebu fixes we've had that failed to apply were generally
 due to a large whitespace change (dts node shuffling, admittedly not
 checkpatch-related).

So not due to this.

   I've also frequently been stymied by code cleanups
 when using git blame to find the commit introducing a regression.

git blame -w can frequently help there.

 So, my general rule is: If you're submitting a patch to make checkpatch
 be quiet, re-assess the need.  If you're making changes and you can fix
 some checkpatch items while you're there, then do so.

Decent rule.

 There are certainly legitimate checkpatch-only patches, I just don't
 think this is one qualifies.

Of course it's the maintainer's choice (and last I saw,
that's you) to ignore whatever doesn't fit the appropriate
vision for the code.

$ ./scripts/get_maintainer.pl -f drivers/irqchip/irq-crossbar.c
Thomas Gleixner t...@linutronix.de (maintainer:IRQCHIP DRIVERS)
Jason Cooper ja...@lakedaemon.net (maintainer:IRQCHIP DRIVERS)
...

cheers, Joe

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/10] mfd: menelaus: Use for_each_set_bit()

2013-12-16 Thread Joe Perches
On Mon, 2013-12-16 at 18:08 -0600, Felipe Balbi wrote:
 That macro just helps removing some extra line of code and hides ffs()
 calls.
 
 While at that, also fix a variable shadowing bug where 'int irq' was
 being redeclared inside inner loop while it was also argument to
 interrupt handler.
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 Signed-off-by: Felipe Balbi ba...@ti.com
 ---
  drivers/mfd/menelaus.c | 16 +++-
  1 file changed, 7 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
 index 87d80a8..d3e3022 100644
 --- a/drivers/mfd/menelaus.c
 +++ b/drivers/mfd/menelaus.c
 @@ -795,24 +795,22 @@ static irqreturn_t menelaus_irq(int irq, void 
 *_menelaus)
  {
   struct menelaus_chip *menelaus = _menelaus;
   void (*handler)(struct menelaus_chip *menelaus);
 - unsigned isr;
 + unsigned long isr;
 + unsigned long i;
  
   isr = (menelaus_read_reg(MENELAUS_INT_STATUS2)
~menelaus-mask2)  8;
   isr |= menelaus_read_reg(MENELAUS_INT_STATUS1)
~menelaus-mask1;
  
 - while (isr) {
 - int irq = fls(isr) - 1;
 - isr = ~(1  irq);
 -
 + for_each_set_bit(i, isr, 16) {
   mutex_lock(menelaus-lock);
 - menelaus_disable_irq(irq);
 - menelaus_ack_irq(irq);
 - handler = menelaus-handlers[irq];
 + menelaus_disable_irq(i);
 + menelaus_ack_irq(i);
 + handler = menelaus-handlers[i];
   if (handler)
   handler(menelaus);
 - menelaus_enable_irq(irq);
 + menelaus_enable_irq(i);
   mutex_unlock(menelaus-lock);
   }
  

This could handle the irqs in reverse order.
Does that matter?

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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 smaller overall code to add
#define pr_fmt(fmt) KBUILD_MODNAME :  fmt
before any #include and use

 +static void omap3_rom_rng_idle(unsigned long data)
 +{
 + int r;
 +
 + r = omap3_rom_rng_call(0, 0, RNG_RESET);
 + if (r != 0) {
 + printk(KERN_ERR %s: reset failed: %d\n,
 +omap3_rom_rng_name, r);

pr_err(reset failed: %d\n, r);

 +static int omap3_rom_rng_get_random(void *buf, unsigned int count)
 +{
[]
 + if (r != 0) {
 + clk_disable_unprepare(rng_clk);
 + printk(KERN_ERR %s: HW init failed: %d\n,
 +omap3_rom_rng_name, r);

pr_err(HW init failed: %d\n, r);

etc...


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Joe Perches
On Wed, 2013-08-14 at 18:12 -0500, Joel Fernandes wrote:
 When DEBUG is enabled, these macros can be used to print variables
 in integer and hex format, and clearly display which registers,
 offsets and values are being read/written , including printing the
 names of the offsets and their values.
[]
 diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
[]
 @@ -15,6 +15,14 @@
  
  #define pr_fmt(fmt) %s:  fmt, __func__
  
 +#ifdef DEBUG
 +#define prn(num) printk(#num =%d\n, num)
 +#define prx(num) printk(#num =%x\n, num)

pr_debug?

 +#else
 +#define prn(num) do { } while (0)
 +#define prx(num)  do { } while (0)
 +#endif
[]
 @@ -172,13 +180,35 @@ struct omap_aes_dev {
  static LIST_HEAD(dev_list);
  static DEFINE_SPINLOCK(list_lock);
  
 +#ifdef DEBUG
 +#define omap_aes_read(dd, offset)\
 + do {\
 + omap_aes_read_1(dd, offset);\
 + pr_debug(omap_aes_read( #offset )\n);   \
 + } while (0)
 +
 +static inline u32 omap_aes_read_1(struct omap_aes_dev *dd, u32 offset)
 +#else
  static inline u32 omap_aes_read(struct omap_aes_dev *dd, u32 offset)
 +#endif
  {
   return __raw_readl(dd-io_base + offset);
  }
  
 +#ifdef DEBUG
 +#define omap_aes_write(dd, offset, value)\
 + do {\
 + pr_debug(omap_aes_write( #offset =%x) value=%d\n,   \
 +  offset, value);\
 + omap_aes_write_1(dd, offset, value);\
 + } while (0)
 +
 +static inline void omap_aes_write_1(struct omap_aes_dev *dd, u32 offset,
 +   u32 value)
 +#else
  static inline void omap_aes_write(struct omap_aes_dev *dd, u32 offset,
 u32 value)
 +#endif
  {
   __raw_writel(value, dd-io_base + offset);
  }

Umm, yuck?

Is there any real value in read_1 and write_1?


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 02/10] crypto: omap-aes: Add useful debug macros

2013-08-14 Thread Joe Perches
On Wed, 2013-08-14 at 18:40 -0500, Joel Fernandes wrote:
 On 08/14/2013 06:29 PM, Joe Perches wrote:
  On Wed, 2013-08-14 at 18:12 -0500, Joel Fernandes wrote:
  When DEBUG is enabled, these macros can be used to print variables
  in integer and hex format, and clearly display which registers,
  offsets and values are being read/written , including printing the
  names of the offsets and their values.
  []
  diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
  []
  @@ -15,6 +15,14 @@
   
   #define pr_fmt(fmt) %s:  fmt, __func__
   
  +#ifdef DEBUG
  +#define prn(num) printk(#num =%d\n, num)
  +#define prx(num) printk(#num =%x\n, num)
  
  pr_debug?
 
 Sure, can change that.
 
  +#else
  +#define prn(num) do { } while (0)
  +#define prx(num)  do { } while (0)
  +#endif
  []
  @@ -172,13 +180,35 @@ struct omap_aes_dev {
   static LIST_HEAD(dev_list);
   static DEFINE_SPINLOCK(list_lock);
   
  +#ifdef DEBUG
  +#define omap_aes_read(dd, offset) \
  +  do {\
  +  omap_aes_read_1(dd, offset);\
  +  pr_debug(omap_aes_read( #offset )\n);   \
  +  } while (0)
  +
  +static inline u32 omap_aes_read_1(struct omap_aes_dev *dd, u32 offset)
  +#else
   static inline u32 omap_aes_read(struct omap_aes_dev *dd, u32 offset)
  +#endif
   {
 return __raw_readl(dd-io_base + offset);
   }
   
  +#ifdef DEBUG
  +#define omap_aes_write(dd, offset, value) \
  +  do {\
  +  pr_debug(omap_aes_write( #offset =%x) value=%d\n,   \
  +   offset, value);\
  +  omap_aes_write_1(dd, offset, value);\
  +  } while (0)
  +
  +static inline void omap_aes_write_1(struct omap_aes_dev *dd, u32 offset,
  +u32 value)
  +#else
   static inline void omap_aes_write(struct omap_aes_dev *dd, u32 offset,
   u32 value)
  +#endif
   {
 __raw_writel(value, dd-io_base + offset);
   }
  
  Umm, yuck?
  
  Is there any real value in read_1 and write_1?
 
 Can you be more descriptive? There is a lot of value in them for debug
 to show clearly sequence of read/writes. Moreover, they are no-op'd when
 DEBUG is disabled.

pr_debug is no-op'd when DEBUG is not #defined.
so just use a single

omap_aes_write(...)
{
pr_debug(...)
__raw_writel(...);
}


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon

2013-08-10 Thread Joe Perches
On Sat, 2013-08-10 at 17:40 +0200, Julia Lawall wrote:
 From: Julia Lawall julia.law...@lip6.fr
 Replace a comma between expression statements by a semicolon.
[]
 I can't tell if the assignment to ct-regs.mask is really intended to be
 under the if.  The proposed patch preserves the current semantics, but not
 the current indentation.

I'd suspect more that the indentation is correct
and the comma use incorrect.

It also looks more like a copy/paste error from
commit f8b46b583 when the code was restructured
a bit.

Kevin?



-#ifdef CONFIG_ARCH_OMAP16XX
-   /* REVISIT: assuming only 16xx supports MPUIO wake events */
-   .irq_set_wake   = gpio_wake_enable,
-#endif
-};



+   /* REVISIT: assuming only 16xx supports MPUIO wake events */
+   if (cpu_is_omap16xx())
+   ct-chip.irq_set_wake = gpio_wake_enable,



 diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
[]
 @@ -1029,10 +1029,10 @@ omap_mpuio_alloc_gc(struct gpio_bank *bank, unsigned 
 int irq_start,
   ct-chip.irq_unmask = irq_gc_mask_clr_bit;
   ct-chip.irq_set_type = gpio_irq_type;
  
 - if (bank-regs-wkup_en)
 - ct-chip.irq_set_wake = gpio_wake_enable,
 -
 - ct-regs.mask = OMAP_MPUIO_GPIO_INT / bank-stride;
 + if (bank-regs-wkup_en) {
 + ct-chip.irq_set_wake = gpio_wake_enable;
 + ct-regs.mask = OMAP_MPUIO_GPIO_INT / bank-stride;
 + }


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 03/18] MAINTAINERS: OMAP POWERDOMAIN, update patterns

2013-07-21 Thread Joe Perches
On Mon, 2013-07-22 at 05:03 +, Paul Walmsley wrote:
 On Sun, 21 Jul 2013, Joe Perches wrote:
 
  commit 498153995b9 (ARM: OMAP2+: powerdomain/PRM: move the
  low-level powerdomain) renamed the files, update the patterns.
  
  Signed-off-by: Joe Perches j...@perches.com
  cc: Paul Walmsley p...@pwsan.com
  cc: Rajendra Nayak rna...@ti.com
  cc: Santosh Shilimkar santosh.shilim...@ti.com
 
 I don't object to the content of this patch, but Cesar 
 Eduardo Barros posted a patch for this already (and cc'ed you) back 
 in March:
 
 http://lkml.indiana.edu/hypermail/linux/kernel/1303.0/00904.html
 
 The regex used in his pattern is also more accurate.  Please take his 
 patch instead, or credit him in your patch and use the cm*.[ch]/prm*.[ch] 
 notation from his patch.

(cc'ing Cesar)

Hi Paul.

I'm not the MAINTAINERS maintainer and I don't
pick up patches.

I certainly don't object at all if Andrew picks
up the patches you mentioned and drops these 2.

Andrew, here are links to Cesar's original patches
https://patchwork.kernel.org/project/LKML/list/?submitter=3513
https://lkml.org/lkml/2013/3/2/185

It seems a few are similar/duplicated to these 18.

Cesar, maybe you should resend yours.  I thought
they were applied and forgot all about them.

cheers, Joe

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] misc: Add crossbar driver

2013-07-18 Thread Joe Perches
On Thu, 2013-07-18 at 22:13 +0530, Sricharan R wrote:
 Some socs have a large number of interrupts/dma requests to service
 the needs of its many peripherals and subsystems. All of the
 requests lines from the subsystems are not needed at the same
 time, so they have to be muxed to the controllers appropriately.
 In such places a interrupt/dma controllers are preceded by an
 IRQ/DMA CROSSBAR that provides flexibility in muxing the device
 requests to the controller inputs.
[]
 diff --git a/drivers/misc/crossbar.c b/drivers/misc/crossbar.c
[]
 +int crossbar_unmap(struct device_node *cbdev_node, unsigned index)
[]
 + list_for_each_entry(cbdev, cb_devlist, node) {
 + if (strcmp(cbdev-name, tmp.cb_name))
 + continue;
[]
 + dev_warn(cbdev-dev,
 +  unmapped int_no %x mapped to cb %x\n,
 +  tmp.int_no, tmp.cb_no);
 + return 0;
[]
 + dev_warn(cbdev-dev, %s cb entry %d not found\n,
 +  __func__, tmp.cb_no);
 + return -ENOENT;

Why does this function always emit a dev_warn
before return?  Maybe the first should be dev_info?


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/1] drivers: net: davinci_cpdma: acknowledge interrupt properly

2013-02-15 Thread Joe Perches
On Fri, 2013-02-15 at 15:05 -0500, David Miller wrote:
 From: Mugunthan V N mugunthan...@ti.com
 Date: Thu, 14 Feb 2013 23:56:46 +0530
 
  +enum {
  + CPDMA_EOI_RX_THRESH = 0,
  + CPDMA_EOI_RX,
  + CPDMA_EOI_TX,
  + CPDMA_EOI_MISC,
  +};
 
 Do not use enumerations for hardware register values, which must be
 exact, otherwise you are potentially going to succumb to the vagaries
 of C language enumeration value assignment.

Vagaries?

In what way is c enumeration (6.7.2.2) vague?
char vs int?  Isn't smaller mostly better?

Concern about possible future reordering given an
insertion or deletion might be the only consideration
I could imagine.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] drivers: phy: add generic PHY framework

2012-09-26 Thread Joe Perches
On Wed, 2012-09-26 at 20:31 +0530, Kishon Vijay Abraham I wrote:
 The PHY framework provides a set of API's for the PHY drivers to
 create/destroy a PHY and API's 

Just some trivial notes.

 diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
[]
 @@ -0,0 +1,445 @@
[]
 +static void devm_phy_release(struct device *dev, void *res)
 +{
 + struct phy *phy = *(struct phy **)res;

That's a bit twisted isn't it?
Perhaps
struct phy *phy = res;

[]

 +static int devm_phy_match(struct device *dev, void *res, void *match_data)
 +{
 + return res == match_data;

static bool devm_phy_match(etc...)

[]

 +struct phy *devm_of_phy_get(struct device *dev, const char *phandle, u8 
 index)
 +{
 + struct phy *phy = NULL, **ptr;
 + struct device_node *node;
 +
 + if (!dev-of_node) {
 + dev_dbg(dev, device does not have a device node entry\n);
 + return ERR_PTR(-EINVAL);
 + }
 +
 + node = of_parse_phandle(dev-of_node, phandle, index);
 + if (!node) {
 + dev_dbg(dev, failed to get %s phandle in %s node\n, phandle,
 + dev-of_node-full_name);
 + return ERR_PTR(-ENODEV);
 + }
 +
 + ptr = devres_alloc(devm_phy_release, sizeof(*ptr), GFP_KERNEL);

Is this the right size?

Because ptr is **, perhaps sizeof(struct phy) is clearer.

 + if (!ptr) {
 + dev_dbg(dev, failed to allocate memory for devres\n);

alloc failures generally don't need specific OOM messages
as the general alloc OOM dumps stack.

 + return ERR_PTR(-ENOMEM);
 + }
 +
 + mutex_lock(phy_list_mutex);
 +
 + phy = of_phy_lookup(dev, node);
 + if (IS_ERR(phy) || !phy-dev.class ||
 + !try_module_get(phy-dev.class-owner)) {

I think it's tasteful coding style to align like:

if (IS_ERR(phy) || !phy-dev.class ||
!try_module_get(phy-dev.class-owner)) {
[]

 +struct phy *phy_create(struct device *dev, struct phy_descriptor *desc)
 +{
 + int ret;
 + struct phy *phy;
 + struct phy_bind *phy_bind;
 + const char *devname = NULL;
 +
 + if (!dev || !desc) {
 + dev_err(dev, no descriptor/device provided for PHY\n);
 + ret = -EINVAL;
 + goto err0;
 + }
 +
 + if (!desc-ops) {
 + dev_err(dev, no PHY ops provided\n);
 + ret = -EINVAL;
 + goto err0;
 + }
 +
 + phy = kzalloc(sizeof(*phy), GFP_KERNEL);
 + if (!phy) {
 + dev_err(dev, no memory for PHY\n);

No OOM message required...

[]

 +static int __init phy_core_init(void)
 +{
 + phy_class = class_create(THIS_MODULE, phy);
 + if (IS_ERR(phy_class)) {
 + pr_err(failed to create phy class -- %ld\n,
 + PTR_ERR(phy_class));

You might add #define pr_fmt(fmt) KBUILD_MODNAME :  fmt
before any include so that pr_levels are prefixed.

cheers, Joe

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4 2/4] NET ethernet introduce mac_platform helper

2012-07-04 Thread Joe Perches
On Thu, 2012-07-05 at 10:44 +0800, Andy Green wrote:
 From: Andy Green a...@warmcat.com
 
 This introduces a small helper in net/ethernet, which registers a network
 notifier at core_initcall time, and accepts registrations mapping expected
 asynchronously-probed network device paths (like, usb1/1-1/1-1.1/1-1.1:1.0)
 and the MAC that is needed to be assigned to the device when it appears.

The mac prefix is poor.  I think eth_mac is better.

[]

 diff --git a/net/ethernet/mac-platform.c b/net/ethernet/mac-platform.c
[]
 +static int mac_platform_netdev_event(struct notifier_block *this,
 + unsigned long event, void *ptr)

alignment to parenthesis please.

[]

 +int mac_platform_register_device_macs(const struct mac_platform *macs)
 +{
[]
 + next = kmalloc(sizeof(struct mac_platform), GFP_KERNEL);
 + if (!next) {
 + ret = -ENOMEM;
 + goto bail;
 + }
 +
 + next-device_path = kmalloc(strlen(macs-device_path) + 1,
 +GFP_KERNEL);
 + if (!next-device_path) {
 + ret = -ENOMEM;
 + goto bail;
 + }
 +
 + strcpy(next-device_path, macs-device_path);
 + memcpy(next-mac, macs-mac, sizeof macs-mac);

kmemdup and kstrdup()

 + list_add(next-list, mac_platform_list);
 +
 + macs++;
 + }
 +
 +bail:
 + mutex_unlock(mac_platform_mutex);
 +
 + return ret;
 +}

leaking memory on failures.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4 2/4] NET ethernet introduce mac_platform helper

2012-07-04 Thread Joe Perches
On Thu, 2012-07-05 at 11:20 +0800, Andy Green wrote:
 On 05/07/12 11:12, the mail apparently from Joe Perches included:
[]
  diff --git a/net/ethernet/mac-platform.c b/net/ethernet/mac-platform.c
  []
  +static int mac_platform_netdev_event(struct notifier_block *this,
  +  unsigned long event, void *ptr)
 
  alignment to parenthesis please.
 
 OK.  Although different places in the kernel seem to have different 
 expectations about that.

net and drivers/net is pretty consistent.
Most of the exceptions are old code.
Some of those exceptions are being slowly updated too.

cheers, Joe

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2 2/4] net ethernet introduce mac_la_ap helper

2012-07-03 Thread Joe Perches
On Mon, 2012-07-02 at 12:35 -0400, Steven Rostedt wrote:
 On Mon, 2012-07-02 at 16:12 +, Arnd Bergmann wrote:
 
include/net/mac-la-ap.h  |   28 
net/Kconfig  |   14 
net/ethernet/Makefile|2 +
net/ethernet/mac-la-ap.c |  165 
   ++
4 files changed, 209 insertions(+)
create mode 100644 include/net/mac-la-ap.h
create mode 100644 net/ethernet/mac-la-ap.c
   diff --git a/include/net/mac-la-ap.h b/include/net/mac-la-ap.h
   new file mode 100644
   index 000..d5189b5
   --- /dev/null
   +++ b/include/net/mac-la-ap.h
   @@ -0,0 +1,28 @@
   +/*
   + * mac-la-ap.h:  Locally Administered MAC address for Async probed 
   devices
   + */
  
  I find the name a bit non-obvious, not sure if we can come up with the
  perfect one.
  
  How about mac-platform?
 
 I really find it unfortunate that 'mac' for ethernet has the same name
 as the Apple box as well. 'mac' in other contexts can usually
 differentiate these two, but saying 'mac-platform' just screams of
 forbidden fruit.
 
 mac-probe.h ?

Maybe eth_mac_addr.h?

underscore filenames outnumber dash filenames ~2:1

$ git ls-files *_* | while read file ; do basename $file; done | grep _ | 
wc -l
11185
$ git ls-files *-* | while read file ; do basename $file; done | grep - | 
wc -l
6624



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/5] staging: tidspbridge: Lindent to drv_interface.c

2012-01-30 Thread Joe Perches
On Mon, 2012-01-30 at 22:29 +0300, Dan Carpenter wrote:
 On Mon, Jan 30, 2012 at 11:25:34AM -0600, Ramirez Luna, Omar wrote:
   +   pr_info(%s:%d handle(s) still opened\n, 
   __func__,
   +   atomic_read(bridge_cref));
  I remember the rule was to break lines as far to the right as
  possible, no? Chapter 2 CodingStyle, same for the other similar
  changes.
 It doesn't mean you have to right justify things, it just means
 indented.  The original code is fine here and the new code is fine
 here.  It's up to whoever writes the code to decide.

I concur.

My personal preference is to use a new line after the format
string if necessary.

ie:
pr_level(fmt\n[, args to 80 columns if all fit])
or
pr_level(fmt\n,
   args when single line exceeds 80 columns);

So for this case:
pr_info(%s:%d handle(s) still opened\n,
__func__, atomic_read(bridge_cref));

I've done a patch here to tidspbridge that standardizes
printk output.

Basically, the patch adds
#define pr_fmt(fmt) KBUILD_MODNAME %s: , __func__
to prefix tidspbridge:%s:, removes the leading
%s:...,  __func__ from the uses, coalesces
formats and does argument alignment.

It cleans up the DBC_ASSERT, DBC_REQUIRE and DBC_ENSURE
macros too.

I'm waiting for the Makefile change and whatever
patches Víctor produces to be applied.  I'll then
redo my patch and submit it.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/5] staging: tidspbridge: Lindent to drv_interface.c

2012-01-30 Thread Joe Perches
On Mon, 2012-01-30 at 21:33 +0100, Víctor M. Jáquez L. wrote:
 On Mon, Jan 30, 2012 at 11:53:00AM -0800, Joe Perches wrote:
  I've done a patch here to tidspbridge that standardizes
  printk output.
  
  Basically, the patch adds
  #define pr_fmt(fmt) KBUILD_MODNAME %s: , __func__
  to prefix tidspbridge:%s:, removes the leading
  %s:...,  __func__ from the uses, coalesces
  formats and does argument alignment.
  
  It cleans up the DBC_ASSERT, DBC_REQUIRE and DBC_ENSURE
  macros too.
 
 hehehe... I also have one for this... But I prefer yours: I'm a newbie :)

Well, given that you haven't done many of these, I prefer yours.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] tidspbridge: Rename module from bridgedriver to tidspbridge

2012-01-24 Thread Joe Perches
tidspbridge when built as a module is named bridgedriver.

bridgedriver is not a particularly good module name.

tidspbridge is what the source is named.  That seems
a more appropriate module name too as it describes
the hardware function better.

Signed-off-by: Joe Perches j...@perches.com
---
 drivers/staging/tidspbridge/Makefile |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/tidspbridge/Makefile 
b/drivers/staging/tidspbridge/Makefile
index fd6a276..8c8c92a 100644
--- a/drivers/staging/tidspbridge/Makefile
+++ b/drivers/staging/tidspbridge/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_TIDSPBRIDGE)  += bridgedriver.o
+obj-$(CONFIG_TIDSPBRIDGE)  += tidspbridge.o
 
 libgen = gen/gh.o gen/uuidutil.o
 libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \
@@ -13,7 +13,7 @@ libdload = dynload/cload.o dynload/getsection.o 
dynload/reloc.o \
 dynload/tramp.o
 libhw = hw/hw_mmu.o
 
-bridgedriver-y := $(libgen) $(libservices) $(libcore) $(libpmgr) $(librmgr) \
+tidspbridge-y := $(libgen) $(libservices) $(libcore) $(libpmgr) $(librmgr) \
$(libdload) $(libhw)
 
 #Machine dependent


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] mmc: logging neatening and mmc_host_level

2011-11-15 Thread Joe Perches
Joe Perches (4):
  mmc: Update logging style
  wbsd: Use current logging
  mmc: Logging neatening
  mmc: Add mmc_host_level logging

 drivers/mmc/card/block.c|4 +-
 drivers/mmc/card/mmc_test.c |   77 ++-
 drivers/mmc/card/queue.c|6 +-
 drivers/mmc/card/sdio_uart.c|   10 +-
 drivers/mmc/core/bus.c  |   27 ++---
 drivers/mmc/core/core.c |  116 ++---
 drivers/mmc/core/host.c |   14 +--
 drivers/mmc/core/mmc.c  |   75 +-
 drivers/mmc/core/mmc_ops.c  |   12 +--
 drivers/mmc/core/sd.c   |   73 +-
 drivers/mmc/core/sdio.c |   11 +--
 drivers/mmc/core/sdio_bus.c |6 +-
 drivers/mmc/core/sdio_cis.c |   10 +-
 drivers/mmc/core/sdio_io.c  |   14 ++-
 drivers/mmc/core/sdio_irq.c |   24 ++--
 drivers/mmc/host/at91_mci.c |   12 +-
 drivers/mmc/host/au1xmmc.c  |   35 +++---
 drivers/mmc/host/bfin_sdh.c |3 +-
 drivers/mmc/host/dw_mmc.c   |   18 ++--
 drivers/mmc/host/mmc_spi.c  |9 +-
 drivers/mmc/host/mmci.c |8 +-
 drivers/mmc/host/msm_sdcc.c |  101 --
 drivers/mmc/host/mvsdio.c   |   42 +++-
 drivers/mmc/host/omap_hsmmc.c   |   19 +---
 drivers/mmc/host/pxamci.c   |4 +-
 drivers/mmc/host/s3cmci.c   |3 +-
 drivers/mmc/host/sdhci-pci.c|   17 ++--
 drivers/mmc/host/sdhci-pxav3.c  |7 +-
 drivers/mmc/host/sdhci.c|  218 +--
 drivers/mmc/host/sdricoh_cs.c   |   12 +-
 drivers/mmc/host/tifm_sd.c  |   12 +--
 drivers/mmc/host/tmio_mmc.c |4 +-
 drivers/mmc/host/tmio_mmc_pio.c |4 +-
 drivers/mmc/host/via-sdmmc.c|   33 +++
 drivers/mmc/host/vub300.c   |   54 +-
 drivers/mmc/host/wbsd.c |   72 ++
 include/linux/mmc/host.h|   11 ++
 37 files changed, 510 insertions(+), 667 deletions(-)

-- 
1.7.6.405.gc1be0

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] mmc: Update logging style

2011-11-15 Thread Joe Perches
Convert pr_warning to pr_warn.
Coalesce format strings.
Align arguments.
Add missing \n.

Signed-off-by: Joe Perches j...@perches.com
---
 drivers/mmc/card/block.c  |4 +-
 drivers/mmc/card/queue.c  |6 +---
 drivers/mmc/card/sdio_uart.c  |   10 
 drivers/mmc/core/bus.c|4 +-
 drivers/mmc/core/core.c   |9 +++
 drivers/mmc/core/mmc.c|   28 ++--
 drivers/mmc/core/mmc_ops.c|4 +-
 drivers/mmc/core/sd.c |   46 +
 drivers/mmc/core/sdio.c   |5 +--
 drivers/mmc/core/sdio_bus.c   |4 +-
 drivers/mmc/core/sdio_cis.c   |7 ++---
 drivers/mmc/core/sdio_irq.c   |7 ++---
 drivers/mmc/host/mmci.c   |5 +--
 drivers/mmc/host/omap_hsmmc.c |5 +--
 drivers/mmc/host/s3cmci.c |3 +-
 drivers/mmc/host/sdhci.c  |   18 +++-
 drivers/mmc/host/tifm_sd.c|3 +-
 drivers/mmc/host/wbsd.c   |   24 -
 18 files changed, 82 insertions(+), 110 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c80bb6d..fe489b1 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1238,8 +1238,8 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, 
struct request *rqc)
case MMC_BLK_ECC_ERR:
if (brq-data.blocks  1) {
/* Redo read one sector at a time */
-   pr_warning(%s: retrying using single block 
read\n,
-  req-rq_disk-disk_name);
+   pr_warn(%s: retrying using single block 
read\n,
+   req-rq_disk-disk_name);
disable_multi = 1;
break;
}
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index dcad59c..f1fd979 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -197,14 +197,12 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card 
*card,
if (bouncesz  512) {
mqrq_cur-bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
if (!mqrq_cur-bounce_buf) {
-   pr_warning(%s: unable to 
-   allocate bounce cur buffer\n,
+   pr_warn(%s: unable to allocate bounce cur 
buffer\n,
mmc_card_name(card));
}
mqrq_prev-bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
if (!mqrq_prev-bounce_buf) {
-   pr_warning(%s: unable to 
-   allocate bounce prev buffer\n,
+   pr_warn(%s: unable to allocate bounce prev 
buffer\n,
mmc_card_name(card));
kfree(mqrq_cur-bounce_buf);
mqrq_cur-bounce_buf = NULL;
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c
index 2c151e1..e264ee2 100644
--- a/drivers/mmc/card/sdio_uart.c
+++ b/drivers/mmc/card/sdio_uart.c
@@ -1082,8 +1082,8 @@ static int sdio_uart_probe(struct sdio_func *func,
return -ENOMEM;
 
if (func-class == SDIO_CLASS_UART) {
-   pr_warning(%s: need info on UART class basic setup\n,
-  sdio_func_id(func));
+   pr_warn(%s: need info on UART class basic setup\n,
+   sdio_func_id(func));
kfree(port);
return -ENOSYS;
} else if (func-class == SDIO_CLASS_GPS) {
@@ -1101,9 +1101,9 @@ static int sdio_uart_probe(struct sdio_func *func,
break;
}
if (!tpl) {
-   pr_warning(
-   %s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n,
-  sdio_func_id(func));
+   pr_warn(
+   %s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n,
+   sdio_func_id(func));
kfree(port);
return -EINVAL;
}
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 6be4924..2e1f028 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -303,10 +303,10 @@ int mmc_add_card(struct mmc_card *card)
mmc_card_ddr_mode(card) ? DDR  : ,
type);
} else {
-   printk(KERN_INFO %s: new %s%s%s card at address %04x\n,
+   pr_info(%s: new %s%s%s card at address %04x\n,
mmc_hostname(card-host),
mmc_sd_card_uhs(card) ? ultra high speed  :
-   (mmc_card_highspeed(card) ? high speed

Re: [PATCH 4/4] mmc: Add mmc_host_level logging

2011-11-15 Thread Joe Perches
On Wed, 2011-11-16 at 09:52 +0900, NamJae Jeon wrote:
 2011/11/16 Joe Perches j...@perches.com:
  Centralize the pr_level uses of mmc_hostname into specific
  mmc_host_level calls to allow a flexible presentation style
  and shorten the code a bit.

 I don't know why pr_info should be surely replaced by mmc_host_info.
 if it is needed for only host name, I think that existing
 pr_info/err/debug is sufficient.

Please trim your replies and read the patch description.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] mmc: Add mmc_host_level logging

2011-11-15 Thread Joe Perches
On Wed, 2011-11-16 at 10:14 +0900, NamJae Jeon wrote:
 2011/11/16 Joe Perches j...@perches.com:
  On Wed, 2011-11-16 at 09:52 +0900, NamJae Jeon wrote:
  2011/11/16 Joe Perches j...@perches.com:
   Centralize the pr_level uses of mmc_hostname into specific
   mmc_host_level calls to allow a flexible presentation style
   and shorten the code a bit.
  I don't know why pr_info should be surely replaced by mmc_host_info.
  if it is needed for only host name, I think that existing
  pr_info/err/debug is sufficient.
  Please trim your replies and read the patch description.
 my concern is that they feel confuse when coder add print code because
 they should use mmc_hostlevel for hostname, and pr_level is used
 in the other case.

That's one point of view.

It is the same issue though as using dev_level
when you have a struct device * and also using
pr_level otherwise.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] mmc: Logging neatening

2011-11-15 Thread Joe Perches
On Wed, 2011-11-16 at 10:48 +0900, NamJae Jeon wrote:

[123K of untrimmed reply]

If you wrote something, I didn't find it.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] mmc: Logging neatening

2011-11-15 Thread Joe Perches
On Wed, 2011-11-16 at 10:55 +0900, NamJae Jeon wrote:
 2011/11/16 Joe Perches j...@perches.com:
  On Wed, 2011-11-16 at 10:48 +0900, NamJae Jeon wrote:
 
  [123K of untrimmed reply]
 
  If you wrote something, I didn't find it.
 
 
  -   dev_info(pdev-dev, DW MMC controller at irq %d, 
  -%d bit host data width, 
  -%u deep fifo\n,
  +   dev_info(pdev-dev,
  +   DW MMC controller at irq %d, %d bit host data width, %u deep 
  fifo\n,
  irq, width, fifo_size);
 
 I think that tab is needed this DW MMC controller at irq  ?

Argument alignment isn't always the right thing.

Very long formats should not necessarily be aligned
at the open parenthesis.  It helps to determine
when the format string or the dmesg output line length
is too long.





--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] omap: dmtimer: convert printk to pr_err

2011-10-07 Thread Joe Perches
On Fri, 2011-10-07 at 10:22 +0100, Russell King - ARM Linux wrote:
 On Fri, Oct 07, 2011 at 10:50:16AM +0200, Víctor Manuel Jáquez Leal wrote:
  Convert a printk(KERN_ERR) message in the driver to pr_err().
 ...
  @@ -111,7 +111,7 @@ static void omap_dm_timer_wait_for_reset(struct 
  omap_dm_timer *timer)
  while (!(__raw_readl(timer-sys_stat)  1)) {
  c++;
  if (c  10) {
  -   printk(KERN_ERR Timer failed to reset\n);
  +   pr_err(Timer failed to reset\n);
 
 What is the reason behind this change?  It looks like it's to use the
 latest and greatest function.

Hi Russell

I'm not promoting this patch, just commenting.

At some point in the next couple of years, I want
to convert all of, or as many as possible of, the
remaining printk uses to pr_level.

This would allow finer grained control over the
prefixing of KBUILD_MODNAME and __func__, and
could possibly make the kernel image smaller.

Today, arch/arm has ~3:1 ratio of printk to pr_level.
grep shows 1427 printks, 468 pr_level, 405 pr_debug's.

 If so, please don't make these changes - we have on many occasions been
 blamed for size of diffstat, churn, needless change, and this patch is
 exactly that.

True.

These trivial changes could wait until arch/arm settles
down a bit more.

 By all means fix printk's without KERN_ constants,

There's still more than 250 of those in arch/arm.
Even more with the uses of secondary things like:
#define PRINTK(x...) (foo  printk(x))

 possibly converting
 them to pr_*, but don't go around replacing printk(KERN_* with pr_*(
 without ensuring that there's a real benefit to the change.

Style consistency patches do need to be governed by
acceptable churn rate.


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] omap: dmtimer: convert printk to pr_err

2011-10-07 Thread Joe Perches
On Fri, 2011-10-07 at 20:18 +0100, Russell King - ARM Linux wrote:
 On Fri, Oct 07, 2011 at 10:40:39AM -0700, Joe Perches wrote:
  At some point in the next couple of years, I want
  to convert all of, or as many as possible of, the
  remaining printk uses to pr_level.
 If the idea is also to get rid of printk() too (which IMHO would be a
 good thing as it kills off the constant need to continually patch for
 missing KERN_ prefixes) then that's a good reason (provided Linus
 accepts the idea.)

I don't accept that idea yet.

There are about 50K printks vs 20K pr_levels
in kernel source.

I think 50K lines is _way_ too many to convert
in a couple of years.

I think it needs to be done subsystem by subsystem,
arch by arch, as maintainers accept.

And there's no hurry.

I have a script that automates most all of the
conversions, argument alignments, etc.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] omap: dmtimer: convert printk to pr_err

2011-10-07 Thread Joe Perches
On Fri, 2011-10-07 at 20:57 +0100, Russell King - ARM Linux wrote:
 On Fri, Oct 07, 2011 at 12:48:21PM -0700, Joe Perches wrote:
  I think it needs to be done subsystem by subsystem,
  arch by arch, as maintainers accept.
 Agreed - but doing one instance here, maybe another instance somewhere
 else, and come the merge window having several of these patches
 scattered around with no real coherent this is what we're doing, and
 its all done for this bit of the tree kind of story is not the way to
 do it.
 It would be good to get core code done, or a sub-arch, and then say
 we're not accepting any patch which re-introduces the problem...
 It's a little late in the cycle for that now though.

Well, if you want it done for arch/arm, just let me
know when it would be convenient for you and I'll
do them all as a single patch.



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap: dmtimer: convert printk to pr_*

2011-10-06 Thread Joe Perches
On Thu, 2011-10-06 at 12:48 +0200, Víctor Manuel Jáquez Leal wrote:
 Convert all the printk(level) messages in the driver to pr_level().
[]
 diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
[]
 @@ -397,8 +397,7 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int 
 id)
   spin_lock_irqsave(dm_timer_lock, flags);
   if (id = 0 || id  dm_timer_count || dm_timers[id-1].reserved) {
   spin_unlock_irqrestore(dm_timer_lock, flags);
 - printk(BUG: warning at %s:%d/%s(): unable to get timer %d\n,
 -__FILE__, __LINE__, __func__, id);
 + pr_warning(unable to get timer %d\n, id);

For new conversions, please use pr_warn not pr_warning.
It's shorter and similar to other dev_warn/netdev_warn
uses.

   dump_stack();

To emit a message then dump stack, please use
WARN(1, fmt, ...)


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] arm: omap3evm: Add support for an MT9M032 based camera board.

2011-09-17 Thread Joe Perches
On Sat, 2011-09-17 at 11:34 +0200, Martin Hostettler wrote:
 Adds board support for an MT9M032 based camera to omap3evm.

All of the logging messages could be
prefixed by the printk subsystem if you
add #define pr_fmt before any #include

 diff --git a/arch/arm/mach-omap2/board-omap3evm-camera.c 
 b/arch/arm/mach-omap2/board-omap3evm-camera.c
[]
#define pr_fmt(fmt) KBUILD_MODNAME :  fmt
[]
 +static int omap3evm_set_mux(enum omap3evmdc_mux mux_id)
[]
 + switch (mux_id) {
[]
 + default:
 + pr_err(omap3evm-camera: Invalid mux id #%d\n, mux_id);

pr_err(Invalid mux id #%d\n, mux_id);
[]
 +static int __init camera_init(void)
[]
 + if (gpio_request(nCAM_VD_SEL, nCAM_VD_SEL)  0) {
 + pr_err(omap3evm-camera: Failed to get GPIO nCAM_VD_SEL(%d)\n,
 +nCAM_VD_SEL);

pr_err(Failed to get GPIO nCAM_VD_SEL(%d)\n,
   nCAM_VD_SEL);
etc.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/10] hwspinlock: add MAINTAINERS entries

2011-09-12 Thread Joe Perches
On Mon, 2011-09-12 at 19:47 +0300, Ohad Ben-Cohen wrote:
 Update MAINTAINERS with entries for hwspinlock/core and hwspinlock/omap
 files.

trivial:

 diff --git a/MAINTAINERS b/MAINTAINERS
[]
 @@ -2953,6 +2953,14 @@ F: Documentation/hw_random.txt
[]
 +HARDWARE SPINLOCK CORE
 +M:   Ohad Ben-Cohen o...@wizery.com
 +S:   Maintained
 +F:   Documentation/hwspinlock.h

F:  Documentation/hwspinlock.txt

 +F:   drivers/hwspinlock/hwspinlock_core.c
 +F:   drivers/hwspinlock/hwspinlock_internal.h

Maybe
F:  drivers/hwspinlock/hwspinlock_*

 +F:   include/linux/hwspinlock.h


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/39] Cleanup WARN #defines

2010-10-30 Thread Joe Perches
WARN uses sometimes use KERN_level but mostly don't
have any prefix.

Change the WARN macros and the warn_slowpath function to preface
KERN_WARNING and remove all the KERN_level uses from WARN sites.

Neatening clean up of include/asm-generic/bug.h

Update WARN macros
Add KERN_WARNING to WARN output
Remove any KERN_level from WARN uses
Coalesce formats
Align WARN arguments
Add some missing newlines to WARN uses
Add some missing first test argument (1, fmt, args) to WARN uses

Joe Perches (39):
  include/asm-generic/bug.h: Update WARN macros
  arch/alpha: Update WARN uses
  arch/arm: Update WARN uses
  arch/powerpc: Update WARN uses
  arch/x86: Update WARN uses
  drivers/acpi: Update WARN uses
  drivers/base: Update WARN uses
  drivers/block: Update WARN uses
  drivers/cpuidle: Update WARN uses
  drivers/firewire: Update WARN uses
  drivers/firmware: Update WARN uses
  drivers/gpio: Update WARN uses
  drivers/gpu/drm: Update WARN uses
  drivers/media/video: Update WARN uses
  drivers/mfd: Update WARN uses
  drivers/net/can: Update WARN uses
  drivers/net/usb: Update WARN uses
  drivers/net/wireless/iwlwifi: Update WARN uses
  drivers/regulator: Update WARN uses
  drivers/scsi/fcoe: Update WARN uses
  drivers/staging: Update WARN uses
  drivers/usb/musb: Update WARN uses
  drivers/video/omap2/dss: Update WARN uses
  fs/nfsd: Update WARN uses
  fs/notify/inotify: Update WARN uses
  fs/sysfs: Update WARN uses
  fs/proc: Update WARN uses
  fs: Update WARN uses
  include/linux/device.h: Update WARN uses
  kernel/irq: Update WARN uses
  kernel/panic.c: Update warn_slowpath to use %pV
  kernel: Update WARN uses
  lib: Update WARN uses
  mm: Update WARN uses
  net/core/dev.c: Update WARN uses
  net/ipv4/tcp.c: Update WARN uses
  net/mac80211: Update WARN uses
  net/rfkill/input.c: Update WARN uses
  sound/soc/codecs/wm_hubs.c: Update WARN uses

 arch/alpha/kernel/pci-sysfs.c|   14 ++--
 arch/arm/mach-davinci/clock.c|4 +-
 arch/arm/mach-davinci/da830.c|2 +-
 arch/arm/mach-davinci/da850.c|   12 ++--
 arch/arm/mach-omap2/clkt_clksel.c|   12 ++--
 arch/arm/mach-omap2/clock.c  |   16 ++--
 arch/arm/mach-omap2/devices.c|4 +-
 arch/arm/mach-omap2/omap_hwmod.c |   47 +++-
 arch/arm/mach-omap2/pm34xx.c |7 +-
 arch/arm/mach-omap2/serial.c |2 +-
 arch/arm/mach-omap2/timer-gp.c   |3 +-
 arch/arm/mach-tegra/clock.c  |3 +-
 arch/arm/mach-tegra/timer.c  |2 +-
 arch/arm/mach-u300/padmux.c  |   14 +---
 arch/arm/plat-omap/omap-pm-noop.c|   10 ++--
 arch/powerpc/kernel/hw_breakpoint.c  |4 +-
 arch/x86/kernel/acpi/boot.c  |2 +-
 arch/x86/kernel/apic/apic.c  |2 +-
 arch/x86/kernel/apic/es7000_32.c |2 +-
 arch/x86/kernel/cpu/perf_event.c |4 +-
 arch/x86/kernel/pci-calgary_64.c |4 +-
 arch/x86/kernel/tsc_sync.c   |4 +-
 arch/x86/kernel/xsave.c  |2 +-
 arch/x86/mm/ioremap.c|5 +-
 arch/x86/mm/pageattr-test.c  |2 +-
 arch/x86/mm/pageattr.c   |5 +-
 arch/x86/platform/sfi/sfi.c  |4 +-
 drivers/acpi/ec.c|4 +-
 drivers/base/class.c |4 +-
 drivers/base/core.c  |5 +-
 drivers/base/memory.c|4 +-
 drivers/base/sys.c   |   10 +--
 drivers/block/floppy.c   |2 +-
 drivers/cpuidle/driver.c |2 +-
 drivers/firewire/core-transaction.c  |6 +-
 drivers/firmware/dmi_scan.c  |2 +-
 drivers/gpio/gpiolib.c   |4 +-
 drivers/gpio/it8761e_gpio.c  |2 +-
 drivers/gpu/drm/drm_crtc_helper.c|2 +-
 drivers/gpu/drm/i915/i915_gem.c  |3 +-
 drivers/gpu/drm/radeon/evergreen.c   |2 +-
 drivers/gpu/drm/radeon/r100.c|4 +-
 drivers/gpu/drm/radeon/r300.c|2 +-
 drivers/gpu/drm/radeon/r600.c|4 +-
 drivers/gpu/drm/radeon/radeon_fence.c|3 +-
 drivers/gpu/drm/radeon/radeon_ttm.c  |3 +-
 drivers/gpu/drm/radeon/rs400.c   |2 +-
 drivers/gpu/drm/radeon/rs600.c   |4 +-
 drivers/media/video/s5p-fimc/fimc-core.c |2 +-
 drivers/media/video/sr030pc30.c  |2 +-
 drivers/mfd/ezx-pcap.c   |5 +-
 drivers/net/can/mscan/mscan.c|2 +-
 drivers/net/usb/ipheth.c |2 +-
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c   |3 +-
 drivers/net/wireless/iwlwifi/iwl-agn-sta.c   |6 +-
 drivers/net/wireless

[PATCH 23/39] drivers/video/omap2/dss: Update WARN uses

2010-10-30 Thread Joe Perches
Add missing initial argument.
Coalesce long formats.

Signed-off-by: Joe Perches j...@perches.com
---
 drivers/video/omap2/dss/core.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 8e89f60..2a98237 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -867,8 +867,7 @@ static void reset_device(struct device *dev, int check)
dev-platform_data = NULL;
while (dev_p  dev_end) {
if (*dev_p) {
-   WARN(%s: struct device fields will be 
-   discarded\n,
+   WARN(1, %s: struct device fields will be 
discarded\n,
 __func__);
break;
}
-- 
1.7.3.1.g432b3.dirty

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 03/39] arch/arm: Update WARN uses

2010-10-30 Thread Joe Perches
Coalesce long formats.
Align arguments.
Add missing newlines.

Signed-off-by: Joe Perches j...@perches.com
---
 arch/arm/mach-davinci/clock.c |4 +-
 arch/arm/mach-davinci/da830.c |2 +-
 arch/arm/mach-davinci/da850.c |   12 -
 arch/arm/mach-omap2/clkt_clksel.c |   12 
 arch/arm/mach-omap2/clock.c   |   16 ++--
 arch/arm/mach-omap2/devices.c |4 +-
 arch/arm/mach-omap2/omap_hwmod.c  |   47 ++---
 arch/arm/mach-omap2/pm34xx.c  |7 ++---
 arch/arm/mach-omap2/serial.c  |2 +-
 arch/arm/mach-omap2/timer-gp.c|3 +-
 arch/arm/mach-tegra/clock.c   |3 +-
 arch/arm/mach-tegra/timer.c   |2 +-
 arch/arm/mach-u300/padmux.c   |   14 +++
 arch/arm/plat-omap/omap-pm-noop.c |   10 
 14 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 01ba080..85599bd 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -177,8 +177,8 @@ int clk_register(struct clk *clk)
return -EINVAL;
 
if (WARN(clk-parent  !clk-parent-rate,
-   CLK: %s parent %s has no rate!\n,
-   clk-name, clk-parent-name))
+CLK: %s parent %s has no rate!\n,
+clk-name, clk-parent-name))
return -EINVAL;
 
INIT_LIST_HEAD(clk-children);
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index ec23ab4..1ae9ea9 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -1208,5 +1208,5 @@ void __init da830_init(void)
davinci_common_init(davinci_soc_info_da830);
 
da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
-   WARN(!da8xx_syscfg0_base, Unable to map syscfg0 module);
+   WARN(!da8xx_syscfg0_base, Unable to map syscfg0 module\n);
 }
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 63916b9..b83a273 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -811,8 +811,8 @@ static void da850_set_async3_src(int pllnum)
clk = c-clk;
if (clk-flags  DA850_CLK_ASYNC3) {
ret = clk_set_parent(clk, newparent);
-   WARN(ret, DA850: unable to re-parent clock %s,
-   clk-name);
+   WARN(ret, DA850: unable to re-parent clock %s\n,
+clk-name);
}
}
 
@@ -903,10 +903,8 @@ static int da850_set_voltage(unsigned int index)
 static int da850_regulator_init(void)
 {
cvdd = regulator_get(NULL, cvdd);
-   if (WARN(IS_ERR(cvdd), Unable to obtain voltage regulator for CVDD;
-voltage scaling unsupported\n)) {
+   if (WARN(IS_ERR(cvdd), Unable to obtain voltage regulator for CVDD; 
voltage scaling unsupported\n))
return PTR_ERR(cvdd);
-   }
 
return 0;
 }
@@ -1079,11 +1077,11 @@ void __init da850_init(void)
davinci_common_init(davinci_soc_info_da850);
 
da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
-   if (WARN(!da8xx_syscfg0_base, Unable to map syscfg0 module))
+   if (WARN(!da8xx_syscfg0_base, Unable to map syscfg0 module\n))
return;
 
da8xx_syscfg1_base = ioremap(DA8XX_SYSCFG1_BASE, SZ_4K);
-   if (WARN(!da8xx_syscfg1_base, Unable to map syscfg1 module))
+   if (WARN(!da8xx_syscfg1_base, Unable to map syscfg1 module\n))
return;
 
/*
diff --git a/arch/arm/mach-omap2/clkt_clksel.c 
b/arch/arm/mach-omap2/clkt_clksel.c
index a781cd6..f0f7c0b 100644
--- a/arch/arm/mach-omap2/clkt_clksel.c
+++ b/arch/arm/mach-omap2/clkt_clksel.c
@@ -70,8 +70,8 @@ static const struct clksel *_get_clksel_by_parent(struct clk 
*clk,
 
if (!clks-parent) {
/* This indicates a data problem */
-   WARN(1, clock: Could not find parent clock %s in clksel array 
-of clock %s\n, src_clk-name, clk-name);
+   WARN(1, clock: Could not find parent clock %s in clksel array 
of clock %s\n,
+src_clk-name, clk-name);
return NULL;
}
 
@@ -125,8 +125,8 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct 
clk *clk,
 
if (max_div == 0) {
/* This indicates an error in the clksel data */
-   WARN(1, clock: Could not find divisor for clock %s parent %s
-\n, clk-name, src_clk-parent-name);
+   WARN(1, clock: Could not find divisor for clock %s parent 
%s\n,
+clk-name, src_clk-parent-name);
return 0;
}
 
@@ -190,8 +190,8 @@ static u32 _clksel_to_divisor(struct clk *clk, u32 
field_val)
 
if (!clkr-div

Re: [RFC] [PATCH] watchdog_info separation and constify

2010-01-19 Thread Joe Perches
On Tue, 2010-01-19 at 22:17 +0100, Wim Van Sebroeck wrote:
 -static struct watchdog_info at32_wdt_info = {
 +static const struct watchdog_info at32_wdt_info = {

It'd be good to use a consistent structure name:

static const struct watchdog_info ident = {
etc...
}

$ grep -Poh struct\s*watchdog_info\s*\w+ *.[ch] | sort | uniq -c | sort -rn
 65 struct watchdog_info ident
  8 struct watchdog_info __user
  4 struct watchdog_info info
  2 struct watchdog_info sh_wdt_info
  2 struct watchdog_info bfin_wdt_info
  2 struct watchdog_info at91_wdt_info
  1 struct watchdog_info zf_info
  1 struct watchdog_info wdinfo
  1 struct watchdog_info twl4030_wd_ident
  1 struct watchdog_info s3c2410_wdt_ident
  1 struct watchdog_info nuc900_wdt_info
  1 struct watchdog_info ks8695_wdt_info
  1 struct watchdog_info bcm47xx_wdt_info
  1 struct watchdog_info at32_wdt_info
  1 struct watchdog_info adx_wdt_info

firmware_version doesn't have to be initialized to 0.

It might be good to standardize .identity to include
either WDT or watchdog or exclude both of those.

Maybe a standard #define WATCHDOG_NAME foo

.identity = WATCHGOD_NAME

$ grep -Poh \.identity\s*=\s*.*$ *.[ch] | sed -r -e 's/\s+/ /g' | sort 
.identity = ALi M1535 WatchDog Timer,
.identity = ALiM7101,
.identity = at32ap700x watchdog,
.identity = at91 watchdog,
.identity = Avionic Design Xanthos Watchdog,
.identity = Blackfin Watchdog,
.identity = COH 901 327 Watchdog,
.identity = CPU5 WDT,
.identity = DaVinci Watchdog,
.identity = DRIVER_NAME,
.identity = DRIVER_NAME,
.identity = DRIVER_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = EP93xx Watchdog,
.identity = ESB_MODULE_NAME,
.identity = Footbridge Watchdog,
.identity = GE Fanuc watchdog,
.identity = Hardware Watchdog for PNX833x,
.identity = Hardware Watchdog for SGI IP22,
.identity = Hardware Watchdog for TXx9,
.identity = HP iLO2 HW Watchdog Timer,
.identity = IB700 WDT,
.identity = IBM ASR,
.identity = iop watchdog,
.identity = IT8712F Watchdog,
.identity = IXP2000 Watchdog,
.identity = IXP4xx Watchdog,
.identity = ks8695 watchdog,
.identity = LONGNAME,
.identity = MixCOM watchdog,
.identity = MPC8xxx,
.identity = MPcore Watchdog,
.identity = MTX-1 WDT,
.identity = MV64x60 watchdog,
.identity = NatSemi SCx200 Watchdog,
.identity = nuc900 watchdog,
.identity = OMAP Watchdog,
.identity = Orion Watchdog,
.identity = PC87307/PC97307,
.identity = PC87413(HF/F) watchdog,
.identity = PCI-WDT500/501,
.identity = PCWD,
.identity = PNX4008 Watchdog,
.identity = PowerPC Book-E Watchdog,
.identity = RC32434_WDT Watchdog,
.identity = RDC321x WDT,
.identity = S3C2410 Watchdog,
.identity = SA1100/PXA255 Watchdog,
.identity = SBC60xx,
.identity = SBC7240,
.identity = SC520,
.identity = SH WDT,
.identity = SiByte Watchdog,
.identity = SMsC 37B787 Watchdog,
.identity = Software Watchdog,
.identity = STMP3XXX Watchdog,
.identity = TWL4030 Watchdog,
.identity = W83627HF WDT,
.identity = W83697HF WDT,
.identity = W83697UG WDT,
.identity = W83877F,
.identity = Wafer 5823 WDT,
.identity = WATCHDOG_DRIVER_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = wdrtas,
.identity = WDT500/501,
.identity = WDT Eurotech CPU-1220/1410,
.identity = Winsystems EPX-C3 H/W Watchdog,
.identity = WM831x Watchdog,
.identity = WM8350 Watchdog,
.identity = ZF-Logic watchdog,

Maybe a DECLARE_WATCHDOG_IDENT() macro?

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] [PATCH] watchdog_info separation and constify

2010-01-19 Thread Joe Perches
On Tue, 2010-01-19 at 22:16 +, Mark Brown wrote:
 On Tue, Jan 19, 2010 at 01:42:31PM -0800, Joe Perches wrote:
  Maybe a standard #define WATCHDOG_NAME foo
  .identity = WATCHGOD_NAME
 
 I don't really see that the indrection via the #define would buy us
 anything?

Maybe not, just a suggestion.
There are already 17 uses though.

It might have some value like DRV_NAME does or
any other frequent #define used in printks or
#include code.

It may be useful standardization prior to or post
some generic watchdog code consolidation.

$ grep -r --include=*.[ch] -Poh ^#define\s*\w+NAME\b drivers | \
  sed -r -e 's/\s+/ /g' | sort | uniq -c | sort -rn | head -10
334 #define DRV_NAME
137 #define DRIVER_NAME
 59 #define MODULE_NAME
 25 #define DRVNAME
 21 #define DRV_MODULE_NAME
 18 #define DEVICE_NAME
 17 #define WATCHDOG_NAME
 15 #define MY_NAME
 12 #define BOARD_MAP_NAME
 11 #define DSS_SUBSYS_NAME


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] MAINTAINERS: Add list entries linux-...@vger.kernel.org and linux-arm-kernel@ to OMAP sections

2009-08-10 Thread Joe Perches
Resend for Andrew Morton

On Fri, 2009-08-07 at 11:01 +0300, Tony Lindgren wrote:
 * Joe Perches j...@perches.com [090806 19:35]:
  Perhaps it's useful for OMAP patches and bug reports
  to CC entries to the primary and secondary ARM lists.
  Added a pattern entry for OMAP USB as well.
 ... I think let's not add the drivers. The related driver list
 and linux-omap list should be enough for these.

Fine by me.  I fixed up your M: entry as well.

Signed-off-by: Joe Perches j...@perches.com
Acked-by: Tony Lindgren t...@atomide.com

diff --git a/MAINTAINERS b/MAINTAINERS
index b1114cf..6a82733 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3660,8 +3660,10 @@ F:   drivers/video/riva/
 F: drivers/video/nvidia/
 
 OMAP SUPPORT
-M: Tony Lindgren t...@atomide.com t...@atomide.com
+M: Tony Lindgren t...@atomide.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 W: http://www.muru.com/linux/omap/
 W: http://linux.omap.com/
 T: git 
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
@@ -3671,12 +3673,16 @@ F:  arch/arm/*omap*
 OMAP CLOCK FRAMEWORK SUPPORT
 M: Paul Walmsley p...@pwsan.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: arch/arm/*omap*/*clock*
 
 OMAP POWER MANAGEMENT SUPPORT
 M: Kevin Hilman khil...@deeprootsystems.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: arch/arm/*omap*/*pm*
 


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] MAINTAINERS: Add list entries linux-...@vger.kernel.org and linux-arm-kernel@ to OMAP sections

2009-08-07 Thread Joe Perches
On Fri, 2009-08-07 at 11:01 +0300, Tony Lindgren wrote:
 * Joe Perches j...@perches.com [090806 19:35]:
  Perhaps it's useful for OMAP patches and bug reports
  to CC entries to the primary and secondary ARM lists.
  Added a pattern entry for OMAP USB as well.
 ... I think let's not add the drivers. The related driver list
 and linux-omap list should be enough for these.

Fine by me.  I fixed up your M: entry as well.

Signed-off-by: Joe Perches j...@perches.com

diff --git a/MAINTAINERS b/MAINTAINERS
index b1114cf..6a82733 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3660,8 +3660,10 @@ F:   drivers/video/riva/
 F: drivers/video/nvidia/
 
 OMAP SUPPORT
-M: Tony Lindgren t...@atomide.com t...@atomide.com
+M: Tony Lindgren t...@atomide.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 W: http://www.muru.com/linux/omap/
 W: http://linux.omap.com/
 T: git 
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
@@ -3671,12 +3673,16 @@ F:  arch/arm/*omap*
 OMAP CLOCK FRAMEWORK SUPPORT
 M: Paul Walmsley p...@pwsan.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: arch/arm/*omap*/*clock*
 
 OMAP POWER MANAGEMENT SUPPORT
 M: Kevin Hilman khil...@deeprootsystems.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: arch/arm/*omap*/*pm*
 


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] MAINTAINERS: Add list entries linux-...@vger.kernel.org and linux-arm-kernel@ to OMAP sections

2009-08-06 Thread Joe Perches
Perhaps it's useful for OMAP patches and bug reports
to CC entries to the primary and secondary ARM lists.

Added a pattern entry for OMAP USB as well.

Signed-off-by: Joe Perches

diff --git a/MAINTAINERS b/MAINTAINERS
index b1114cf..f237765 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3662,6 +3662,8 @@ F:drivers/video/nvidia/
 OMAP SUPPORT
 M: Tony Lindgren t...@atomide.com t...@atomide.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 W: http://www.muru.com/linux/omap/
 W: http://linux.omap.com/
 T: git 
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
@@ -3671,12 +3673,16 @@ F:  arch/arm/*omap*
 OMAP CLOCK FRAMEWORK SUPPORT
 M: Paul Walmsley p...@pwsan.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: arch/arm/*omap*/*clock*
 
 OMAP POWER MANAGEMENT SUPPORT
 M: Kevin Hilman khil...@deeprootsystems.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: arch/arm/*omap*/*pm*
 
@@ -3684,6 +3690,8 @@ OMAP AUDIO SUPPORT
 M: Jarkko Nikula jhnik...@gmail.com
 L: alsa-de...@alsa-project.org (subscribers-only)
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: sound/soc/omap/
 
@@ -3691,17 +3699,24 @@ OMAP FRAMEBUFFER SUPPORT
 M: Imre Deak imre.d...@nokia.com
 L: linux-fbdev-de...@lists.sourceforge.net (moderated for non-subscribers)
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: drivers/video/omap/
 
 OMAP MMC SUPPORT
 M: Jarkko Lavinen jarkko.lavi...@nokia.com
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: drivers/mmc/host/*omap*
 
 OMAP RANDOM NUMBER GENERATOR SUPPORT
 M: Deepak Saxena dsax...@plexity.net
+L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
 F: drivers/char/hw_random/omap-rng.c
 
@@ -3710,7 +3725,10 @@ M:   Felipe Balbi felipe.ba...@nokia.com
 M: David Brownell dbrown...@users.sourceforge.net
 L: linux-...@vger.kernel.org
 L: linux-omap@vger.kernel.org
+L: linux-arm-ker...@lists.arm.linux.org.uk (subscribers-only)
+L: linux-...@vger.kernel.org
 S: Maintained
+F: drivers/usb/*/*omap*
 
 OMFS FILESYSTEM
 M: Bob Copeland m...@bobcopeland.com


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html