2006-02-24 11:10:44

by Andrew Morton

[permalink] [raw]
Subject: 2.6.16-rc4-mm2


ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/

- Sam's new section-mismatch warning code detects 358 errors in my alpha
build, and a quick sampling indicates that they're real. Once this hits
mainline things will get somewhat messy.

- The git-blktrace tree was dropped, due to a bad disagreement with the
relayfs rework in Greg's tree.

- Various buggy patches which were in -mm1 were dropped. Should be better.
(ie: some new, more interesting bugs).



Boilerplate:

- See the `hot-fixes' directory for any important updates to this patchset.

- To fetch an -mm tree using git, use (for example)

git fetch git://git.kernel.org/pub/scm/linux/kernel/git/smurf/linux-trees.git v2.6.16-rc2-mm1

- -mm kernel commit activity can be reviewed by subscribing to the
mm-commits mailing list.

echo "subscribe mm-commits" | mail [email protected]

- If you hit a bug in -mm and it's not obvious which patch caused it, it is
most valuable if you can perform a bisection search to identify which patch
introduced the bug. Instructions for this process are at

http://www.zip.com.au/~akpm/linux/patches/stuff/bisecting-mm-trees.txt

But beware that this process takes some time (around ten rebuilds and
reboots), so consider reporting the bug first and if we cannot immediately
identify the faulty patch, then perform the bisection search.

- When reporting bugs, please try to Cc: the relevant maintainer and mailing
list on any email.



Changes since 2.6.16-rc4-mm1:

linus.patch
git-acpi.patch
git-alsa.patch
git-audit-master.patch
git-cfq.patch
git-cifs.patch
git-cpufreq.patch
git-drm.patch
git-ia64.patch
git-infiniband.patch
git-input.patch
git-jfs.patch
git-kbuild.patch
git-libata-all.patch
git-netdev-all.patch
git-net.patch
git-ntfs.patch
git-ocfs2.patch
git-powerpc.patch
git-sym2.patch
git-pcmcia.patch
git-scsi-misc.patch
git-scsi-rc-fixes.patch
git-sas-jg.patch
git-sparc64.patch
git-watchdog.patch
git-xfs.patch
git-cryptodev.patch
git-viro-bird-fixes.patch
git-viro-bird-m32r.patch
git-viro-bird-m68k.patch
git-viro-bird-xfs.patch
git-viro-bird-uml.patch
git-viro-bird-frv.patch
git-viro-bird-misc.patch
git-viro-bird-upf.patch
git-viro-bird-volatile.patch
git-viro-bird-endian.patch

git trees.

-oom-kill-children-accounting.patch
-terminate-process-that-fails-on-a-constrained-allocation-v3.patch
-i386-need-to-pass-virtual-address-to-smp_read_mpc.patch
-cfi_cmdset_0001-fix-range-for-cache-invalidation.patch
-spi-fix-modular-master-driver-remove-and-device-suspend-remove.patch
-x86_64-dont-set-config_debug_info-in-defconfig.patch
-cpu-hotplug-documentation-fix.patch
-suspend-to-ram-allow-video-options-to-be-set-at-runtime.patch
-suspend-to-ram-allow-video-options-to-be-set-at-runtime-update.patch
-fix-units-in-mbind-check.patch
-fix-race-condition-in-hvc-console.patch
-daemonize-detach-from-current-namespace.patch
-fix-snd-usb-audio-in-32-bit-compat-environemt.patch
-pktcdvd-correctly-set-rq-cmd_len-in-pkt_generic_packet.patch
-pktcdvd-rename-functions-and-make-their-return-values-sane.patch
-pktcdvd-remove-useless-printk-statements.patch
-pktcdvd-fix-the-logic-in-the-pkt_writable_track-function.patch
-pktcdvd-only-return-erofs-when-appropriate.patch
-modules-with-old-style-parameters-wont-load.patch
-modules-with-old-style-parameters-wont-load-fix.patch
-v9fs-update-documentation-and-fix-debug-flag.patch
-powermac-fix-loss-of-ethernet-phy-on-sleep.patch
-fix-undefined-symbols-for-nommu-architecture-improved-version.patch
-fix-compile-for-config_sysvipc=n-or-config_sysctl=n.patch
-reset-pci-device-state-to-unknown-after-disabled.patch
-ipw2200-suppress-warning-message.patch
-drivers-fc4-fcc-memset-correct-length.patch
-firmware-fix-bug-in-fw_realloc_buffer.patch
-spi-per-transfer-overrides-for-wordsize-and-clocking.patch
-sem2mutex-drivers-media-2.patch
-sky2-fix-a-hang-on-yukon-ec-0xb6-rev-1.patch
-gregkh-pci-acpiphp-add-new-bus-to-acpi.patch
-pci-pci-quirk-for-asus-a8v-and-a8v-deluxe-motherboards.patch
-usb-zc0301-driver-updates.patch
-page-migration-fix-mpol_interleave-behavior-for-migration-via.patch
-page-migration-fix-mpol_interleave-behavior-for-migration-via-fix.patch
-pci-cardbus-cards-hidden-needs-pci=assign-busses-to-fix.patch
-pci-cardbus-cards-hidden-needs-pci=assign-busses-to-fix-tidy.patch
-pci-cardbus-cards-hidden-needs-pci=assign-busses-to-fix-tidy-fix.patch
-include-asm-m68k-irqh-remove-unused-define-enable_irq_nosync.patch
-radeonfb-resume-support-for-samsung-p35-laptops.patch

Merged

+cache-align-futex-hash-buckets.patch

futex speedup (not final)

+m32r-enable-asm-code-optimization.patch
+m32r-fix-and-update-for-gcc-40.patch
+remove-module_parm.patch
+remove-module_parm-fix.patch
+snd-cs4236-tpyo-fix.patch
+alsa-fix-bogus-snd_device_free-in-opl3-ossc.patch
+pnp-bus-type-fix.patch
+uml-correct-error-messages-in-cow-driver.patch
+uml-fix-usage-of-kernel_errno-in-place-of-errno.patch
+uml-fix-unused-attribute.patch
+uml-os_connect_socket-error-path-fixup.patch
+uml-better-error-reporting-for-read_output.patch
+uml-tidying-cow-code.patch
+vgacon-no-vertical-resizing-on-ega.patch
+kprobes-causes-nx-protection-fault-on-i686-smp.patch
+powerpc-fix-altivec_unavailable_exception-oopses.patch
+cfi-init-wait-queue-in-chip-struct.patch
+voyager-fix-boot-panic-by-adding-topology-export.patch
+voyager-fix-the-cpu_possible_map-to-make-voyager-boot-again.patch
+page-migration-fix-mpol_interleave-behavior-for-migration-via.patch
+x86-fix-smp-boot-sequence.patch
+x86-fix-smp-boot-sequence-fix.patch
+gbefb-ip32-gbefb-depth-change-fix.patch
+gbefb-set-default-of-fb_gbe_mem-to-4-mb.patch
+au1100fb-replaced-io_remap_page_range-with-io_remap_pfn_range.patch
+asiliantfb-fix-pseudo_palette-setup-in-asiliantfb_setcolreg.patch
+flags-parameter-for-linkat.patch
+flags-parameter-for-linkat-fix.patch
+vmscan-fix-zone_reclaim.patch

Current 2.6.16 queue. Some of these are a bit questionable at this stage.

+gregkh-driver-sysfs-relay-channel-buffers-as-sysfs-attributes.patch
+gregkh-driver-relay-consolidate-relayfs-core-into-kernel-relay.c.patch
+gregkh-driver-sysfs-update-relay-file-support-for-generic-relay-api.patch
+gregkh-driver-relayfs-remove-relayfs-in-favour-of-config_relay.patch
+gregkh-driver-relay-relay-header-cleanup.patch
+gregkh-driver-sysfs-add-__attr_relay-helper-for-relay-attributes.patch
+gregkh-driver-sysfs-kzalloc-conversion.patch
+gregkh-driver-firmware-fix-bug-in-fw_realloc_buffer.patch
+gregkh-driver-spi-per-transfer-overrides-for-wordsize-and-clocking.patch

Driver tree updates

+add-cpia2-camera-support.patch

CPIA camera driver

+gregkh-i2c-w1-use-kthread-api.patch

i2c tree

+pc-speaker-add-snd_silent.patch

Bring back yet again the pc-speaker SND_SILENT patch. I can't get rid of
the thing.

+remove-the-config_cc_align_-options.patch

kbuild cleanup

+drivers-scsi-libata-scsic-make-some-functions-static.patch

scsi cleanup

+tg3-netif_carrier_off-runs-too-early-could-still-be-queued-when-init-fails.patch

tg3 fix (nacked by maintainer)

+config_forcedeth-updates.patch

forcedeth driver fixes

+serial-serial_txx9-driver-update.patch

This got lost. Another patch I cannot get rid of. Should I send them
daily?

+serial-kernel-console-should-send-crlf-not-lfcr.patch

serial driver \n\r -> \r\n fixes

+gregkh-pci-pci-avoid-leaving-master_abort-disabled-permanently-when-returning-from-pci_scan_bridge.patch
+gregkh-pci-shpchp-remove-unused-pci_bus-member-from-controller-structure.patch
+gregkh-pci-shpchp-remove-unused-wait_for_ctrl_irq.patch
+gregkh-pci-shpchp-event-handling-rework.patch
+gregkh-pci-shpchp-fix-slot-state-handling.patch
+gregkh-pci-shpchp-adapt-to-pci-driver-model.patch
+gregkh-pci-pci-add-pci_device_shutdown-to-pci_bus_type.patch
+gregkh-pci-pci-smbus-unhide-on-hp-compaq-nx6110.patch
+gregkh-pci-pci-pci-quirk-for-asus-a8v-and-a8v-deluxe-motherboards.patch
+gregkh-pci-pci-make-msi-quirk-inheritable-from-the-pci-bus.patch
+gregkh-pci-pci-msi-save-restore-for-suspend-resume.patch
+gregkh-pci-pci-remove-msi-save-restore-code-in-specific-driver.patch
+gregkh-pci-pci-resource-address-mismatch.patch
+gregkh-pci-pci-fix-problems-with-msi-x-on-ia64.patch
+gregkh-pci-pci-pci-cardbus-cards-hidden-needs-pci-assign-busses-to-fix.patch
+gregkh-pci-pci-move-pci_dev_put-outside-a-spinlock.patch
+gregkh-pci-acpiphp-add-new-bus-to-acpi.patch
+gregkh-pci-acpi-export-acpi_bus_trim.patch
+gregkh-pci-acpiphp-add-dock-event-handling.patch
+gregkh-pci-acpi-remove-dock-event-handling-from-ibm_acpi.patch
+gregkh-pci-acpiphp-slot-management-fix-v4.patch

PCI tree updates

+revert-gregkh-pci-x86-pci-domain-support-the-meat.patch
+gregkh-pci-altix-msi-support-git-ia64-fix.patch

Fix up things in the PCI tree

+axnet_cs-support-amb8110.patch

New device support

+net-socket-timestamp-32-bit-handler-for-64-bit-kernel-fix.patch

Fix net-socket-timestamp-32-bit-handler-for-64-bit-kernel.patch

+git-sparc64-build-fix.patch

Fix git-sparc64.patch

+gregkh-usb-usb-unusual_devs-entry-for-lyra-rca-rd1080.patch
+gregkh-usb-usb-lh7a40x-gadget-driver-fixed-a-dead-lock.patch
+gregkh-usb-usb-gadget-rndis-fix-alloc-bug.patch
+gregkh-usb-ub-use-kzalloc.patch
+gregkh-usb-usb-gadget-driver-section-fixups.patch
+gregkh-usb-usb-ethernet-gadget-driver-section-fixups.patch
+gregkh-usb-usb-visor.c-id-for-gspda-smartphone.patch
+gregkh-usb-usb-fix-warning-in-drivers-usb-media-ov511.c.patch
+gregkh-usb-usb-zc0301-driver-updates.patch
+gregkh-usb-usb-credits-add-credits-about-the-zc0301-and-et61x51-usb-drivers.patch

USB tree updates

+slab-remove-slab_no_reap-option.patch
+slab-remove-slab_no_reap-option-fix.patch
+on_each_cpu-disable-local-interupts.patch
+slab-use-on_each_cpu.patch
+slab-node-rotor-for-freeing-alien-caches-and-remote-per-cpu-pages.patch
+slab-node-rotor-for-freeing-alien-caches-and-remote-per-cpu-pages-fix.patch

slab cleanups and NUMA tweak

+selinux-disable-automatic-labeling-of-new-inodes-when.patch
+selinuxfs-cleanups-fix-hard-link-count.patch
+selinuxfs-cleanups-use-sel_make_dir.patch
+selinuxfs-cleanups-sel_fill_super-exit-path.patch
+selinuxfs-cleanups-sel_make_bools.patch
+selinuxfs-cleanups-sel_make_avc_files.patch

SELinux updates

+i386-dont-let-ptrace-set-the-nested-task-bit.patch
+i386-let-signal-handlers-set-the-resume-flag.patch
+x86-early-printk-handling-fixes.patch
+register-the-boot-cpu-in-the-cpu-maps-earlier.patch
+register-the-boot-cpu-in-the-cpu-maps-earlier-fix.patch
+i386-pass-proper-trap-numbers-to-die-chain-handlers.patch
+i386-actively-synchronize-vmalloc-area-when-registering-certain-callbacks.patch
+i386-actively-synchronize-vmalloc-area-when-registering-certain-callbacks-tidy.patch
+i386-fix-uses-of-user_mode-vs-user_mode_vm.patch
+fix-elf-entry-point-i386.patch
+i386-fix-singlestep-through-an-int80-syscall.patch

x86 updates

+swsusp-documentation-fix.patch

swsusp documentation

-pm-add-state-field-to-pm_message_t-to-hold-actual.patch
-pm-respect-the-actual-device-power-states-in-sysfs.patch
-pm-minor-updates-to-core-suspend-resume-functions.patch
-pm-make-pci_choose_state-use-the-real-device.patch

Dropped due to bug.

+pm-print-name-of-failed-suspend-function.patch

PM debugging aid.

+remove-kernel-power-pmcpm_unregister.patch

Cleanup

-dasd-backout-dasd_eer-module.patch

The eer module got deleted.

-register-sysfs-device-for-lp-devices.patch

Buggy, dropped.

-timer-irq-driven-soft-watchdog-percpu-race-fix.patch
-timer-irq-driven-soft-watchdog-percpu-fix.patch
-timer-irq-driven-soft-watchdog-boot-fix.patch

Folded into timer-irq-driven-soft-watchdog-cleanups.patch

+softlockup-detection-vs-cpu-hotplug.patch
+timer-irq-driven-soft-watchdog-cleanups-update.patch

Update it some more.

+decrapify-asm-generic-localh.patch

Use atomic64_t for default local_t implementation

+fs-inodec-make-iprune_mutex-static.patch

Cleanup

+reiserfs-fix-transaction-overflowing.patch

reiser3 fix

+introduce-fmode_exec-file-flag.patch

A hint for distributed filesystems.

+add-lookup_instantiate_filp-usage-warning.patch

Comment update

+isdn-fix-copy_to_user-unused-result-warning-in-isdn_ppp.patch

Warning fix

+time_interpolator-use-readq_relaxed-instead-of-readq.patch

Microoptimisation

+copy_process-cleanup-bad_fork_cleanup_sighand.patch
+copy_process-cleanup-bad_fork_cleanup_signal.patch
+cleanup-__exit_signal.patch
+rename-__exit_sighand-to-cleanup_sighand.patch
+move-__exit_signal-to-kernel-exitc.patch
+revert-optimize-sys_times-for-a-single-thread-process.patch
+do-__unhash_process-under-siglock.patch
+sys_times-dont-take-tasklist_lock.patch
+relax-sig_needs_tasklist.patch
+do_signal_stop-dont-take-tasklist_lock.patch
+do_group_exit-dont-take-tasklist_lock.patch
+do_sigaction-dont-take-tasklist_lock.patch

More core process/pid/thread updates from Oleg.

+autofs4-add-new-packet-type-for-v5-communications-fix.patch

Fix autofs4-add-new-packet-type-for-v5-communications.patch

-time-reduced-ntp-rework-part-1-update.patch
+time-reduced-ntp-rework-part-1-fix-adjtimeadj.patch
+time-reduced-ntp-rework-part-2-fix-adjtimeadj.patch
+time-clocksource-infrastructure-remove-nsec_t.patch
+time-generic-timekeeping-infrastructure-remove-nsec_t.patch
+time-generic-timekeeping-infrastructure-fix-ntp_synced.patch
+time-generic-timekeeping-infrastructure-wall_offset-helper-cleanup.patch
+time-i386-conversion-part-3-remove-nsec_t.patch
+time-i386-conversion-part-3-backout-pmtmr-changes.patch
-time-i386-conversion-part-5-acpi-pm-variable-renaming-and-config-change.patch
-time-i386-conversion-part-5-acpi-pm-variable-renaming-and-config-change-x86_64-fix.patch
+time-i386-conversion-part-4-del-timer_tscc.patch
+time-i386-clocksource-drivers-backout-pmtmr-changes.patch

Various updates, fixes and cleanups for the time management patches in -mm.

+sched-smpnice-apply-review-suggestions.patch

Tweaks for sched-implement-smpnice.patch

+frv-remove-unnecessary-ampersand.patch
+function-typo-fixes.patch
+um-fix-undefined-reference-to-hweight32.patch
+arm-fix-undefined-reference-to-generic_fls.patch
+bitops-generic-test_and_setclearchange_bit-fix.patch
+bitops-generic-hweight6432168-fix.patch
+bitops-m68k-use-generic-bitops-fix.patch
+bitops-ppc-use-generic-bitops.patch
+remove-zone_mem_map.patch

Various updates related to the bitops consolidation code in -mm.

+ia64-add-ptr-to-compatpatch.patch
+s390-add-ptr-compatpatch.patch
+parisc-add-ptr-compatpatch.patch
+mips-add-ptr-compatpatch.patch

Various archtectures need ptr_to_compat() for the lightweight futex patch.

+lightweight-robust-futexes-docs-update.patch
+lightweight-robust-futexes-i386-fix.patch
+lightweight-robust-futexes-x86_64-fix.patch

Updates to the futex patches

+unify-pfn_to_page-sparc64-pfn_to_page-fix.patch

Fix unify-pfn_to_page-sparc64-pfn_to_page.patch

+notifier-chain-update-api-changes.patch
+notifier-chain-update-api-changes-register-atomic_notifiers-in-atomic-context.patch
+notifier-chain-update-api-changes-export-new-notifier-chain-routines-as-gpl.patch
+notifier-chain-update-api-changes-avoid-calling-down_read-and-down_write-during-startup.patch
+notifier-chain-update-simple-definition-changes.patch
+notifier-chain-update-remove-unneeded-protection.patch
+notifier-chain-update-remove-unneeded-protection-the-idle-notifier-chain-should-be-atomic.patch
+notifier-chain-update-die_chain-changes.patch
+notifier-chain-update-dont-unregister-yourself.patch
+notifier-chain-update-dont-unregister-yourself-fix.patch
+notifier-chain-update-changes-to-dcdbasc.patch
+notifier-chain-update-update-usb_notify.patch
+notifier-chain-update-remaining-changes-for-new-api.patch

Notifier chain rework.

+rtc-subsystem-class.patch
+rtc-subsystem-arm-cleanup.patch
+rtc-subsystem-i2c-cleanup.patch
+rtc-subsystem-sysfs-interface.patch
+rtc-subsystem-proc-interface.patch
+rtc-subsystem-dev-interface.patch
+rtc-subsystem-x1205-driver.patch
+rtc-subsystem-test-device-driver.patch
+rtc-subsystem-ds1672-driver.patch
+rtc-subsystem-pcf8563-driver.patch
+rtc-subsystem-rs5c372-driver.patch

rtc subsystem rework. These patches are being updated.

+fbdev-framebuffer-driver-for-geode-gx-warning-fix.patch

Fix warning in fbdev-framebuffer-driver-for-geode-gx-update.patch

+au1200fb-alchemy-au1200-framebuffer-driver.patch

New framebuffer driver

+fbdev-make-bios-edid-reading-configurable.patch

Fix boot-time stall due to EDID probing.

+acpi-identify-which-device-is-not-power-manageable.patch

More useful ACPI warning message


All 1149 patches:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/patch-list



2006-02-24 16:27:33

by Yoichi Yuasa

[permalink] [raw]
Subject: [-mm PATCH] mips: fixed collision of rtc function name

Hi,

This patch has fixed the collision of rtc function name on 2.6.16-rc4-mm2.

Yoichi

Signed-off-by: Yoichi Yuasa <[email protected]>

diff -pruN -X dontdiff mm2-orig/arch/mips/ddb5xxx/common/rtc_ds1386.c mm2/arch/mips/ddb5xxx/common/rtc_ds1386.c
--- mm2-orig/arch/mips/ddb5xxx/common/rtc_ds1386.c 2006-02-25 01:08:51.063134250 +0900
+++ mm2/arch/mips/ddb5xxx/common/rtc_ds1386.c 2006-02-25 00:58:31.150596000 +0900
@@ -165,6 +165,6 @@ rtc_ds1386_init(unsigned long base)
WRITE_RTC(0xB, byte);

/* set the function pointers */
- rtc_get_time = rtc_ds1386_get_time;
- rtc_set_time = rtc_ds1386_set_time;
+ rtc_mips_get_time = rtc_ds1386_get_time;
+ rtc_mips_set_time = rtc_ds1386_set_time;
}
diff -pruN -X dontdiff mm2-orig/arch/mips/dec/time.c mm2/arch/mips/dec/time.c
--- mm2-orig/arch/mips/dec/time.c 2006-02-25 01:08:51.211143500 +0900
+++ mm2/arch/mips/dec/time.c 2006-02-25 00:59:33.010462000 +0900
@@ -193,8 +193,8 @@ static void dec_ioasic_hpt_init(unsigned

void __init dec_time_init(void)
{
- rtc_get_time = dec_rtc_get_time;
- rtc_set_mmss = dec_rtc_set_mmss;
+ rtc_mips_get_time = dec_rtc_get_time;
+ rtc_mips_set_mmss = dec_rtc_set_mmss;

mips_timer_state = dec_timer_state;
mips_timer_ack = dec_timer_ack;
diff -pruN -X dontdiff mm2-orig/arch/mips/ite-boards/generic/time.c mm2/arch/mips/ite-boards/generic/time.c
--- mm2-orig/arch/mips/ite-boards/generic/time.c 2006-02-25 01:08:51.315150000 +0900
+++ mm2/arch/mips/ite-boards/generic/time.c 2006-02-25 00:59:57.503992750 +0900
@@ -227,8 +227,8 @@ void __init it8172_time_init(void)

local_irq_restore(flags);

- rtc_get_time = it8172_rtc_get_time;
- rtc_set_time = it8172_rtc_set_time;
+ rtc_mips_get_time = it8172_rtc_get_time;
+ rtc_mips_set_time = it8172_rtc_set_time;
}

#define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5)
diff -pruN -X dontdiff mm2-orig/arch/mips/jmr3927/common/rtc_ds1742.c mm2/arch/mips/jmr3927/common/rtc_ds1742.c
--- mm2-orig/arch/mips/jmr3927/common/rtc_ds1742.c 2006-02-25 01:08:51.319150250 +0900
+++ mm2/arch/mips/jmr3927/common/rtc_ds1742.c 2006-02-25 01:01:59.797301250 +0900
@@ -159,8 +159,8 @@ rtc_ds1742_init(unsigned long base)
db_assert((rtc_base & 0xe0000000) == KSEG1);

/* set the function pointers */
- rtc_get_time = rtc_ds1742_get_time;
- rtc_set_time = rtc_ds1742_set_time;
+ rtc_mips_get_time = rtc_ds1742_get_time;
+ rtc_mips_set_time = rtc_ds1742_set_time;

/* clear oscillator stop bit */
CMOS_WRITE(RTC_READ, RTC_CONTROL);
diff -pruN -X dontdiff mm2-orig/arch/mips/kernel/time.c mm2/arch/mips/kernel/time.c
--- mm2-orig/arch/mips/kernel/time.c 2006-02-25 01:08:51.471159750 +0900
+++ mm2/arch/mips/kernel/time.c 2006-02-25 00:53:17.975023750 +0900
@@ -65,9 +65,9 @@ static int null_rtc_set_time(unsigned lo
return 0;
}

-unsigned long (*rtc_get_time)(void) = null_rtc_get_time;
-int (*rtc_set_time)(unsigned long) = null_rtc_set_time;
-int (*rtc_set_mmss)(unsigned long);
+unsigned long (*rtc_mips_get_time)(void) = null_rtc_get_time;
+int (*rtc_mips_set_time)(unsigned long) = null_rtc_set_time;
+int (*rtc_mips_set_mmss)(unsigned long);


/* usecs per counter cycle, shifted to left by 32 bits */
@@ -437,7 +437,7 @@ irqreturn_t timer_interrupt(int irq, voi

/*
* If we have an externally synchronized Linux clock, then update
- * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be
+ * CMOS clock accordingly every ~11 minutes. rtc_mips_set_time() has to be
* called as close as possible to 500 ms before the new second starts.
*/
write_seqlock(&xtime_lock);
@@ -445,7 +445,7 @@ irqreturn_t timer_interrupt(int irq, voi
xtime.tv_sec > last_rtc_update + 660 &&
(xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
(xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
- if (rtc_set_mmss(xtime.tv_sec) == 0) {
+ if (rtc_mips_set_mmss(xtime.tv_sec) == 0) {
last_rtc_update = xtime.tv_sec;
} else {
/* do it again in 60 s */
@@ -562,7 +562,7 @@ asmlinkage void ll_local_timer_interrupt
* b) (optional) calibrate and set the mips_hpt_frequency
* (only needed if you intended to use fixed_rate_gettimeoffset
* or use cpu counter as timer interrupt source)
- * 2) setup xtime based on rtc_get_time().
+ * 2) setup xtime based on rtc_mips_get_time().
* 3) choose a appropriate gettimeoffset routine.
* 4) calculate a couple of cached variables for later usage
* 5) board_timer_setup() -
@@ -630,10 +630,10 @@ void __init time_init(void)
if (board_time_init)
board_time_init();

- if (!rtc_set_mmss)
- rtc_set_mmss = rtc_set_time;
+ if (!rtc_mips_set_mmss)
+ rtc_mips_set_mmss = rtc_mips_set_time;

- xtime.tv_sec = rtc_get_time();
+ xtime.tv_sec = rtc_mips_get_time();
xtime.tv_nsec = 0;

set_normalized_timespec(&wall_to_monotonic,
@@ -769,8 +769,8 @@ void to_tm(unsigned long tim, struct rtc

EXPORT_SYMBOL(rtc_lock);
EXPORT_SYMBOL(to_tm);
-EXPORT_SYMBOL(rtc_set_time);
-EXPORT_SYMBOL(rtc_get_time);
+EXPORT_SYMBOL(rtc_mips_set_time);
+EXPORT_SYMBOL(rtc_mips_get_time);

unsigned long long sched_clock(void)
{
diff -pruN -X dontdiff mm2-orig/arch/mips/lasat/setup.c mm2/arch/mips/lasat/setup.c
--- mm2-orig/arch/mips/lasat/setup.c 2006-02-25 01:08:51.479160250 +0900
+++ mm2/arch/mips/lasat/setup.c 2006-02-25 01:02:31.199556750 +0900
@@ -175,8 +175,8 @@ void __init plat_setup(void)

#ifdef CONFIG_DS1603
ds1603 = &ds_defs[mips_machtype];
- rtc_get_time = ds1603_read;
- rtc_set_time = ds1603_set;
+ rtc_mips_get_time = ds1603_read;
+ rtc_mips_set_time = ds1603_set;
#endif

#ifdef DYNAMIC_SERIAL_INIT
diff -pruN -X dontdiff mm2-orig/arch/mips/mips-boards/atlas/atlas_setup.c mm2/arch/mips/mips-boards/atlas/atlas_setup.c
--- mm2-orig/arch/mips/mips-boards/atlas/atlas_setup.c 2006-02-25 01:08:51.555165000 +0900
+++ mm2/arch/mips/mips-boards/atlas/atlas_setup.c 2006-02-25 01:05:47.797507500 +0900
@@ -65,7 +65,7 @@ void __init plat_setup(void)

board_time_init = mips_time_init;
board_timer_setup = mips_timer_setup;
- rtc_get_time = mips_rtc_get_time;
+ rtc_mips_get_time = mips_rtc_get_time;
}

static void __init serial_init(void)
diff -pruN -X dontdiff mm2-orig/arch/mips/mips-boards/malta/malta_setup.c mm2/arch/mips/mips-boards/malta/malta_setup.c
--- mm2-orig/arch/mips/mips-boards/malta/malta_setup.c 2006-02-25 01:08:51.559165250 +0900
+++ mm2/arch/mips/mips-boards/malta/malta_setup.c 2006-02-25 01:06:28.555668000 +0900
@@ -225,5 +225,5 @@ void __init plat_setup(void)

board_time_init = mips_time_init;
board_timer_setup = mips_timer_setup;
- rtc_get_time = mips_rtc_get_time;
+ rtc_mips_get_time = mips_rtc_get_time;
}
diff -pruN -X dontdiff mm2-orig/arch/mips/momentum/jaguar_atx/setup.c mm2/arch/mips/momentum/jaguar_atx/setup.c
--- mm2-orig/arch/mips/momentum/jaguar_atx/setup.c 2006-02-25 01:08:51.607168250 +0900
+++ mm2/arch/mips/momentum/jaguar_atx/setup.c 2006-02-25 01:03:37.534522500 +0900
@@ -228,8 +228,8 @@ void momenco_time_init(void)
mips_hpt_frequency = cpu_clock / 2;
board_timer_setup = momenco_timer_setup;

- rtc_get_time = m48t37y_get_time;
- rtc_set_time = m48t37y_set_time;
+ rtc_mips_get_time = m48t37y_get_time;
+ rtc_mips_set_time = m48t37y_set_time;
}

static struct resource mv_pci_io_mem0_resource = {
diff -pruN -X dontdiff mm2-orig/arch/mips/momentum/ocelot_3/setup.c mm2/arch/mips/momentum/ocelot_3/setup.c
--- mm2-orig/arch/mips/momentum/ocelot_3/setup.c 2006-02-25 01:08:51.611168500 +0900
+++ mm2/arch/mips/momentum/ocelot_3/setup.c 2006-02-25 01:04:05.526270750 +0900
@@ -215,8 +215,8 @@ void momenco_time_init(void)
mips_hpt_frequency = cpu_clock / 2;
board_timer_setup = momenco_timer_setup;

- rtc_get_time = m48t37y_get_time;
- rtc_set_time = m48t37y_set_time;
+ rtc_mips_get_time = m48t37y_get_time;
+ rtc_mips_set_time = m48t37y_set_time;
}

/*
diff -pruN -X dontdiff mm2-orig/arch/mips/momentum/ocelot_c/setup.c mm2/arch/mips/momentum/ocelot_c/setup.c
--- mm2-orig/arch/mips/momentum/ocelot_c/setup.c 2006-02-25 01:08:51.639170250 +0900
+++ mm2/arch/mips/momentum/ocelot_c/setup.c 2006-02-25 01:04:30.779217750 +0900
@@ -226,8 +226,8 @@ void momenco_time_init(void)
printk("momenco_time_init cpu_clock=%d\n", cpu_clock);
board_timer_setup = momenco_timer_setup;

- rtc_get_time = m48t37y_get_time;
- rtc_set_time = m48t37y_set_time;
+ rtc_mips_get_time = m48t37y_get_time;
+ rtc_mips_set_time = m48t37y_set_time;
}

void __init plat_setup(void)
diff -pruN -X dontdiff mm2-orig/arch/mips/pmc-sierra/yosemite/setup.c mm2/arch/mips/pmc-sierra/yosemite/setup.c
--- mm2-orig/arch/mips/pmc-sierra/yosemite/setup.c 2006-02-25 01:08:51.835182500 +0900
+++ mm2/arch/mips/pmc-sierra/yosemite/setup.c 2006-02-25 01:02:57.907866750 +0900
@@ -198,8 +198,8 @@ static void __init py_rtc_setup(void)
if (!m48t37_base)
printk(KERN_ERR "Mapping the RTC failed\n");

- rtc_get_time = m48t37y_get_time;
- rtc_set_time = m48t37y_set_time;
+ rtc_mips_get_time = m48t37y_get_time;
+ rtc_mips_set_time = m48t37y_set_time;

write_seqlock(&xtime_lock);
xtime.tv_sec = m48t37y_get_time();
diff -pruN -X dontdiff mm2-orig/arch/mips/sgi-ip22/ip22-time.c mm2/arch/mips/sgi-ip22/ip22-time.c
--- mm2-orig/arch/mips/sgi-ip22/ip22-time.c 2006-02-25 01:08:51.863184250 +0900
+++ mm2/arch/mips/sgi-ip22/ip22-time.c 2006-02-25 00:58:00.360671750 +0900
@@ -212,8 +212,8 @@ static void indy_timer_setup(struct irqa
void __init ip22_time_init(void)
{
/* setup hookup functions */
- rtc_get_time = indy_rtc_get_time;
- rtc_set_time = indy_rtc_set_time;
+ rtc_mips_get_time = indy_rtc_get_time;
+ rtc_mips_set_time = indy_rtc_set_time;

board_time_init = indy_time_init;
board_timer_setup = indy_timer_setup;
diff -pruN -X dontdiff mm2-orig/arch/mips/sgi-ip32/ip32-setup.c mm2/arch/mips/sgi-ip32/ip32-setup.c
--- mm2-orig/arch/mips/sgi-ip32/ip32-setup.c 2006-02-25 01:08:51.991192250 +0900
+++ mm2/arch/mips/sgi-ip32/ip32-setup.c 2006-02-25 00:57:36.283167000 +0900
@@ -91,8 +91,8 @@ void __init plat_setup(void)
{
board_be_init = ip32_be_init;

- rtc_get_time = mc146818_get_cmos_time;
- rtc_set_mmss = mc146818_set_rtc_mmss;
+ rtc_mips_get_time = mc146818_get_cmos_time;
+ rtc_mips_set_mmss = mc146818_set_rtc_mmss;

board_time_init = ip32_time_init;
board_timer_setup = ip32_timer_setup;
diff -pruN -X dontdiff mm2-orig/arch/mips/sibyte/swarm/setup.c mm2/arch/mips/sibyte/swarm/setup.c
--- mm2-orig/arch/mips/sibyte/swarm/setup.c 2006-02-25 01:08:52.031194750 +0900
+++ mm2/arch/mips/sibyte/swarm/setup.c 2006-02-25 00:56:45.591999000 +0900
@@ -114,14 +114,14 @@ void __init plat_setup(void)

if (xicor_probe()) {
printk("swarm setup: Xicor 1241 RTC detected.\n");
- rtc_get_time = xicor_get_time;
- rtc_set_time = xicor_set_time;
+ rtc_mips_get_time = xicor_get_time;
+ rtc_mips_set_time = xicor_set_time;
}

if (m41t81_probe()) {
printk("swarm setup: M41T81 RTC detected.\n");
- rtc_get_time = m41t81_get_time;
- rtc_set_time = m41t81_set_time;
+ rtc_mips_get_time = m41t81_get_time;
+ rtc_mips_set_time = m41t81_set_time;
}

printk("This kernel optimized for "
diff -pruN -X dontdiff mm2-orig/arch/mips/sni/setup.c mm2/arch/mips/sni/setup.c
--- mm2-orig/arch/mips/sni/setup.c 2006-02-25 01:08:52.035195000 +0900
+++ mm2/arch/mips/sni/setup.c 2006-02-25 00:56:12.565935000 +0900
@@ -164,8 +164,8 @@ static struct pci_controller sni_control

static inline void sni_pcimt_time_init(void)
{
- rtc_get_time = mc146818_get_cmos_time;
- rtc_set_time = mc146818_set_rtc_mmss;
+ rtc_mips_get_time = mc146818_get_cmos_time;
+ rtc_mips_set_time = mc146818_set_rtc_mmss;
}

void __init plat_setup(void)
diff -pruN -X dontdiff mm2-orig/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c mm2/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
--- mm2-orig/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c 2006-02-25 01:08:52.039195250 +0900
+++ mm2/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c 2006-02-25 00:55:37.163722500 +0900
@@ -1036,8 +1036,8 @@ toshiba_rbtx4927_time_init(void)

#ifdef CONFIG_RTC_DS1742

- rtc_get_time = rtc_ds1742_get_time;
- rtc_set_time = rtc_ds1742_set_time;
+ rtc_mips_get_time = rtc_ds1742_get_time;
+ rtc_mips_set_time = rtc_ds1742_set_time;

TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIME_INIT,
":rtc_ds1742_init()-\n");
diff -pruN -X dontdiff mm2-orig/arch/mips/tx4938/common/rtc_rx5c348.c mm2/arch/mips/tx4938/common/rtc_rx5c348.c
--- mm2-orig/arch/mips/tx4938/common/rtc_rx5c348.c 2006-02-25 01:08:52.043195500 +0900
+++ mm2/arch/mips/tx4938/common/rtc_rx5c348.c 2006-02-25 00:55:01.897518500 +0900
@@ -197,6 +197,6 @@ rtc_rx5c348_init(int chipid)
srtc_24h = 1;

/* set the function pointers */
- rtc_get_time = rtc_rx5c348_get_time;
- rtc_set_time = rtc_rx5c348_set_time;
+ rtc_mips_get_time = rtc_rx5c348_get_time;
+ rtc_mips_set_time = rtc_rx5c348_set_time;
}
diff -pruN -X dontdiff mm2-orig/include/asm-mips/time.h mm2/include/asm-mips/time.h
--- mm2-orig/include/asm-mips/time.h 2006-02-25 01:10:21.548789250 +0900
+++ mm2/include/asm-mips/time.h 2006-02-25 00:52:13.330983750 +0900
@@ -26,14 +26,14 @@ extern spinlock_t rtc_lock;

/*
* RTC ops. By default, they point to no-RTC functions.
- * rtc_get_time - mktime(year, mon, day, hour, min, sec) in seconds.
- * rtc_set_time - reverse the above translation and set time to RTC.
- * rtc_set_mmss - similar to rtc_set_time, but only min and sec need
+ * rtc_mips_get_time - mktime(year, mon, day, hour, min, sec) in seconds.
+ * rtc_mips_set_time - reverse the above translation and set time to RTC.
+ * rtc_mips_set_mmss - similar to rtc_set_time, but only min and sec need
* to be set. Used by RTC sync-up.
*/
-extern unsigned long (*rtc_get_time)(void);
-extern int (*rtc_set_time)(unsigned long);
-extern int (*rtc_set_mmss)(unsigned long);
+extern unsigned long (*rtc_mips_get_time)(void);
+extern int (*rtc_mips_set_time)(unsigned long);
+extern int (*rtc_mips_set_mmss)(unsigned long);

/*
* Timer interrupt functions.

2006-02-24 23:52:35

by Sam Ravnborg

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
>
> - Sam's new section-mismatch warning code detects 358 errors in my alpha
> build, and a quick sampling indicates that they're real. Once this hits
> mainline things will get somewhat messy.
To put credits right I just ported the functionality of the two scripts
developed by Keith Owens (reference_init.pl and reference_discarded.pl)
to modpost so the check is run each time moduels are build. All errors
introduced in the process are mine.
The scripts are kept for now so one can double check.

I had in mind to fix some of the easier ones but work is hindering it
atm.

For now it gives a warning when a drivers uses module_parm_array() and
uses __initdata for parameters. This is a false warning - at least if
sysfs attribute is '0'. Hope to look into this later.

Sam

2006-02-25 03:31:31

by Adrian Bunk

[permalink] [raw]
Subject: 2.6.16-rc4-mm2: drivers/rtc/utils.c should become part of a generic implementation

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +rtc-subsystem-class.patch
>...
> rtc subsystem rework. These patches are being updated.
>...

Always building drivers/rtc/utils.o even if no RTC support is enabled
seems to be a workaround for an issue that should instead be fixed
properly:

The code in e.g. fs/udf/udftime.c or drivers/scsi/ips.c has some
overlaps with what you are adding (they are not doing exactly the
same, but there are overlaps).

We should have one common set of defines/inlines/functions dealing with
all these time conversion, leap year, length of months/years etc. issues
instead of adding one more implementation in this area.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2006-02-25 03:39:05

by Adrian Bunk

[permalink] [raw]
Subject: 2.6.16-rc4-mm2: drivers/isdn/hysdn/hysdn_net.c module_param() compile error

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +remove-module_parm.patch
>...
> Current 2.6.16 queue. Some of these are a bit questionable at this stage.
>...

This causes the following compile error:

<-- snip -->

...
CC [M] drivers/isdn/hysdn/hysdn_net.o
drivers/isdn/hysdn/hysdn_net.c:27: error: syntax error before 'int'
drivers/isdn/hysdn/hysdn_net.c:27: error: syntax error before ',' token
drivers/isdn/hysdn/hysdn_net.c:27: error: 'param_set_unsigned' undeclared here (not in a function)
drivers/isdn/hysdn/hysdn_net.c:27: error: syntax error before 'int'
drivers/isdn/hysdn/hysdn_net.c:27: error: 'param_get_unsigned' undeclared here (not in a function)
make[3]: *** [drivers/isdn/hysdn/hysdn_net.o] Error 1

<-- snip -->

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2006-02-25 03:41:45

by Richard Knutsson

[permalink] [raw]
Subject: oss/sonicvibes.c defines its own hweight32

Hi Andrew and all

Just tried to compile the kernel with the 'allyesconfig' when I stumbled
on this one (have not seen any reports on this one, otherwise sorry for
the blotter):

CHK usr/initramfs_list
CC sound/oss/sonicvibes.o
sound/oss/sonicvibes.c:421: error: static declaration of ?hweight32? follows non-static declaration
include/asm-generic/bitops/hweight.h:6: error: previous declaration of ?hweight32? was here
make[2]: *** [sound/oss/sonicvibes.o] Error 1
make[1]: *** [sound/oss] Error 2
make: *** [sound] Error 2


I am not sure why it tries to make its own hweight32() so I just
disabled it:

--- a/sound/oss/sonicvibes.c 2006-02-24 23:14:11.000000000 +0100
+++ b/sound/oss/sonicvibes.c 2006-02-25 04:10:09.000000000 +0100
@@ -408,6 +408,7 @@ static inline unsigned ld2(unsigned int
return r;
}

+#if 0
/*
* hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word
@@ -425,6 +426,7 @@ static inline unsigned int hweight32(uns
res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF);
return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF);
}
+#endif

/* --------------------------------------------------------------------- */



BTW, I do not have the hardware, so it is just building-tested.

Best
Richard Knutsson

2006-02-25 04:11:47

by Adrian Bunk

[permalink] [raw]
Subject: 2.6.16-rc4-mm2: useless acpi_pmtmr_buggy

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +time-i386-clocksource-drivers-backout-pmtmr-changes.patch
>
> Various updates, fixes and cleanups for the time management patches in -mm.
>...

Both before and after this patch, acpi_pmtmr_buggy is useless since it
never gets any value assigned.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2006-02-25 04:46:43

by Alessandro Zummo

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/rtc/utils.c should become part of a generic implementation

On Sat, 25 Feb 2006 04:31:18 +0100
Adrian Bunk <[email protected]> wrote:

> Always building drivers/rtc/utils.o even if no RTC support is enabled
> seems to be a workaround for an issue that should instead be fixed
> properly:
>
> The code in e.g. fs/udf/udftime.c or drivers/scsi/ips.c has some
> overlaps with what you are adding (they are not doing exactly the
> same, but there are overlaps).
>
> We should have one common set of defines/inlines/functions dealing with
> all these time conversion, leap year, length of months/years etc. issues
> instead of adding one more implementation in this area.

I agree. My idea was to place those routines in utils.o and then
modify callers, like udftime.c and ips.c to use them. What is currently
in utils.c has been gathered from files that were known to me,
lice rtctime.c in the arm arch and some rtc drivers. Once deployed,
it will be easier to find and convert similar routines.y

--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

2006-02-25 07:09:59

by Rusty Russell

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/isdn/hysdn/hysdn_net.c module_param() compile error

On Sat, 2006-02-25 at 04:38 +0100, Adrian Bunk wrote:
> On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
> >...
> > Changes since 2.6.16-rc4-mm1:
> >...
> > +remove-module_parm.patch
> >...
> > Current 2.6.16 queue. Some of these are a bit questionable at this stage.
> >...
>
> This causes the following compile error:

Thanks Adrian!

The hysdn_net driver #defines uint to "unsigned int" in a header.
Remove that: the typedefs in types.h have the same effect, without
breaking "uint" module_param.

Signed-off-by: Rusty Russell <[email protected]>

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.16-rc4/drivers/isdn/hysdn/hysdn_defs.h working-2.6.16-rc4-MODULE_PARM-remove/drivers/isdn/hysdn/hysdn_defs.h
--- linux-2.6.16-rc4/drivers/isdn/hysdn/hysdn_defs.h 2005-08-29 14:39:36.000000000 +1000
+++ working-2.6.16-rc4-MODULE_PARM-remove/drivers/isdn/hysdn/hysdn_defs.h 2006-02-25 18:06:06.000000000 +1100
@@ -24,8 +24,6 @@
/* storage type definitions */
/****************************/
#define uchar unsigned char
-#define uint unsigned int
-#define ulong unsigned long
#define word unsigned short

#include "ince1pc.h"

--
ccontrol: http://ozlabs.org/~rusty/ccontrol

2006-02-25 07:26:45

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/isdn/hysdn/hysdn_net.c module_param() compile error

Adrian Bunk <[email protected]> wrote:
>
> On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
> >...
> > Changes since 2.6.16-rc4-mm1:
> >...
> > +remove-module_parm.patch
> >...
> > Current 2.6.16 queue. Some of these are a bit questionable at this stage.
> >...
>
> This causes the following compile error:
>
> <-- snip -->
>
> ...
> CC [M] drivers/isdn/hysdn/hysdn_net.o
> drivers/isdn/hysdn/hysdn_net.c:27: error: syntax error before 'int'
> drivers/isdn/hysdn/hysdn_net.c:27: error: syntax error before ',' token
> drivers/isdn/hysdn/hysdn_net.c:27: error: 'param_set_unsigned' undeclared here (not in a function)
> drivers/isdn/hysdn/hysdn_net.c:27: error: syntax error before 'int'
> drivers/isdn/hysdn/hysdn_net.c:27: error: 'param_get_unsigned' undeclared here (not in a function)
> make[3]: *** [drivers/isdn/hysdn/hysdn_net.o] Error 1

That's a bit nasty.

module_param(hynet_enable, uint, 0);

module_param() does funny things with macros, and relies upon things like
`uint' having a special-to-moduleparam.h meaning.

