Make static
Subsystems (65)
PATCH 1/33 Documentation: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- Documentation/DocBook/procfs_example.c | 2 +- Documentation/connector/cn_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/DocBook/procfs_example.c +1 -1
@@ -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,
Documentation/connector/cn_test.c +1 -1
@@ -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;
PATCH 2/33 x86: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
arch/x86/kernel/efi.c +1 -1
@@ -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)
arch/x86/kernel/hpet.c +1 -1
@@ -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 {
arch/x86/kernel/io_apic.c +1 -1
@@ -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,
arch/x86/kernel/microcode_core.c +2 -2
@@ -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 ;
arch/x86/kernel/microcode_intel.c +1 -1
@@ -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,
arch/x86/kernel/setup.c +2 -1
@@ -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 ;
arch/x86/kvm/vmx.c +1 -1
@@ -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;
arch/x86/pci/legacy.c +1 -1
@@ -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 ();
cover Make static
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
PATCH 3/33 block: Make static
Sparse asked whether these could be static.
--- block/blk-softirq.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
block/blk-softirq.c +1 -1
@@ -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;
PATCH 4/33 drivers/acpi: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/acpi/ec.c | 8 ++++---- drivers/acpi/pci_link.c | 2 +- drivers/acpi/video_detect.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/acpi/ec.c +4 -4
@@ -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 ;
drivers/acpi/pci_link.c +1 -1
@@ -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 ;
drivers/acpi/video_detect.c +2 -2
@@ -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 ;
PATCH 5/33 drivers/block/floppy: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/block/floppy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/block/floppy.c +1 -1
@@ -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) {
PATCH 6/33 drivers/char: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/char/defkeymap.c_shipped | 6 +++--- drivers/char/keyboard.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/char/defkeymap.c_shipped +3 -3
@@ -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,
drivers/char/keyboard.c +1 -1
@@ -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 */
PATCH 7/33 drivers/dca: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/dca/dca-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dca/dca-core.c +1 -1
@@ -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;
PATCH 8/33 drivers/edac: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/edac/x38_edac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/x38_edac.c +1 -1
@@ -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;
PATCH 10/33 drm/i915: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/gpu/drm/i915/i915_opregion.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_opregion.c +2 -2
@@ -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
PATCH 12/33 i2c: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/i2c/i2c-core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +2 -1
@@ -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;
PATCH 13/33 Input: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/input/mouse/gpio_mouse.c | 2 +- drivers/input/tablet/wacom_wac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/mouse/gpio_mouse.c +1 -1
@@ -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" ,
drivers/input/tablet/wacom_wac.c +1 -1
@@ -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;
PATCH 14/33 isdn: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
drivers/isdn/hardware/eicon/di.c +2 -2
@@ -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,
drivers/isdn/hardware/eicon/message.c +35 -32
229 lines not on this page · raw message
drivers/isdn/hardware/mISDN/hfcmulti.c +9 -18
@@ -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;
drivers/isdn/mISDN/core.c +3 -4
@@ -31,7 +31,7 @@ static u64 device_ids;#define MAX_DEVICE_ID 63static 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 ();
drivers/isdn/mISDN/dsp_audio.c +1 -1
@@ -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;
drivers/isdn/mISDN/dsp_cmx.c +3 -3
@@ -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)
drivers/isdn/mISDN/dsp_core.c +1 -1
@@ -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;
drivers/isdn/mISDN/stack.c +1 -2
@@ -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 ;
PATCH 15/33 leds: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/leds/leds-pca9532.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/leds/leds-pca9532.c +2 -2
@@ -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);
PATCH 16/33 DVB: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
drivers/media/dvb/dm1105/dm1105.c +2 -2
@@ -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);
drivers/media/dvb/dvb-core/dvb_frontend.c +14 -11
@@ -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;
drivers/media/dvb/dvb-usb/anysee.c +1 -1
@@ -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);
drivers/media/dvb/dvb-usb/cinergyT2-core.c +2 -2
@@ -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;
drivers/media/dvb/frontends/cx24116.c +1 -1
@@ -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;
PATCH 17/33 drivers/misc: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/misc/lkdtm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/misc/lkdtm.c +2 -2
@@ -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);
Jean Delvare
NAKRe: [PATCH 12/33] i2c: Make static
In reply to Roel KluinQuoted 12 lines · Roel Kluin
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(-)drivers/i2c/i2c-core.c +0
-0
drivers/i2c/i2c-core.c EXPORT_SYMBOL(i2c_smbus_write_word_data); · line 1706
Quoted 9 lines
drivers/i2c/i2c-core.c +2
-1@@ -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);
Signature · 1 line
Jean Delvare
PATCH 18/33 drivers/net: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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/* ?
drivers/net/arcnet/capmode.c +1 -1
@@ -61,7 +61,7 @@ static struct ArcProto capmode_proto = }; -void arcnet_cap_init (void ) +static void arcnet_cap_init (void ) {int count;
drivers/net/arcnet/com90xx.c +1 -1
@@ -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;
drivers/net/atlx/atl1.c +2 -2
@@ -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;
drivers/net/cxgb3/vsc8211.c +1 -1
@@ -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;
drivers/net/irda/ma600-sir.c +1 -1
@@ -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__);
drivers/net/irda/smsc-ircc2.c +3 -3
@@ -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;
drivers/net/irda/w83977af_ir.c +6 -6
@@ -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;
drivers/net/ixgbe/ixgbe_82598.c +7 -7
@@ -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 ;
drivers/net/plip.c +1 -1
@@ -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;
drivers/net/qlge/qlge_ethtool.c +1 -1
@@ -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;
drivers/net/qlge/qlge_main.c +8 -6
@@ -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;
drivers/net/qlge/qlge_mpi.c +1 -1
@@ -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;
drivers/net/skfp/skfddi.c +3 -3
@@ -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;
drivers/net/tokenring/madgemc.c +1 -1
@@ -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);
drivers/net/tokenring/proteon.c +1 -1
@@ -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 ; }
drivers/net/tokenring/skisa.c +1 -1
@@ -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 ; }
drivers/net/usb/hso.c +2 -2
@@ -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,
drivers/net/wan/sbni.c +1 -3
@@ -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 ;
drivers/net/wan/x25_asy.c +1 -1
@@ -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;
drivers/net/wan/z85230.c +2 -2
@@ -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,
drivers/net/wireless/airo.c +1 -1
@@ -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 ;
drivers/net/wireless/atmel.c +1 -1
@@ -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];
drivers/net/wireless/b43/phy_a.c +2 -2
@@ -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 );
drivers/net/wireless/b43/phy_g.c +8 -8
@@ -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;
drivers/net/wireless/ipw2100.c +3 -3
@@ -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))
drivers/net/wireless/prism54/islpci_hotplug.c +4 -8
@@ -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 ;
drivers/net/wireless/ray_cs.c +1 -1
@@ -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;
PATCH v2 4/33 drivers/acpi: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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)
drivers/acpi/ec.c +2 -2
@@ -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 ,
drivers/acpi/pci_link.c +1 -1
@@ -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 ;
drivers/acpi/video_detect.c +2 -2
@@ -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 ;
PATCH v2 2/33 x86: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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)
arch/x86/kernel/hpet.c +1 -1
@@ -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 {
arch/x86/kernel/io_apic.c +1 -1
@@ -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,
arch/x86/kernel/microcode_core.c +2 -2
@@ -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 ;
arch/x86/kernel/microcode_intel.c +1 -1
@@ -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,
arch/x86/kernel/setup.c +2 -1
@@ -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 ;
arch/x86/kvm/vmx.c +1 -1
@@ -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;
arch/x86/pci/legacy.c +1 -1
@@ -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 ();
Re: [PATCH 2/33] x86: Make static
In reply to Roel Kluinarch/x86/kernel/efi.c static int __init setup_noefi(char *arg) · line 68
Quoted 3 lines · Roel Kluin
arch/x86/kernel/efi.c +1
-1-int add_efi_memmap; +static int add_efi_memmap;EXPORT_SYMBOL (add_efi_memmap);
This is really an extern missing.
Regards,
Frederik
PATCH 18/31 drivers/pci: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
drivers/pci/hotplug/ibmphp_hpc.c +1 -1
@@ -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); }
drivers/pci/hotplug/pciehp_hpc.c +1 -1
@@ -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);
drivers/pci/pci-driver.c +1 -1
@@ -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,
PATCH 19/31 drivers/pcmcia: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/pcmcia/pcmcia_ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/pcmcia/pcmcia_ioctl.c +1 -1
@@ -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) {
PATCH 20/31 drivers/pnp: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/pnp/resource.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/pnp/resource.c +2 -2
@@ -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;
PATCH 21/31 drivers/power: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/power/olpc_battery.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/olpc_battery.c +1 -1
@@ -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 );
PATCH 23/31 drivers/usb: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- drivers/usb/serial/usb_debug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/serial/usb_debug.c +1 -1
@@ -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 ;
PATCH 24/31 drivers/video: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
drivers/video/mb862xx/mb862xxfb.c +1 -1
@@ -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;
drivers/video/via/hw.c +1 -1
@@ -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 );
drivers/video/via/viafbdev.c +4 -4
@@ -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,
PATCH 25/31 fs: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
fs/bio-integrity.c +4 -3
@@ -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;
fs/ext4/extents.c +3 -2
@@ -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;
fs/ext4/mballoc.c +1 -1
@@ -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;
fs/jbd2/transaction.c +1 -1
@@ -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;
fs/reiserfs/journal.c +1 -1
@@ -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)
fs/select.c +4 -3
@@ -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 ;
PATCH 26/31 kernel: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
kernel/irq/manage.c +1 -1
@@ -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;
kernel/kexec.c +1 -1
@@ -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);
kernel/kprobes.c +1 -1
@@ -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);
kernel/lockdep.c +2 -2
@@ -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;
kernel/smp.c +1 -1
@@ -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 ,
kernel/time/tick-broadcast.c +1 -1
@@ -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;
kernel/time/tick-sched.c +1 -1
@@ -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);
kernel/trace/ftrace.c +2 -2
@@ -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 ); }
kernel/trace/ring_buffer.c +4 -2
@@ -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;
kernel/trace/trace.c +5 -5
@@ -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;
kernel/trace/trace_boot.c +1 -1
@@ -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 (); }
PATCH 27/31 mm: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- mm/memcontrol.c | 3 ++- mm/vmscan.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
mm/memcontrol.c +2 -1
@@ -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 ;
mm/vmscan.c +2 -2
@@ -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;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 28/31 net: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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(-)
net/decnet/dn_dev.c +1 -1
@@ -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;
net/decnet/dn_route.c +2 -2
@@ -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);
net/dsa/mv88e6060.c +2 -2
@@ -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); }
net/dsa/mv88e6123_61_65.c +2 -2
@@ -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); }
net/dsa/mv88e6131.c +2 -2
@@ -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); }
net/irda/irttp.c +7 -7
@@ -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 ;
net/irda/timer.c +1 -1
@@ -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;
net/mac80211/rc80211_minstrel.c +4 -4
@@ -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;
net/phonet/sysctl.c +1 -1
@@ -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 , }, { },
net/rxrpc/ar-connection.c +1 -1
@@ -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;
net/rxrpc/ar-connevent.c +1 -1
@@ -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) {
net/rxrpc/ar-security.c +1 -1
@@ -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 ;
net/sched/sch_api.c +1 -1
@@ -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;
net/sunrpc/xprtrdma/svc_rdma_sendto.c +1 -1
@@ -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) {
net/sunrpc/xprtrdma/svc_rdma_transport.c +1 -1
@@ -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);
net/wireless/reg.c +1 -1
@@ -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 ]);
PATCH 29/31 markers: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- samples/markers/probe-example.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
samples/markers/probe-example.c +3 -3
@@ -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 */
PATCH 30/31 sound: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- sound/usb/usx2y/usb_stream.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
sound/usb/usx2y/usb_stream.c +2 -1
@@ -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;
PATCH 31/31 virt: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- virt/kvm/kvm_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
virt/kvm/kvm_main.c +1 -1
@@ -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,
PATCH 22/31 scsi: Make static
In reply to Roel KluinSparse asked whether these could be static.
--- 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.
drivers/scsi/aic7xxx/aic7xxx_core.c +1 -1
@@ -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)
drivers/scsi/aic7xxx/aic7xxx_osm.c +1 -2
@@ -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;
drivers/scsi/dpt_i2o.c +1 -1
@@ -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++) {
drivers/scsi/gdth.c +2 -2
@@ -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;
drivers/scsi/hptiop.c +1 -1
@@ -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;
drivers/scsi/initio.c +12 -11
@@ -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_breturn ; } -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;
drivers/scsi/ips.c +3 -5
@@ -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;
drivers/scsi/megaraid/megaraid_mbox.c +3 -3
@@ -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[] = {
drivers/scsi/ncr53c8xx.c +8 -8
@@ -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;
drivers/scsi/osst.c +6 -6
@@ -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;
drivers/scsi/pas16.c +1 -1
@@ -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;
drivers/scsi/scsi_debug.c +18 -17
@@ -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
drivers/scsi/scsi_sysfs.c +2 -2
@@ -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, };
drivers/scsi/ses.c +1 -1
@@ -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;
drivers/scsi/st.c +5 -5
@@ -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) {
drivers/scsi/sym53c8xx_2/sym_hipd.c +3 -3
@@ -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;
drivers/scsi/t128.c +2 -1
@@ -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 )
Re: [PATCH 12/33] i2c: Make static
In reply to Jean DelvareQuoted 7 lines
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
Re: [PATCH 29/31] markers: Make static
In reply to Roel KluinQuoted 2 lines · * 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.
Quoted 31 lines
Signed-off-by Roel Kluin <[email protected]>--- samples/markers/probe-example.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)samples/markers/probe-example.c +3
-3@@ -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 */
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Jesse Barnes
AppliedRe: [PATCH 18/31] drivers/pci: Make static
In reply to Roel KluinQuoted 3 lines · Roel Kluin
Sparse asked whether these could be static.
Signed-off-by Roel Kluin <[email protected]>
Applied to my linux-next branch, thanks.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Re: [PATCH 18/33] drivers/net: Make static
In reply to Roel KluinQuoted 709 lines · Roel Kluin
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/*?drivers/net/arcnet/capmode.c +1
-1@@ -61,7 +61,7 @@ static struct ArcProto capmode_proto = }; -void arcnet_cap_init (void ) +static void arcnet_cap_init (void ) {int count;drivers/net/arcnet/com90xx.c +1
-1@@ -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;drivers/net/atlx/atl1.c +2
-2@@ -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;drivers/net/cxgb3/vsc8211.c +1
-1@@ -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;drivers/net/irda/ma600-sir.c +1
-1@@ -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__);drivers/net/irda/smsc-ircc2.c +3
-3@@ -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;drivers/net/irda/w83977af_ir.c +6
-6@@ -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;drivers/net/ixgbe/ixgbe_82598.c +7
-7@@ -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 ;drivers/net/plip.c +1
-1@@ -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;drivers/net/qlge/qlge_ethtool.c +1
-1@@ -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;drivers/net/qlge/qlge_main.c +8
-6@@ -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;drivers/net/qlge/qlge_mpi.c +1
-1@@ -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;drivers/net/skfp/skfddi.c +3
-3@@ -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;drivers/net/tokenring/madgemc.c +1
-1@@ -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);drivers/net/tokenring/proteon.c +1
-1@@ -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 ; }drivers/net/tokenring/skisa.c +1
-1@@ -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 ; }drivers/net/usb/hso.c +2
-2@@ -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,drivers/net/wan/sbni.c +1
-3@@ -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 ;drivers/net/wan/x25_asy.c +1
-1@@ -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;drivers/net/wan/z85230.c +2
-2@@ -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,drivers/net/wireless/airo.c +1
-1@@ -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 ;drivers/net/wireless/atmel.c +1
-1@@ -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];drivers/net/wireless/b43/phy_a.c +2
-2@@ -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 );drivers/net/wireless/b43/phy_g.c +8
-8@@ -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;drivers/net/wireless/ipw2100.c +3
-3@@ -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))drivers/net/wireless/prism54/islpci_hotplug.c +4
-8@@ -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 ;drivers/net/wireless/ray_cs.c +0
-0
drivers/net/wireless/ray_cs.c static int ray_resume(struct pcmcia_device *link) · line 835
Quoted 8 lines
drivers/net/wireless/ray_cs.c +1
-1@@ -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.
Signature · 2 lines
Cheers, Jeff
Avi Kivity
AppliedRe: [PATCH 31/31] virt: Make static
In reply to Roel KluinQuoted 2 lines · Roel Kluin
Sparse asked whether these could be static.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH 31/31] virt: Make static
Quoted 6 lines · Avi Kivity
Quoted 2 lines · Roel Kluin
Sparse asked whether these could be static.
Applied, thanks.
Er, actually I already had a patch in my queue for this.
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH 30/31] sound: Make static
In reply to Roel KluinAt Tue, 09 Dec 2008 23:26:05 +0100,
Quoted 4 lines · Roel Kluin
Sparse asked whether these could be static.
Signed-off-by Roel Kluin <[email protected]>
Applied now. Thanks!
Takashi
Quoted 19 lines
--- sound/usb/usx2y/usb_stream.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)sound/usb/usx2y/usb_stream.c +2
-1@@ -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;
Jens Axboe
AppliedRe: [PATCH 3/33] block: Make static
In reply to Roel KluinQuoted 12 lines · Roel Kluin
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(-)block/blk-softirq.c +0
-0
block/blk-softirq.c void blk_complete_request(struct request *req) · line 167
Quoted 8 lines
block/blk-softirq.c +1
-1@@ -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.
Signature · 1 line
Jens Axboe
David Miller
maintainerRe: [PATCH 28/31] net: Make static
In reply to Roel KluinFrom: Roel Kluin <[email protected]>
Date: Tue, 09 Dec 2008 23:20:24 +0100
Quoted 3 lines
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!
Re: [PATCH 14/33] isdn: Make static
In reply to Roel KluinQuoted 3 lines · Roel Kluin
Sparse asked whether these could be static.
Signed-off-by Roel Kluin <[email protected]>
Quoted 3 lines
---
drivers/isdn/hardware/eicon/di.c| 4 +-drivers/isdn/hardware/eicon/message.c| 67 ++++++++++++++++---------------
Re: [PATCH 1/33] Documentation: Make static
In reply to Roel KluinQuoted 4 lines · 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]>---
Thanks.
Quoted 22 lines
Documentation/DocBook/procfs_example.c | 2 +- Documentation/connector/cn_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Documentation/DocBook/procfs_example.c +1
-1@@ -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,Documentation/connector/cn_test.c +0
-0
Documentation/connector/cn_test.c static char cn_test_name[] = "cn_test"; · line 38
Quoted 8 lines
Documentation/connector/cn_test.c +1
-1@@ -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
Re: [PATCH 29/31] markers: Make static
In reply to Roel KluinQuoted 2 lines · * Roel Kluin ([email protected]) wrote:
Sparse asked whether these could be static.
Will merge in the LTTng tree, thanks !
Mathieu
Quoted 31 lines
Signed-off-by Roel Kluin <[email protected]>--- samples/markers/probe-example.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)samples/markers/probe-example.c +3
-3@@ -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 */
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68