Hi,
The following patches make things static, found by sparse. They are only used in
the file where they are declared.
I first compiled the kernel using sparse. and piped output to
../logs/make_yes_log_20081203155529
Then I used the script below, but made some manual changes as well. I tested
changes with checkpatch, have built it successfully with allnoconfig,
allmodconfig and allyesconfig.
Thanks,
Roel
Q="[^[:alnum:]_]"
s="[[:space:]]+"
V="[A-Za-z_]+[A-Za-z0-9_]*"
grep "Should it be static\?" ../logs/make_yes_log_20081203155529 |
sed -rn "s/^([^:]*):([^:]*):.*'($V)'.*$/\1 \2 \3/p" | while read f n v; do
echo "---[ v $f:$n $v ]---"
f2="$(git grep -l -E "(^|$Q)$v($Q|$)")"
z=$(echo "$f2" | wc -l)
if [ $z -eq 1 ]; then
echo "$v can be static: v $f:$n"
sed -r -i "${n}s/^(static$S)*(.*)$/static \2/" "$f"
elif [ $z -lt 5 ]; then
grep -E -n "(^|$Q)$v($Q|$)" $(echo $f2 | tr "\n" " ");
echo "if this can be static then apply:"
echo "sed -r -i \"${n}s/^(static$S)*(.*)$/static \2/\" \"$f\"";
fi
done | less
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
Documentation/DocBook/procfs_example.c | 2 +-
Documentation/connector/cn_test.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/DocBook/procfs_example.c b/Documentation/DocBook/procfs_example.c
index 8c6396e..db06753 100644
--- a/Documentation/DocBook/procfs_example.c
+++ b/Documentation/DocBook/procfs_example.c
@@ -54,7 +54,7 @@ static struct proc_dir_entry *example_dir, *foo_file,
*bar_file, *jiffies_file, *symlink;
-struct fb_data_t foo_data, bar_data;
+static struct fb_data_t foo_data, bar_data;
static int proc_read_jiffies(char *page, char **start,
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
index be7af14..b984b5b 100644
--- a/Documentation/connector/cn_test.c
+++ b/Documentation/connector/cn_test.c
@@ -32,7 +32,7 @@ static char cn_test_name[] = "cn_test";
static struct sock *nls;
static struct timer_list cn_test_timer;
-void cn_test_callback(void *data)
+static void cn_test_callback(void *data)
{
struct cn_msg *msg = (struct cn_msg *)data;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
arch/x86/kernel/efi.c | 2 +-
arch/x86/kernel/hpet.c | 2 +-
arch/x86/kernel/io_apic.c | 2 +-
arch/x86/kernel/microcode_core.c | 4 ++--
arch/x86/kernel/microcode_intel.c | 2 +-
arch/x86/kernel/setup.c | 3 ++-
arch/x86/kvm/vmx.c | 2 +-
arch/x86/pci/legacy.c | 2 +-
8 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index 1119d24..4ef1c4a 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -64,7 +64,7 @@ static int __init setup_noefi(char *arg)
}
early_param("noefi", setup_noefi);
-int add_efi_memmap;
+static int add_efi_memmap;
EXPORT_SYMBOL(add_efi_memmap);
static int __init setup_add_efi_memmap(char *arg)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 067d8de..15fcaac 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -33,7 +33,7 @@
* HPET address is set in acpi/boot.c, when an ACPI entry exists
*/
unsigned long hpet_address;
-unsigned long hpet_num_timers;
+static unsigned long hpet_num_timers;
static void __iomem *hpet_virt_address;
struct hpet_dev {
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 9043251..dd6371f 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3401,7 +3401,7 @@ static void hpet_msi_set_affinity(unsigned int irq, cpumask_t mask)
}
#endif /* CONFIG_SMP */
-struct irq_chip hpet_msi_type = {
+static struct irq_chip hpet_msi_type = {
.name = "HPET_MSI",
.unmask = hpet_msi_unmask,
.mask = hpet_msi_mask,
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 82fb280..97af1ec 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -203,7 +203,7 @@ MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
#endif
/* fake device for request_firmware */
-struct platform_device *microcode_pdev;
+static struct platform_device *microcode_pdev;
static ssize_t reload_store(struct sys_device *dev,
struct sysdev_attribute *attr,
@@ -319,7 +319,7 @@ static int microcode_resume_cpu(int cpu)
return 0;
}
-void microcode_update_cpu(int cpu)
+static void microcode_update_cpu(int cpu)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
int err = 0;
diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
index 622dc4a..c34c820 100644
--- a/arch/x86/kernel/microcode_intel.c
+++ b/arch/x86/kernel/microcode_intel.c
@@ -465,7 +465,7 @@ static void microcode_fini_cpu(int cpu)
uci->mc = NULL;
}
-struct microcode_ops microcode_intel_ops = {
+static struct microcode_ops microcode_intel_ops = {
.request_microcode_user = request_microcode_user,
.request_microcode_fw = request_microcode_fw,
.collect_cpu_info = collect_cpu_info,
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 9d5674f..efc5cfe 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -448,7 +448,8 @@ static void __init reserve_early_setup_data(void)
* @size: Size of the crashkernel memory to reserve.
* Returns the base address on success, and -1ULL on failure.
*/
-unsigned long long __init find_and_reserve_crashkernel(unsigned long long size)
+static unsigned long long __init find_and_reserve_crashkernel(
+ unsigned long long size)
{
const unsigned long long alignment = 16<<20; /* 16M */
unsigned long long start = 0LL;
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index a4018b0..bd7d441 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -122,7 +122,7 @@ static struct vmcs_config {
u32 vmentry_ctrl;
} vmcs_config;
-struct vmx_capability {
+static struct vmx_capability {
u32 ept;
u32 vpid;
} vmx_capability;
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index b722dd4..abe0f58 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -55,7 +55,7 @@ static int __init pci_legacy_init(void)
return 0;
}
-int __init pci_subsys_init(void)
+static int __init pci_subsys_init(void)
{
#ifdef CONFIG_X86_NUMAQ
pci_numaq_init();
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
block/blk-softirq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/blk-softirq.c b/block/blk-softirq.c
index e660d26..ce0efc6 100644
--- a/block/blk-softirq.c
+++ b/block/blk-softirq.c
@@ -161,7 +161,7 @@ void blk_complete_request(struct request *req)
}
EXPORT_SYMBOL(blk_complete_request);
-__init int blk_softirq_init(void)
+static __init int blk_softirq_init(void)
{
int i;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/acpi/ec.c | 8 ++++----
drivers/acpi/pci_link.c | 2 +-
drivers/acpi/video_detect.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 30f3ef2..effd419 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -370,7 +370,7 @@ unlock:
* Note: samsung nv5000 doesn't work with ec burst mode.
* http://bugzilla.kernel.org/show_bug.cgi?id=4980
*/
-int acpi_ec_burst_enable(struct acpi_ec *ec)
+static int acpi_ec_burst_enable(struct acpi_ec *ec)
{
u8 d;
struct transaction t = {.command = ACPI_EC_BURST_ENABLE,
@@ -380,7 +380,7 @@ int acpi_ec_burst_enable(struct acpi_ec *ec)
return acpi_ec_transaction(ec, &t, 0);
}
-int acpi_ec_burst_disable(struct acpi_ec *ec)
+static int acpi_ec_burst_disable(struct acpi_ec *ec)
{
struct transaction t = {.command = ACPI_EC_BURST_DISABLE,
.wdata = NULL, .rdata = NULL,
@@ -416,7 +416,7 @@ static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data)
/*
* Externally callable EC access functions. For now, assume 1 EC only
*/
-int ec_burst_enable(void)
+static int ec_burst_enable(void)
{
if (!first_ec)
return -ENODEV;
@@ -425,7 +425,7 @@ int ec_burst_enable(void)
EXPORT_SYMBOL(ec_burst_enable);
-int ec_burst_disable(void)
+static int ec_burst_disable(void)
{
if (!first_ec)
return -ENODEV;
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index e52ad91..4869fa1 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -912,7 +912,7 @@ static int __init acpi_irq_nobalance_set(char *str)
__setup("acpi_irq_nobalance", acpi_irq_nobalance_set);
-int __init acpi_irq_balance_set(char *str)
+static int __init acpi_irq_balance_set(char *str)
{
acpi_irq_balance = 1;
return 1;
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f022eb6..50e3d2d 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -234,7 +234,7 @@ EXPORT_SYMBOL(acpi_video_display_switch_support);
* To force that backlight or display output switching is processed by vendor
* specific acpi drivers or video.ko driver.
*/
-int __init acpi_backlight(char *str)
+static int __init acpi_backlight(char *str)
{
if (str == NULL || *str == '\0')
return 1;
@@ -250,7 +250,7 @@ int __init acpi_backlight(char *str)
}
__setup("acpi_backlight=", acpi_backlight);
-int __init acpi_display_output(char *str)
+static int __init acpi_display_output(char *str)
{
if (str == NULL || *str == '\0')
return 1;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/block/floppy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index cf29cc4..b49000c 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4140,7 +4140,7 @@ static ssize_t floppy_cmos_show(struct device *dev,
drive = p->id;
return sprintf(buf, "%X\n", UDP->cmos);
}
-DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL);
+static DEVICE_ATTR(cmos, S_IRUGO, floppy_cmos_show, NULL);
static void floppy_device_release(struct device *dev)
{
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/char/defkeymap.c_shipped | 6 +++---
drivers/char/keyboard.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/char/defkeymap.c_shipped b/drivers/char/defkeymap.c_shipped
index d2208df..e930e3b 100644
--- a/drivers/char/defkeymap.c_shipped
+++ b/drivers/char/defkeymap.c_shipped
@@ -43,7 +43,7 @@ u_short shift_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
-u_short altgr_map[NR_KEYS] = {
+static u_short altgr_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200,
0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf200, 0xf200, 0xf200,
0xfb71, 0xfb77, 0xf918, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
@@ -100,7 +100,7 @@ u_short shift_ctrl_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
-u_short alt_map[NR_KEYS] = {
+static u_short alt_map[NR_KEYS] = {
0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
@@ -119,7 +119,7 @@ u_short alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
-u_short ctrl_alt_map[NR_KEYS] = {
+static u_short ctrl_alt_map[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index de26a97..564f719 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -151,7 +151,7 @@ static struct ledptr {
/* Simple translation table for the SysRq keys */
#ifdef CONFIG_MAGIC_SYSRQ
-unsigned char kbd_sysrq_xlate[KEY_MAX + 1] =
+static unsigned char kbd_sysrq_xlate[KEY_MAX + 1] =
"\000\0331234567890-=\177\t" /* 0x00 - 0x0f */
"qwertyuiop[]\r\000as" /* 0x10 - 0x1f */
"dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/dca/dca-core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c
index d883e1b..3e5d947 100644
--- a/drivers/dca/dca-core.c
+++ b/drivers/dca/dca-core.c
@@ -131,7 +131,7 @@ EXPORT_SYMBOL_GPL(dca_remove_requester);
* @dev - the device that wants dca service
* @cpu - the cpuid as returned by get_cpu()
*/
-u8 dca_common_get_tag(struct device *dev, int cpu)
+static u8 dca_common_get_tag(struct device *dev, int cpu)
{
struct dca_provider *dca;
u8 tag;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/edac/x38_edac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
index 2406c2c..c25175a 100644
--- a/drivers/edac/x38_edac.c
+++ b/drivers/edac/x38_edac.c
@@ -243,7 +243,7 @@ static void x38_check(struct mem_ctl_info *mci)
}
-void __iomem *x38_map_mchbar(struct pci_dev *pdev)
+static void __iomem *x38_map_mchbar(struct pci_dev *pdev)
{
union {
u64 mchbar;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/gpu/drm/i915/i915_opregion.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
index 13ae731..53dd21c 100644
--- a/drivers/gpu/drm/i915/i915_opregion.c
+++ b/drivers/gpu/drm/i915/i915_opregion.c
@@ -257,8 +257,8 @@ void opregion_enable_asle(struct drm_device *dev)
static struct intel_opregion *system_opregion;
-int intel_opregion_video_event(struct notifier_block *nb, unsigned long val,
- void *data)
+static int intel_opregion_video_event(struct notifier_block *nb,
+ unsigned long val, void *data)
{
/* The only video events relevant to opregion are 0x80. These indicate
either a docking event, lid switch or display switch request. In
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/i2c/i2c-core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index c6a63f4..1049615 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1699,7 +1699,8 @@ EXPORT_SYMBOL(i2c_smbus_write_word_data);
* This executes the SMBus "process call" protocol, returning negative errno
* else a 16-bit unsigned "word" received from the device.
*/
-s32 i2c_smbus_process_call(struct i2c_client *client, u8 command, u16 value)
+static s32 i2c_smbus_process_call(struct i2c_client *client, u8 command,
+ u16 value)
{
union i2c_smbus_data data;
int status;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/input/mouse/gpio_mouse.c | 2 +-
drivers/input/tablet/wacom_wac.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c
index 72cf5e3..0db8d16 100644
--- a/drivers/input/mouse/gpio_mouse.c
+++ b/drivers/input/mouse/gpio_mouse.c
@@ -173,7 +173,7 @@ static int __devexit gpio_mouse_remove(struct platform_device *pdev)
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:gpio_mouse");
-struct platform_driver gpio_mouse_device_driver = {
+static struct platform_driver gpio_mouse_device_driver = {
.remove = __devexit_p(gpio_mouse_remove),
.driver = {
.name = "gpio_mouse",
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 8dc8d1e..2638811 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -535,7 +535,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
return 1;
}
-int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo)
+static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo)
{
char *data = wacom->data;
int prox = 0, pressure;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/isdn/hardware/eicon/di.c | 4 +-
drivers/isdn/hardware/eicon/message.c | 67 ++++++++++++++++---------------
drivers/isdn/hardware/mISDN/hfcmulti.c | 27 ++++--------
drivers/isdn/mISDN/core.c | 7 +--
drivers/isdn/mISDN/dsp_audio.c | 2 +-
drivers/isdn/mISDN/dsp_cmx.c | 6 +-
drivers/isdn/mISDN/dsp_core.c | 2 +-
drivers/isdn/mISDN/stack.c | 3 +-
8 files changed, 55 insertions(+), 63 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/di.c b/drivers/isdn/hardware/eicon/di.c
index 10760b3..cfee4f2 100644
--- a/drivers/isdn/hardware/eicon/di.c
+++ b/drivers/isdn/hardware/eicon/di.c
@@ -353,7 +353,7 @@ void scom_clear_int(ADAPTER * a)
/*------------------------------------------------------------------*/
/* return code handler */
/*------------------------------------------------------------------*/
-byte isdn_rc(ADAPTER * a,
+static byte isdn_rc(ADAPTER *a,
byte Rc,
byte Id,
byte Ch,
@@ -555,7 +555,7 @@ byte isdn_rc(ADAPTER * a,
/*------------------------------------------------------------------*/
/* indication handler */
/*------------------------------------------------------------------*/
-byte isdn_ind(ADAPTER * a,
+static byte isdn_ind(ADAPTER *a,
byte Ind,
byte Id,
byte Ch,
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index 599fed8..8977fb5 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -592,7 +592,8 @@ word api_put(APPL * appl, CAPI_MSG * msg)
/* api_parse function, check the format of api messages */
/*------------------------------------------------------------------*/
-word api_parse(byte * msg, word length, byte * format, API_PARSE * parms)
+static word api_parse(byte *msg, word length, byte *format,
+ API_PARSE *parms)
{
word i;
word p;
@@ -631,7 +632,7 @@ word api_parse(byte * msg, word length, byte * format, API_PARSE * parms)
return false;
}
-void api_save_msg(API_PARSE *in, byte *format, API_SAVE *out)
+static void api_save_msg(API_PARSE *in, byte *format, API_SAVE *out)
{
word i, j, n = 0;
byte *p;
@@ -663,7 +664,7 @@ void api_save_msg(API_PARSE *in, byte *format, API_SAVE *out)
out->parms[i].length = 0;
}
-void api_load_msg(API_SAVE *in, API_PARSE *out)
+static void api_load_msg(API_SAVE *in, API_PARSE *out)
{
word i;
@@ -3414,7 +3415,8 @@ byte select_b_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci,
return false;
}
-byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms)
+static byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
+ PLCI *plci, APPL *appl, API_PARSE *parms)
{
word command;
word i;
@@ -3741,8 +3743,8 @@ byte manufacturer_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p
return false;
}
-
-byte manufacturer_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg)
+static byte manufacturer_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
+ PLCI *plci, APPL *appl, API_PARSE *msg)
{
word indication;
@@ -4073,8 +4075,8 @@ capi_callback_suffix:
send_req(plci);
}
-
-void control_rc(PLCI * plci, byte req, byte rc, byte ch, byte global_req, byte nl_rc)
+static void control_rc(PLCI *plci, byte req, byte rc, byte ch, byte global_req,
+ byte nl_rc)
{
dword Id;
dword rId;
@@ -4740,7 +4742,7 @@ void control_rc(PLCI * plci, byte req, byte rc, byte ch, byte global_req, byte
}
}
-void data_rc(PLCI * plci, byte ch)
+static void data_rc(PLCI *plci, byte ch)
{
dword Id;
DIVA_CAPI_ADAPTER * a;
@@ -4776,7 +4778,7 @@ void data_rc(PLCI * plci, byte ch)
}
}
-void data_ack(PLCI * plci, byte ch)
+static void data_ack(PLCI *plci, byte ch)
{
dword Id;
DIVA_CAPI_ADAPTER * a;
@@ -4802,7 +4804,7 @@ void data_ack(PLCI * plci, byte ch)
}
}
-void sig_ind(PLCI * plci)
+static void sig_ind(PLCI *plci)
{
dword x_Id;
dword Id;
@@ -6169,8 +6171,7 @@ static void SendSetupInfo(APPL * appl, PLCI * plci, dword Id, byte * * par
}
}
-
-void SendInfo(PLCI * plci, dword Id, byte * * parms, byte iesent)
+static void SendInfo(PLCI *plci, dword Id, byte **parms, byte iesent)
{
word i;
word j;
@@ -6345,8 +6346,8 @@ void SendInfo(PLCI * plci, dword Id, byte * * parms, byte iesent)
}
}
-
-byte SendMultiIE(PLCI * plci, dword Id, byte * * parms, byte ie_type, dword info_mask, byte setupParse)
+static byte SendMultiIE(PLCI *plci, dword Id, byte **parms, byte ie_type,
+ dword info_mask, byte setupParse)
{
word i;
word j;
@@ -6465,7 +6466,7 @@ static void SendSSExtInd(APPL * appl, PLCI * plci, dword Id, byte * * parm
}
};
-void nl_ind(PLCI * plci)
+static void nl_ind(PLCI *plci)
{
byte ch;
word ncci;
@@ -7247,7 +7248,7 @@ void nl_ind(PLCI * plci)
/* find a free PLCI */
/*------------------------------------------------------------------*/
-word get_plci(DIVA_CAPI_ADAPTER * a)
+static word get_plci(DIVA_CAPI_ADAPTER *a)
{
word i,j;
PLCI * plci;
@@ -7406,7 +7407,7 @@ static void add_ie(PLCI * plci, byte code, byte * p, word p_length)
/* put a unstructured data into the buffer */
/*------------------------------------------------------------------*/
-void add_d(PLCI * plci, word length, byte * p)
+static void add_d(PLCI *plci, word length, byte *p)
{
word i;
@@ -7424,7 +7425,7 @@ void add_d(PLCI * plci, word length, byte * p)
/* parameter buffer */
/*------------------------------------------------------------------*/
-void add_ai(PLCI * plci, API_PARSE * ai)
+static void add_ai(PLCI *plci, API_PARSE *ai)
{
word i;
API_PARSE ai_parms[5];
@@ -7445,7 +7446,8 @@ void add_ai(PLCI * plci, API_PARSE * ai)
/* put parameter for b1 protocol in the parameter buffer */
/*------------------------------------------------------------------*/
-word add_b1(PLCI * plci, API_PARSE * bp, word b_channel_info, word b1_facilities)
+static word add_b1(PLCI *plci, API_PARSE *bp, word b_channel_info,
+ word b1_facilities)
{
API_PARSE bp_parms[8];
API_PARSE mdm_cfg[9];
@@ -7909,7 +7911,7 @@ word add_b1(PLCI * plci, API_PARSE * bp, word b_channel_info, word b1_faciliti
/* put parameter for b2 and B3 protocol in the parameter buffer */
/*------------------------------------------------------------------*/
-word add_b23(PLCI * plci, API_PARSE * bp)
+static word add_b23(PLCI *plci, API_PARSE *bp)
{
word i, fax_control_bits;
byte pos, len;
@@ -8706,7 +8708,7 @@ void sig_req(PLCI * plci, byte req, byte Id)
/* send a request for the network layer entity */
/*------------------------------------------------------------------*/
-void nl_req_ncci(PLCI * plci, byte req, byte ncci)
+static void nl_req_ncci(PLCI *plci, byte req, byte ncci)
{
if(!plci) return;
if(plci->adapter->adapter_disabled) return;
@@ -8728,7 +8730,7 @@ void nl_req_ncci(PLCI * plci, byte req, byte ncci)
plci->req_in_start = plci->req_in;
}
-void send_req(PLCI * plci)
+static void send_req(PLCI *plci)
{
ENTITY * e;
word l;
@@ -8863,7 +8865,7 @@ void send_data(PLCI * plci)
}
}
-void listen_check(DIVA_CAPI_ADAPTER * a)
+static void listen_check(DIVA_CAPI_ADAPTER *a)
{
word i,j;
PLCI * plci;
@@ -8906,7 +8908,8 @@ void listen_check(DIVA_CAPI_ADAPTER * a)
/* functions for all parameters sent in INDs */
/*------------------------------------------------------------------*/
-void IndParse(PLCI * plci, word * parms_id, byte ** parms, byte multiIEsize)
+static void IndParse(PLCI *plci, word *parms_id, byte **parms,
+ byte multiIEsize)
{
word ploc; /* points to current location within packet */
byte w;
@@ -8991,7 +8994,7 @@ void IndParse(PLCI * plci, word * parms_id, byte ** parms, byte multiIEsize)
/* try to match a cip from received BC and HLC */
/*------------------------------------------------------------------*/
-byte ie_compare(byte * ie1, byte * ie2)
+static byte ie_compare(byte *ie1, byte *ie2)
{
word i;
if(!ie1 || ! ie2) return false;
@@ -9000,7 +9003,7 @@ byte ie_compare(byte * ie1, byte * ie2)
return true;
}
-word find_cip(DIVA_CAPI_ADAPTER * a, byte * bc, byte * hlc)
+static word find_cip(DIVA_CAPI_ADAPTER *a, byte *bc, byte *hlc)
{
word i;
word j;
@@ -9068,7 +9071,7 @@ static byte AddInfo(byte **add_i,
/* voice and codec features */
/*------------------------------------------------------------------*/
-void SetVoiceChannel(PLCI *plci, byte *chi, DIVA_CAPI_ADAPTER * a)
+static void SetVoiceChannel(PLCI *plci, byte *chi, DIVA_CAPI_ADAPTER *a)
{
byte voice_chi[] = "\x02\x18\x01";
byte channel;
@@ -9086,7 +9089,7 @@ void SetVoiceChannel(PLCI *plci, byte *chi, DIVA_CAPI_ADAPTER * a)
}
}
-void VoiceChannelOff(PLCI *plci)
+static void VoiceChannelOff(PLCI *plci)
{
dbug(1,dprintf("ExtDevOFF"));
add_p(plci,FTY,"\x02\x01\x08"); /* B Off */
@@ -9098,8 +9101,8 @@ void VoiceChannelOff(PLCI *plci)
}
}
-
-word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte hook_listen)
+static word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl,
+ byte hook_listen)
{
word j;
PLCI *splci;
@@ -9195,7 +9198,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho
}
-void CodecIdCheck(DIVA_CAPI_ADAPTER *a, PLCI *plci)
+static void CodecIdCheck(DIVA_CAPI_ADAPTER *a, PLCI *plci)
{
dbug(1,dprintf("CodecIdCheck"));
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 1eac03f..266eac1 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -171,7 +171,7 @@ static int (*unregister_interrupt)(void);
static int interrupt_registered;
static struct hfc_multi *syncmaster;
-int plxsd_master; /* if we have a master card (yet) */
+static int plxsd_master; /* if we have a master card (yet) */
static spinlock_t plx_lock; /* may not acquire other lock inside */
EXPORT_SYMBOL(plx_lock);
@@ -422,8 +422,7 @@ HFC_wait_debug(struct hfc_multi *hc, const char *function, int line)
#endif
/* write fifo data (REGIO) */
-void
-write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
+static void write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
while (len>>2) {
@@ -443,8 +442,7 @@ write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
}
}
/* write fifo data (PCIMEM) */
-void
-write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
+static void write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
while (len>>2) {
writel(cpu_to_le32(*(u32 *)data),
@@ -465,8 +463,7 @@ write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
}
}
/* read fifo data (REGIO) */
-void
-read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
+static void read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
while (len>>2) {
@@ -487,8 +484,7 @@ read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
}
/* read fifo data (PCIMEM) */
-void
-read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
+static void read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
while (len>>2) {
*(u32 *)data =
@@ -705,9 +701,7 @@ vpm_out(struct hfc_multi *c, int which, unsigned short addr,
}
-
-void
-vpm_init(struct hfc_multi *wc)
+void static vpm_init(struct hfc_multi *wc)
{
unsigned char reg;
unsigned int mask;
@@ -789,8 +783,7 @@ vpm_init(struct hfc_multi *wc)
}
}
-void
-vpm_check(struct hfc_multi *hctmp)
+void static vpm_check(struct hfc_multi *hctmp)
{
unsigned char gpi2;
@@ -812,8 +805,7 @@ vpm_check(struct hfc_multi *hctmp)
*
*/
-void
-vpm_echocan_on(struct hfc_multi *hc, int ch, int taps)
+void static vpm_echocan_on(struct hfc_multi *hc, int ch, int taps)
{
unsigned int timeslot;
unsigned int unit;
@@ -844,8 +836,7 @@ vpm_echocan_on(struct hfc_multi *hc, int ch, int taps)
vpm_out(hc, unit, timeslot, 0x7e);
}
-void
-vpm_echocan_off(struct hfc_multi *hc, int ch)
+void static vpm_echocan_off(struct hfc_multi *hc, int ch)
{
unsigned int timeslot;
unsigned int unit;
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c
index 3306817..03ea96f 100644
--- a/drivers/isdn/mISDN/core.c
+++ b/drivers/isdn/mISDN/core.c
@@ -31,7 +31,7 @@ static u64 device_ids;
#define MAX_DEVICE_ID 63
static LIST_HEAD(Bprotocols);
-DEFINE_RWLOCK(bp_lock);
+static DEFINE_RWLOCK(bp_lock);
struct mISDNdevice
*get_mdevice(u_int id)
@@ -192,8 +192,7 @@ mISDN_unregister_Bprotocol(struct Bprotocol *bp)
}
EXPORT_SYMBOL(mISDN_unregister_Bprotocol);
-int
-mISDNInit(void)
+static int mISDNInit(void)
{
int err;
@@ -224,7 +223,7 @@ error:
return err;
}
-void mISDN_cleanup(void)
+static void mISDN_cleanup(void)
{
misdn_sock_cleanup();
mISDN_timer_cleanup();
diff --git a/drivers/isdn/mISDN/dsp_audio.c b/drivers/isdn/mISDN/dsp_audio.c
index 1c2dd56..de3795e 100644
--- a/drivers/isdn/mISDN/dsp_audio.c
+++ b/drivers/isdn/mISDN/dsp_audio.c
@@ -30,7 +30,7 @@ EXPORT_SYMBOL(dsp_audio_s16_to_law);
/* alaw -> ulaw */
u8 dsp_audio_alaw_to_ulaw[256];
/* ulaw -> alaw */
-u8 dsp_audio_ulaw_to_alaw[256];
+static u8 dsp_audio_ulaw_to_alaw[256];
u8 dsp_silence;
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
index c2f51cc..2db0098 100644
--- a/drivers/isdn/mISDN/dsp_cmx.c
+++ b/drivers/isdn/mISDN/dsp_cmx.c
@@ -1540,11 +1540,11 @@ send_packet:
schedule_work(&dsp->workq);
}
-u32 samplecount;
+static u32 samplecount;
struct timer_list dsp_spl_tl;
u32 dsp_spl_jiffies; /* calculate the next time to fire */
-u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */
-struct timeval dsp_start_tv; /* time at start of calculation */
+static u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */
+static struct timeval dsp_start_tv; /* time at start of calculation */
void
dsp_cmx_send(void *arg)
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index 2f10ed8..41af063 100644
--- a/drivers/isdn/mISDN/dsp_core.c
+++ b/drivers/isdn/mISDN/dsp_core.c
@@ -161,7 +161,7 @@
#include "core.h"
#include "dsp.h"
-const char *mISDN_dsp_revision = "2.0";
+static const char *mISDN_dsp_revision = "2.0";
static int debug;
static int options;
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c
index 54cfddc..5adee7f 100644
--- a/drivers/isdn/mISDN/stack.c
+++ b/drivers/isdn/mISDN/stack.c
@@ -36,8 +36,7 @@ _queue_message(struct mISDNstack *st, struct sk_buff *skb)
}
}
-int
-mISDN_queue_message(struct mISDNchannel *ch, struct sk_buff *skb)
+int static mISDN_queue_message(struct mISDNchannel *ch, struct sk_buff *skb)
{
_queue_message(ch->st, skb);
return 0;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/leds/leds-pca9532.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
index 4064d4f..fa060f8 100644
--- a/drivers/leds/leds-pca9532.c
+++ b/drivers/leds/leds-pca9532.c
@@ -151,8 +151,8 @@ static int pca9532_set_blink(struct led_classdev *led_cdev,
return pca9532_setpwm(client, 0, psc, led_cdev->brightness);
}
-int pca9532_event(struct input_dev *dev, unsigned int type, unsigned int code,
- int value)
+static int pca9532_event(struct input_dev *dev, unsigned int type,
+ unsigned int code, int value)
{
struct pca9532_data *data = input_get_drvdata(dev);
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/media/dvb/dm1105/dm1105.c | 4 ++--
drivers/media/dvb/dvb-core/dvb_frontend.c | 25 ++++++++++++++-----------
drivers/media/dvb/dvb-usb/anysee.c | 2 +-
drivers/media/dvb/dvb-usb/cinergyT2-core.c | 4 ++--
drivers/media/dvb/frontends/cx24116.c | 2 +-
5 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c
index c1d92f8..a0bc379 100644
--- a/drivers/media/dvb/dm1105/dm1105.c
+++ b/drivers/media/dvb/dm1105/dm1105.c
@@ -507,7 +507,7 @@ static void input_register_keys(struct infrared *ir)
ir->input_dev->keycodemax = ARRAY_SIZE(ir->key_map);
}
-int __devinit dm1105_ir_init(struct dm1105dvb *dm1105)
+static int __devinit dm1105_ir_init(struct dm1105dvb *dm1105)
{
struct input_dev *input_dev;
int err;
@@ -551,7 +551,7 @@ int __devinit dm1105_ir_init(struct dm1105dvb *dm1105)
}
-void __devexit dm1105_ir_exit(struct dm1105dvb *dm1105)
+static void __devexit dm1105_ir_exit(struct dm1105dvb *dm1105)
{
tasklet_kill(&dm1105->ir.ir_tasklet);
input_unregister_device(dm1105->ir.input_dev);
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 7a421e9..a432c1a 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -764,7 +764,7 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe,
return 0;
}
-struct dtv_cmds_h dtv_cmds[] = {
+static struct dtv_cmds_h dtv_cmds[] = {
[DTV_TUNE] = {
.name = "DTV_TUNE",
.cmd = DTV_TUNE,
@@ -902,7 +902,7 @@ struct dtv_cmds_h dtv_cmds[] = {
},
};
-void dtv_property_dump(struct dtv_property *tvp)
+static void dtv_property_dump(struct dtv_property *tvp)
{
int i;
@@ -933,7 +933,7 @@ void dtv_property_dump(struct dtv_property *tvp)
dprintk("%s() tvp.u.data = 0x%08x\n", __func__, tvp->u.data);
}
-int is_legacy_delivery_system(fe_delivery_system_t s)
+static int is_legacy_delivery_system(fe_delivery_system_t s)
{
if((s == SYS_UNDEFINED) || (s == SYS_DVBC_ANNEX_AC) ||
(s == SYS_DVBC_ANNEX_B) || (s == SYS_DVBT) || (s == SYS_DVBS) ||
@@ -947,7 +947,8 @@ int is_legacy_delivery_system(fe_delivery_system_t s)
* drivers can use a single set_frontend tuning function, regardless of whether
* it's being used for the legacy or new API, reducing code and complexity.
*/
-void dtv_property_cache_sync(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
+static void dtv_property_cache_sync(struct dvb_frontend *fe,
+ struct dvb_frontend_parameters *p)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
@@ -999,7 +1000,7 @@ void dtv_property_cache_sync(struct dvb_frontend *fe, struct dvb_frontend_parame
/* Ensure the cached values are set correctly in the frontend
* legacy tuning structures, for the advanced tuning API.
*/
-void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
+static void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
@@ -1054,7 +1055,7 @@ void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
/* Ensure the cached values are set correctly in the frontend
* legacy tuning structures, for the legacy tuning API.
*/
-void dtv_property_adv_params_sync(struct dvb_frontend *fe)
+static void dtv_property_adv_params_sync(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
@@ -1089,7 +1090,7 @@ void dtv_property_adv_params_sync(struct dvb_frontend *fe)
}
}
-void dtv_property_cache_submit(struct dvb_frontend *fe)
+static void dtv_property_cache_submit(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
@@ -1120,8 +1121,9 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file,
static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
unsigned int cmd, void *parg);
-int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp,
- struct inode *inode, struct file *file)
+static int dtv_property_process_get(struct dvb_frontend *fe,
+ struct dtv_property *tvp, struct inode *inode,
+ struct file *file)
{
int r = 0;
@@ -1193,8 +1195,9 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp,
return r;
}
-int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp,
- struct inode *inode, struct file *file)
+static int dtv_property_process_set(struct dvb_frontend *fe,
+ struct dtv_property *tvp, struct inode *inode,
+ struct file *file)
{
int r = 0;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c
index cd2edbc..c9eda4e 100644
--- a/drivers/media/dvb/dvb-usb/anysee.c
+++ b/drivers/media/dvb/dvb-usb/anysee.c
@@ -41,7 +41,7 @@
static int dvb_usb_anysee_debug;
module_param_named(debug, dvb_usb_anysee_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debugging level" DVB_USB_DEBUG_STATUS);
-int dvb_usb_anysee_delsys;
+static int dvb_usb_anysee_delsys;
module_param_named(delsys, dvb_usb_anysee_delsys, int, 0644);
MODULE_PARM_DESC(delsys, "select delivery mode (0=DVB-C, 1=DVB-T)");
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
diff --git a/drivers/media/dvb/dvb-usb/cinergyT2-core.c b/drivers/media/dvb/dvb-usb/cinergyT2-core.c
index 3ac9f74..ef23719 100644
--- a/drivers/media/dvb/dvb-usb/cinergyT2-core.c
+++ b/drivers/media/dvb/dvb-usb/cinergyT2-core.c
@@ -32,7 +32,7 @@
/* debug */
int dvb_usb_cinergyt2_debug;
-int disable_remote;
+static int disable_remote;
module_param_named(debug, dvb_usb_cinergyt2_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debugging level (1=info, xfer=2, rc=4 "
@@ -45,7 +45,7 @@ struct cinergyt2_state {
};
/* We are missing a release hook with usb_device data */
-struct dvb_usb_device *cinergyt2_usb_device;
+static struct dvb_usb_device *cinergyt2_usb_device;
static struct dvb_usb_device_properties cinergyt2_properties;
diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c
index b144b30..74f9750 100644
--- a/drivers/media/dvb/frontends/cx24116.c
+++ b/drivers/media/dvb/frontends/cx24116.c
@@ -368,7 +368,7 @@ static int cx24116_set_inversion(struct cx24116_state *state,
* Not all S2 mmodulation schemes are support and not all rates with
* a scheme are support. Especially, no auto detect when in S2 mode.
*/
-struct cx24116_modfec {
+static struct cx24116_modfec {
fe_delivery_system_t delivery_system;
fe_modulation_t modulation;
fe_code_rate_t fec;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/misc/lkdtm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
index 1bfe5d1..9019a1d 100644
--- a/drivers/misc/lkdtm.c
+++ b/drivers/misc/lkdtm.c
@@ -183,7 +183,7 @@ static int jp_scsi_dispatch_cmd(struct scsi_cmnd *cmd)
}
#ifdef CONFIG_IDE
-int jp_generic_ide_ioctl(ide_drive_t *drive, struct file *file,
+static int jp_generic_ide_ioctl(ide_drive_t *drive, struct file *file,
struct block_device *bdev, unsigned int cmd,
unsigned long arg)
{
@@ -235,7 +235,7 @@ static int recursive_loop(int a)
return recursive_loop(a);
}
-void lkdtm_handler(void)
+static void lkdtm_handler(void)
{
printk(KERN_INFO "lkdtm : Crash point %s of type %s hit\n",
cpoint_name, cpoint_type);
On Tue, 09 Dec 2008 19:41:20 +0100, Roel Kluin wrote:
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
> ---
> drivers/i2c/i2c-core.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> index c6a63f4..1049615 100644
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -1699,7 +1699,8 @@ EXPORT_SYMBOL(i2c_smbus_write_word_data);
> * This executes the SMBus "process call" protocol, returning negative errno
> * else a 16-bit unsigned "word" received from the device.
> */
> -s32 i2c_smbus_process_call(struct i2c_client *client, u8 command, u16 value)
> +static s32 i2c_smbus_process_call(struct i2c_client *client, u8 command,
> + u16 value)
> {
> union i2c_smbus_data data;
> int status;
Nack:
drivers/i2c/i2c-core.c:EXPORT_SYMBOL(i2c_smbus_process_call);
--
Jean Delvare
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/net/arcnet/capmode.c | 2 +-
drivers/net/arcnet/com90xx.c | 2 +-
drivers/net/atlx/atl1.c | 4 ++--
drivers/net/cxgb3/vsc8211.c | 2 +-
drivers/net/irda/ma600-sir.c | 2 +-
drivers/net/irda/smsc-ircc2.c | 6 +++---
drivers/net/irda/w83977af_ir.c | 12 ++++++------
drivers/net/ixgbe/ixgbe_82598.c | 14 +++++++-------
drivers/net/plip.c | 2 +-
drivers/net/qlge/qlge_ethtool.c | 2 +-
drivers/net/qlge/qlge_main.c | 14 ++++++++------
drivers/net/qlge/qlge_mpi.c | 2 +-
drivers/net/skfp/skfddi.c | 6 +++---
drivers/net/tokenring/madgemc.c | 2 +-
drivers/net/tokenring/proteon.c | 2 +-
drivers/net/tokenring/skisa.c | 2 +-
drivers/net/usb/hso.c | 4 ++--
drivers/net/wan/sbni.c | 4 +---
drivers/net/wan/x25_asy.c | 2 +-
drivers/net/wan/z85230.c | 4 ++--
drivers/net/wireless/airo.c | 2 +-
drivers/net/wireless/atmel.c | 2 +-
drivers/net/wireless/b43/phy_a.c | 4 ++--
drivers/net/wireless/b43/phy_g.c | 16 ++++++++--------
drivers/net/wireless/ipw2100.c | 6 +++---
drivers/net/wireless/prism54/islpci_hotplug.c | 12 ++++--------
drivers/net/wireless/ray_cs.c | 2 +-
27 files changed, 65 insertions(+), 69 deletions(-)
hmm, still a lot. should this be split in drivers/net/* ?
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
index 02cb8f1..c7e9b58 100644
--- a/drivers/net/arcnet/capmode.c
+++ b/drivers/net/arcnet/capmode.c
@@ -61,7 +61,7 @@ static struct ArcProto capmode_proto =
};
-void arcnet_cap_init(void)
+static void arcnet_cap_init(void)
{
int count;
diff --git a/drivers/net/arcnet/com90xx.c b/drivers/net/arcnet/com90xx.c
index 0d45553..680a530 100644
--- a/drivers/net/arcnet/com90xx.c
+++ b/drivers/net/arcnet/com90xx.c
@@ -583,7 +583,7 @@ static void com90xx_setmask(struct net_device *dev, int mask)
*
* However, it does make sure the card is in a defined state.
*/
-int com90xx_reset(struct net_device *dev, int really_reset)
+static int com90xx_reset(struct net_device *dev, int really_reset)
{
struct arcnet_local *lp = dev->priv;
short ioaddr = dev->base_addr;
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index aef403d..8f82a8c 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -195,7 +195,7 @@ static int __devinit atl1_validate_option(int *value, struct atl1_option *opt,
* value exists, a default value is used. The final value is stored
* in a variable in the adapter structure.
*/
-void __devinit atl1_check_options(struct atl1_adapter *adapter)
+static void __devinit atl1_check_options(struct atl1_adapter *adapter)
{
struct pci_dev *pdev = adapter->pdev;
int bd = adapter->bd_number;
@@ -523,7 +523,7 @@ static int atl1_get_permanent_address(struct atl1_hw *hw)
* Reads the adapter's MAC address from the EEPROM
* hw - Struct containing variables accessed by shared code
*/
-s32 atl1_read_mac_addr(struct atl1_hw *hw)
+static s32 atl1_read_mac_addr(struct atl1_hw *hw)
{
u16 i;
diff --git a/drivers/net/cxgb3/vsc8211.c b/drivers/net/cxgb3/vsc8211.c
index 33f956b..722034b 100644
--- a/drivers/net/cxgb3/vsc8211.c
+++ b/drivers/net/cxgb3/vsc8211.c
@@ -292,7 +292,7 @@ static int vsc8211_set_automdi(struct cphy *phy, int enable)
return 0;
}
-int vsc8211_set_speed_duplex(struct cphy *phy, int speed, int duplex)
+static int vsc8211_set_speed_duplex(struct cphy *phy, int speed, int duplex)
{
int err;
diff --git a/drivers/net/irda/ma600-sir.c b/drivers/net/irda/ma600-sir.c
index 1ceed9c..e912164 100644
--- a/drivers/net/irda/ma600-sir.c
+++ b/drivers/net/irda/ma600-sir.c
@@ -236,7 +236,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
* avoid the state machine complexity before we get things working
*/
-int ma600_reset(struct sir_dev *dev)
+static int ma600_reset(struct sir_dev *dev)
{
IRDA_DEBUG(2, "%s()\n", __func__);
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index b5360fe..5d09e15 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -872,7 +872,7 @@ static void smsc_ircc_timeout(struct net_device *dev)
* waits until the next transmit interrupt, and continues until the
* frame is transmitted.
*/
-int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
+static int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
{
struct smsc_ircc_cb *self;
unsigned long flags;
@@ -1128,7 +1128,7 @@ static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed)
* Set speed of IrDA port to specified baudrate
*
*/
-void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
+static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
{
int iobase;
int fcr; /* FIFO control reg */
@@ -1894,7 +1894,7 @@ static void __exit smsc_ircc_cleanup(void)
* This function *must* be called with spinlock held, because it may
* be called from the irq handler (via smsc_ircc_change_speed()). - Jean II
*/
-void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
+static void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
{
struct net_device *dev;
int fir_base, sir_base;
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index 002a6d7..b3c6768 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -147,7 +147,7 @@ static void __exit w83977af_cleanup(void)
* Open driver instance
*
*/
-int w83977af_open(int i, unsigned int iobase, unsigned int irq,
+static int w83977af_open(int i, unsigned int iobase, unsigned int irq,
unsigned int dma)
{
struct net_device *dev;
@@ -310,7 +310,7 @@ static int w83977af_close(struct w83977af_ir *self)
return 0;
}
-int w83977af_probe( int iobase, int irq, int dma)
+static int w83977af_probe(int iobase, int irq, int dma)
{
int version;
int i;
@@ -409,7 +409,7 @@ int w83977af_probe( int iobase, int irq, int dma)
return -1;
}
-void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
+static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
{
int ir_mode = HCR_SIR;
int iobase;
@@ -489,7 +489,7 @@ void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
* Sets up a DMA transfer to send the current frame.
*
*/
-int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
+static int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct w83977af_ir *self;
__s32 speed;
@@ -731,7 +731,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
* if it starts to receive a frame.
*
*/
-int w83977af_dma_receive(struct w83977af_ir *self)
+static int w83977af_dma_receive(struct w83977af_ir *self)
{
int iobase;
__u8 set;
@@ -803,7 +803,7 @@ int w83977af_dma_receive(struct w83977af_ir *self)
* Finished with receiving a frame
*
*/
-int w83977af_dma_receive_complete(struct w83977af_ir *self)
+static int w83977af_dma_receive_complete(struct w83977af_ir *self)
{
struct sk_buff *skb;
struct st_fifo *st_fifo;
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index 7cddcfb..0645140 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -146,7 +146,7 @@ static s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw,
*
* Determines the link capabilities by reading the AUTOC register.
**/
-s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw,
+static s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw,
ixgbe_link_speed *speed,
bool *autoneg)
{
@@ -205,7 +205,7 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
* Configures the flow control settings based on SW configuration. This
* function is used for 802.3x flow control configuration only.
**/
-s32 ixgbe_setup_fc_82598(struct ixgbe_hw *hw, s32 packetbuf_num)
+static s32 ixgbe_setup_fc_82598(struct ixgbe_hw *hw, s32 packetbuf_num)
{
u32 frctl_reg;
u32 rmcs_reg;
@@ -648,7 +648,7 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw)
* @rar: receive address register index to associate with a VMDq index
* @vmdq: VMDq set index
**/
-s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
+static s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
{
u32 rar_high;
@@ -692,7 +692,7 @@ static s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
*
* Turn on/off specified VLAN in the VLAN filter table.
**/
-s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind,
+static s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind,
bool vlan_on)
{
u32 regindex;
@@ -816,7 +816,7 @@ static s32 ixgbe_blink_led_stop_82598(struct ixgbe_hw *hw, u32 index)
*
* Performs read operation to Atlas analog register specified.
**/
-s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val)
+static s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val)
{
u32 atlas_ctl;
@@ -838,7 +838,7 @@ s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val)
*
* Performs write operation to Atlas analog register specified.
**/
-s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val)
+static s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val)
{
u32 atlas_ctl;
@@ -856,7 +856,7 @@ s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val)
*
* Determines physical layer capabilities of the current configuration.
**/
-s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
+static s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
{
s32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
index 1e96542..9781881 100644
--- a/drivers/net/plip.c
+++ b/drivers/net/plip.c
@@ -1018,7 +1018,7 @@ plip_hard_header(struct sk_buff *skb, struct net_device *dev,
return ret;
}
-int plip_hard_header_cache(const struct neighbour *neigh,
+static int plip_hard_header_cache(const struct neighbour *neigh,
struct hh_cache *hh)
{
int ret;
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c
index b62fbd4..eefb81b 100644
--- a/drivers/net/qlge/qlge_ethtool.c
+++ b/drivers/net/qlge/qlge_ethtool.c
@@ -97,7 +97,7 @@ exit:
return status;
}
-void ql_update_stats(struct ql_adapter *qdev)
+static void ql_update_stats(struct ql_adapter *qdev)
{
u32 i;
u64 data;
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index b83a9c9..7f9c6a8 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -643,7 +643,7 @@ static void ql_enable_all_completion_interrupts(struct ql_adapter *qdev)
}
-int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data)
+static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data)
{
int status = 0;
/* wait for reg to come ready */
@@ -833,7 +833,7 @@ end:
}
/* Get the next large buffer. */
-struct bq_desc *ql_get_curr_lbuf(struct rx_ring *rx_ring)
+static struct bq_desc *ql_get_curr_lbuf(struct rx_ring *rx_ring)
{
struct bq_desc *lbq_desc = &rx_ring->lbq[rx_ring->lbq_curr_idx];
rx_ring->lbq_curr_idx++;
@@ -844,7 +844,7 @@ struct bq_desc *ql_get_curr_lbuf(struct rx_ring *rx_ring)
}
/* Get the next small buffer. */
-struct bq_desc *ql_get_curr_sbuf(struct rx_ring *rx_ring)
+static struct bq_desc *ql_get_curr_sbuf(struct rx_ring *rx_ring)
{
struct bq_desc *sbq_desc = &rx_ring->sbq[rx_ring->sbq_curr_idx];
rx_ring->sbq_curr_idx++;
@@ -1167,7 +1167,7 @@ map_error:
return NETDEV_TX_BUSY;
}
-void ql_realign_skb(struct sk_buff *skb, int len)
+static void ql_realign_skb(struct sk_buff *skb, int len)
{
void *temp_addr = skb->data;
@@ -2071,7 +2071,8 @@ err:
return -ENOMEM;
}
-void ql_free_lbq_buffers(struct ql_adapter *qdev, struct rx_ring *rx_ring)
+static void ql_free_lbq_buffers(struct ql_adapter *qdev,
+ struct rx_ring *rx_ring)
{
int i;
struct bq_desc *lbq_desc;
@@ -2134,7 +2135,8 @@ mem_error:
return -ENOMEM;
}
-void ql_free_sbq_buffers(struct ql_adapter *qdev, struct rx_ring *rx_ring)
+static void ql_free_sbq_buffers(struct ql_adapter *qdev,
+ struct rx_ring *rx_ring)
{
int i;
struct bq_desc *sbq_desc;
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index 24fe344..fa31891 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -19,7 +19,7 @@ exit:
return status;
}
-int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
+static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
{
int i, status;
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index a2b092b..9f641f2 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -612,7 +612,7 @@ static int skfp_close(struct net_device *dev)
* Interrupts are disabled, then reenabled at the adapter.
*/
-irqreturn_t skfp_interrupt(int irq, void *dev_id)
+static irqreturn_t skfp_interrupt(int irq, void *dev_id)
{
struct net_device *dev = dev_id;
struct s_smc *smc; /* private board structure pointer */
@@ -679,7 +679,7 @@ irqreturn_t skfp_interrupt(int irq, void *dev_id)
* independent.
*
*/
-struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev)
+static struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev)
{
struct s_smc *bp = netdev_priv(dev);
@@ -1224,7 +1224,7 @@ static void send_queued_packets(struct s_smc *smc)
* Verify if the source address is set. Insert it if necessary.
*
************************/
-void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr)
+static void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr)
{
unsigned char SRBit;
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index c9c5a2b..0d2f58c 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -467,7 +467,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id)
* zero to leave the TMS NSELOUT bits unaffected.
*
*/
-unsigned short madgemc_setnselout_pins(struct net_device *dev)
+static unsigned short madgemc_setnselout_pins(struct net_device *dev)
{
unsigned char reg1;
struct net_local *tp = netdev_priv(dev);
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
index 00ea945..74c4d6a 100644
--- a/drivers/net/tokenring/proteon.c
+++ b/drivers/net/tokenring/proteon.c
@@ -284,7 +284,7 @@ static void proteon_read_eeprom(struct net_device *dev)
dev->dev_addr[i] = proteon_sifreadw(dev, SIFINC) >> 8;
}
-unsigned short proteon_setnselout_pins(struct net_device *dev)
+static unsigned short proteon_setnselout_pins(struct net_device *dev)
{
return 0;
}
diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
index 41b6999..bc39f29 100644
--- a/drivers/net/tokenring/skisa.c
+++ b/drivers/net/tokenring/skisa.c
@@ -301,7 +301,7 @@ static void sk_isa_read_eeprom(struct net_device *dev)
dev->dev_addr[i] = sk_isa_sifreadw(dev, SIFINC) >> 8;
}
-unsigned short sk_isa_setnselout_pins(struct net_device *dev)
+static unsigned short sk_isa_setnselout_pins(struct net_device *dev)
{
return 0;
}
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 8e90891..4cb807e 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1189,7 +1189,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
* This needs to be a tasklet otherwise we will
* end up recursively calling this function.
*/
-void hso_unthrottle_tasklet(struct hso_serial *serial)
+static void hso_unthrottle_tasklet(struct hso_serial *serial)
{
unsigned long flags;
@@ -1208,7 +1208,7 @@ static void hso_unthrottle(struct tty_struct *tty)
tasklet_hi_schedule(&serial->unthrottle_tasklet);
}
-void hso_unthrottle_workfunc(struct work_struct *work)
+static void hso_unthrottle_workfunc(struct work_struct *work)
{
struct hso_serial *serial =
container_of(work, struct hso_serial,
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index ee51b6a..ceb4a1b 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -286,9 +286,7 @@ static int __init sbni_init(struct net_device *dev)
return -ENODEV;
}
-
-int __init
-sbni_pci_probe( struct net_device *dev )
+static int __init sbni_pci_probe(struct net_device *dev)
{
struct pci_dev *pdev = NULL;
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 2a6c7a6..348ab86 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -624,7 +624,7 @@ static struct net_device_stats *x25_asy_get_stats(struct net_device *dev)
* STANDARD X.25 ENCAPSULATION *
************************************************************************/
-int x25_asy_esc(unsigned char *s, unsigned char *d, int len)
+static int x25_asy_esc(unsigned char *s, unsigned char *d, int len)
{
unsigned char *ptr = d;
unsigned char c;
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index 5bf7e01..6a2751c 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -601,7 +601,7 @@ static void z8530_dma_status(struct z8530_channel *chan)
write_zsctrl(chan, RES_H_IUS);
}
-struct z8530_irqhandler z8530_dma_sync=
+static struct z8530_irqhandler z8530_dma_sync =
{
z8530_dma_rx,
z8530_dma_tx,
@@ -610,7 +610,7 @@ struct z8530_irqhandler z8530_dma_sync=
EXPORT_SYMBOL(z8530_dma_sync);
-struct z8530_irqhandler z8530_txdma_sync=
+static struct z8530_irqhandler z8530_txdma_sync =
{
z8530_rx,
z8530_dma_tx,
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 370133e..20edc3a 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -3611,7 +3611,7 @@ badrx:
}
}
-void mpi_receive_802_11 (struct airo_info *ai)
+static void mpi_receive_802_11(struct airo_info *ai)
{
RxFid rxd;
struct sk_buff *skb = NULL;
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index ecb02bd..f5b22da 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -3183,7 +3183,7 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)
}
}
-void atmel_join_bss(struct atmel_private *priv, int bss_index)
+static void atmel_join_bss(struct atmel_private *priv, int bss_index)
{
struct bss_info *bss = &priv->BSSinfo[bss_index];
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
index 0f1a84c..7fe9d17 100644
--- a/drivers/net/wireless/b43/phy_a.c
+++ b/drivers/net/wireless/b43/phy_a.c
@@ -77,7 +77,7 @@ static s8 b43_aphy_estimate_power_out(struct b43_wldev *dev, s8 tssi)
}
#endif
-void b43_radio_set_tx_iq(struct b43_wldev *dev)
+static void b43_radio_set_tx_iq(struct b43_wldev *dev)
{
static const u8 data_high[5] = { 0x00, 0x40, 0x80, 0x90, 0xD0 };
static const u8 data_low[5] = { 0x00, 0x01, 0x05, 0x06, 0x0A };
@@ -147,7 +147,7 @@ static void aphy_channel_switch(struct b43_wldev *dev, unsigned int channel)
//FIXME b43_phy_xmitpower(dev);
}
-void b43_radio_init2060(struct b43_wldev *dev)
+static void b43_radio_init2060(struct b43_wldev *dev)
{
b43_radio_write16(dev, 0x0004, 0x00C0);
b43_radio_write16(dev, 0x0005, 0x0008);
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index 232181f..f07e1d3 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -54,7 +54,7 @@ static const s8 b43_tssi2dbm_g_table[] = {
-20, -20, -20, -20,
};
-const u8 b43_radio_channel_codes_bg[] = {
+static const u8 b43_radio_channel_codes_bg[] = {
12, 17, 22, 27,
32, 37, 42, 47,
52, 57, 62, 67,
@@ -215,7 +215,7 @@ void b43_gphy_set_baseband_attenuation(struct b43_wldev *dev,
}
/* Adjust the transmission power output (G-PHY) */
-void b43_set_txpower_g(struct b43_wldev *dev,
+static void b43_set_txpower_g(struct b43_wldev *dev,
const struct b43_bbatt *bbatt,
const struct b43_rfatt *rfatt, u8 tx_control)
{
@@ -383,14 +383,14 @@ static void b43_set_original_gains(struct b43_wldev *dev)
}
/* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
-void b43_nrssi_hw_write(struct b43_wldev *dev, u16 offset, s16 val)
+static void b43_nrssi_hw_write(struct b43_wldev *dev, u16 offset, s16 val)
{
b43_phy_write(dev, B43_PHY_NRSSILT_CTRL, offset);
b43_phy_write(dev, B43_PHY_NRSSILT_DATA, (u16) val);
}
/* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
-s16 b43_nrssi_hw_read(struct b43_wldev *dev, u16 offset)
+static s16 b43_nrssi_hw_read(struct b43_wldev *dev, u16 offset)
{
u16 val;
@@ -401,7 +401,7 @@ s16 b43_nrssi_hw_read(struct b43_wldev *dev, u16 offset)
}
/* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
-void b43_nrssi_hw_update(struct b43_wldev *dev, u16 val)
+static void b43_nrssi_hw_update(struct b43_wldev *dev, u16 val)
{
u16 i;
s16 tmp;
@@ -415,7 +415,7 @@ void b43_nrssi_hw_update(struct b43_wldev *dev, u16 val)
}
/* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
-void b43_nrssi_mem_update(struct b43_wldev *dev)
+static void b43_nrssi_mem_update(struct b43_wldev *dev)
{
struct b43_phy_g *gphy = dev->phy.g;
s16 i, delta;
@@ -589,7 +589,7 @@ static void b43_calc_nrssi_offset(struct b43_wldev *dev)
b43_phy_write(dev, 0x0811, backup[1]);
}
-void b43_calc_nrssi_slope(struct b43_wldev *dev)
+static void b43_calc_nrssi_slope(struct b43_wldev *dev)
{
struct b43_phy *phy = &dev->phy;
struct b43_phy_g *gphy = phy->g;
@@ -1354,7 +1354,7 @@ struct init2050_saved_values {
u16 phy_syncctl;
};
-u16 b43_radio_init2050(struct b43_wldev *dev)
+static u16 b43_radio_init2050(struct b43_wldev *dev)
{
struct b43_phy *phy = &dev->phy;
struct init2050_saved_values sav;
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index bca7481..a3aa1de 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -5271,21 +5271,21 @@ static int ipw2100_set_ibss_beacon_interval(struct ipw2100_priv *priv,
return 0;
}
-void ipw2100_queues_initialize(struct ipw2100_priv *priv)
+static void ipw2100_queues_initialize(struct ipw2100_priv *priv)
{
ipw2100_tx_initialize(priv);
ipw2100_rx_initialize(priv);
ipw2100_msg_initialize(priv);
}
-void ipw2100_queues_free(struct ipw2100_priv *priv)
+static void ipw2100_queues_free(struct ipw2100_priv *priv)
{
ipw2100_tx_free(priv);
ipw2100_rx_free(priv);
ipw2100_msg_free(priv);
}
-int ipw2100_queues_allocate(struct ipw2100_priv *priv)
+static int ipw2100_queues_allocate(struct ipw2100_priv *priv)
{
if (ipw2100_tx_allocate(priv) ||
ipw2100_rx_allocate(priv) || ipw2100_msg_allocate(priv))
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
index af2e4f2..ddb21b7 100644
--- a/drivers/net/wireless/prism54/islpci_hotplug.c
+++ b/drivers/net/wireless/prism54/islpci_hotplug.c
@@ -93,8 +93,7 @@ static struct pci_driver prism54_driver = {
Module initialization functions
******************************************************************************/
-int
-prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+int static prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
struct net_device *ndev;
u8 latency_tmr;
@@ -216,8 +215,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static volatile int __in_cleanup_module = 0;
/* this one removes one(!!) instance only */
-void
-prism54_remove(struct pci_dev *pdev)
+void static prism54_remove(struct pci_dev *pdev)
{
struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
@@ -259,8 +257,7 @@ prism54_remove(struct pci_dev *pdev)
pci_disable_device(pdev);
}
-int
-prism54_suspend(struct pci_dev *pdev, pm_message_t state)
+int static prism54_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
@@ -282,8 +279,7 @@ prism54_suspend(struct pci_dev *pdev, pm_message_t state)
return 0;
}
-int
-prism54_resume(struct pci_dev *pdev)
+int static prism54_resume(struct pci_dev *pdev)
{
struct net_device *ndev = pci_get_drvdata(pdev);
islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 1404a57..1512b17 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -829,7 +829,7 @@ static int ray_resume(struct pcmcia_device *link)
}
/*===========================================================================*/
-int ray_dev_init(struct net_device *dev)
+static int ray_dev_init(struct net_device *dev)
{
#ifdef RAY_IMMEDIATE_INIT
int i;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/acpi/ec.c | 4 ++--
drivers/acpi/pci_link.c | 2 +-
drivers/acpi/video_detect.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
please ignore previous patch (ec_burst_enable and ec_burst_disable were exported)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 30f3ef2..783acda 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -370,7 +370,7 @@ unlock:
* Note: samsung nv5000 doesn't work with ec burst mode.
* http://bugzilla.kernel.org/show_bug.cgi?id=4980
*/
-int acpi_ec_burst_enable(struct acpi_ec *ec)
+static int acpi_ec_burst_enable(struct acpi_ec *ec)
{
u8 d;
struct transaction t = {.command = ACPI_EC_BURST_ENABLE,
@@ -380,7 +380,7 @@ int acpi_ec_burst_enable(struct acpi_ec *ec)
return acpi_ec_transaction(ec, &t, 0);
}
-int acpi_ec_burst_disable(struct acpi_ec *ec)
+static int acpi_ec_burst_disable(struct acpi_ec *ec)
{
struct transaction t = {.command = ACPI_EC_BURST_DISABLE,
.wdata = NULL, .rdata = NULL,
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index e52ad91..4869fa1 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -912,7 +912,7 @@ static int __init acpi_irq_nobalance_set(char *str)
__setup("acpi_irq_nobalance", acpi_irq_nobalance_set);
-int __init acpi_irq_balance_set(char *str)
+static int __init acpi_irq_balance_set(char *str)
{
acpi_irq_balance = 1;
return 1;
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f022eb6..50e3d2d 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -234,7 +234,7 @@ EXPORT_SYMBOL(acpi_video_display_switch_support);
* To force that backlight or display output switching is processed by vendor
* specific acpi drivers or video.ko driver.
*/
-int __init acpi_backlight(char *str)
+static int __init acpi_backlight(char *str)
{
if (str == NULL || *str == '\0')
return 1;
@@ -250,7 +250,7 @@ int __init acpi_backlight(char *str)
}
__setup("acpi_backlight=", acpi_backlight);
-int __init acpi_display_output(char *str)
+static int __init acpi_display_output(char *str)
{
if (str == NULL || *str == '\0')
return 1;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
arch/x86/kernel/hpet.c | 2 +-
arch/x86/kernel/io_apic.c | 2 +-
arch/x86/kernel/microcode_core.c | 4 ++--
arch/x86/kernel/microcode_intel.c | 2 +-
arch/x86/kernel/setup.c | 3 ++-
arch/x86/kvm/vmx.c | 2 +-
arch/x86/pci/legacy.c | 2 +-
7 files changed, 9 insertions(+), 8 deletions(-)
please ignore previous patch (add_efi_memmap was exported)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 067d8de..15fcaac 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -33,7 +33,7 @@
* HPET address is set in acpi/boot.c, when an ACPI entry exists
*/
unsigned long hpet_address;
-unsigned long hpet_num_timers;
+static unsigned long hpet_num_timers;
static void __iomem *hpet_virt_address;
struct hpet_dev {
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 9043251..dd6371f 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3401,7 +3401,7 @@ static void hpet_msi_set_affinity(unsigned int irq, cpumask_t mask)
}
#endif /* CONFIG_SMP */
-struct irq_chip hpet_msi_type = {
+static struct irq_chip hpet_msi_type = {
.name = "HPET_MSI",
.unmask = hpet_msi_unmask,
.mask = hpet_msi_mask,
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 82fb280..97af1ec 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -203,7 +203,7 @@ MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
#endif
/* fake device for request_firmware */
-struct platform_device *microcode_pdev;
+static struct platform_device *microcode_pdev;
static ssize_t reload_store(struct sys_device *dev,
struct sysdev_attribute *attr,
@@ -319,7 +319,7 @@ static int microcode_resume_cpu(int cpu)
return 0;
}
-void microcode_update_cpu(int cpu)
+static void microcode_update_cpu(int cpu)
{
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
int err = 0;
diff --git a/arch/x86/kernel/microcode_intel.c b/arch/x86/kernel/microcode_intel.c
index 622dc4a..c34c820 100644
--- a/arch/x86/kernel/microcode_intel.c
+++ b/arch/x86/kernel/microcode_intel.c
@@ -465,7 +465,7 @@ static void microcode_fini_cpu(int cpu)
uci->mc = NULL;
}
-struct microcode_ops microcode_intel_ops = {
+static struct microcode_ops microcode_intel_ops = {
.request_microcode_user = request_microcode_user,
.request_microcode_fw = request_microcode_fw,
.collect_cpu_info = collect_cpu_info,
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 9d5674f..efc5cfe 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -448,7 +448,8 @@ static void __init reserve_early_setup_data(void)
* @size: Size of the crashkernel memory to reserve.
* Returns the base address on success, and -1ULL on failure.
*/
-unsigned long long __init find_and_reserve_crashkernel(unsigned long long size)
+static unsigned long long __init find_and_reserve_crashkernel(
+ unsigned long long size)
{
const unsigned long long alignment = 16<<20; /* 16M */
unsigned long long start = 0LL;
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index a4018b0..bd7d441 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -122,7 +122,7 @@ static struct vmcs_config {
u32 vmentry_ctrl;
} vmcs_config;
-struct vmx_capability {
+static struct vmx_capability {
u32 ept;
u32 vpid;
} vmx_capability;
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index b722dd4..abe0f58 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -55,7 +55,7 @@ static int __init pci_legacy_init(void)
return 0;
}
-int __init pci_subsys_init(void)
+static int __init pci_subsys_init(void)
{
#ifdef CONFIG_X86_NUMAQ
pci_numaq_init();
On Tue, Dec 09, 2008 at 05:58:38PM +0100, Roel Kluin wrote:
> -int add_efi_memmap;
> +static int add_efi_memmap;
> EXPORT_SYMBOL(add_efi_memmap);
This is really an extern missing.
Regards,
Frederik
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/pci/hotplug/ibmphp_hpc.c | 2 +-
drivers/pci/hotplug/pciehp_hpc.c | 2 +-
drivers/pci/pci-driver.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index 83f337c..5c0dbc4 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -782,7 +782,7 @@ static void get_hpc_access (void)
/*----------------------------------------------------------------------
* Name: free_hpc_access()
*---------------------------------------------------------------------*/
-void free_hpc_access (void)
+static void free_hpc_access(void)
{
mutex_unlock(&sem_hpcaccess);
}
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index b643ca1..e23cfc1 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -1254,7 +1254,7 @@ abort:
return NULL;
}
-void pcie_release_ctrl(struct controller *ctrl)
+static void pcie_release_ctrl(struct controller *ctrl)
{
pcie_shutdown_notification(ctrl);
pcie_cleanup_slot(ctrl);
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index b4cdd69..28eb38d 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -654,7 +654,7 @@ static int pci_pm_restore_noirq(struct device *dev)
#endif /* !CONFIG_HIBERNATION */
-struct pm_ext_ops pci_pm_ops = {
+static struct pm_ext_ops pci_pm_ops = {
.base = {
.prepare = pci_pm_prepare,
.complete = pci_pm_complete,
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/pcmcia/pcmcia_ioctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index 1703b20..8b8ac7c 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -286,7 +286,7 @@ static int pccard_get_status(struct pcmcia_socket *s,
return 0;
} /* pccard_get_status */
-int pccard_get_configuration_info(struct pcmcia_socket *s,
+static int pccard_get_configuration_info(struct pcmcia_socket *s,
struct pcmcia_device *p_dev,
config_info_t *config)
{
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/pnp/resource.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index f604061..d5b1e05 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -30,8 +30,8 @@ static int pnp_reserve_mem[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some
* option registration
*/
-struct pnp_option *pnp_build_option(struct pnp_dev *dev, unsigned long type,
- unsigned int option_flags)
+static struct pnp_option *pnp_build_option(struct pnp_dev *dev,
+ unsigned long type, unsigned int option_flags)
{
struct pnp_option *option;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/power/olpc_battery.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
index 5fbca26..a9fd570 100644
--- a/drivers/power/olpc_battery.c
+++ b/drivers/power/olpc_battery.c
@@ -379,7 +379,7 @@ static struct power_supply olpc_bat = {
.use_for_apm = 1,
};
-void olpc_battery_trigger_uevent(unsigned long cause)
+static void olpc_battery_trigger_uevent(unsigned long cause)
{
if (cause & EC_SCI_SRC_ACPWR)
kobject_uevent(&olpc_ac.dev->kobj, KOBJ_CHANGE);
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/usb/serial/usb_debug.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index fc5d995..6c9cbb5 100644
--- a/drivers/usb/serial/usb_debug.c
+++ b/drivers/usb/serial/usb_debug.c
@@ -31,7 +31,7 @@ static struct usb_driver debug_driver = {
.no_dynamic_id = 1,
};
-int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port,
+static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port,
struct file *filp)
{
port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/video/mb862xx/mb862xxfb.c | 2 +-
drivers/video/via/hw.c | 2 +-
drivers/video/via/viafbdev.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfb.c
index 38718d9..d9041af 100644
--- a/drivers/video/mb862xx/mb862xxfb.c
+++ b/drivers/video/mb862xx/mb862xxfb.c
@@ -458,7 +458,7 @@ static ssize_t mb862xxfb_show_dispregs(struct device *dev,
static DEVICE_ATTR(dispregs, 0444, mb862xxfb_show_dispregs, NULL);
-irqreturn_t mb862xx_intr(int irq, void *dev_id)
+static irqreturn_t mb862xx_intr(int irq, void *dev_id)
{
struct mb862xxfb_par *par = (struct mb862xxfb_par *) dev_id;
unsigned long reg_ist, mask;
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index fcd53ce..30493ac 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -553,7 +553,7 @@ void viafb_write_reg_mask(u8 index, int io_port, u8 data, u8 mask)
/*DEBUG_MSG(KERN_INFO "\nIndex=%2d Value=%2d", index, tmp); */
}
-void write_dac_reg(u8 index, u8 r, u8 g, u8 b)
+static void write_dac_reg(u8 index, u8 r, u8 g, u8 b)
{
outb(index, LUT_INDEX_WRITE);
outb(r, LUT_DATA);
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 73ac754..29d9ed1 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -35,14 +35,14 @@ static char *viafb_mode1 = "640x480";
static int viafb_resMode = VIA_RES_640X480;
/* Added for specifying active devices.*/
-char *viafb_active_dev = "";
+static char *viafb_active_dev = "";
/* Added for specifying video on devices.*/
-char *viafb_video_dev = "";
+static char *viafb_video_dev = "";
/*Added for specify lcd output port*/
-char *viafb_lcd_port = "";
-char *viafb_dvi_port = "";
+static char *viafb_lcd_port = "";
+static char *viafb_dvi_port = "";
static void viafb_set_device(struct device_t active_dev);
static int apply_device_setting(struct viafb_ioctl_setting setting_info,
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
fs/bio-integrity.c | 7 ++++---
fs/ext4/extents.c | 5 +++--
fs/ext4/mballoc.c | 2 +-
fs/jbd2/transaction.c | 2 +-
fs/reiserfs/journal.c | 2 +-
fs/select.c | 7 ++++---
6 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
index 19caf7c..80a7b33 100644
--- a/fs/bio-integrity.c
+++ b/fs/bio-integrity.c
@@ -226,7 +226,8 @@ unsigned int bio_integrity_tag_size(struct bio *bio)
}
EXPORT_SYMBOL(bio_integrity_tag_size);
-int bio_integrity_tag(struct bio *bio, void *tag_buf, unsigned int len, int set)
+static int bio_integrity_tag(struct bio *bio, void *tag_buf, unsigned int len,
+ int set)
{
struct bio_integrity_payload *bip = bio->bi_integrity;
struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
@@ -536,7 +537,7 @@ EXPORT_SYMBOL(bio_integrity_endio);
* @bip: Integrity vector to advance
* @skip: Number of bytes to advance it
*/
-void bio_integrity_mark_head(struct bio_integrity_payload *bip,
+static void bio_integrity_mark_head(struct bio_integrity_payload *bip,
unsigned int skip)
{
struct bio_vec *iv;
@@ -562,7 +563,7 @@ void bio_integrity_mark_head(struct bio_integrity_payload *bip,
* @bip: Integrity vector to truncate
* @len: New length of integrity vector
*/
-void bio_integrity_mark_tail(struct bio_integrity_payload *bip,
+static void bio_integrity_mark_tail(struct bio_integrity_payload *bip,
unsigned int len)
{
struct bio_vec *iv;
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ea2ce3c..2387b85 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3083,7 +3083,7 @@ retry:
/*
* Callback function called for each extent to gather FIEMAP information.
*/
-int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
+static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
struct ext4_ext_cache *newex, struct ext4_extent *ex,
void *data)
{
@@ -3152,7 +3152,8 @@ int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
/* fiemap flags we can handle specified here */
#define EXT4_FIEMAP_FLAGS (FIEMAP_FLAG_SYNC|FIEMAP_FLAG_XATTR)
-int ext4_xattr_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo)
+static int ext4_xattr_fiemap(struct inode *inode,
+ struct fiemap_extent_info *fieinfo)
{
__u64 physical = 0;
__u64 length;
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 444ad99..c85c20e 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2242,7 +2242,7 @@ ext4_mb_store_history(struct ext4_allocation_context *ac)
/* Create and initialize ext4_group_info data for the given group. */
-int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group,
+static int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group,
struct ext4_group_desc *desc)
{
int i, len;
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 39b7805..c376d3a 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1372,7 +1372,7 @@ __blist_del_buffer(struct journal_head **list, struct journal_head *jh)
*
* Called under j_list_lock. The journal may not be locked.
*/
-void __jbd2_journal_temp_unlink_buffer(struct journal_head *jh)
+static void __jbd2_journal_temp_unlink_buffer(struct journal_head *jh)
{
struct journal_head **list = NULL;
transaction_t *transaction;
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 9643c3b..476fc6e 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -1872,7 +1872,7 @@ static int flush_used_journal_lists(struct super_block *s,
** removes any nodes in table with name block and dev as bh.
** only touchs the hnext and hprev pointers.
*/
-void remove_journal_hash(struct super_block *sb,
+static void remove_journal_hash(struct super_block *sb,
struct reiserfs_journal_cnode **table,
struct reiserfs_journal_list *jl,
unsigned long block, int remove_freed)
diff --git a/fs/select.c b/fs/select.c
index 87df51e..c24614e 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -532,9 +532,10 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
}
#ifdef HAVE_SET_RESTORE_SIGMASK
-asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp,
- fd_set __user *exp, struct timespec __user *tsp,
- const sigset_t __user *sigmask, size_t sigsetsize)
+static asmlinkage long sys_pselect7(int n, fd_set __user *inp,
+ fd_set __user *outp, fd_set __user *exp,
+ struct timespec __user *tsp, const sigset_t __user *sigmask,
+ size_t sigsetsize)
{
sigset_t ksigmask, sigsaved;
struct timespec ts, end_time, *to = NULL;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
kernel/irq/manage.c | 2 +-
kernel/kexec.c | 2 +-
kernel/kprobes.c | 2 +-
kernel/lockdep.c | 4 ++--
kernel/smp.c | 2 +-
kernel/time/tick-broadcast.c | 2 +-
kernel/time/tick-sched.c | 2 +-
kernel/trace/ftrace.c | 4 ++--
kernel/trace/ring_buffer.c | 6 ++++--
kernel/trace/trace.c | 10 +++++-----
kernel/trace/trace_boot.c | 2 +-
11 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 801addd..6e3d9f8 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -110,7 +110,7 @@ int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
/*
* Generic version of the affinity autoselector.
*/
-int do_irq_select_affinity(unsigned int irq, struct irq_desc *desc)
+static int do_irq_select_affinity(unsigned int irq, struct irq_desc *desc)
{
cpumask_t mask;
diff --git a/kernel/kexec.c b/kernel/kexec.c
index ac0fde7..07b1078 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -42,7 +42,7 @@
note_buf_t* crash_notes;
/* vmcoreinfo stuff */
-unsigned char vmcoreinfo_data[VMCOREINFO_BYTES];
+static unsigned char vmcoreinfo_data[VMCOREINFO_BYTES];
u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];
size_t vmcoreinfo_size;
size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data);
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 9f8a3f2..75cd3dc 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -419,7 +419,7 @@ void kretprobe_hash_unlock(struct task_struct *tsk, unsigned long *flags)
spin_unlock_irqrestore(hlist_lock, *flags);
}
-void kretprobe_table_unlock(unsigned long hash, unsigned long *flags)
+static void kretprobe_table_unlock(unsigned long hash, unsigned long *flags)
{
spinlock_t *hlist_lock = kretprobe_table_lock_ptr(hash);
spin_unlock_irqrestore(hlist_lock, *flags);
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 46a4041..eb8d81c 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -984,7 +984,7 @@ static int noinline print_infinite_recursion_bug(void)
return 0;
}
-unsigned long __lockdep_count_forward_deps(struct lock_class *class,
+static unsigned long __lockdep_count_forward_deps(struct lock_class *class,
unsigned int depth)
{
struct lock_list *entry;
@@ -1015,7 +1015,7 @@ unsigned long lockdep_count_forward_deps(struct lock_class *class)
return ret;
}
-unsigned long __lockdep_count_backward_deps(struct lock_class *class,
+static unsigned long __lockdep_count_backward_deps(struct lock_class *class,
unsigned int depth)
{
struct lock_list *entry;
diff --git a/kernel/smp.c b/kernel/smp.c
index 75c8dde..269e6e6 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -13,7 +13,7 @@
static DEFINE_PER_CPU(struct call_single_queue, call_single_queue);
static LIST_HEAD(call_function_queue);
-__cacheline_aligned_in_smp DEFINE_SPINLOCK(call_function_lock);
+static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_function_lock);
enum {
CSD_FLAG_WAIT = 0x01,
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index f98a1b7..8b244df 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -27,7 +27,7 @@
* timer stops in C3 state.
*/
-struct tick_device tick_broadcast_device;
+static struct tick_device tick_broadcast_device;
static cpumask_t tick_broadcast_mask;
static DEFINE_SPINLOCK(tick_broadcast_lock);
static int tick_broadcast_force;
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 342fc9c..446620f 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -134,7 +134,7 @@ __setup("nohz=", setup_tick_nohz);
* value. We do this unconditionally on any cpu, as we don't know whether the
* cpu, which has the update task assigned is in a long sleep.
*/
-void tick_nohz_update_jiffies(void)
+static void tick_nohz_update_jiffies(void)
{
int cpu = smp_processor_id();
struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 78db083..d9519ab 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -817,7 +817,7 @@ ftrace_avail_open(struct inode *inode, struct file *file)
return ret;
}
-int ftrace_avail_release(struct inode *inode, struct file *file)
+static int ftrace_avail_release(struct inode *inode, struct file *file)
{
struct seq_file *m = (struct seq_file *)file->private_data;
struct ftrace_iterator *iter = m->private;
@@ -1154,7 +1154,7 @@ void ftrace_set_filter(unsigned char *buf, int len, int reset)
* is enabled. If @buf is NULL and reset is set, all functions will be enabled
* for tracing.
*/
-void ftrace_set_notrace(unsigned char *buf, int len, int reset)
+static void ftrace_set_notrace(unsigned char *buf, int len, int reset)
{
ftrace_set_regex(buf, len, reset, 0);
}
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 668bbb5..44a934c 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1418,7 +1418,8 @@ void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu)
* @buffer: The ring buffer
* @cpu: The per CPU buffer to get the entries from.
*/
-unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu)
+static unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer,
+ int cpu)
{
struct ring_buffer_per_cpu *cpu_buffer;
@@ -1434,7 +1435,8 @@ unsigned long ring_buffer_entries_cpu(struct ring_buffer *buffer, int cpu)
* @buffer: The ring buffer
* @cpu: The per CPU buffer to get the number of overruns from
*/
-unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu)
+static unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer,
+ int cpu)
{
struct ring_buffer_per_cpu *cpu_buffer;
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index d86e325..1ae6df8 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -113,7 +113,7 @@ static DEFINE_PER_CPU(struct trace_array_cpu, max_data);
static int tracer_enabled = 1;
/* function tracing enabled */
-int ftrace_function_enabled;
+static int ftrace_function_enabled;
/*
* trace_buf_size is the size in bytes that is allocated
@@ -572,7 +572,7 @@ static int cmdline_idx;
static DEFINE_SPINLOCK(trace_cmdline_lock);
/* temporary disable recording */
-atomic_t trace_record_cmdline_disabled __read_mostly;
+static atomic_t trace_record_cmdline_disabled __read_mostly;
static void trace_init_cmdlines(void)
{
@@ -734,7 +734,7 @@ static void ftrace_trace_stack(struct trace_array *tr,
#endif
}
-void __trace_stack(struct trace_array *tr,
+static void __trace_stack(struct trace_array *tr,
struct trace_array_cpu *data,
unsigned long flags,
int skip)
@@ -1284,7 +1284,7 @@ lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
trace_seq_puts(s, ".");
}
-unsigned long preempt_mark_thresh = 100;
+static unsigned long preempt_mark_thresh = 100;
static void
lat_print_timestamp(struct trace_seq *s, u64 abs_usecs,
@@ -1950,7 +1950,7 @@ int tracing_open_generic(struct inode *inode, struct file *filp)
return 0;
}
-int tracing_release(struct inode *inode, struct file *file)
+static int tracing_release(struct inode *inode, struct file *file)
{
struct seq_file *m = (struct seq_file *)file->private_data;
struct trace_iterator *iter = m->private;
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index d0a5e50..1649989 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -27,7 +27,7 @@ void stop_boot_trace(void)
trace_boot_enabled = 0;
}
-void reset_boot_trace(struct trace_array *tr)
+static void reset_boot_trace(struct trace_array *tr)
{
stop_boot_trace();
}
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
mm/memcontrol.c | 3 ++-
mm/vmscan.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 866dcc7..b2dbba7 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -779,7 +779,8 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask)
return 0;
}
-int mem_cgroup_resize_limit(struct mem_cgroup *memcg, unsigned long long val)
+static int mem_cgroup_resize_limit(struct mem_cgroup *memcg,
+ unsigned long long val)
{
int retry_count = MEM_CGROUP_RECLAIM_RETRIES;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 62e7f62..440e2a3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2472,7 +2472,7 @@ void scan_mapping_unevictable_pages(struct address_space *mapping)
* back onto @zone's unevictable list.
*/
#define SCAN_UNEVICTABLE_BATCH_SIZE 16UL /* arbitrary lock hold batch size */
-void scan_zone_unevictable_pages(struct zone *zone)
+static void scan_zone_unevictable_pages(struct zone *zone)
{
struct list_head *l_unevictable = &zone->lru[LRU_UNEVICTABLE].list;
unsigned long scan;
@@ -2514,7 +2514,7 @@ void scan_zone_unevictable_pages(struct zone *zone)
* that has possibly/probably made some previously unevictable pages
* evictable.
*/
-void scan_all_zones_unevictable_pages(void)
+static void scan_all_zones_unevictable_pages(void)
{
struct zone *zone;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
net/decnet/dn_dev.c | 2 +-
net/decnet/dn_route.c | 4 ++--
net/dsa/mv88e6060.c | 4 ++--
net/dsa/mv88e6123_61_65.c | 4 ++--
net/dsa/mv88e6131.c | 4 ++--
net/irda/irttp.c | 14 +++++++-------
net/irda/timer.c | 2 +-
net/mac80211/rc80211_minstrel.c | 8 ++++----
net/phonet/sysctl.c | 2 +-
net/rxrpc/ar-connection.c | 2 +-
net/rxrpc/ar-connevent.c | 2 +-
net/rxrpc/ar-security.c | 2 +-
net/sched/sch_api.c | 2 +-
net/sunrpc/xprtrdma/svc_rdma_sendto.c | 2 +-
net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +-
net/wireless/reg.c | 2 +-
16 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 28e26bd..5b066f7 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -1106,7 +1106,7 @@ static void dn_dev_set_timer(struct net_device *dev)
add_timer(&dn_db->timer);
}
-struct dn_dev *dn_dev_create(struct net_device *dev, int *err)
+static struct dn_dev *dn_dev_create(struct net_device *dev, int *err)
{
int i;
struct dn_dev_parms *p = dn_dev_list;
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 821bd1c..5ab48d0 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -312,7 +312,7 @@ static int dn_insert_route(struct dn_route *rt, unsigned hash, struct dn_route *
return 0;
}
-void dn_run_flush(unsigned long dummy)
+static void dn_run_flush(unsigned long dummy)
{
int i;
struct dn_route *rt, *next;
@@ -1423,7 +1423,7 @@ e_neighbour:
goto done;
}
-int dn_route_input(struct sk_buff *skb)
+static int dn_route_input(struct sk_buff *skb)
{
struct dn_route *rt;
struct dn_skb_cb *cb = DN_SKB_CB(skb);
diff --git a/net/dsa/mv88e6060.c b/net/dsa/mv88e6060.c
index 54068ef..0f69224 100644
--- a/net/dsa/mv88e6060.c
+++ b/net/dsa/mv88e6060.c
@@ -273,14 +273,14 @@ static struct dsa_switch_driver mv88e6060_switch_driver = {
.poll_link = mv88e6060_poll_link,
};
-int __init mv88e6060_init(void)
+static int __init mv88e6060_init(void)
{
register_switch_driver(&mv88e6060_switch_driver);
return 0;
}
module_init(mv88e6060_init);
-void __exit mv88e6060_cleanup(void)
+static void __exit mv88e6060_cleanup(void)
{
unregister_switch_driver(&mv88e6060_switch_driver);
}
diff --git a/net/dsa/mv88e6123_61_65.c b/net/dsa/mv88e6123_61_65.c
index 555b164..ec8c6a0 100644
--- a/net/dsa/mv88e6123_61_65.c
+++ b/net/dsa/mv88e6123_61_65.c
@@ -407,14 +407,14 @@ static struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
.get_sset_count = mv88e6123_61_65_get_sset_count,
};
-int __init mv88e6123_61_65_init(void)
+static int __init mv88e6123_61_65_init(void)
{
register_switch_driver(&mv88e6123_61_65_switch_driver);
return 0;
}
module_init(mv88e6123_61_65_init);
-void __exit mv88e6123_61_65_cleanup(void)
+static void __exit mv88e6123_61_65_cleanup(void)
{
unregister_switch_driver(&mv88e6123_61_65_switch_driver);
}
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 36e01eb..374d46a 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -366,14 +366,14 @@ static struct dsa_switch_driver mv88e6131_switch_driver = {
.get_sset_count = mv88e6131_get_sset_count,
};
-int __init mv88e6131_init(void)
+static int __init mv88e6131_init(void)
{
register_switch_driver(&mv88e6131_switch_driver);
return 0;
}
module_init(mv88e6131_init);
-void __exit mv88e6131_cleanup(void)
+static void __exit mv88e6131_cleanup(void)
{
unregister_switch_driver(&mv88e6131_switch_driver);
}
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 74e439e..ecf4eb2 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -201,7 +201,7 @@ static void irttp_todo_expired(unsigned long data)
*
* Flushes (removes all frames) in transitt-buffer (tx_list)
*/
-void irttp_flush_queues(struct tsap_cb *self)
+static void irttp_flush_queues(struct tsap_cb *self)
{
struct sk_buff* skb;
@@ -1266,9 +1266,9 @@ static void irttp_connect_confirm(void *instance, void *sap,
* Some other device is connecting to this TSAP
*
*/
-void irttp_connect_indication(void *instance, void *sap, struct qos_info *qos,
- __u32 max_seg_size, __u8 max_header_size,
- struct sk_buff *skb)
+static void irttp_connect_indication(void *instance, void *sap,
+ struct qos_info *qos, __u32 max_seg_size, __u8 max_header_size,
+ struct sk_buff *skb)
{
struct tsap_cb *self;
struct lsap_cb *lsap;
@@ -1579,8 +1579,8 @@ EXPORT_SYMBOL(irttp_disconnect_request);
* Disconnect indication, TSAP disconnected by peer?
*
*/
-void irttp_disconnect_indication(void *instance, void *sap, LM_REASON reason,
- struct sk_buff *skb)
+static void irttp_disconnect_indication(void *instance, void *sap,
+ LM_REASON reason, struct sk_buff *skb)
{
struct tsap_cb *self;
@@ -1664,7 +1664,7 @@ static void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb)
* Check if we have any frames to be transmitted, or if we have any
* available credit to give away.
*/
-void irttp_run_rx_queue(struct tsap_cb *self)
+static void irttp_run_rx_queue(struct tsap_cb *self)
{
struct sk_buff *skb;
int more = 0;
diff --git a/net/irda/timer.c b/net/irda/timer.c
index d730099..0335ba0 100644
--- a/net/irda/timer.c
+++ b/net/irda/timer.c
@@ -219,7 +219,7 @@ static void irlap_backoff_timer_expired(void *data)
*
*
*/
-void irlap_media_busy_expired(void* data)
+static void irlap_media_busy_expired(void *data)
{
struct irlap_cb *self = (struct irlap_cb *) data;
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index f6d69da..7639bcc 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -233,10 +233,10 @@ minstrel_get_next_sample(struct minstrel_sta_info *mi)
return sample_ndx;
}
-void
-minstrel_get_rate(void *priv, struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta, void *priv_sta,
- struct sk_buff *skb, struct rate_selection *sel)
+static void minstrel_get_rate(void *priv,
+ struct ieee80211_supported_band *sband,
+ struct ieee80211_sta *sta, void *priv_sta,
+ struct sk_buff *skb, struct rate_selection *sel)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct minstrel_sta_info *mi = priv_sta;
diff --git a/net/phonet/sysctl.c b/net/phonet/sysctl.c
index 600a430..1532042 100644
--- a/net/phonet/sysctl.c
+++ b/net/phonet/sysctl.c
@@ -95,7 +95,7 @@ static struct ctl_table phonet_table[] = {
{ .ctl_name = 0 }
};
-struct ctl_path phonet_ctl_path[] = {
+static struct ctl_path phonet_ctl_path[] = {
{ .procname = "net", .ctl_name = CTL_NET, },
{ .procname = "phonet", .ctl_name = CTL_UNNUMBERED, },
{ },
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c
index 3869a58..0f1218b 100644
--- a/net/rxrpc/ar-connection.c
+++ b/net/rxrpc/ar-connection.c
@@ -826,7 +826,7 @@ static void rxrpc_destroy_connection(struct rxrpc_connection *conn)
/*
* reap dead connections
*/
-void rxrpc_connection_reaper(struct work_struct *work)
+static void rxrpc_connection_reaper(struct work_struct *work)
{
struct rxrpc_connection *conn, *_p;
unsigned long now, earliest, reap_time;
diff --git a/net/rxrpc/ar-connevent.c b/net/rxrpc/ar-connevent.c
index 1ada43d..dc5cb1e 100644
--- a/net/rxrpc/ar-connevent.c
+++ b/net/rxrpc/ar-connevent.c
@@ -126,7 +126,7 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn,
* mark a call as being on a now-secured channel
* - must be called with softirqs disabled
*/
-void rxrpc_call_is_secure(struct rxrpc_call *call)
+static void rxrpc_call_is_secure(struct rxrpc_call *call)
{
_enter("%p", call);
if (call) {
diff --git a/net/rxrpc/ar-security.c b/net/rxrpc/ar-security.c
index 60d1d36..dc62920 100644
--- a/net/rxrpc/ar-security.c
+++ b/net/rxrpc/ar-security.c
@@ -40,7 +40,7 @@ static void rxrpc_security_put(struct rxrpc_security *sec)
/*
* look up an rxrpc security module
*/
-struct rxrpc_security *rxrpc_security_lookup(u8 security_index)
+static struct rxrpc_security *rxrpc_security_lookup(u8 security_index)
{
struct rxrpc_security *sec = NULL;
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 6ab4a2f..2ce3f34 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(unregister_qdisc);
(root qdisc, all its children, children of children etc.)
*/
-struct Qdisc *qdisc_match_from_root(struct Qdisc *root, u32 handle)
+static struct Qdisc *qdisc_match_from_root(struct Qdisc *root, u32 handle)
{
struct Qdisc *q;
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 9a7a8e7..a3334e3 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -69,7 +69,7 @@
* array is only concerned with the reply we are assured that we have
* on extra page for the RPCRMDA header.
*/
-int fast_reg_xdr(struct svcxprt_rdma *xprt,
+static int fast_reg_xdr(struct svcxprt_rdma *xprt,
struct xdr_buf *xdr,
struct svc_rdma_req_map *vec)
{
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 6fb493c..95a5955 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -61,7 +61,7 @@ static int svc_rdma_has_wspace(struct svc_xprt *xprt);
static void rq_cq_reap(struct svcxprt_rdma *xprt);
static void sq_cq_reap(struct svcxprt_rdma *xprt);
-DECLARE_TASKLET(dto_tasklet, dto_tasklet_func, 0UL);
+static DECLARE_TASKLET(dto_tasklet, dto_tasklet_func, 0UL);
static DEFINE_SPINLOCK(dto_lock);
static LIST_HEAD(dto_xprt_q);
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index eb3b1a9..080906c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -705,7 +705,7 @@ static void print_regdomain(const struct ieee80211_regdomain *rd)
print_rd_rules(rd);
}
-void print_regdomain_info(const struct ieee80211_regdomain *rd)
+static void print_regdomain_info(const struct ieee80211_regdomain *rd)
{
printk(KERN_INFO "cfg80211: Regulatory domain: %c%c\n",
rd->alpha2[0], rd->alpha2[1]);
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
samples/markers/probe-example.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/samples/markers/probe-example.c b/samples/markers/probe-example.c
index 2dfb3b3..d816aad 100644
--- a/samples/markers/probe-example.c
+++ b/samples/markers/probe-example.c
@@ -20,7 +20,7 @@ struct probe_data {
marker_probe_func *probe_func;
};
-void probe_subsystem_event(void *probe_data, void *call_data,
+static void probe_subsystem_event(void *probe_data, void *call_data,
const char *format, va_list *args)
{
/* Declare args */
@@ -37,9 +37,9 @@ void probe_subsystem_event(void *probe_data, void *call_data,
/* or count, check rights, serialize data in a buffer */
}
-atomic_t eventb_count = ATOMIC_INIT(0);
+static atomic_t eventb_count = ATOMIC_INIT(0);
-void probe_subsystem_eventb(void *probe_data, void *call_data,
+static void probe_subsystem_eventb(void *probe_data, void *call_data,
const char *format, va_list *args)
{
/* Increment counter */
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
sound/usb/usx2y/usb_stream.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c
index ff23cc1..70b9635 100644
--- a/sound/usb/usx2y/usb_stream.c
+++ b/sound/usb/usx2y/usb_stream.c
@@ -276,7 +276,8 @@ static void subs_set_complete(struct urb **urbs, void (*complete)(struct urb *))
}
}
-int usb_stream_prepare_playback(struct usb_stream_kernel *sk, struct urb *inurb)
+static int usb_stream_prepare_playback(struct usb_stream_kernel *sk,
+ struct urb *inurb)
{
struct usb_stream *s = sk->s;
struct urb *io;
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
virt/kvm/kvm_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index a87f45e..6bf6d90 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -75,7 +75,7 @@ struct dentry *kvm_debugfs_dir;
static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl,
unsigned long arg);
-bool kvm_rebooting;
+static bool kvm_rebooting;
#ifdef KVM_CAP_DEVICE_ASSIGNMENT
static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(struct list_head *head,
Sparse asked whether these could be static.
Signed-off-by: Roel Kluin <[email protected]>
---
drivers/scsi/aic7xxx/aic7xxx_core.c | 2 +-
drivers/scsi/aic7xxx/aic7xxx_osm.c | 3 +-
drivers/scsi/dpt_i2o.c | 2 +-
drivers/scsi/gdth.c | 4 +-
drivers/scsi/hptiop.c | 2 +-
drivers/scsi/initio.c | 23 +++++++++++----------
drivers/scsi/ips.c | 8 ++----
drivers/scsi/megaraid/megaraid_mbox.c | 6 ++--
drivers/scsi/ncr53c8xx.c | 16 +++++++-------
drivers/scsi/osst.c | 12 +++++-----
drivers/scsi/pas16.c | 2 +-
drivers/scsi/scsi_debug.c | 35 +++++++++++++++++----------------
drivers/scsi/scsi_sysfs.c | 4 +-
drivers/scsi/ses.c | 2 +-
drivers/scsi/st.c | 10 ++++----
drivers/scsi/sym53c8xx_2/sym_hipd.c | 6 ++--
drivers/scsi/t128.c | 3 +-
17 files changed, 70 insertions(+), 70 deletions(-)
Note that there are many {DEVICE,DRIVER}_ATTR, but I think they can be static as
well.
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index e6f2bb7..7605720 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -2213,7 +2213,7 @@ ahc_free_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel, int force)
* by the capabilities of the bus connectivity of and sync settings for
* the target.
*/
-const struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_devlimited_syncrate(struct ahc_softc *ahc,
struct ahc_initiator_tinfo *tinfo,
u_int *period, u_int *ppr_options, role_t role)
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index fd2b978..40e5097 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -1147,8 +1147,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
* or forcing transfer negotiations on the next command to any
* target.
*/
-void
-ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc)
+void static ahc_linux_initialize_scsi_bus(struct ahc_softc *ahc)
{
int i;
int numtarg;
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 6194ed5..f76c502 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -3593,7 +3593,7 @@ static int adpt_i2o_systab_send(adpt_hba* pHba)
#ifdef UARTDELAY
-static static void adpt_delay(int millisec)
+static void adpt_delay(int millisec)
{
int i;
for (i = 0; i < millisec; i++) {
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index fb247fd..285cf36 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -440,8 +440,8 @@ static void gdth_scsi_done(struct scsi_cmnd *scp)
scp->scsi_done(scp);
}
-int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
- int timeout, u32 *info)
+static int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd,
+ char *cmnd, int timeout, u32 *info)
{
gdth_ha_str *ha = shost_priv(sdev->host);
Scsi_Cmnd *scp;
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index a48e499..7151964 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -608,7 +608,7 @@ static void hptiop_host_request_callback_itl(struct hptiop_hba *hba, u32 _tag)
hptiop_finish_scsi_req(hba, tag, req);
}
-void hptiop_iop_request_callback_itl(struct hptiop_hba *hba, u32 tag)
+static void hptiop_iop_request_callback_itl(struct hptiop_hba *hba, u32 tag)
{
struct hpt_iop_request_header __iomem *req;
struct hpt_iop_request_ioctl_command __iomem *p;
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index e3f7397..df2c5ea 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -335,7 +335,7 @@ static void initio_se2_instr(unsigned long base, u8 instr)
*
* Enable erase/write state of serial EEPROM
*/
-void initio_se2_ew_en(unsigned long base)
+static void initio_se2_ew_en(unsigned long base)
{
initio_se2_instr(base, 0x30); /* EWEN */
outb(0, base + TUL_NVRAM); /* -CS */
@@ -349,7 +349,7 @@ void initio_se2_ew_en(unsigned long base)
*
* Disable erase/write state of serial EEPROM
*/
-void initio_se2_ew_ds(unsigned long base)
+static void initio_se2_ew_ds(unsigned long base)
{
initio_se2_instr(base, 0); /* EWDS */
outb(0, base + TUL_NVRAM); /* -CS */
@@ -894,7 +894,8 @@ static void initio_unlink_busy_scb(struct initio_host * host, struct scsi_ctrl_b
return;
}
-struct scsi_ctrl_blk *initio_find_busy_scb(struct initio_host * host, u16 tarlun)
+static struct scsi_ctrl_blk *initio_find_busy_scb(struct initio_host *host,
+ u16 tarlun)
{
struct scsi_ctrl_blk *tmp, *prev;
u16 scbp_tarlun;
@@ -932,7 +933,7 @@ static void initio_append_done_scb(struct initio_host * host, struct scsi_ctrl_b
}
}
-struct scsi_ctrl_blk *initio_find_done_scb(struct initio_host * host)
+static struct scsi_ctrl_blk *initio_find_done_scb(struct initio_host *host)
{
struct scsi_ctrl_blk *tmp;
@@ -1670,7 +1671,7 @@ static int initio_state_6(struct initio_host * host)
*
*/
-int initio_state_7(struct initio_host * host)
+static int initio_state_7(struct initio_host *host)
{
int cnt, i;
@@ -1756,7 +1757,7 @@ static int initio_xfer_data_out(struct initio_host * host)
return 0; /* return to OS, wait xfer done , let jas_isr come in */
}
-int initio_xpad_in(struct initio_host * host)
+static int initio_xpad_in(struct initio_host *host)
{
struct scsi_ctrl_blk *scb = host->active;
struct target_control *active_tc = host->active_tc;
@@ -1780,7 +1781,7 @@ int initio_xpad_in(struct initio_host * host)
}
}
-int initio_xpad_out(struct initio_host * host)
+static int initio_xpad_out(struct initio_host *host)
{
struct scsi_ctrl_blk *scb = host->active;
struct target_control *active_tc = host->active_tc;
@@ -1805,7 +1806,7 @@ int initio_xpad_out(struct initio_host * host)
}
}
-int initio_status_msg(struct initio_host * host)
+static int initio_status_msg(struct initio_host *host)
{ /* status & MSG_IN */
struct scsi_ctrl_blk *scb = host->active;
u8 msg;
@@ -1855,7 +1856,7 @@ int initio_status_msg(struct initio_host * host)
/* scsi bus free */
-int int_initio_busfree(struct initio_host * host)
+static int int_initio_busfree(struct initio_host *host)
{
struct scsi_ctrl_blk *scb = host->active;
@@ -1925,7 +1926,7 @@ static int int_initio_scsi_rst(struct initio_host * host)
* and continue processing that command.
*/
-int int_initio_resel(struct initio_host * host)
+static int int_initio_resel(struct initio_host *host)
{
struct scsi_ctrl_blk *scb;
struct target_control *active_tc;
@@ -2381,7 +2382,7 @@ static void initio_select_atn3(struct initio_host * host, struct scsi_ctrl_blk *
* Perform a device reset and abort all pending SCBs for the
* victim device
*/
-int initio_bus_device_reset(struct initio_host * host)
+static int initio_bus_device_reset(struct initio_host *host)
{
struct scsi_ctrl_blk *scb = host->active;
struct target_control *active_tc = host->active_tc;
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index ef683f0..e53c1a4 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -780,7 +780,7 @@ ips_halt(struct notifier_block *nb, ulong event, void *buf)
/* Abort a command (using the new error code stuff) */
/* Note: this routine is called under the io_request_lock */
/****************************************************************************/
-int ips_eh_abort(struct scsi_cmnd *SC)
+static int ips_eh_abort(struct scsi_cmnd *SC)
{
ips_ha_t *ha;
ips_copp_wait_item_t *item;
@@ -1271,8 +1271,7 @@ do_ipsintr(int irq, void *dev_id)
/* ASSUMES interrupts are disabled */
/* */
/****************************************************************************/
-int
-ips_intr_copperhead(ips_ha_t * ha)
+static int ips_intr_copperhead(ips_ha_t *ha)
{
ips_stat_t *sp;
ips_scb_t *scb;
@@ -1335,8 +1334,7 @@ ips_intr_copperhead(ips_ha_t * ha)
/* ASSUMES interrupts are disabled */
/* */
/****************************************************************************/
-int
-ips_intr_morpheus(ips_ha_t * ha)
+static int ips_intr_morpheus(ips_ha_t *ha)
{
ips_stat_t *sp;
ips_scb_t *scb;
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 805bb61..58a7183 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -313,8 +313,8 @@ static struct pci_driver megaraid_pci_driver = {
// definitions for the device attributes for exporting logical drive number
// for a scsi address (Host, Channel, Id, Lun)
-DEVICE_ATTR(megaraid_mbox_app_hndl, S_IRUSR, megaraid_sysfs_show_app_hndl,
- NULL);
+static DEVICE_ATTR(megaraid_mbox_app_hndl, S_IRUSR,
+ megaraid_sysfs_show_app_hndl, NULL);
// Host template initializer for megaraid mbox sysfs device attributes
static struct device_attribute *megaraid_shost_attrs[] = {
@@ -323,7 +323,7 @@ static struct device_attribute *megaraid_shost_attrs[] = {
};
-DEVICE_ATTR(megaraid_mbox_ld, S_IRUSR, megaraid_sysfs_show_ldnum, NULL);
+static DEVICE_ATTR(megaraid_mbox_ld, S_IRUSR, megaraid_sysfs_show_ldnum, NULL);
// Host template initializer for megaraid mbox sysfs device attributes
static struct device_attribute *megaraid_sdev_attrs[] = {
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index 3b7240e..43579f1 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -3442,7 +3442,7 @@ static struct scripth scripth0 __initdata = {
**==========================================================
*/
-void __init ncr_script_fill (struct script * scr, struct scripth * scrh)
+static void __init ncr_script_fill(struct script *scr, struct scripth *scrh)
{
int i;
ncrcmd *p;
@@ -4813,7 +4813,7 @@ static void ncr_detach(struct ncb *np)
**==========================================================
*/
-void ncr_complete (struct ncb *np, struct ccb *cp)
+static void ncr_complete(struct ncb *np, struct ccb *cp)
{
struct scsi_cmnd *cmd;
struct tcb *tp;
@@ -5113,7 +5113,7 @@ static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp)
** The NCR has completed CCBs.
** Look at the DONE QUEUE if enabled, otherwise scan all CCBs
*/
-void ncr_wakeup_done (struct ncb *np)
+static void ncr_wakeup_done(struct ncb *np)
{
struct ccb *cp;
#ifdef SCSI_NCR_CCB_DONE_SUPPORT
@@ -5159,7 +5159,7 @@ void ncr_wakeup_done (struct ncb *np)
/*
** Complete all active CCBs.
*/
-void ncr_wakeup (struct ncb *np, u_long code)
+static void ncr_wakeup(struct ncb *np, u_long code)
{
struct ccb *cp = np->ccb;
@@ -5202,7 +5202,7 @@ static void ncr_chip_reset(struct ncb *np, int delay)
**==========================================================
*/
-void ncr_init (struct ncb *np, int reset, char * msg, u_long code)
+static void ncr_init(struct ncb *np, int reset, char *msg, u_long code)
{
int i;
@@ -5900,7 +5900,7 @@ static void ncr_log_hard_error(struct ncb *np, u16 sist, u_char dstat)
**============================================================
*/
-void ncr_exception (struct ncb *np)
+static void ncr_exception(struct ncb *np)
{
u_char istat, dstat;
u16 sist;
@@ -6083,7 +6083,7 @@ void ncr_exception (struct ncb *np)
**----------------------------------------------------------
*/
-void ncr_int_sto (struct ncb *np)
+static void ncr_int_sto(struct ncb *np)
{
u_long dsa;
struct ccb *cp;
@@ -6689,7 +6689,7 @@ out:
**==========================================================
*/
-void ncr_int_sir (struct ncb *np)
+static void ncr_int_sir(struct ncb *np)
{
u_char scntl3;
u_char chg, ofs, per, fak, wide;
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 0ea78d9..37682d1 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -5615,7 +5615,7 @@ static ssize_t osst_adr_rev_show(struct device *dev,
return l;
}
-DEVICE_ATTR(ADR_rev, S_IRUGO, osst_adr_rev_show, NULL);
+static DEVICE_ATTR(ADR_rev, S_IRUGO, osst_adr_rev_show, NULL);
static ssize_t osst_linux_media_version_show(struct device *dev,
struct device_attribute *attr,
@@ -5629,7 +5629,7 @@ static ssize_t osst_linux_media_version_show(struct device *dev,
return l;
}
-DEVICE_ATTR(media_version, S_IRUGO, osst_linux_media_version_show, NULL);
+static DEVICE_ATTR(media_version, S_IRUGO, osst_linux_media_version_show, NULL);
static ssize_t osst_capacity_show(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -5642,7 +5642,7 @@ static ssize_t osst_capacity_show(struct device *dev,
return l;
}
-DEVICE_ATTR(capacity, S_IRUGO, osst_capacity_show, NULL);
+static DEVICE_ATTR(capacity, S_IRUGO, osst_capacity_show, NULL);
static ssize_t osst_first_data_ppos_show(struct device *dev,
struct device_attribute *attr,
@@ -5656,7 +5656,7 @@ static ssize_t osst_first_data_ppos_show(struct device *dev,
return l;
}
-DEVICE_ATTR(BOT_frame, S_IRUGO, osst_first_data_ppos_show, NULL);
+static DEVICE_ATTR(BOT_frame, S_IRUGO, osst_first_data_ppos_show, NULL);
static ssize_t osst_eod_frame_ppos_show(struct device *dev,
struct device_attribute *attr,
@@ -5670,7 +5670,7 @@ static ssize_t osst_eod_frame_ppos_show(struct device *dev,
return l;
}
-DEVICE_ATTR(EOD_frame, S_IRUGO, osst_eod_frame_ppos_show, NULL);
+static DEVICE_ATTR(EOD_frame, S_IRUGO, osst_eod_frame_ppos_show, NULL);
static ssize_t osst_filemark_cnt_show(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -5683,7 +5683,7 @@ static ssize_t osst_filemark_cnt_show(struct device *dev,
return l;
}
-DEVICE_ATTR(file_count, S_IRUGO, osst_filemark_cnt_show, NULL);
+static DEVICE_ATTR(file_count, S_IRUGO, osst_filemark_cnt_show, NULL);
static struct class *osst_sysfs_class;
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c
index f2018b4..ef99ad2 100644
--- a/drivers/scsi/pas16.c
+++ b/drivers/scsi/pas16.c
@@ -348,7 +348,7 @@ static int __init
*
*/
-void __init pas16_setup(char *str, int *ints)
+static void __init pas16_setup(char *str, int *ints)
{
static int commandline_current = 0;
int i;
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 27c633f..b4bb95f 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2202,7 +2202,7 @@ static ssize_t sdebug_delay_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(delay, S_IRUGO | S_IWUSR, sdebug_delay_show,
+static DRIVER_ATTR(delay, S_IRUGO | S_IWUSR, sdebug_delay_show,
sdebug_delay_store);
static ssize_t sdebug_opts_show(struct device_driver * ddp, char * buf)
@@ -2231,7 +2231,7 @@ opts_done:
scsi_debug_cmnd_count = 0;
return count;
}
-DRIVER_ATTR(opts, S_IRUGO | S_IWUSR, sdebug_opts_show,
+static DRIVER_ATTR(opts, S_IRUGO | S_IWUSR, sdebug_opts_show,
sdebug_opts_store);
static ssize_t sdebug_ptype_show(struct device_driver * ddp, char * buf)
@@ -2249,7 +2249,8 @@ static ssize_t sdebug_ptype_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(ptype, S_IRUGO | S_IWUSR, sdebug_ptype_show, sdebug_ptype_store);
+static DRIVER_ATTR(ptype, S_IRUGO | S_IWUSR, sdebug_ptype_show,
+ sdebug_ptype_store);
static ssize_t sdebug_dsense_show(struct device_driver * ddp, char * buf)
{
@@ -2266,7 +2267,7 @@ static ssize_t sdebug_dsense_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(dsense, S_IRUGO | S_IWUSR, sdebug_dsense_show,
+static DRIVER_ATTR(dsense, S_IRUGO | S_IWUSR, sdebug_dsense_show,
sdebug_dsense_store);
static ssize_t sdebug_fake_rw_show(struct device_driver * ddp, char * buf)
@@ -2284,7 +2285,7 @@ static ssize_t sdebug_fake_rw_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(fake_rw, S_IRUGO | S_IWUSR, sdebug_fake_rw_show,
+static DRIVER_ATTR(fake_rw, S_IRUGO | S_IWUSR, sdebug_fake_rw_show,
sdebug_fake_rw_store);
static ssize_t sdebug_no_lun_0_show(struct device_driver * ddp, char * buf)
@@ -2302,7 +2303,7 @@ static ssize_t sdebug_no_lun_0_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(no_lun_0, S_IRUGO | S_IWUSR, sdebug_no_lun_0_show,
+static DRIVER_ATTR(no_lun_0, S_IRUGO | S_IWUSR, sdebug_no_lun_0_show,
sdebug_no_lun_0_store);
static ssize_t sdebug_num_tgts_show(struct device_driver * ddp, char * buf)
@@ -2321,20 +2322,20 @@ static ssize_t sdebug_num_tgts_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(num_tgts, S_IRUGO | S_IWUSR, sdebug_num_tgts_show,
+static DRIVER_ATTR(num_tgts, S_IRUGO | S_IWUSR, sdebug_num_tgts_show,
sdebug_num_tgts_store);
static ssize_t sdebug_dev_size_mb_show(struct device_driver * ddp, char * buf)
{
return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dev_size_mb);
}
-DRIVER_ATTR(dev_size_mb, S_IRUGO, sdebug_dev_size_mb_show, NULL);
+static DRIVER_ATTR(dev_size_mb, S_IRUGO, sdebug_dev_size_mb_show, NULL);
static ssize_t sdebug_num_parts_show(struct device_driver * ddp, char * buf)
{
return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_parts);
}
-DRIVER_ATTR(num_parts, S_IRUGO, sdebug_num_parts_show, NULL);
+static DRIVER_ATTR(num_parts, S_IRUGO, sdebug_num_parts_show, NULL);
static ssize_t sdebug_every_nth_show(struct device_driver * ddp, char * buf)
{
@@ -2352,7 +2353,7 @@ static ssize_t sdebug_every_nth_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(every_nth, S_IRUGO | S_IWUSR, sdebug_every_nth_show,
+static DRIVER_ATTR(every_nth, S_IRUGO | S_IWUSR, sdebug_every_nth_show,
sdebug_every_nth_store);
static ssize_t sdebug_max_luns_show(struct device_driver * ddp, char * buf)
@@ -2371,14 +2372,14 @@ static ssize_t sdebug_max_luns_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(max_luns, S_IRUGO | S_IWUSR, sdebug_max_luns_show,
+static DRIVER_ATTR(max_luns, S_IRUGO | S_IWUSR, sdebug_max_luns_show,
sdebug_max_luns_store);
static ssize_t sdebug_scsi_level_show(struct device_driver * ddp, char * buf)
{
return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_scsi_level);
}
-DRIVER_ATTR(scsi_level, S_IRUGO, sdebug_scsi_level_show, NULL);
+static DRIVER_ATTR(scsi_level, S_IRUGO, sdebug_scsi_level_show, NULL);
static ssize_t sdebug_virtual_gb_show(struct device_driver * ddp, char * buf)
{
@@ -2398,7 +2399,7 @@ static ssize_t sdebug_virtual_gb_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(virtual_gb, S_IRUGO | S_IWUSR, sdebug_virtual_gb_show,
+static DRIVER_ATTR(virtual_gb, S_IRUGO | S_IWUSR, sdebug_virtual_gb_show,
sdebug_virtual_gb_store);
static ssize_t sdebug_add_host_show(struct device_driver * ddp, char * buf)
@@ -2424,7 +2425,7 @@ static ssize_t sdebug_add_host_store(struct device_driver * ddp,
}
return count;
}
-DRIVER_ATTR(add_host, S_IRUGO | S_IWUSR, sdebug_add_host_show,
+static DRIVER_ATTR(add_host, S_IRUGO | S_IWUSR, sdebug_add_host_show,
sdebug_add_host_store);
static ssize_t sdebug_vpd_use_hostno_show(struct device_driver * ddp,
@@ -2443,14 +2444,14 @@ static ssize_t sdebug_vpd_use_hostno_store(struct device_driver * ddp,
}
return -EINVAL;
}
-DRIVER_ATTR(vpd_use_hostno, S_IRUGO | S_IWUSR, sdebug_vpd_use_hostno_show,
- sdebug_vpd_use_hostno_store);
+static DRIVER_ATTR(vpd_use_hostno, S_IRUGO | S_IWUSR,
+ sdebug_vpd_use_hostno_show, sdebug_vpd_use_hostno_store);
static ssize_t sdebug_sector_size_show(struct device_driver * ddp, char * buf)
{
return scnprintf(buf, PAGE_SIZE, "%u\n", scsi_debug_sector_size);
}
-DRIVER_ATTR(sector_size, S_IRUGO, sdebug_sector_size_show, NULL);
+static DRIVER_ATTR(sector_size, S_IRUGO, sdebug_sector_size_show, NULL);
/* Note: The following function creates attribute files in the
/sys/bus/pseudo/drivers/scsi_debug directory. The advantage of these
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 93c28f3..e34a704 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -195,7 +195,7 @@ show_shost_state(struct device *dev, struct device_attribute *attr, char *buf)
}
/* DEVICE_ATTR(state) clashes with dev_attr_state for sdev */
-struct device_attribute dev_attr_hstate =
+static struct device_attribute dev_attr_hstate =
__ATTR(state, S_IRUGO | S_IWUSR, show_shost_state, store_shost_state);
static ssize_t
@@ -271,7 +271,7 @@ static struct attribute *scsi_sysfs_shost_attrs[] = {
NULL
};
-struct attribute_group scsi_shost_attr_group = {
+static struct attribute_group scsi_shost_attr_group = {
.attrs = scsi_sysfs_shost_attrs,
};
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 1bcf3c3..2642d5d 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -264,7 +264,7 @@ struct ses_host_edev {
struct enclosure_device *edev;
};
-int ses_match_host(struct enclosure_device *edev, void *data)
+static int ses_match_host(struct enclosure_device *edev, void *data)
{
struct ses_host_edev *sed = data;
struct scsi_device *sdev;
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index c959bdc..c2dc969 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4334,7 +4334,7 @@ st_defined_show(struct device *dev, struct device_attribute *attr, char *buf)
return l;
}
-DEVICE_ATTR(defined, S_IRUGO, st_defined_show, NULL);
+static DEVICE_ATTR(defined, S_IRUGO, st_defined_show, NULL);
static ssize_t
st_defblk_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -4346,7 +4346,7 @@ st_defblk_show(struct device *dev, struct device_attribute *attr, char *buf)
return l;
}
-DEVICE_ATTR(default_blksize, S_IRUGO, st_defblk_show, NULL);
+static DEVICE_ATTR(default_blksize, S_IRUGO, st_defblk_show, NULL);
static ssize_t
st_defdensity_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -4360,7 +4360,7 @@ st_defdensity_show(struct device *dev, struct device_attribute *attr, char *buf)
return l;
}
-DEVICE_ATTR(default_density, S_IRUGO, st_defdensity_show, NULL);
+static DEVICE_ATTR(default_density, S_IRUGO, st_defdensity_show, NULL);
static ssize_t
st_defcompression_show(struct device *dev, struct device_attribute *attr,
@@ -4373,7 +4373,7 @@ st_defcompression_show(struct device *dev, struct device_attribute *attr,
return l;
}
-DEVICE_ATTR(default_compression, S_IRUGO, st_defcompression_show, NULL);
+static DEVICE_ATTR(default_compression, S_IRUGO, st_defcompression_show, NULL);
static ssize_t
st_options_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -4414,7 +4414,7 @@ st_options_show(struct device *dev, struct device_attribute *attr, char *buf)
return l;
}
-DEVICE_ATTR(options, S_IRUGO, st_options_show, NULL);
+static DEVICE_ATTR(options, S_IRUGO, st_options_show, NULL);
static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
{
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 98df165..9c545d0 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -3807,7 +3807,7 @@ out_reject:
* a relevant information. :)
*/
-int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp)
+static int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp)
{
int dp_sg, dp_sgmin, resid = 0;
int dp_ofs = 0;
@@ -5267,7 +5267,7 @@ int sym_abort_scsiio(struct sym_hcb *np, struct scsi_cmnd *cmd, int timed_out)
* SCRATCHA is assumed to have been loaded with STARTPOS
* before the SCRIPTS called the C code.
*/
-void sym_complete_error(struct sym_hcb *np, struct sym_ccb *cp)
+static void sym_complete_error(struct sym_hcb *np, struct sym_ccb *cp)
{
struct scsi_device *sdev;
struct scsi_cmnd *cmd;
@@ -5398,7 +5398,7 @@ finish:
* The SCRIPTS processor is running while we are
* completing successful commands.
*/
-void sym_complete_ok (struct sym_hcb *np, struct sym_ccb *cp)
+static void sym_complete_ok(struct sym_hcb *np, struct sym_ccb *cp)
{
struct sym_tcb *tp;
struct sym_lcb *lp;
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c
index 041eaaa..91b93b2 100644
--- a/drivers/scsi/t128.c
+++ b/drivers/scsi/t128.c
@@ -163,7 +163,8 @@ static struct signature {
*
*/
-void __init t128_setup(char *str, int *ints){
+static void __init t128_setup(char *str, int *ints)
+{
static int commandline_current = 0;
int i;
if (ints[0] != 2)
* Roel Kluin ([email protected]) wrote:
> Sparse asked whether these could be static.
>
Yes, I guess they should. But beware that when using trace_mark_tp()
helper within tracepoint probes, the probe functions should *not* be
made static. Making them static would make the compiler thing that
nobody is actually using them, which is false, because they are used
through the declaration made in the marker section. So we should be very
careful when turning probe functions to "static" that an external
reference to that function will be seen.
trace_mark_tp() is the only "weird" case I have seen so far.
Acked-by: Mathieu Desnoyers <[email protected]>
> Signed-off-by: Roel Kluin <[email protected]>
> ---
> samples/markers/probe-example.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/samples/markers/probe-example.c b/samples/markers/probe-example.c
> index 2dfb3b3..d816aad 100644
> --- a/samples/markers/probe-example.c
> +++ b/samples/markers/probe-example.c
> @@ -20,7 +20,7 @@ struct probe_data {
> marker_probe_func *probe_func;
> };
>
> -void probe_subsystem_event(void *probe_data, void *call_data,
> +static void probe_subsystem_event(void *probe_data, void *call_data,
> const char *format, va_list *args)
> {
> /* Declare args */
> @@ -37,9 +37,9 @@ void probe_subsystem_event(void *probe_data, void *call_data,
> /* or count, check rights, serialize data in a buffer */
> }
>
> -atomic_t eventb_count = ATOMIC_INIT(0);
> +static atomic_t eventb_count = ATOMIC_INIT(0);
>
> -void probe_subsystem_eventb(void *probe_data, void *call_data,
> +static void probe_subsystem_eventb(void *probe_data, void *call_data,
> const char *format, va_list *args)
> {
> /* Increment counter */
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
On Tuesday, December 09, 2008 12:49 pm Roel Kluin wrote:
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
Applied to my linux-next branch, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
> Nack:
>
> drivers/i2c/i2c-core.c:EXPORT_SYMBOL(i2c_smbus_process_call);
>
> --
> Jean Delvare
>
Again thanks for reporting, fortunately it appears that this only occurred
in a few other patches.
Roel
On Tue, Dec 9, 2008 at 11:06 AM, Roel Kluin <[email protected]> wrote:
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
> ---
> drivers/net/arcnet/capmode.c | 2 +-
> drivers/net/arcnet/com90xx.c | 2 +-
> drivers/net/atlx/atl1.c | 4 ++--
> drivers/net/cxgb3/vsc8211.c | 2 +-
> drivers/net/irda/ma600-sir.c | 2 +-
> drivers/net/irda/smsc-ircc2.c | 6 +++---
> drivers/net/irda/w83977af_ir.c | 12 ++++++------
> drivers/net/ixgbe/ixgbe_82598.c | 14 +++++++-------
> drivers/net/plip.c | 2 +-
> drivers/net/qlge/qlge_ethtool.c | 2 +-
> drivers/net/qlge/qlge_main.c | 14 ++++++++------
> drivers/net/qlge/qlge_mpi.c | 2 +-
> drivers/net/skfp/skfddi.c | 6 +++---
> drivers/net/tokenring/madgemc.c | 2 +-
> drivers/net/tokenring/proteon.c | 2 +-
> drivers/net/tokenring/skisa.c | 2 +-
> drivers/net/usb/hso.c | 4 ++--
> drivers/net/wan/sbni.c | 4 +---
> drivers/net/wan/x25_asy.c | 2 +-
> drivers/net/wan/z85230.c | 4 ++--
> drivers/net/wireless/airo.c | 2 +-
> drivers/net/wireless/atmel.c | 2 +-
> drivers/net/wireless/b43/phy_a.c | 4 ++--
> drivers/net/wireless/b43/phy_g.c | 16 ++++++++--------
> drivers/net/wireless/ipw2100.c | 6 +++---
> drivers/net/wireless/prism54/islpci_hotplug.c | 12 ++++--------
> drivers/net/wireless/ray_cs.c | 2 +-
> 27 files changed, 65 insertions(+), 69 deletions(-)
>
> hmm, still a lot. should this be split in drivers/net/* ?
>
> diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
> index 02cb8f1..c7e9b58 100644
> --- a/drivers/net/arcnet/capmode.c
> +++ b/drivers/net/arcnet/capmode.c
> @@ -61,7 +61,7 @@ static struct ArcProto capmode_proto =
> };
>
>
> -void arcnet_cap_init(void)
> +static void arcnet_cap_init(void)
> {
> int count;
>
> diff --git a/drivers/net/arcnet/com90xx.c b/drivers/net/arcnet/com90xx.c
> index 0d45553..680a530 100644
> --- a/drivers/net/arcnet/com90xx.c
> +++ b/drivers/net/arcnet/com90xx.c
> @@ -583,7 +583,7 @@ static void com90xx_setmask(struct net_device *dev, int mask)
> *
> * However, it does make sure the card is in a defined state.
> */
> -int com90xx_reset(struct net_device *dev, int really_reset)
> +static int com90xx_reset(struct net_device *dev, int really_reset)
> {
> struct arcnet_local *lp = dev->priv;
> short ioaddr = dev->base_addr;
> diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
> index aef403d..8f82a8c 100644
> --- a/drivers/net/atlx/atl1.c
> +++ b/drivers/net/atlx/atl1.c
> @@ -195,7 +195,7 @@ static int __devinit atl1_validate_option(int *value, struct atl1_option *opt,
> * value exists, a default value is used. The final value is stored
> * in a variable in the adapter structure.
> */
> -void __devinit atl1_check_options(struct atl1_adapter *adapter)
> +static void __devinit atl1_check_options(struct atl1_adapter *adapter)
> {
> struct pci_dev *pdev = adapter->pdev;
> int bd = adapter->bd_number;
> @@ -523,7 +523,7 @@ static int atl1_get_permanent_address(struct atl1_hw *hw)
> * Reads the adapter's MAC address from the EEPROM
> * hw - Struct containing variables accessed by shared code
> */
> -s32 atl1_read_mac_addr(struct atl1_hw *hw)
> +static s32 atl1_read_mac_addr(struct atl1_hw *hw)
> {
> u16 i;
>
> diff --git a/drivers/net/cxgb3/vsc8211.c b/drivers/net/cxgb3/vsc8211.c
> index 33f956b..722034b 100644
> --- a/drivers/net/cxgb3/vsc8211.c
> +++ b/drivers/net/cxgb3/vsc8211.c
> @@ -292,7 +292,7 @@ static int vsc8211_set_automdi(struct cphy *phy, int enable)
> return 0;
> }
>
> -int vsc8211_set_speed_duplex(struct cphy *phy, int speed, int duplex)
> +static int vsc8211_set_speed_duplex(struct cphy *phy, int speed, int duplex)
> {
> int err;
>
> diff --git a/drivers/net/irda/ma600-sir.c b/drivers/net/irda/ma600-sir.c
> index 1ceed9c..e912164 100644
> --- a/drivers/net/irda/ma600-sir.c
> +++ b/drivers/net/irda/ma600-sir.c
> @@ -236,7 +236,7 @@ static int ma600_change_speed(struct sir_dev *dev, unsigned speed)
> * avoid the state machine complexity before we get things working
> */
>
> -int ma600_reset(struct sir_dev *dev)
> +static int ma600_reset(struct sir_dev *dev)
> {
> IRDA_DEBUG(2, "%s()\n", __func__);
>
> diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
> index b5360fe..5d09e15 100644
> --- a/drivers/net/irda/smsc-ircc2.c
> +++ b/drivers/net/irda/smsc-ircc2.c
> @@ -872,7 +872,7 @@ static void smsc_ircc_timeout(struct net_device *dev)
> * waits until the next transmit interrupt, and continues until the
> * frame is transmitted.
> */
> -int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
> +static int smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
> {
> struct smsc_ircc_cb *self;
> unsigned long flags;
> @@ -1128,7 +1128,7 @@ static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed)
> * Set speed of IrDA port to specified baudrate
> *
> */
> -void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
> +static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
> {
> int iobase;
> int fcr; /* FIFO control reg */
> @@ -1894,7 +1894,7 @@ static void __exit smsc_ircc_cleanup(void)
> * This function *must* be called with spinlock held, because it may
> * be called from the irq handler (via smsc_ircc_change_speed()). - Jean II
> */
> -void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
> +static void smsc_ircc_sir_start(struct smsc_ircc_cb *self)
> {
> struct net_device *dev;
> int fir_base, sir_base;
> diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
> index 002a6d7..b3c6768 100644
> --- a/drivers/net/irda/w83977af_ir.c
> +++ b/drivers/net/irda/w83977af_ir.c
> @@ -147,7 +147,7 @@ static void __exit w83977af_cleanup(void)
> * Open driver instance
> *
> */
> -int w83977af_open(int i, unsigned int iobase, unsigned int irq,
> +static int w83977af_open(int i, unsigned int iobase, unsigned int irq,
> unsigned int dma)
> {
> struct net_device *dev;
> @@ -310,7 +310,7 @@ static int w83977af_close(struct w83977af_ir *self)
> return 0;
> }
>
> -int w83977af_probe( int iobase, int irq, int dma)
> +static int w83977af_probe(int iobase, int irq, int dma)
> {
> int version;
> int i;
> @@ -409,7 +409,7 @@ int w83977af_probe( int iobase, int irq, int dma)
> return -1;
> }
>
> -void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
> +static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
> {
> int ir_mode = HCR_SIR;
> int iobase;
> @@ -489,7 +489,7 @@ void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
> * Sets up a DMA transfer to send the current frame.
> *
> */
> -int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
> +static int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
> {
> struct w83977af_ir *self;
> __s32 speed;
> @@ -731,7 +731,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
> * if it starts to receive a frame.
> *
> */
> -int w83977af_dma_receive(struct w83977af_ir *self)
> +static int w83977af_dma_receive(struct w83977af_ir *self)
> {
> int iobase;
> __u8 set;
> @@ -803,7 +803,7 @@ int w83977af_dma_receive(struct w83977af_ir *self)
> * Finished with receiving a frame
> *
> */
> -int w83977af_dma_receive_complete(struct w83977af_ir *self)
> +static int w83977af_dma_receive_complete(struct w83977af_ir *self)
> {
> struct sk_buff *skb;
> struct st_fifo *st_fifo;
> diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
> index 7cddcfb..0645140 100644
> --- a/drivers/net/ixgbe/ixgbe_82598.c
> +++ b/drivers/net/ixgbe/ixgbe_82598.c
> @@ -146,7 +146,7 @@ static s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw,
> *
> * Determines the link capabilities by reading the AUTOC register.
> **/
> -s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw,
> +static s32 ixgbe_get_copper_link_capabilities_82598(struct ixgbe_hw *hw,
> ixgbe_link_speed *speed,
> bool *autoneg)
> {
> @@ -205,7 +205,7 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
> * Configures the flow control settings based on SW configuration. This
> * function is used for 802.3x flow control configuration only.
> **/
> -s32 ixgbe_setup_fc_82598(struct ixgbe_hw *hw, s32 packetbuf_num)
> +static s32 ixgbe_setup_fc_82598(struct ixgbe_hw *hw, s32 packetbuf_num)
> {
> u32 frctl_reg;
> u32 rmcs_reg;
> @@ -648,7 +648,7 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw)
> * @rar: receive address register index to associate with a VMDq index
> * @vmdq: VMDq set index
> **/
> -s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
> +static s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
> {
> u32 rar_high;
>
> @@ -692,7 +692,7 @@ static s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
> *
> * Turn on/off specified VLAN in the VLAN filter table.
> **/
> -s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind,
> +static s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind,
> bool vlan_on)
> {
> u32 regindex;
> @@ -816,7 +816,7 @@ static s32 ixgbe_blink_led_stop_82598(struct ixgbe_hw *hw, u32 index)
> *
> * Performs read operation to Atlas analog register specified.
> **/
> -s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val)
> +static s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val)
> {
> u32 atlas_ctl;
>
> @@ -838,7 +838,7 @@ s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val)
> *
> * Performs write operation to Atlas analog register specified.
> **/
> -s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val)
> +static s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val)
> {
> u32 atlas_ctl;
>
> @@ -856,7 +856,7 @@ s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val)
> *
> * Determines physical layer capabilities of the current configuration.
> **/
> -s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
> +static s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
> {
> s32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
>
> diff --git a/drivers/net/plip.c b/drivers/net/plip.c
> index 1e96542..9781881 100644
> --- a/drivers/net/plip.c
> +++ b/drivers/net/plip.c
> @@ -1018,7 +1018,7 @@ plip_hard_header(struct sk_buff *skb, struct net_device *dev,
> return ret;
> }
>
> -int plip_hard_header_cache(const struct neighbour *neigh,
> +static int plip_hard_header_cache(const struct neighbour *neigh,
> struct hh_cache *hh)
> {
> int ret;
> diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c
> index b62fbd4..eefb81b 100644
> --- a/drivers/net/qlge/qlge_ethtool.c
> +++ b/drivers/net/qlge/qlge_ethtool.c
> @@ -97,7 +97,7 @@ exit:
> return status;
> }
>
> -void ql_update_stats(struct ql_adapter *qdev)
> +static void ql_update_stats(struct ql_adapter *qdev)
> {
> u32 i;
> u64 data;
> diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
> index b83a9c9..7f9c6a8 100644
> --- a/drivers/net/qlge/qlge_main.c
> +++ b/drivers/net/qlge/qlge_main.c
> @@ -643,7 +643,7 @@ static void ql_enable_all_completion_interrupts(struct ql_adapter *qdev)
>
> }
>
> -int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data)
> +static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data)
> {
> int status = 0;
> /* wait for reg to come ready */
> @@ -833,7 +833,7 @@ end:
> }
>
> /* Get the next large buffer. */
> -struct bq_desc *ql_get_curr_lbuf(struct rx_ring *rx_ring)
> +static struct bq_desc *ql_get_curr_lbuf(struct rx_ring *rx_ring)
> {
> struct bq_desc *lbq_desc = &rx_ring->lbq[rx_ring->lbq_curr_idx];
> rx_ring->lbq_curr_idx++;
> @@ -844,7 +844,7 @@ struct bq_desc *ql_get_curr_lbuf(struct rx_ring *rx_ring)
> }
>
> /* Get the next small buffer. */
> -struct bq_desc *ql_get_curr_sbuf(struct rx_ring *rx_ring)
> +static struct bq_desc *ql_get_curr_sbuf(struct rx_ring *rx_ring)
> {
> struct bq_desc *sbq_desc = &rx_ring->sbq[rx_ring->sbq_curr_idx];
> rx_ring->sbq_curr_idx++;
> @@ -1167,7 +1167,7 @@ map_error:
> return NETDEV_TX_BUSY;
> }
>
> -void ql_realign_skb(struct sk_buff *skb, int len)
> +static void ql_realign_skb(struct sk_buff *skb, int len)
> {
> void *temp_addr = skb->data;
>
> @@ -2071,7 +2071,8 @@ err:
> return -ENOMEM;
> }
>
> -void ql_free_lbq_buffers(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> +static void ql_free_lbq_buffers(struct ql_adapter *qdev,
> + struct rx_ring *rx_ring)
> {
> int i;
> struct bq_desc *lbq_desc;
> @@ -2134,7 +2135,8 @@ mem_error:
> return -ENOMEM;
> }
>
> -void ql_free_sbq_buffers(struct ql_adapter *qdev, struct rx_ring *rx_ring)
> +static void ql_free_sbq_buffers(struct ql_adapter *qdev,
> + struct rx_ring *rx_ring)
> {
> int i;
> struct bq_desc *sbq_desc;
> diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
> index 24fe344..fa31891 100644
> --- a/drivers/net/qlge/qlge_mpi.c
> +++ b/drivers/net/qlge/qlge_mpi.c
> @@ -19,7 +19,7 @@ exit:
> return status;
> }
>
> -int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
> +static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
> {
> int i, status;
>
> diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
> index a2b092b..9f641f2 100644
> --- a/drivers/net/skfp/skfddi.c
> +++ b/drivers/net/skfp/skfddi.c
> @@ -612,7 +612,7 @@ static int skfp_close(struct net_device *dev)
> * Interrupts are disabled, then reenabled at the adapter.
> */
>
> -irqreturn_t skfp_interrupt(int irq, void *dev_id)
> +static irqreturn_t skfp_interrupt(int irq, void *dev_id)
> {
> struct net_device *dev = dev_id;
> struct s_smc *smc; /* private board structure pointer */
> @@ -679,7 +679,7 @@ irqreturn_t skfp_interrupt(int irq, void *dev_id)
> * independent.
> *
> */
> -struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev)
> +static struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev)
> {
> struct s_smc *bp = netdev_priv(dev);
>
> @@ -1224,7 +1224,7 @@ static void send_queued_packets(struct s_smc *smc)
> * Verify if the source address is set. Insert it if necessary.
> *
> ************************/
> -void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr)
> +static void CheckSourceAddress(unsigned char *frame, unsigned char *hw_addr)
> {
> unsigned char SRBit;
>
> diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
> index c9c5a2b..0d2f58c 100644
> --- a/drivers/net/tokenring/madgemc.c
> +++ b/drivers/net/tokenring/madgemc.c
> @@ -467,7 +467,7 @@ static irqreturn_t madgemc_interrupt(int irq, void *dev_id)
> * zero to leave the TMS NSELOUT bits unaffected.
> *
> */
> -unsigned short madgemc_setnselout_pins(struct net_device *dev)
> +static unsigned short madgemc_setnselout_pins(struct net_device *dev)
> {
> unsigned char reg1;
> struct net_local *tp = netdev_priv(dev);
> diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
> index 00ea945..74c4d6a 100644
> --- a/drivers/net/tokenring/proteon.c
> +++ b/drivers/net/tokenring/proteon.c
> @@ -284,7 +284,7 @@ static void proteon_read_eeprom(struct net_device *dev)
> dev->dev_addr[i] = proteon_sifreadw(dev, SIFINC) >> 8;
> }
>
> -unsigned short proteon_setnselout_pins(struct net_device *dev)
> +static unsigned short proteon_setnselout_pins(struct net_device *dev)
> {
> return 0;
> }
> diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
> index 41b6999..bc39f29 100644
> --- a/drivers/net/tokenring/skisa.c
> +++ b/drivers/net/tokenring/skisa.c
> @@ -301,7 +301,7 @@ static void sk_isa_read_eeprom(struct net_device *dev)
> dev->dev_addr[i] = sk_isa_sifreadw(dev, SIFINC) >> 8;
> }
>
> -unsigned short sk_isa_setnselout_pins(struct net_device *dev)
> +static unsigned short sk_isa_setnselout_pins(struct net_device *dev)
> {
> return 0;
> }
> diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> index 8e90891..4cb807e 100644
> --- a/drivers/net/usb/hso.c
> +++ b/drivers/net/usb/hso.c
> @@ -1189,7 +1189,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
> * This needs to be a tasklet otherwise we will
> * end up recursively calling this function.
> */
> -void hso_unthrottle_tasklet(struct hso_serial *serial)
> +static void hso_unthrottle_tasklet(struct hso_serial *serial)
> {
> unsigned long flags;
>
> @@ -1208,7 +1208,7 @@ static void hso_unthrottle(struct tty_struct *tty)
> tasklet_hi_schedule(&serial->unthrottle_tasklet);
> }
>
> -void hso_unthrottle_workfunc(struct work_struct *work)
> +static void hso_unthrottle_workfunc(struct work_struct *work)
> {
> struct hso_serial *serial =
> container_of(work, struct hso_serial,
> diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
> index ee51b6a..ceb4a1b 100644
> --- a/drivers/net/wan/sbni.c
> +++ b/drivers/net/wan/sbni.c
> @@ -286,9 +286,7 @@ static int __init sbni_init(struct net_device *dev)
> return -ENODEV;
> }
>
> -
> -int __init
> -sbni_pci_probe( struct net_device *dev )
> +static int __init sbni_pci_probe(struct net_device *dev)
> {
> struct pci_dev *pdev = NULL;
>
> diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
> index 2a6c7a6..348ab86 100644
> --- a/drivers/net/wan/x25_asy.c
> +++ b/drivers/net/wan/x25_asy.c
> @@ -624,7 +624,7 @@ static struct net_device_stats *x25_asy_get_stats(struct net_device *dev)
> * STANDARD X.25 ENCAPSULATION *
> ************************************************************************/
>
> -int x25_asy_esc(unsigned char *s, unsigned char *d, int len)
> +static int x25_asy_esc(unsigned char *s, unsigned char *d, int len)
> {
> unsigned char *ptr = d;
> unsigned char c;
> diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
> index 5bf7e01..6a2751c 100644
> --- a/drivers/net/wan/z85230.c
> +++ b/drivers/net/wan/z85230.c
> @@ -601,7 +601,7 @@ static void z8530_dma_status(struct z8530_channel *chan)
> write_zsctrl(chan, RES_H_IUS);
> }
>
> -struct z8530_irqhandler z8530_dma_sync=
> +static struct z8530_irqhandler z8530_dma_sync =
> {
> z8530_dma_rx,
> z8530_dma_tx,
> @@ -610,7 +610,7 @@ struct z8530_irqhandler z8530_dma_sync=
>
> EXPORT_SYMBOL(z8530_dma_sync);
>
> -struct z8530_irqhandler z8530_txdma_sync=
> +static struct z8530_irqhandler z8530_txdma_sync =
> {
> z8530_rx,
> z8530_dma_tx,
> diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
> index 370133e..20edc3a 100644
> --- a/drivers/net/wireless/airo.c
> +++ b/drivers/net/wireless/airo.c
> @@ -3611,7 +3611,7 @@ badrx:
> }
> }
>
> -void mpi_receive_802_11 (struct airo_info *ai)
> +static void mpi_receive_802_11(struct airo_info *ai)
> {
> RxFid rxd;
> struct sk_buff *skb = NULL;
> diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
> index ecb02bd..f5b22da 100644
> --- a/drivers/net/wireless/atmel.c
> +++ b/drivers/net/wireless/atmel.c
> @@ -3183,7 +3183,7 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)
> }
> }
>
> -void atmel_join_bss(struct atmel_private *priv, int bss_index)
> +static void atmel_join_bss(struct atmel_private *priv, int bss_index)
> {
> struct bss_info *bss = &priv->BSSinfo[bss_index];
>
> diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c
> index 0f1a84c..7fe9d17 100644
> --- a/drivers/net/wireless/b43/phy_a.c
> +++ b/drivers/net/wireless/b43/phy_a.c
> @@ -77,7 +77,7 @@ static s8 b43_aphy_estimate_power_out(struct b43_wldev *dev, s8 tssi)
> }
> #endif
>
> -void b43_radio_set_tx_iq(struct b43_wldev *dev)
> +static void b43_radio_set_tx_iq(struct b43_wldev *dev)
> {
> static const u8 data_high[5] = { 0x00, 0x40, 0x80, 0x90, 0xD0 };
> static const u8 data_low[5] = { 0x00, 0x01, 0x05, 0x06, 0x0A };
> @@ -147,7 +147,7 @@ static void aphy_channel_switch(struct b43_wldev *dev, unsigned int channel)
> //FIXME b43_phy_xmitpower(dev);
> }
>
> -void b43_radio_init2060(struct b43_wldev *dev)
> +static void b43_radio_init2060(struct b43_wldev *dev)
> {
> b43_radio_write16(dev, 0x0004, 0x00C0);
> b43_radio_write16(dev, 0x0005, 0x0008);
> diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
> index 232181f..f07e1d3 100644
> --- a/drivers/net/wireless/b43/phy_g.c
> +++ b/drivers/net/wireless/b43/phy_g.c
> @@ -54,7 +54,7 @@ static const s8 b43_tssi2dbm_g_table[] = {
> -20, -20, -20, -20,
> };
>
> -const u8 b43_radio_channel_codes_bg[] = {
> +static const u8 b43_radio_channel_codes_bg[] = {
> 12, 17, 22, 27,
> 32, 37, 42, 47,
> 52, 57, 62, 67,
> @@ -215,7 +215,7 @@ void b43_gphy_set_baseband_attenuation(struct b43_wldev *dev,
> }
>
> /* Adjust the transmission power output (G-PHY) */
> -void b43_set_txpower_g(struct b43_wldev *dev,
> +static void b43_set_txpower_g(struct b43_wldev *dev,
> const struct b43_bbatt *bbatt,
> const struct b43_rfatt *rfatt, u8 tx_control)
> {
> @@ -383,14 +383,14 @@ static void b43_set_original_gains(struct b43_wldev *dev)
> }
>
> /* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
> -void b43_nrssi_hw_write(struct b43_wldev *dev, u16 offset, s16 val)
> +static void b43_nrssi_hw_write(struct b43_wldev *dev, u16 offset, s16 val)
> {
> b43_phy_write(dev, B43_PHY_NRSSILT_CTRL, offset);
> b43_phy_write(dev, B43_PHY_NRSSILT_DATA, (u16) val);
> }
>
> /* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
> -s16 b43_nrssi_hw_read(struct b43_wldev *dev, u16 offset)
> +static s16 b43_nrssi_hw_read(struct b43_wldev *dev, u16 offset)
> {
> u16 val;
>
> @@ -401,7 +401,7 @@ s16 b43_nrssi_hw_read(struct b43_wldev *dev, u16 offset)
> }
>
> /* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
> -void b43_nrssi_hw_update(struct b43_wldev *dev, u16 val)
> +static void b43_nrssi_hw_update(struct b43_wldev *dev, u16 val)
> {
> u16 i;
> s16 tmp;
> @@ -415,7 +415,7 @@ void b43_nrssi_hw_update(struct b43_wldev *dev, u16 val)
> }
>
> /* http://bcm-specs.sipsolutions.net/NRSSILookupTable */
> -void b43_nrssi_mem_update(struct b43_wldev *dev)
> +static void b43_nrssi_mem_update(struct b43_wldev *dev)
> {
> struct b43_phy_g *gphy = dev->phy.g;
> s16 i, delta;
> @@ -589,7 +589,7 @@ static void b43_calc_nrssi_offset(struct b43_wldev *dev)
> b43_phy_write(dev, 0x0811, backup[1]);
> }
>
> -void b43_calc_nrssi_slope(struct b43_wldev *dev)
> +static void b43_calc_nrssi_slope(struct b43_wldev *dev)
> {
> struct b43_phy *phy = &dev->phy;
> struct b43_phy_g *gphy = phy->g;
> @@ -1354,7 +1354,7 @@ struct init2050_saved_values {
> u16 phy_syncctl;
> };
>
> -u16 b43_radio_init2050(struct b43_wldev *dev)
> +static u16 b43_radio_init2050(struct b43_wldev *dev)
> {
> struct b43_phy *phy = &dev->phy;
> struct init2050_saved_values sav;
> diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
> index bca7481..a3aa1de 100644
> --- a/drivers/net/wireless/ipw2100.c
> +++ b/drivers/net/wireless/ipw2100.c
> @@ -5271,21 +5271,21 @@ static int ipw2100_set_ibss_beacon_interval(struct ipw2100_priv *priv,
> return 0;
> }
>
> -void ipw2100_queues_initialize(struct ipw2100_priv *priv)
> +static void ipw2100_queues_initialize(struct ipw2100_priv *priv)
> {
> ipw2100_tx_initialize(priv);
> ipw2100_rx_initialize(priv);
> ipw2100_msg_initialize(priv);
> }
>
> -void ipw2100_queues_free(struct ipw2100_priv *priv)
> +static void ipw2100_queues_free(struct ipw2100_priv *priv)
> {
> ipw2100_tx_free(priv);
> ipw2100_rx_free(priv);
> ipw2100_msg_free(priv);
> }
>
> -int ipw2100_queues_allocate(struct ipw2100_priv *priv)
> +static int ipw2100_queues_allocate(struct ipw2100_priv *priv)
> {
> if (ipw2100_tx_allocate(priv) ||
> ipw2100_rx_allocate(priv) || ipw2100_msg_allocate(priv))
> diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
> index af2e4f2..ddb21b7 100644
> --- a/drivers/net/wireless/prism54/islpci_hotplug.c
> +++ b/drivers/net/wireless/prism54/islpci_hotplug.c
> @@ -93,8 +93,7 @@ static struct pci_driver prism54_driver = {
> Module initialization functions
> ******************************************************************************/
>
> -int
> -prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> +int static prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> {
> struct net_device *ndev;
> u8 latency_tmr;
> @@ -216,8 +215,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> static volatile int __in_cleanup_module = 0;
>
> /* this one removes one(!!) instance only */
> -void
> -prism54_remove(struct pci_dev *pdev)
> +void static prism54_remove(struct pci_dev *pdev)
> {
> struct net_device *ndev = pci_get_drvdata(pdev);
> islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
> @@ -259,8 +257,7 @@ prism54_remove(struct pci_dev *pdev)
> pci_disable_device(pdev);
> }
>
> -int
> -prism54_suspend(struct pci_dev *pdev, pm_message_t state)
> +int static prism54_suspend(struct pci_dev *pdev, pm_message_t state)
> {
> struct net_device *ndev = pci_get_drvdata(pdev);
> islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
> @@ -282,8 +279,7 @@ prism54_suspend(struct pci_dev *pdev, pm_message_t state)
> return 0;
> }
>
> -int
> -prism54_resume(struct pci_dev *pdev)
> +int static prism54_resume(struct pci_dev *pdev)
> {
> struct net_device *ndev = pci_get_drvdata(pdev);
> islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
> diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
> index 1404a57..1512b17 100644
> --- a/drivers/net/wireless/ray_cs.c
> +++ b/drivers/net/wireless/ray_cs.c
> @@ -829,7 +829,7 @@ static int ray_resume(struct pcmcia_device *link)
> }
>
> /*===========================================================================*/
> -int ray_dev_init(struct net_device *dev)
> +static int ray_dev_init(struct net_device *dev)
> {
> #ifdef RAY_IMMEDIATE_INIT
> int i;
>
>
Adding Netdev...
Please make sure you CC netdev for networking patches.
--
Cheers,
Jeff
Roel Kluin wrote:
> Sparse asked whether these could be static.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
Avi Kivity wrote:
> Roel Kluin wrote:
>> Sparse asked whether these could be static.
>>
>
> Applied, thanks.
>
Er, actually I already had a patch in my queue for this.
--
error compiling committee.c: too many arguments to function
At Tue, 09 Dec 2008 23:26:05 +0100,
Roel Kluin wrote:
>
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
Applied now. Thanks!
Takashi
> ---
> sound/usb/usx2y/usb_stream.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c
> index ff23cc1..70b9635 100644
> --- a/sound/usb/usx2y/usb_stream.c
> +++ b/sound/usb/usx2y/usb_stream.c
> @@ -276,7 +276,8 @@ static void subs_set_complete(struct urb **urbs, void (*complete)(struct urb *))
> }
> }
>
> -int usb_stream_prepare_playback(struct usb_stream_kernel *sk, struct urb *inurb)
> +static int usb_stream_prepare_playback(struct usb_stream_kernel *sk,
> + struct urb *inurb)
> {
> struct usb_stream *s = sk->s;
> struct urb *io;
>
On Tue, Dec 09 2008, Roel Kluin wrote:
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
> ---
> block/blk-softirq.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/block/blk-softirq.c b/block/blk-softirq.c
> index e660d26..ce0efc6 100644
> --- a/block/blk-softirq.c
> +++ b/block/blk-softirq.c
> @@ -161,7 +161,7 @@ void blk_complete_request(struct request *req)
> }
> EXPORT_SYMBOL(blk_complete_request);
>
> -__init int blk_softirq_init(void)
> +static __init int blk_softirq_init(void)
> {
> int i;
>
Applied to for-2.6.29, thanks.
--
Jens Axboe
From: Roel Kluin <[email protected]>
Date: Tue, 09 Dec 2008 23:20:24 +0100
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
net-next-2.6 already had some of these fixed already, so
I kicked those parts out and applied the rest of your
patch.
Thanks!
On Tue, 9 Dec 2008, Roel Kluin wrote:
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Armin Schindler <[email protected]>
> ---
> drivers/isdn/hardware/eicon/di.c | 4 +-
> drivers/isdn/hardware/eicon/message.c | 67 ++++++++++++++++---------------
On Tuesday 09 December 2008 10:44:41 Roel Kluin wrote:
> Sparse asked whether these could be static.
>
Applied to 'next' branch, thank you Roel.
--
Dmitry
On Tue, 09 Dec 2008 17:55:21 +0100 Roel Kluin wrote:
> Sparse asked whether these could be static.
>
> Signed-off-by: Roel Kluin <[email protected]>
> ---
Acked-by: Randy Dunlap <[email protected]>
Thanks.
> Documentation/DocBook/procfs_example.c | 2 +-
> Documentation/connector/cn_test.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/DocBook/procfs_example.c b/Documentation/DocBook/procfs_example.c
> index 8c6396e..db06753 100644
> --- a/Documentation/DocBook/procfs_example.c
> +++ b/Documentation/DocBook/procfs_example.c
> @@ -54,7 +54,7 @@ static struct proc_dir_entry *example_dir, *foo_file,
> *bar_file, *jiffies_file, *symlink;
>
>
> -struct fb_data_t foo_data, bar_data;
> +static struct fb_data_t foo_data, bar_data;
>
>
> static int proc_read_jiffies(char *page, char **start,
> diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
> index be7af14..b984b5b 100644
> --- a/Documentation/connector/cn_test.c
> +++ b/Documentation/connector/cn_test.c
> @@ -32,7 +32,7 @@ static char cn_test_name[] = "cn_test";
> static struct sock *nls;
> static struct timer_list cn_test_timer;
>
> -void cn_test_callback(void *data)
> +static void cn_test_callback(void *data)
> {
> struct cn_msg *msg = (struct cn_msg *)data;
>
---
~Randy