But ISDN defines its own meaning for uint and trips up the
moduleparam.h macros.

Bad Rusty should have chosen less generic-sounding identifiers.

Bad ISDN shouldn't have gone off and defined its own types, either.

Kasrten, this nukes the hysdn custom types. Is it acceptable?

drivers/isdn/hysdn/boardergo.c | 31 +++++------
drivers/isdn/hysdn/boardergo.h | 46 ++++++++--------
drivers/isdn/hysdn/hycapi.c | 2
drivers/isdn/hysdn/hysdn_boot.c | 28 +++++-----
drivers/isdn/hysdn/hysdn_defs.h | 71 ++++++++++++--------------
drivers/isdn/hysdn/hysdn_init.c | 4 -
drivers/isdn/hysdn/hysdn_net.c | 6 +-
drivers/isdn/hysdn/hysdn_pof.h | 12 ++--
drivers/isdn/hysdn/hysdn_procconf.c | 14 ++---
drivers/isdn/hysdn/hysdn_proclog.c | 10 +--
drivers/isdn/hysdn/hysdn_sched.c | 11 ++--
drivers/isdn/hysdn/ince1pc.h | 18 +++---
12 files changed, 127 insertions(+), 126 deletions(-)

diff -puN drivers/isdn/hysdn/hysdn_defs.h~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_defs.h
--- devel/drivers/isdn/hysdn/hysdn_defs.h~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_defs.h 2006-02-24 23:17:06.000000000 -0800
@@ -20,14 +20,6 @@
#include <linux/workqueue.h>
#include <linux/skbuff.h>

