aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-16 21:31:37 -0400
committerOlof Johansson <olof@lixom.net>2012-09-16 21:31:37 -0400
commit2e6185f1fea6cf88e9ce25cde1d6291ddfb3d4f0 (patch)
treec45ae7bace055c258fba5c4c6c0340b1e3f17f05 /tools/perf/util/symbol.c
parent7405a749ae14f846cc2892c36d1a9343b0264b7c (diff)
parentfd301cc4e5ba839050be135a178031bcd0d363a5 (diff)
Merge tag 'tegra-for-3.7-drivers-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/drivers
From Stephen Warren: ARM: tegra: i2c driver enhancements mostly related to clocking This branch contains a number of fixes and cleanups to the Tegra I2C driver related to clocks. These are based on the common clock conversion in order to avoid duplicating the clock driver changes before and after the conversion. Finally, a bug-fix related to I2C_M_NOSTART is included. This branch is based on previous pull request tegra-for-3.7-common-clk. * tag 'tegra-for-3.7-drivers-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: i2c: tegra: dynamically control fast clk i2c: tegra: I2_M_NOSTART functionality not supported in Tegra20 ARM: tegra: clock: remove unused clock entry for i2c ARM: tegra: clock: add connection name in i2c clock entry i2c: tegra: pass proper name for getting clock ARM: tegra: clock: add i2c fast clock entry in clock table ARM: Tegra: Add smp_twd clock for Tegra20 ARM: tegra: cpu-tegra: explicitly manage re-parenting ARM: tegra: fix overflow in tegra20_pll_clk_round_rate() ARM: tegra: Fix data type for io address ARM: tegra: remove tegra_timer from tegra_list_clks ARM: tegra30: clocks: fix the wrong tegra_audio_sync_clk_ops name ARM: tegra: clocks: separate tegra_clk_32k_ops from Tegra20 and Tegra30 ARM: tegra: Remove duplicate code ARM: tegra: Port tegra to generic clock framework ARM: tegra: Add clk_tegra structure and helper functions ARM: tegra: Rename tegra20 clock file ARM: tegra20: Separate out clk ops and clk data ARM: tegra30: Separate out clk ops and clk data ARM: tegra: fix U16 divider range check ... + sync to v3.6-rc4 Resolved remove/modify conflict in arch/arm/mach-sa1100/leds-hackkit.c caused by the sync with v3.6-rc4. Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index fdad4eeeb429..8b63b678e127 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -64,7 +64,7 @@ static enum dso_binary_type binary_type_symtab[] = {
64 DSO_BINARY_TYPE__NOT_FOUND, 64 DSO_BINARY_TYPE__NOT_FOUND,
65}; 65};
66 66
67#define DSO_BINARY_TYPE__SYMTAB_CNT sizeof(binary_type_symtab) 67#define DSO_BINARY_TYPE__SYMTAB_CNT ARRAY_SIZE(binary_type_symtab)
68 68
69static enum dso_binary_type binary_type_data[] = { 69static enum dso_binary_type binary_type_data[] = {
70 DSO_BINARY_TYPE__BUILD_ID_CACHE, 70 DSO_BINARY_TYPE__BUILD_ID_CACHE,
@@ -72,7 +72,7 @@ static enum dso_binary_type binary_type_data[] = {
72 DSO_BINARY_TYPE__NOT_FOUND, 72 DSO_BINARY_TYPE__NOT_FOUND,
73}; 73};
74 74
75#define DSO_BINARY_TYPE__DATA_CNT sizeof(binary_type_data) 75#define DSO_BINARY_TYPE__DATA_CNT ARRAY_SIZE(binary_type_data)
76 76
77int dso__name_len(const struct dso *dso) 77int dso__name_len(const struct dso *dso)
78{ 78{
@@ -2875,6 +2875,7 @@ int machines__create_guest_kernel_maps(struct rb_root *machines)
2875 int i, items = 0; 2875 int i, items = 0;
2876 char path[PATH_MAX]; 2876 char path[PATH_MAX];
2877 pid_t pid; 2877 pid_t pid;
2878 char *endp;
2878 2879
2879 if (symbol_conf.default_guest_vmlinux_name || 2880 if (symbol_conf.default_guest_vmlinux_name ||
2880 symbol_conf.default_guest_modules || 2881 symbol_conf.default_guest_modules ||
@@ -2891,7 +2892,14 @@ int machines__create_guest_kernel_maps(struct rb_root *machines)
2891 /* Filter out . and .. */ 2892 /* Filter out . and .. */
2892 continue; 2893 continue;
2893 } 2894 }
2894 pid = atoi(namelist[i]->d_name); 2895 pid = (pid_t)strtol(namelist[i]->d_name, &endp, 10);
2896 if ((*endp != '\0') ||
2897 (endp == namelist[i]->d_name) ||
2898 (errno == ERANGE)) {
2899 pr_debug("invalid directory (%s). Skipping.\n",
2900 namelist[i]->d_name);
2901 continue;
2902 }
2895 sprintf(path, "%s/%s/proc/kallsyms", 2903 sprintf(path, "%s/%s/proc/kallsyms",
2896 symbol_conf.guestmount, 2904 symbol_conf.guestmount,
2897 namelist[i]->d_name); 2905 namelist[i]->d_name);