-/****************************/
-/* storage type definitions */
-/****************************/
-#define uchar unsigned char
-#define uint unsigned int
-#define ulong unsigned long
-#define word unsigned short
-
#include "ince1pc.h"

#ifdef CONFIG_HYSDN_CAPI
@@ -147,18 +139,18 @@ typedef struct HYSDN_CARD {

/* general variables for the cards */
int myid; /* own driver card id */
- uchar bus; /* pci bus the card is connected to */
- uchar devfn; /* slot+function bit encoded */
- word subsysid; /* PCI subsystem id */
- uchar brdtype; /* type of card */
- uint bchans; /* number of available B-channels */
- uint faxchans; /* number of available fax-channels */
- uchar mac_addr[6]; /* MAC Address read from card */
- uint irq; /* interrupt number */
- uint iobase; /* IO-port base address */
- ulong plxbase; /* PLX memory base */
- ulong membase; /* DPRAM memory base */
- ulong memend; /* DPRAM memory end */
+ unsigned char bus; /* pci bus the card is connected to */
+ unsigned char devfn; /* slot+function bit encoded */
+ unsigned short subsysid;/* PCI subsystem id */
+ unsigned char brdtype; /* type of card */
+ unsigned int bchans; /* number of available B-channels */
+ unsigned int faxchans; /* number of available fax-channels */
+ unsigned char mac_addr[6];/* MAC Address read from card */
+ unsigned int irq; /* interrupt number */
+ unsigned int iobase; /* IO-port base address */
+ unsigned long plxbase; /* PLX memory base */
+ unsigned long membase; /* DPRAM memory base */
+ unsigned long memend; /* DPRAM memory end */
void *dpram; /* mapped dpram */
int state; /* actual state of card -> CARD_STATE_** */
struct HYSDN_CARD *next; /* pointer to next card */
@@ -168,26 +160,26 @@ typedef struct HYSDN_CARD {
void *procconf; /* pointer to procconf filesystem specific data */

/* debugging and logging */
- uchar err_log_state; /* actual error log state of the card */
- ulong debug_flags; /* tells what should be debugged and where */
+ unsigned char err_log_state;/* actual error log state of the card */
+ unsigned long debug_flags;/* tells what should be debugged and where */
void (*set_errlog_state) (struct HYSDN_CARD *, int);

/* interrupt handler + interrupt synchronisation */
struct work_struct irq_queue; /* interrupt task queue */
- uchar volatile irq_enabled; /* interrupt enabled if != 0 */
- uchar volatile hw_lock; /* hardware is currently locked -> no access */
+ unsigned char volatile irq_enabled;/* interrupt enabled if != 0 */
+ unsigned char volatile hw_lock;/* hardware is currently locked -> no access */

/* boot process */
void *boot; /* pointer to boot private data */
- int (*writebootimg) (struct HYSDN_CARD *, uchar *, ulong);
- int (*writebootseq) (struct HYSDN_CARD *, uchar *, int);
+ int (*writebootimg) (struct HYSDN_CARD *, unsigned char *, unsigned long);
+ int (*writebootseq) (struct HYSDN_CARD *, unsigned char *, int);
int (*waitpofready) (struct HYSDN_CARD *);
int (*testram) (struct HYSDN_CARD *);

/* scheduler for data transfer (only async parts) */
- uchar async_data[256]; /* async data to be sent (normally for config) */
- word volatile async_len; /* length of data to sent */
- word volatile async_channel; /* channel number for async transfer */
+ unsigned char async_data[256];/* async data to be sent (normally for config) */
+ unsigned short volatile async_len;/* length of data to sent */
+ unsigned short volatile async_channel;/* channel number for async transfer */
int volatile async_busy; /* flag != 0 sending in progress */
int volatile net_tx_busy; /* a network packet tx is in progress */

@@ -251,15 +243,18 @@ extern int ergo_inithardware(hysdn_card

/* hysdn_boot.c */
extern int pof_write_close(hysdn_card *); /* close proc file after writing pof */
-extern int pof_write_open(hysdn_card *, uchar **); /* open proc file for writing pof */
+extern int pof_write_open(hysdn_card *, unsigned char **); /* open proc file for writing pof */
extern int pof_write_buffer(hysdn_card *, int); /* write boot data to card */
-extern int EvalSysrTokData(hysdn_card *, uchar *, int); /* Check Sysready Token Data */
+extern int EvalSysrTokData(hysdn_card *, unsigned char *, int); /* Check Sysready Token Data */

/* hysdn_sched.c */
-extern int hysdn_sched_tx(hysdn_card *, uchar *, word volatile *, word volatile *,
- word);
-extern int hysdn_sched_rx(hysdn_card *, uchar *, word, word);
-extern int hysdn_tx_cfgline(hysdn_card *, uchar *, word); /* send one cfg line */
+extern int hysdn_sched_tx(hysdn_card *, unsigned char *,
+ unsigned short volatile *, unsigned short volatile *,
+ unsigned short);
+extern int hysdn_sched_rx(hysdn_card *, unsigned char *, unsigned short,
+ unsigned short);
+extern int hysdn_tx_cfgline(hysdn_card *, unsigned char *,
+ unsigned short); /* send one cfg line */

/* hysdn_net.c */
extern unsigned int hynet_enable;
@@ -269,14 +264,16 @@ extern int hysdn_net_release(hysdn_card
extern char *hysdn_net_getname(hysdn_card *); /* get name of net interface */
extern void hysdn_tx_netack(hysdn_card *); /* acknowledge a packet tx */
extern struct sk_buff *hysdn_tx_netget(hysdn_card *); /* get next network packet */
-extern void hysdn_rx_netpkt(hysdn_card *, uchar *, word); /* rxed packet from network */
+extern void hysdn_rx_netpkt(hysdn_card *, unsigned char *,
+ unsigned short); /* rxed packet from network */

#ifdef CONFIG_HYSDN_CAPI
extern unsigned int hycapi_enable;
extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */
extern int hycapi_capi_release(hysdn_card *); /* delete the device */
extern int hycapi_capi_stop(hysdn_card *card); /* suspend */
-extern void hycapi_rx_capipkt(hysdn_card * card, uchar * buf, word len);
+extern void hycapi_rx_capipkt(hysdn_card * card, unsigned char * buf,
+ unsigned short len);
extern void hycapi_tx_capiack(hysdn_card * card);
extern struct sk_buff *hycapi_tx_capiget(hysdn_card *card);
extern int hycapi_init(void);
diff -puN drivers/isdn/hysdn/ince1pc.h~hysdn-remove-custom-types drivers/isdn/hysdn/ince1pc.h
--- devel/drivers/isdn/hysdn/ince1pc.h~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/ince1pc.h 2006-02-24 23:17:06.000000000 -0800
@@ -62,7 +62,7 @@
* s. RotlCRC algorithm
*
* RotlCRC algorithm:
- * ucSum= 0 1 uchar
+ * ucSum= 0 1 unsigned char
* for all NonEndTokenChunk bytes:
* ROTL(ucSum,1) rotate left by 1
* ucSum += Char; add current byte with swap around
@@ -85,13 +85,13 @@

typedef struct ErrLogEntry_tag {

-/*00 */ ulong ulErrType;
+/*00 */ unsigned long ulErrType;

-/*04 */ ulong ulErrSubtype;
+/*04 */ unsigned long ulErrSubtype;

-/*08 */ uchar ucTextSize;
+/*08 */ unsigned char ucTextSize;

- /*09 */ uchar ucText[ERRLOG_TEXT_SIZE];
+ /*09 */ unsigned char ucText[ERRLOG_TEXT_SIZE];
/* ASCIIZ of len ucTextSize-1 */

/*40 */
@@ -111,13 +111,13 @@ typedef struct ErrLogEntry_tag {
#define DPRAM_SPOOLER_DATA_SIZE 0x20
typedef struct DpramBootSpooler_tag {

-/*00 */ uchar Len;
+/*00 */ unsigned char Len;

-/*01 */ volatile uchar RdPtr;
+/*01 */ volatile unsigned char RdPtr;

-/*02 */ uchar WrPtr;
+/*02 */ unsigned char WrPtr;

-/*03 */ uchar Data[DPRAM_SPOOLER_DATA_SIZE];
+/*03 */ unsigned char Data[DPRAM_SPOOLER_DATA_SIZE];

/*23 */
} tDpramBootSpooler;
diff -puN drivers/isdn/hysdn/hysdn_net.c~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_net.c
--- devel/drivers/isdn/hysdn/hysdn_net.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_net.c 2006-02-24 23:17:06.000000000 -0800
@@ -83,12 +83,12 @@ net_open(struct net_device *dev)

/* Fill in the MAC-level header (if not already set) */
if (!card->mac_addr[0]) {
- for (i = 0; i < ETH_ALEN - sizeof(ulong); i++)
+ for (i = 0; i < ETH_ALEN - sizeof(unsigned long); i++)
dev->dev_addr[i] = 0xfc;
if ((in_dev = dev->ip_ptr) != NULL) {
struct in_ifaddr *ifa = in_dev->ifa_list;
if (ifa != NULL)
- memcpy(dev->dev_addr + (ETH_ALEN - sizeof(ulong)), &ifa->ifa_local, sizeof(ulong));
+ memcpy(dev->dev_addr + (ETH_ALEN - sizeof(unsigned long)), &ifa->ifa_local, sizeof(unsigned long));
}
} else
memcpy(dev->dev_addr, card->mac_addr, ETH_ALEN);
@@ -197,7 +197,7 @@ hysdn_tx_netack(hysdn_card * card)
/* we got a packet from the network, go and queue it */
/*****************************************************/
void
-hysdn_rx_netpkt(hysdn_card * card, uchar * buf, word len)
+hysdn_rx_netpkt(hysdn_card * card, unsigned char *buf, unsigned short len)
{
struct net_local *lp = card->netif;
struct sk_buff *skb;
diff -puN drivers/isdn/hysdn/boardergo.c~hysdn-remove-custom-types drivers/isdn/hysdn/boardergo.c
--- devel/drivers/isdn/hysdn/boardergo.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/boardergo.c 2006-02-24 23:17:06.000000000 -0800
@@ -38,8 +38,8 @@ ergo_interrupt(int intno, void *dev_id,
{
hysdn_card *card = dev_id; /* parameter from irq */
tErgDpram *dpr;
- ulong flags;
- uchar volatile b;
+ unsigned long flags;
+ unsigned char volatile b;

if (!card)
return IRQ_NONE; /* error -> spurious interrupt */
@@ -77,7 +77,7 @@ ergo_irq_bh(hysdn_card * card)
{
tErgDpram *dpr;
int again;
- ulong flags;
+ unsigned long flags;

if (card->state != CARD_STATE_RUN)
return; /* invalid call */
@@ -131,8 +131,8 @@ ergo_irq_bh(hysdn_card * card)
static void
ergo_stopcard(hysdn_card * card)
{
- ulong flags;
- uchar val;
+ unsigned long flags;
+ unsigned char val;

hysdn_net_release(card); /* first release the net device if existing */
#ifdef CONFIG_HYSDN_CAPI
@@ -157,7 +157,7 @@ ergo_stopcard(hysdn_card * card)
static void
ergo_set_errlog_state(hysdn_card * card, int on)
{
- ulong flags;
+ unsigned long flags;

if (card->state != CARD_STATE_RUN) {
card->err_log_state = ERRLOG_STATE_OFF; /* must be off */
@@ -217,9 +217,10 @@ ergo_testram(hysdn_card * card)
/* Negative return values are interpreted as errors. */
/*****************************************************************************/
static int
-ergo_writebootimg(struct HYSDN_CARD *card, uchar * buf, ulong offs)
+ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf,
+ unsigned long offs)
{
- uchar *dst;
+ unsigned char *dst;
tErgDpram *dpram;
int cnt = (BOOT_IMG_SIZE >> 2); /* number of words to move and swap (byte order!) */

@@ -264,14 +265,14 @@ ergo_writebootimg(struct HYSDN_CARD *car
/* case of errors a negative error value is returned. */
/********************************************************************************/
static int
-ergo_writebootseq(struct HYSDN_CARD *card, uchar * buf, int len)
+ergo_writebootseq(struct HYSDN_CARD *card, unsigned char *buf, int len)
{
tDpramBootSpooler *sp = (tDpramBootSpooler *) card->dpram;
- uchar *dst;
- uchar buflen;
+ unsigned char *dst;
+ unsigned char buflen;
int nr_write;
- uchar tmp_rdptr;
- uchar wr_mirror;
+ unsigned char tmp_rdptr;
+ unsigned char wr_mirror;
int i;

if (card->debug_flags & LOG_POF_CARD)
@@ -330,7 +331,7 @@ ergo_waitpofready(struct HYSDN_CARD *car
{
tErgDpram *dpr = card->dpram; /* pointer to DPRAM structure */
int timecnt = 10000 / 50; /* timeout is 10 secs max. */
- ulong flags;
+ unsigned long flags;
int msg_size;
int i;

@@ -345,7 +346,7 @@ ergo_waitpofready(struct HYSDN_CARD *car
if ((dpr->ToPcChannel != CHAN_SYSTEM) ||
(dpr->ToPcSize < MIN_RDY_MSG_SIZE) ||
(dpr->ToPcSize > MAX_RDY_MSG_SIZE) ||
- ((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC))
+ ((*(unsigned long *) dpr->ToPcBuf) != RDY_MAGIC))
break; /* an error occurred */

/* Check for additional data delivered during SysReady */
diff -puN drivers/isdn/hysdn/hycapi.c~hysdn-remove-custom-types drivers/isdn/hysdn/hycapi.c
--- devel/drivers/isdn/hysdn/hycapi.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hycapi.c 2006-02-24 23:17:06.000000000 -0800
@@ -523,7 +523,7 @@ New nccis are created if necessary.
*******************************************************************/

void
-hycapi_rx_capipkt(hysdn_card * card, uchar * buf, word len)
+hycapi_rx_capipkt(hysdn_card * card, unsigned char *buf, unsigned short len)
{
struct sk_buff *skb;
hycapictrl_info *cinfo = card->hyctrlinfo;
diff -puN drivers/isdn/hysdn/hysdn_boot.c~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_boot.c
--- devel/drivers/isdn/hysdn/hysdn_boot.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_boot.c 2006-02-24 23:17:06.000000000 -0800
@@ -30,17 +30,17 @@
/* needed during boot and so allocated dynamically. */
/************************************************************/
struct boot_data {
- word Cryptor; /* for use with Decrypt function */
- word Nrecs; /* records remaining in file */
- uchar pof_state; /* actual state of read handler */
- uchar is_crypted; /* card data is crypted */
+ unsigned short Cryptor; /* for use with Decrypt function */
+ unsigned short Nrecs; /* records remaining in file */
+ unsigned char pof_state;/* actual state of read handler */
+ unsigned char is_crypted;/* card data is crypted */
int BufSize; /* actual number of bytes bufferd */
int last_error; /* last occurred error */
- word pof_recid; /* actual pof recid */
- ulong pof_reclen; /* total length of pof record data */
- ulong pof_recoffset; /* actual offset inside pof record */
+ unsigned short pof_recid;/* actual pof recid */
+ unsigned long pof_reclen;/* total length of pof record data */
+ unsigned long pof_recoffset;/* actual offset inside pof record */
union {
- uchar BootBuf[BOOT_BUF_SIZE]; /* buffer as byte count */
+ unsigned char BootBuf[BOOT_BUF_SIZE];/* buffer as byte count */
tPofRecHdr PofRecHdr; /* header for actual record/chunk */
tPofFileHdr PofFileHdr; /* header from POF file */
tPofTimeStamp PofTime; /* time information */
@@ -69,11 +69,11 @@ StartDecryption(struct boot_data *boot)
static void
DecryptBuf(struct boot_data *boot, int cnt)
{
- uchar *bufp = boot->buf.BootBuf;
+ unsigned char *bufp = boot->buf.BootBuf;

while (cnt--) {
boot->Cryptor = (boot->Cryptor >> 1) ^ ((boot->Cryptor & 1U) ? CRYPT_FEEDTERM : 0);
- *bufp++ ^= (uchar) boot->Cryptor;
+ *bufp++ ^= (unsigned char)boot->Cryptor;
}
} /* DecryptBuf */

@@ -86,7 +86,7 @@ pof_handle_data(hysdn_card * card, int d
{
struct boot_data *boot = card->boot; /* pointer to boot specific data */
long l;
- uchar *imgp;
+ unsigned char *imgp;
int img_len;

/* handle the different record types */
@@ -197,7 +197,7 @@ pof_write_buffer(hysdn_card * card, int
break;
}
/* Setup the new state and vars */
- boot->Nrecs = (word) (boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */
+ boot->Nrecs = (unsigned short)(boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */
boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */
boot->last_error = sizeof(tPofRecHdr); /* new length */
break;
@@ -268,7 +268,7 @@ pof_write_buffer(hysdn_card * card, int
/* occurred. Additionally the pointer to the buffer data area is set on success */
/*******************************************************************************/
int
-pof_write_open(hysdn_card * card, uchar ** bufp)
+pof_write_open(hysdn_card * card, unsigned char **bufp)
{
struct boot_data *boot; /* pointer to boot specific data */

@@ -335,7 +335,7 @@ pof_write_close(hysdn_card * card)
/* when POF has been booted. A return value of 0 is used if no error occurred. */
/*********************************************************************************/
int
-EvalSysrTokData(hysdn_card * card, uchar * cp, int len)
+EvalSysrTokData(hysdn_card *card, unsigned char *cp, int len)
{
u_char *p;
u_char crc;
diff -puN drivers/isdn/hysdn/hysdn_init.c~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_init.c
--- devel/drivers/isdn/hysdn/hysdn_init.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_init.c 2006-02-24 23:17:06.000000000 -0800
@@ -41,8 +41,8 @@ hysdn_card *card_root = NULL; /* pointer
/* the last entry contains all 0 */
/**********************************************/
static struct {
- word subid; /* PCI sub id */
- uchar cardtyp; /* card type assigned */
+ unsigned short subid; /* PCI sub id */
+ unsigned char cardtyp; /* card type assigned */
} pci_subid_map[] = {

{
diff -puN drivers/isdn/hysdn/hysdn_procconf.c~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_procconf.c
--- devel/drivers/isdn/hysdn/hysdn_procconf.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_procconf.c 2006-02-24 23:17:06.000000000 -0800
@@ -36,9 +36,9 @@ struct conf_writedata {
int buf_size; /* actual number of bytes in the buffer */
int needed_size; /* needed size when reading pof */
int state; /* actual interface states from above constants */
- uchar conf_line[CONF_LINE_LEN]; /* buffered conf line */
- word channel; /* active channel number */
- uchar *pof_buffer; /* buffer when writing pof */
+ unsigned char conf_line[CONF_LINE_LEN]; /* buffered conf line */
+ unsigned short channel; /* active channel number */
+ unsigned char *pof_buffer; /* buffer when writing pof */
};

/***********************************************************************/
@@ -49,7 +49,7 @@ struct conf_writedata {
static int
process_line(struct conf_writedata *cnf)
{
- uchar *cp = cnf->conf_line;
+ unsigned char *cp = cnf->conf_line;
int i;

if (cnf->card->debug_flags & LOG_CNF_LINE)
@@ -92,7 +92,7 @@ hysdn_conf_write(struct file *file, cons
{
struct conf_writedata *cnf;
int i;
- uchar ch, *cp;
+ unsigned char ch, *cp;

if (!count)
return (0); /* nothing to handle */
@@ -390,7 +390,7 @@ int
hysdn_procconf_init(void)
{
hysdn_card *card;
- uchar conf_name[20];
+ unsigned char conf_name[20];

hysdn_proc_entry = proc_mkdir(PROC_SUBDIR_NAME, proc_net);
if (!hysdn_proc_entry) {
@@ -423,7 +423,7 @@ void
hysdn_procconf_release(void)
{
hysdn_card *card;
- uchar conf_name[20];
+ unsigned char conf_name[20];

card = card_root; /* start with first card */
while (card) {
diff -puN drivers/isdn/hysdn/hysdn_proclog.c~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_proclog.c
--- devel/drivers/isdn/hysdn/hysdn_proclog.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_proclog.c 2006-02-24 23:17:06.000000000 -0800
@@ -28,7 +28,7 @@ static void put_log_buffer(hysdn_card *
/*************************************************/
struct log_data {
struct log_data *next;
- ulong usage_cnt; /* number of files still to work */
+ unsigned long usage_cnt;/* number of files still to work */
void *proc_ctrl; /* pointer to own control procdata structure */
char log_start[2]; /* log string start (final len aligned by size) */
};
@@ -42,7 +42,7 @@ struct procdata {
struct log_data *log_head, *log_tail; /* head and tail for queue */
int if_used; /* open count for interface */
int volatile del_lock; /* lock for delete operations */
- uchar logtmp[LOG_MAX_LINELEN];
+ unsigned char logtmp[LOG_MAX_LINELEN];
wait_queue_head_t rd_queue;
};

@@ -153,9 +153,9 @@ put_log_buffer(hysdn_card * card, char *
static ssize_t
hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
{
- ulong u = 0;
+ unsigned long u = 0;
int found = 0;
- uchar *cp, valbuf[128];
+ unsigned char *cp, valbuf[128];
long base = 10;
hysdn_card *card = (hysdn_card *) file->private_data;

@@ -249,7 +249,7 @@ hysdn_log_open(struct inode *ino, struct
{
hysdn_card *card;
struct procdata *pd = NULL;
- ulong flags;
+ unsigned long flags;

lock_kernel();
card = card_root;
diff -puN drivers/isdn/hysdn/hysdn_sched.c~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_sched.c
--- devel/drivers/isdn/hysdn/hysdn_sched.c~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_sched.c 2006-02-24 23:18:06.000000000 -0800
@@ -30,7 +30,8 @@
/* to keep the data until later. */
/*****************************************************************************/
int
-hysdn_sched_rx(hysdn_card * card, uchar * buf, word len, word chan)
+hysdn_sched_rx(hysdn_card *card, unsigned char *buf, unsigned short len,
+ unsigned short chan)
{

switch (chan) {
@@ -72,7 +73,9 @@ hysdn_sched_rx(hysdn_card * card, uchar
/* sending. */
/*****************************************************************************/
int
-hysdn_sched_tx(hysdn_card * card, uchar * buf, word volatile *len, word volatile *chan, word maxlen)
+hysdn_sched_tx(hysdn_card *card, unsigned char *buf,
+ unsigned short volatile *len, unsigned short volatile *chan,
+ unsigned short maxlen)
{
struct sk_buff *skb;

@@ -145,10 +148,10 @@ hysdn_sched_tx(hysdn_card * card, uchar
/* are to be sent and this happens very seldom. */
/*****************************************************************************/
int
-hysdn_tx_cfgline(hysdn_card * card, uchar * line, word chan)
+hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
{
int cnt = 50; /* timeout intervalls */
- ulong flags;
+ unsigned long flags;

if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1);
diff -puN drivers/isdn/hysdn/boardergo.h~hysdn-remove-custom-types drivers/isdn/hysdn/boardergo.h
--- devel/drivers/isdn/hysdn/boardergo.h~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/boardergo.h 2006-02-24 23:17:06.000000000 -0800
@@ -23,36 +23,36 @@

/* following DPRAM layout copied from OS2-driver boarderg.h */
typedef struct ErgDpram_tag {
-/*0000 */ uchar ToHyBuf[ERG_TO_HY_BUF_SIZE];
-/*0E00 */ uchar ToPcBuf[ERG_TO_PC_BUF_SIZE];
+/*0000 */ unsigned char ToHyBuf[ERG_TO_HY_BUF_SIZE];
+/*0E00 */ unsigned char ToPcBuf[ERG_TO_PC_BUF_SIZE];

- /*1C00 */ uchar bSoftUart[SIZE_RSV_SOFT_UART];
+ /*1C00 */ unsigned char bSoftUart[SIZE_RSV_SOFT_UART];
/* size 0x1B0 */

- /*1DB0 *//* tErrLogEntry */ uchar volatile ErrLogMsg[64];
+ /*1DB0 *//* tErrLogEntry */ unsigned char volatile ErrLogMsg[64];
/* size 64 bytes */
- /*1DB0 ulong ulErrType; */
- /*1DB4 ulong ulErrSubtype; */
- /*1DB8 ulong ucTextSize; */
- /*1DB9 ulong ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */
+ /*1DB0 unsigned long ulErrType; */
+ /*1DB4 unsigned long ulErrSubtype; */
+ /*1DB8 unsigned long ucTextSize; */
+ /*1DB9 unsigned long ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */
/*1DF0 */

-/*1DF0 */ word volatile ToHyChannel;
-/*1DF2 */ word volatile ToHySize;
- /*1DF4 */ uchar volatile ToHyFlag;
+/*1DF0 */ unsigned short volatile ToHyChannel;
+/*1DF2 */ unsigned short volatile ToHySize;
+ /*1DF4 */ unsigned char volatile ToHyFlag;
/* !=0: msg for Hy waiting */
- /*1DF5 */ uchar volatile ToPcFlag;
+ /*1DF5 */ unsigned char volatile ToPcFlag;
/* !=0: msg for PC waiting */
-/*1DF6 */ word volatile ToPcChannel;
-/*1DF8 */ word volatile ToPcSize;
- /*1DFA */ uchar bRes1DBA[0x1E00 - 0x1DFA];
+/*1DF6 */ unsigned short volatile ToPcChannel;
+/*1DF8 */ unsigned short volatile ToPcSize;
+ /*1DFA */ unsigned char bRes1DBA[0x1E00 - 0x1DFA];
/* 6 bytes */

-/*1E00 */ uchar bRestOfEntryTbl[0x1F00 - 0x1E00];
-/*1F00 */ ulong TrapTable[62];
- /*1FF8 */ uchar bRes1FF8[0x1FFB - 0x1FF8];
+/*1E00 */ unsigned char bRestOfEntryTbl[0x1F00 - 0x1E00];
+/*1F00 */ unsigned long TrapTable[62];
+ /*1FF8 */ unsigned char bRes1FF8[0x1FFB - 0x1FF8];
/* low part of reset vetor */
-/*1FFB */ uchar ToPcIntMetro;
+/*1FFB */ unsigned char ToPcIntMetro;
/* notes:
* - metro has 32-bit boot ram - accessing
* ToPcInt and ToHyInt would be the same;
@@ -65,16 +65,16 @@ typedef struct ErgDpram_tag {
* so E1 side should NOT change this byte
* when writing!
*/
-/*1FFC */ uchar volatile ToHyNoDpramErrLog;
+/*1FFC */ unsigned char volatile ToHyNoDpramErrLog;
/* note: ToHyNoDpramErrLog is used to inform
* boot loader, not to use DPRAM based
* ErrLog; when DOS driver is rewritten
* this becomes obsolete
*/
-/*1FFD */ uchar bRes1FFD;
- /*1FFE */ uchar ToPcInt;
+/*1FFD */ unsigned char bRes1FFD;
+ /*1FFE */ unsigned char ToPcInt;
/* E1_intclear; on CHAMP2: E1_intset */
- /*1FFF */ uchar ToHyInt;
+ /*1FFF */ unsigned char ToHyInt;
/* E1_intset; on CHAMP2: E1_intclear */
} tErgDpram;

diff -puN drivers/isdn/hysdn/hysdn_pof.h~hysdn-remove-custom-types drivers/isdn/hysdn/hysdn_pof.h
--- devel/drivers/isdn/hysdn/hysdn_pof.h~hysdn-remove-custom-types 2006-02-24 23:17:06.000000000 -0800
+++ devel-akpm/drivers/isdn/hysdn/hysdn_pof.h 2006-02-24 23:17:06.000000000 -0800
@@ -47,20 +47,20 @@

/*--------------------------------------POF file record structs------------*/
typedef struct PofFileHdr_tag { /* Pof file header */
-/*00 */ ulong Magic __attribute__((packed));
-/*04 */ ulong N_PofRecs __attribute__((packed));
+/*00 */ unsigned long Magic __attribute__((packed));
+/*04 */ unsigned long N_PofRecs __attribute__((packed));
/*08 */
} tPofFileHdr;

typedef struct PofRecHdr_tag { /* Pof record header */
-/*00 */ word PofRecId __attribute__((packed));
-/*02 */ ulong PofRecDataLen __attribute__((packed));
+/*00 */ unsigned short PofRecId __attribute__((packed));
+/*02 */ unsigned long PofRecDataLen __attribute__((packed));
/*06 */
} tPofRecHdr;

typedef struct PofTimeStamp_tag {
-/*00 */ ulong UnixTime __attribute__((packed));
- /*04 */ uchar DateTimeText[0x28] __attribute__((packed));
+/*00 */ unsigned long UnixTime __attribute__((packed));
+ /*04 */ unsigned char DateTimeText[0x28] __attribute__((packed));
/* =40 */
/*2C */
} tPofTimeStamp;
_

2006-02-25 07:55:58

by Rusty Russell

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/isdn/hysdn/hysdn_net.c module_param() compile error

On Fri, 2006-02-24 at 23:22 -0800, Andrew Morton wrote:
> Bad Rusty should have chosen less generic-sounding identifiers.

I actually disagree with that, for three reasons. Firstly, my namespace
didn't leak: I only appended these names to clear prefixes. Secondly,
uint is already typedefed in types.h. Thirdly, the short names are
clear and intuitive.

> Bad ISDN shouldn't have gone off and defined its own types, either.

That was poor, yes, but typedefs would have been less polluting than
#defines.

Hope that clarifies!
Rusty.
--
ccontrol: http://ozlabs.org/~rusty/ccontrol

2006-02-25 11:59:34

by Jesper Juhl

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

On 2/24/06, Andrew Morton <[email protected]> wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
>

Geode video breaks the build :

LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o(.text+0x133f6): In function `gxfb_set_par':
: undefined reference to `fb_dealloc_cmap'
drivers/built-in.o(.text+0x13432): In function `gxfb_set_par':
: undefined reference to `fb_alloc_cmap'
drivers/built-in.o(.text+0x1359e): In function `gxfb_remove':
: undefined reference to `unregister_framebuffer'
drivers/built-in.o(.text+0x135f5): In function `gxfb_remove':
: undefined reference to `framebuffer_release'
drivers/built-in.o(.init.text+0x168e): In function `gxfb_init_fbinfo':
: undefined reference to `framebuffer_alloc'
drivers/built-in.o(.init.text+0x17b8): In function `gxfb_probe':
: undefined reference to `fb_find_mode'
drivers/built-in.o(.init.text+0x180f): In function `gxfb_probe':
: undefined reference to `register_framebuffer'
drivers/built-in.o(.init.text+0x189e): In function `gxfb_probe':
: undefined reference to `framebuffer_release'
drivers/built-in.o(.init.text+0x192b): In function `gxfb_init':
: undefined reference to `fb_get_options'
make: *** [.tmp_vmlinux1] Error 1


--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

2006-02-25 12:20:27

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

"Jesper Juhl" <[email protected]> wrote:
>
> On 2/24/06, Andrew Morton <[email protected]> wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
> >
>
> Geode video breaks the build :
>
> LD init/built-in.o
> LD .tmp_vmlinux1
> drivers/built-in.o(.text+0x133f6): In function `gxfb_set_par':
> : undefined reference to `fb_dealloc_cmap'
> drivers/built-in.o(.text+0x13432): In function `gxfb_set_par':
> : undefined reference to `fb_alloc_cmap'

How'd you manage that? Those things are dragged in via CONFIG_FB.

2006-02-25 12:25:46

by Jesper Juhl

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

On 2/25/06, Andrew Morton <[email protected]> wrote:
> "Jesper Juhl" <[email protected]> wrote:
> >
> > On 2/24/06, Andrew Morton <[email protected]> wrote:
> > >
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
> > >
> >
> > Geode video breaks the build :
> >
> > LD init/built-in.o
> > LD .tmp_vmlinux1
> > drivers/built-in.o(.text+0x133f6): In function `gxfb_set_par':
> > : undefined reference to `fb_dealloc_cmap'
> > drivers/built-in.o(.text+0x13432): In function `gxfb_set_par':
> > : undefined reference to `fb_alloc_cmap'
>
> How'd you manage that? Those things are dragged in via CONFIG_FB.
>
with "make randconfig" - the config it generated for me (and which
broke) is attached.


--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html


Attachments:
(No filename) (937.00 B)
config (27.63 kB)
Download all attachments

2006-02-25 12:32:20

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

"Jesper Juhl" <[email protected]> wrote:
>
> On 2/25/06, Andrew Morton <[email protected]> wrote:
> > "Jesper Juhl" <[email protected]> wrote:
> > >
> > > On 2/24/06, Andrew Morton <[email protected]> wrote:
> > > >
> > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
> > > >
> > >
> > > Geode video breaks the build :
> > >
> > > LD init/built-in.o
> > > LD .tmp_vmlinux1
> > > drivers/built-in.o(.text+0x133f6): In function `gxfb_set_par':
> > > : undefined reference to `fb_dealloc_cmap'
> > > drivers/built-in.o(.text+0x13432): In function `gxfb_set_par':
> > > : undefined reference to `fb_alloc_cmap'
> >
> > How'd you manage that? Those things are dragged in via CONFIG_FB.
> >
> with "make randconfig" - the config it generated for me (and which
> broke) is attached.

CONFIG_FB=m, CONFIG_FB_GEODE_GX=y. An easy mistake, that.

2006-02-25 12:41:15

by Jesper Juhl

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

On 2/25/06, Andrew Morton <[email protected]> wrote:
> "Jesper Juhl" <[email protected]> wrote:
> >
> > On 2/25/06, Andrew Morton <[email protected]> wrote:
> > > "Jesper Juhl" <[email protected]> wrote:
> > > >
> > > > On 2/24/06, Andrew Morton <[email protected]> wrote:
> > > > >
> > > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
> > > > >
> > > >
> > > > Geode video breaks the build :
> > > >
> > > > LD init/built-in.o
> > > > LD .tmp_vmlinux1
> > > > drivers/built-in.o(.text+0x133f6): In function `gxfb_set_par':
> > > > : undefined reference to `fb_dealloc_cmap'
> > > > drivers/built-in.o(.text+0x13432): In function `gxfb_set_par':
> > > > : undefined reference to `fb_alloc_cmap'
> > >
> > > How'd you manage that? Those things are dragged in via CONFIG_FB.
> > >
> > with "make randconfig" - the config it generated for me (and which
> > broke) is attached.
>
> CONFIG_FB=m, CONFIG_FB_GEODE_GX=y. An easy mistake, that.
>

Does it even make sense to build CONFIG_FB modular?

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

2006-02-25 13:10:26

by Adrian Bunk

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/rtc/utils.c should become part of a generic implementation

On Sat, Feb 25, 2006 at 05:46:19AM +0100, Alessandro Zummo wrote:
> On Sat, 25 Feb 2006 04:31:18 +0100
> Adrian Bunk <[email protected]> wrote:
>
> > Always building drivers/rtc/utils.o even if no RTC support is enabled
> > seems to be a workaround for an issue that should instead be fixed
> > properly:
> >
> > The code in e.g. fs/udf/udftime.c or drivers/scsi/ips.c has some
> > overlaps with what you are adding (they are not doing exactly the
> > same, but there are overlaps).
> >
> > We should have one common set of defines/inlines/functions dealing with
> > all these time conversion, leap year, length of months/years etc. issues
> > instead of adding one more implementation in this area.
>
> I agree. My idea was to place those routines in utils.o and then
> modify callers, like udftime.c and ips.c to use them. What is currently
> in utils.c has been gathered from files that were known to me,
> lice rtctime.c in the arm arch and some rtc drivers. Once deployed,
> it will be easier to find and convert similar routines.y

Sounds good, but for generic functions, two adjustments are required:
- move the code to lib/
- remove rtc_ prefixes from the functions

> Best regards,
> Alessandro Zummo,

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2006-02-25 13:15:31

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] drivers/media/video/cpia2/cpia2_v4l.c cleanups

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +add-cpia2-camera-support.patch
>
> CPIA camera driver

This patch contains the following cleanups:
- make 2 needlessly global functions static
- remove cpia2_setup(): the driver already allows setting parameters
through module_param(), and there's no reason for having two different
ways for setting the same parameters


Signed-off-by: Adrian Bunk <[email protected]>

---

Documentation/video4linux/README.cpia2 | 2 -
drivers/media/video/cpia2/cpia2_v4l.c | 29 +------------------------
2 files changed, 3 insertions(+), 28 deletions(-)

--- linux-2.6.16-rc4-mm2-full/Documentation/video4linux/README.cpia2.old 2006-02-25 05:00:43.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/Documentation/video4linux/README.cpia2 2006-02-25 05:01:30.000000000 +0100
@@ -70,7 +70,7 @@

If the driver is compiled into the kernel, at boot time specify them
like this:
- cpia2=num_buffers:3,buffer_size:65535
+ cpia2.num_buffers=3 cpia2.buffer_size=65535

What buffer size should I use?
------------------------------
--- linux-2.6.16-rc4-mm2-full/drivers/media/video/cpia2/cpia2_v4l.c.old 2006-02-25 05:02:17.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/drivers/media/video/cpia2/cpia2_v4l.c 2006-02-25 05:38:03.000000000 +0100
@@ -2054,7 +2054,7 @@
* cpia2_init/module_init
*
*****************************************************************************/
-int __init cpia2_init(void)
+static int __init cpia2_init(void)
{
LOG("%s v%d.%d.%d\n",
ABOUT, CPIA2_MAJ_VER, CPIA2_MIN_VER, CPIA2_PATCH_VER);
@@ -2069,37 +2069,12 @@
* cpia2_exit/module_exit
*
*****************************************************************************/
-void __exit cpia2_exit(void)
+static void __exit cpia2_exit(void)
{
cpia2_usb_cleanup();
schedule_timeout(2 * HZ);
}

-
-int __init cpia2_setup(char *str)
-{
- while(str) {
- if(!strncmp(str, "buffer_size:", 12)) {
- buffer_size = simple_strtoul(str + 13, &str, 10);
- } else if(!strncmp(str, "num_buffers:", 12)) {
- num_buffers = simple_strtoul(str + 13, &str, 10);
- } else if(!strncmp(str, "alternate:", 10)) {
- alternate = simple_strtoul(str + 11, &str, 10);
- } else if(!strncmp(str, "video_nr:", 9)) {
- video_nr = simple_strtoul(str + 10, &str, 10);
- } else if(!strncmp(str, "flicker_freq:",13)) {
- flicker_freq = simple_strtoul(str + 14, &str, 10);
- } else if(!strncmp(str, "flicker_mode:",13)) {
- flicker_mode = simple_strtoul(str + 14, &str, 10);
- } else {
- ++str;
- }
- }
- return 1;
-}
-
-__setup("cpia2=", cpia2_setup);
-
module_init(cpia2_init);
module_exit(cpia2_exit);


2006-02-25 13:18:16

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] kernel/params.c: make param_array() static

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +remove-module_parm.patch
>...
> Current 2.6.16 queue. Some of these are a bit questionable at this stage.
>...


param_array() in kernel/params.c can now become static.


Signed-off-by: Adrian Bunk <[email protected]>

---

include/linux/moduleparam.h | 7 -------
kernel/params.c | 12 ++++++------
2 files changed, 6 insertions(+), 13 deletions(-)

--- linux-2.6.16-rc4-mm2-full/include/linux/moduleparam.h.old 2006-02-25 04:39:11.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/include/linux/moduleparam.h 2006-02-25 04:40:01.000000000 +0100
@@ -162,13 +162,6 @@
extern int param_set_copystring(const char *val, struct kernel_param *kp);
extern int param_get_string(char *buffer, struct kernel_param *kp);

-int param_array(const char *name,
- const char *val,
- unsigned int min, unsigned int max,
- void *elem, int elemsize,
- int (*set)(const char *, struct kernel_param *kp),
- int *num);
-
/* for exporting parameters in /sys/parameters */

struct module;
--- linux-2.6.16-rc4-mm2-full/kernel/params.c.old 2006-02-25 04:40:07.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/kernel/params.c 2006-02-25 04:42:55.000000000 +0100
@@ -265,12 +265,12 @@
}

/* We cheat here and temporarily mangle the string. */
-int param_array(const char *name,
- const char *val,
- unsigned int min, unsigned int max,
- void *elem, int elemsize,
- int (*set)(const char *, struct kernel_param *kp),
- int *num)
+static int param_array(const char *name,
+ const char *val,
+ unsigned int min, unsigned int max,
+ void *elem, int elemsize,
+ int (*set)(const char *, struct kernel_param *kp),
+ int *num)
{
int ret;
struct kernel_param kp;

2006-02-25 13:21:29

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] drivers/rtc/: make some structs static

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +rtc-subsystem-class.patch
> +rtc-subsystem-arm-cleanup.patch
> +rtc-subsystem-i2c-cleanup.patch
> +rtc-subsystem-sysfs-interface.patch
> +rtc-subsystem-proc-interface.patch
> +rtc-subsystem-dev-interface.patch
> +rtc-subsystem-x1205-driver.patch
> +rtc-subsystem-test-device-driver.patch
> +rtc-subsystem-ds1672-driver.patch
> +rtc-subsystem-pcf8563-driver.patch
> +rtc-subsystem-rs5c372-driver.patch
>
> rtc subsystem rework. These patches are being updated.
>...


This patch makes some needlessly global structs static.


Signed-off-by: Adrian Bunk <[email protected]>

---

drivers/rtc/rtc-dev.c | 2 +-
drivers/rtc/rtc-proc.c | 2 +-
drivers/rtc/rtc-sysfs.c | 2 +-
drivers/rtc/rtc-test.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

--- linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-dev.c.old 2006-02-25 04:52:13.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-dev.c 2006-02-25 04:52:28.000000000 +0100
@@ -330,7 +330,7 @@

/* interface registration */

-struct class_interface rtc_dev_interface = {
+static struct class_interface rtc_dev_interface = {
.add = &rtc_dev_add_device,
.remove = &rtc_dev_remove_device,
};
--- linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-proc.c.old 2006-02-25 04:52:32.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-proc.c 2006-02-25 04:52:40.000000000 +0100
@@ -135,7 +135,7 @@
mutex_unlock(&rtc_lock);
}

-struct class_interface rtc_proc_interface = {
+static struct class_interface rtc_proc_interface = {
.add = &rtc_proc_add_device,
.remove = &rtc_proc_remove_device,
};
--- linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-sysfs.c.old 2006-02-25 04:52:49.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-sysfs.c 2006-02-25 04:52:58.000000000 +0100
@@ -97,7 +97,7 @@

/* interface registration */

-struct class_interface rtc_sysfs_interface = {
+static struct class_interface rtc_sysfs_interface = {
.add = &rtc_sysfs_add_device,
.remove = &rtc_sysfs_remove_device,
};
--- linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-test.c.old 2006-02-25 04:53:20.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/drivers/rtc/rtc-test.c 2006-02-25 04:53:28.000000000 +0100
@@ -14,7 +14,7 @@
#include <linux/rtc.h>
#include <linux/platform_device.h>

-struct platform_device *test0 = NULL, *test1 = NULL;
+static struct platform_device *test0 = NULL, *test1 = NULL;


static int test_rtc_read_alarm(struct device *dev,

2006-02-25 13:24:11

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] kernel/fork.c: make signal_cachep static

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> +copy_process-cleanup-bad_fork_cleanup_signal.patch
>...
> More core process/pid/thread updates from Oleg.
>...


signal_cachep can now become static.


Signed-off-by: Adrian Bunk <[email protected]>

---

include/linux/slab.h | 1 -
kernel/fork.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.16-rc4-mm2-full/include/linux/slab.h.old 2006-02-25 04:48:29.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/include/linux/slab.h 2006-02-25 04:48:36.000000000 +0100
@@ -182,7 +182,6 @@
extern kmem_cache_t *files_cachep;
extern kmem_cache_t *filp_cachep;
extern kmem_cache_t *fs_cachep;
-extern kmem_cache_t *signal_cachep;
extern kmem_cache_t *sighand_cachep;
extern kmem_cache_t *bio_cachep;

--- linux-2.6.16-rc4-mm2-full/kernel/fork.c.old 2006-02-25 04:48:43.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/kernel/fork.c 2006-02-25 04:48:49.000000000 +0100
@@ -84,7 +84,7 @@
#endif

/* SLAB cache for signal_struct structures (tsk->signal) */
-kmem_cache_t *signal_cachep;
+static kmem_cache_t *signal_cachep;

/* SLAB cache for sighand_struct structures (tsk->sighand) */
kmem_cache_t *sighand_cachep;

2006-02-25 13:27:33

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] net/dccp/ipv4.c: make struct dccp_v4_prot static

On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.16-rc4-mm1:
>...
> git-net.patch
>...
> git trees.
>...


There's no reason for struct dccp_v4_prot being global.


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.16-rc4-mm2-full/net/dccp/ipv4.c.old 2006-02-25 04:32:45.000000000 +0100
+++ linux-2.6.16-rc4-mm2-full/net/dccp/ipv4.c 2006-02-25 04:32:53.000000000 +0100
@@ -1022,7 +1022,7 @@
.twsk_obj_size = sizeof(struct inet_timewait_sock),
};

-struct proto dccp_v4_prot = {
+static struct proto dccp_v4_prot = {
.name = "DCCP",
.owner = THIS_MODULE,
.close = dccp_close,

2006-02-25 13:48:25

by Atsushi Nemoto

[permalink] [raw]
Subject: Re: [-mm PATCH] mips: fixed collision of rtc function name

>>>>> On Sat, 25 Feb 2006 01:27:21 +0900, Yoichi Yuasa <[email protected]> said:

yoichi> This patch has fixed the collision of rtc function name on
yoichi> 2.6.16-rc4-mm2.

You missed changes for include/asm-mips/rtc.h (an interface for genrtc
driver) ? Or genrtc driver will be gone in the new RTC subsystem?

---
Atsushi Nemoto

2006-02-25 13:46:20

by Jiri Slaby

[permalink] [raw]
Subject: usbfs2 panic [Was: 2.6.16-rc4-mm2]

Andrew Morton wrote:
>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
[...]
Hello,

I catched this oops through booting due to Greg's inode usbfs2 patch.
Here is camera-snapshot of the screen:
http://www.fi.muni.cz/~xslaby/sklad/panic.gif
Config:
http://www.fi.muni.cz/~xslaby/sklad/config-desk

regards,
--
Jiri Slaby http://www.fi.muni.cz/~xslaby
\_.-^-._ [email protected] _.-^-._/
B67499670407CE62ACC8 22A032CC55C339D47A7E

2006-02-25 14:31:04

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [-mm patch] net/dccp/ipv4.c: make struct dccp_v4_prot static

On 2/25/06, Adrian Bunk <[email protected]> wrote:
> On Fri, Feb 24, 2006 at 03:10:02AM -0800, Andrew Morton wrote:
> >...
> > Changes since 2.6.16-rc4-mm1:
> >...
> > git-net.patch
> >...
> > git trees.
> >...
>
>
> There's no reason for struct dccp_v4_prot being global.
>
>
> Signed-off-by: Adrian Bunk <[email protected]>
>
> --- linux-2.6.16-rc4-mm2-full/net/dccp/ipv4.c.old 2006-02-25 04:32:45.000000000 +0100
> +++ linux-2.6.16-rc4-mm2-full/net/dccp/ipv4.c 2006-02-25 04:32:53.000000000 +0100
> @@ -1022,7 +1022,7 @@
> .twsk_obj_size = sizeof(struct inet_timewait_sock),
> };
>
> -struct proto dccp_v4_prot = {
> +static struct proto dccp_v4_prot = {
> .name = "DCCP",
> .owner = THIS_MODULE,
> .close = dccp_close,

Heck, the last series of patches were exactly to separate ipv4/ipv6 in
DCCP more clearly, how could I forget the cherry on top (sticking this static
in front of dccp_v4_prot)?

Eagle eyes indeed.

Thanks.

- Arnaldo

2006-02-25 15:51:17

by Jesper Juhl

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

On 2/25/06, Jesper Juhl <[email protected]> wrote:
> On 2/25/06, Andrew Morton <[email protected]> wrote:
> > "Jesper Juhl" <[email protected]> wrote:
> > >
> > > On 2/25/06, Andrew Morton <[email protected]> wrote:
> > > > "Jesper Juhl" <[email protected]> wrote:
> > > > >
> > > > > On 2/24/06, Andrew Morton <[email protected]> wrote:
> > > > > >
> > > > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
> > > > > >
> > > > >
> > > > > Geode video breaks the build :
> > > > >
> > > > > LD init/built-in.o
> > > > > LD .tmp_vmlinux1
> > > > > drivers/built-in.o(.text+0x133f6): In function `gxfb_set_par':
> > > > > : undefined reference to `fb_dealloc_cmap'
> > > > > drivers/built-in.o(.text+0x13432): In function `gxfb_set_par':
> > > > > : undefined reference to `fb_alloc_cmap'
> > > >
> > > > How'd you manage that? Those things are dragged in via CONFIG_FB.
> > > >
> > > with "make randconfig" - the config it generated for me (and which
> > > broke) is attached.
> >
> > CONFIG_FB=m, CONFIG_FB_GEODE_GX=y. An easy mistake, that.
> >
>
> Does it even make sense to build CONFIG_FB modular?
>

Whoops, broke it again with a different config (attached) :

LD init/built-in.o
LD vmlinux
kernel/built-in.o(.data+0x8b8): undefined reference to `uevent_helper'
make: *** [vmlinux] Error 1


--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html


Attachments:
(No filename) (1.54 kB)
config (15.74 kB)
Download all attachments

2006-02-25 18:05:48

by Greg KH

[permalink] [raw]
Subject: Re: usbfs2 panic [Was: 2.6.16-rc4-mm2]

On Sat, Feb 25, 2006 at 02:45:54PM +0100, Jiri Slaby wrote:
> Andrew Morton wrote:
> >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc4/2.6.16-rc4-mm2/
> [...]
> Hello,
>
> I catched this oops through booting due to Greg's inode usbfs2 patch.
> Here is camera-snapshot of the screen:
> http://www.fi.muni.cz/~xslaby/sklad/panic.gif
> Config:
> http://www.fi.muni.cz/~xslaby/sklad/config-desk

Thanks. For now just disable usbfs2, or make it a module and don't load
it. It is _very_ raw and as you see, doesn't work properly. And, in
working on it some more, usbfs2 is not even going to be a file system,
but instead just rely on device nodes, like usbfs does today. That will
allow us to proper set ACLs and not force distros to have to mount
yet-another-filesytem.

thanks,

greg k-h

2006-02-26 18:41:53

by Alessandro Zummo

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/rtc/utils.c should become part of a generic implementation

On Sat, 25 Feb 2006 14:10:25 +0100
Adrian Bunk <[email protected]> wrote:

>
> Sounds good, but for generic functions, two adjustments are required:
> - move the code to lib/
> - remove rtc_ prefixes from the functions

Moved. I'm not sure about renaming them..

the functions are:

rtc_month_days
rtc_time_to_tm
rtc_valid_tm
rtc_tm_to_time

I think they make more sense with the rtc prefix

--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

2006-02-26 18:55:20

by Adrian Bunk

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/rtc/utils.c should become part of a generic implementation

On Sun, Feb 26, 2006 at 07:41:16PM +0100, Alessandro Zummo wrote:
> On Sat, 25 Feb 2006 14:10:25 +0100
> Adrian Bunk <[email protected]> wrote:
>
> >
> > Sounds good, but for generic functions, two adjustments are required:
> > - move the code to lib/
> > - remove rtc_ prefixes from the functions
>
> Moved. I'm not sure about renaming them..
>
> the functions are:
>
> rtc_month_days
> rtc_time_to_tm
> rtc_valid_tm
> rtc_tm_to_time
>
> I think they make more sense with the rtc prefix

None of these functions is in any way specicific to RTC drivers.

> Best regards,
> Alessandro Zummo,

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2006-02-26 20:02:19

by Russell King

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/rtc/utils.c should become part of a generic implementation

On Sun, Feb 26, 2006 at 07:55:18PM +0100, Adrian Bunk wrote:
> On Sun, Feb 26, 2006 at 07:41:16PM +0100, Alessandro Zummo wrote:
> > On Sat, 25 Feb 2006 14:10:25 +0100
> > Adrian Bunk <[email protected]> wrote:
> >
> > >
> > > Sounds good, but for generic functions, two adjustments are required:
> > > - move the code to lib/
> > > - remove rtc_ prefixes from the functions
> >
> > Moved. I'm not sure about renaming them..
> >
> > the functions are:
> >
> > rtc_month_days
> > rtc_time_to_tm
> > rtc_valid_tm
> > rtc_tm_to_time
> >
> > I think they make more sense with the rtc prefix
>
> None of these functions is in any way specicific to RTC drivers.

Doesn't having them take a struct rtc_time (which is different from
struct tm) make them rather RTC specific?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2006-02-26 22:43:16

by Yoichi Yuasa

[permalink] [raw]
Subject: Re: [-mm PATCH] mips: fixed collision of rtc function name

On Sat, 25 Feb 2006 22:48:15 +0900 (JST)
Atsushi Nemoto <[email protected]> wrote:

> >>>>> On Sat, 25 Feb 2006 01:27:21 +0900, Yoichi Yuasa <[email protected]> said:
>
> yoichi> This patch has fixed the collision of rtc function name on
> yoichi> 2.6.16-rc4-mm2.
>
> You missed changes for include/asm-mips/rtc.h (an interface for genrtc
> driver) ? Or genrtc driver will be gone in the new RTC subsystem?

The new RTC subsystem don't have genrtc driver.
I think we should move from genrtc driver to the new RTC subsystem.

Yoichi

2006-02-26 23:38:55

by Antonino A. Daplas

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2

Jesper Juhl wrote:
> On 2/25/06, Andrew Morton <[email protected]> wrote:
>> "Jesper Juhl" <[email protected]> wrote:
>>> On 2/25/06, Andrew Morton <[email protected]> wrote:
>>> > "Jesper Juhl" <[email protected]> wrote:
>>> > >
>>> > > On 2/24/06, Andrew Morton <[email protected]> wrote:
>>> > > >
>> CONFIG_FB=m, CONFIG_FB_GEODE_GX=y. An easy mistake, that.
>>

Need to change CONFIG_FB_GEODE_GX to depends on (FB = y)

>
> Does it even make sense to build CONFIG_FB modular?
>

If you're a developer.

Tony

2006-03-03 22:26:19

by Adrian Bunk

[permalink] [raw]
Subject: Re: 2.6.16-rc4-mm2: drivers/rtc/utils.c should become part of a generic implementation

On Sun, Feb 26, 2006 at 08:02:12PM +0000, Russell King wrote:
> On Sun, Feb 26, 2006 at 07:55:18PM +0100, Adrian Bunk wrote:
> > On Sun, Feb 26, 2006 at 07:41:16PM +0100, Alessandro Zummo wrote:
> > > On Sat, 25 Feb 2006 14:10:25 +0100
> > > Adrian Bunk <[email protected]> wrote:
> > >
> > > >
> > > > Sounds good, but for generic functions, two adjustments are required:
> > > > - move the code to lib/
> > > > - remove rtc_ prefixes from the functions
> > >
> > > Moved. I'm not sure about renaming them..
> > >
> > > the functions are:
> > >
> > > rtc_month_days
> > > rtc_time_to_tm
> > > rtc_valid_tm
> > > rtc_tm_to_time
> > >
> > > I think they make more sense with the rtc prefix
> >
> > None of these functions is in any way specicific to RTC drivers.
>
> Doesn't having them take a struct rtc_time (which is different from
> struct tm) make them rather RTC specific?

You are right, it seems I was a bit blind...

But in this case, it seems we don't need to build them unconditionally
no matter whether RTC support is enabled in the kernel.

> Russell King

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2006-03-06 21:12:40

by Ralf Baechle

[permalink] [raw]
Subject: Re: [-mm PATCH] mips: fixed collision of rtc function name

On Mon, Feb 27, 2006 at 07:43:04AM +0900, Yoichi Yuasa wrote:

> > yoichi> This patch has fixed the collision of rtc function name on
> > yoichi> 2.6.16-rc4-mm2.
> >
> > You missed changes for include/asm-mips/rtc.h (an interface for genrtc
> > driver) ? Or genrtc driver will be gone in the new RTC subsystem?
>
> The new RTC subsystem don't have genrtc driver.
> I think we should move from genrtc driver to the new RTC subsystem.

Definately preferable. I took the RTC subsystem patches as the reason
to do some more cleaning in the MIPS RTC code. It's all quite disgusting
but untangeling it is something one can easily burn a day or more on ...

Ralf