From: Brian Gerst This patch cleans up usage of UTS_RELEASE, by replacing many references with system_utsname.release, and deleting others. This eliminates a dependency on version.h for these files, so they don't get rebuilt if EXTRAVERSION or localversion change. Signed-off-by: Brian Gerst Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/process.c | 4 +- 25-akpm/arch/um/sys-x86_64/sysrq.c | 4 +- 25-akpm/arch/x86_64/kernel/process.c | 4 +- 25-akpm/drivers/cdrom/aztcd.c | 5 +-- 25-akpm/drivers/cdrom/mcdx.c | 5 --- 25-akpm/drivers/char/ftape/compressor/zftape-compress.c | 4 -- 25-akpm/drivers/char/ftape/lowlevel/ftape-init.c | 4 -- 25-akpm/drivers/char/ftape/zftape/zftape-init.c | 7 +--- 25-akpm/drivers/parisc/led.c | 7 +++- 25-akpm/drivers/scsi/aic7xxx_old.c | 4 -- 25-akpm/drivers/usb/core/hcd.c | 6 +-- 25-akpm/drivers/usb/gadget/ether.c | 7 +--- 25-akpm/drivers/usb/gadget/file_storage.c | 7 +--- 25-akpm/drivers/usb/gadget/serial.c | 8 ++--- 25-akpm/drivers/usb/gadget/zero.c | 7 +--- 25-akpm/fs/cifs/connect.c | 25 +++++++--------- 16 files changed, 46 insertions(+), 62 deletions(-) diff -puN arch/ppc64/kernel/process.c~clean-up-uts_release-usage arch/ppc64/kernel/process.c --- 25/arch/ppc64/kernel/process.c~clean-up-uts_release-usage 2005-01-23 14:46:34.435083624 -0800 +++ 25-akpm/arch/ppc64/kernel/process.c 2005-01-23 14:46:34.463079368 -0800 @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include @@ -255,7 +255,7 @@ void show_regs(struct pt_regs * regs) printk("NIP: %016lX XER: %08X LR: %016lX CTR: %016lX\n", regs->nip, (unsigned int)regs->xer, regs->link, regs->ctr); printk("REGS: %p TRAP: %04lx %s (%s)\n", - regs, regs->trap, print_tainted(), UTS_RELEASE); + regs, regs->trap, print_tainted(), system_utsname.release); printk("MSR: %016lx EE: %01x PR: %01x FP: %01x ME: %01x " "IR/DR: %01x%01x CR: %08X\n", regs->msr, regs->msr&MSR_EE ? 1 : 0, regs->msr&MSR_PR ? 1 : 0, diff -puN arch/um/sys-x86_64/sysrq.c~clean-up-uts_release-usage arch/um/sys-x86_64/sysrq.c --- 25/arch/um/sys-x86_64/sysrq.c~clean-up-uts_release-usage 2005-01-23 14:46:34.436083472 -0800 +++ 25-akpm/arch/um/sys-x86_64/sysrq.c 2005-01-23 14:46:34.463079368 -0800 @@ -5,7 +5,7 @@ */ #include "linux/kernel.h" -#include "linux/version.h" +#include "linux/utsname.h" #include "linux/module.h" #include "asm/current.h" #include "asm/ptrace.h" @@ -16,7 +16,7 @@ void __show_regs(struct pt_regs * regs) printk("\n"); print_modules(); printk("Pid: %d, comm: %.20s %s %s\n", - current->pid, current->comm, print_tainted(), UTS_RELEASE); + current->pid, current->comm, print_tainted(), system_utsname.release); printk("RIP: %04lx:[<%016lx>] ", PT_REGS_CS(regs) & 0xffff, PT_REGS_RIP(regs)); printk("\nRSP: %016lx EFLAGS: %08lx\n", PT_REGS_RSP(regs), diff -puN arch/x86_64/kernel/process.c~clean-up-uts_release-usage arch/x86_64/kernel/process.c --- 25/arch/x86_64/kernel/process.c~clean-up-uts_release-usage 2005-01-23 14:46:34.437083320 -0800 +++ 25-akpm/arch/x86_64/kernel/process.c 2005-01-23 14:46:34.464079216 -0800 @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -232,7 +232,7 @@ void __show_regs(struct pt_regs * regs) printk("\n"); print_modules(); printk("Pid: %d, comm: %.20s %s %s\n", - current->pid, current->comm, print_tainted(), UTS_RELEASE); + current->pid, current->comm, print_tainted(), system_utsname.release); printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); printk_address(regs->rip); printk("\nRSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, regs->eflags); diff -puN drivers/cdrom/aztcd.c~clean-up-uts_release-usage drivers/cdrom/aztcd.c --- 25/drivers/cdrom/aztcd.c~clean-up-uts_release-usage 2005-01-23 14:46:34.439083016 -0800 +++ 25-akpm/drivers/cdrom/aztcd.c 2005-01-23 14:46:34.466078912 -0800 @@ -165,7 +165,6 @@ Torben Mathiasen */ -#include #include #include "aztcd.h" @@ -1708,8 +1707,8 @@ static int __init aztcd_init(void) printk(KERN_INFO "aztcd: (C) 1994-98 W.Zimmermann\n"); if (azt_port == -1) { printk - ("aztcd: KernelVersion=%s DriverVersion=%s For IDE/ATAPI-drives use ide-cd.c\n", - UTS_RELEASE, AZT_VERSION); + ("aztcd: DriverVersion=%s For IDE/ATAPI-drives use ide-cd.c\n", + AZT_VERSION); } else printk ("aztcd: DriverVersion=%s BaseAddress=0x%x For IDE/ATAPI-drives use ide-cd.c\n", diff -puN drivers/cdrom/mcdx.c~clean-up-uts_release-usage drivers/cdrom/mcdx.c --- 25/drivers/cdrom/mcdx.c~clean-up-uts_release-usage 2005-01-23 14:46:34.440082864 -0800 +++ 25-akpm/drivers/cdrom/mcdx.c 2005-01-23 14:46:34.467078760 -0800 @@ -56,7 +56,6 @@ static const char *mcdx_c_version = "$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $"; #endif -#include #include #include @@ -1265,11 +1264,7 @@ int __init mcdx_init_drive(int drive) int __init mcdx_init(void) { int drive; -#ifdef MODULE - xwarn("Version 2.14(hs) for " UTS_RELEASE "\n"); -#else xwarn("Version 2.14(hs) \n"); -#endif xwarn("$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $\n"); diff -puN drivers/char/ftape/compressor/zftape-compress.c~clean-up-uts_release-usage drivers/char/ftape/compressor/zftape-compress.c --- 25/drivers/char/ftape/compressor/zftape-compress.c~clean-up-uts_release-usage 2005-01-23 14:46:34.442082560 -0800 +++ 25-akpm/drivers/char/ftape/compressor/zftape-compress.c 2005-01-23 14:46:34.469078456 -0800 @@ -27,7 +27,6 @@ * changed * appropriately. See below. */ -#include #include #include #include @@ -1174,11 +1173,10 @@ int zft_compressor_init(void) printk( KERN_INFO "(c) 1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n" KERN_INFO "Compressor for zftape (lzrw3 algorithm)\n" -KERN_INFO "Compiled for kernel version %s\n", UTS_RELEASE); } #else /* !MODULE */ /* print a short no-nonsense boot message */ - printk("zftape compressor v1.00a 970514 for Linux " UTS_RELEASE "\n"); + printk("zftape compressor v1.00a 970514\n"); printk("For use with " FTAPE_VERSION "\n"); #endif /* MODULE */ TRACE(ft_t_info, "zft_compressor_init @ 0x%p", zft_compressor_init); diff -puN drivers/char/ftape/lowlevel/ftape-init.c~clean-up-uts_release-usage drivers/char/ftape/lowlevel/ftape-init.c --- 25/drivers/char/ftape/lowlevel/ftape-init.c~clean-up-uts_release-usage 2005-01-23 14:46:34.443082408 -0800 +++ 25-akpm/drivers/char/ftape/lowlevel/ftape-init.c 2005-01-23 14:46:34.469078456 -0800 @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -74,11 +73,10 @@ KERN_INFO "(c) 1993-1996 Bas Laarhoven ( KERN_INFO "(c) 1995-1996 Kai Harrekilde-Petersen (khp@dolphinics.no)\n" KERN_INFO "(c) 1996-1997 Claus-Justus Heine (claus@momo.math.rwth-aachen.de)\n" KERN_INFO "QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives\n" -KERN_INFO "Compiled for Linux version %s\n", UTS_RELEASE); } #else /* !MODULE */ /* print a short no-nonsense boot message */ - printk(KERN_INFO FTAPE_VERSION " for Linux " UTS_RELEASE "\n"); + printk(KERN_INFO FTAPE_VERSION "\n"); #endif /* MODULE */ TRACE(ft_t_info, "installing QIC-117 floppy tape hardware drive ... "); TRACE(ft_t_info, "ftape_init @ 0x%p", ftape_init); diff -puN drivers/char/ftape/zftape/zftape-init.c~clean-up-uts_release-usage drivers/char/ftape/zftape/zftape-init.c --- 25/drivers/char/ftape/zftape/zftape-init.c~clean-up-uts_release-usage 2005-01-23 14:46:34.445082104 -0800 +++ 25-akpm/drivers/char/ftape/zftape/zftape-init.c 2005-01-23 14:46:34.470078304 -0800 @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -319,13 +318,11 @@ KERN_INFO KERN_INFO "Support for QIC-113 compatible volume table, dynamic memory allocation\n" KERN_INFO -"and builtin compression (lzrw3 algorithm).\n" -KERN_INFO -"Compiled for Linux version %s\n", UTS_RELEASE); +"and builtin compression (lzrw3 algorithm).\n"); } #else /* !MODULE */ /* print a short no-nonsense boot message */ - printk(KERN_INFO ZFTAPE_VERSION " for Linux " UTS_RELEASE "\n"); + printk(KERN_INFO ZFTAPE_VERSION "\n"); #endif /* MODULE */ TRACE(ft_t_info, "zft_init @ 0x%p", zft_init); TRACE(ft_t_info, diff -puN drivers/parisc/led.c~clean-up-uts_release-usage drivers/parisc/led.c --- 25/drivers/parisc/led.c~clean-up-uts_release-usage 2005-01-23 14:46:34.446081952 -0800 +++ 25-akpm/drivers/parisc/led.c 2005-01-23 14:46:34.471078152 -0800 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,7 +56,7 @@ static int led_heartbeat = 1; static int led_diskio = 1; static int led_lanrxtx = 1; static char lcd_text[32]; -static char lcd_text_default[] = "Linux " UTS_RELEASE; +static char lcd_text_default[32]; #if 0 #define DPRINTK(x) printk x @@ -676,6 +676,9 @@ int __init led_init(void) struct pdc_chassis_info chassis_info; int ret; + snprintf(lcd_text_default, sizeof(lcd_text_default), + "Linux %s", system_utsname.release); + /* Work around the buggy PDC of KittyHawk-machines */ switch (CPU_HVERSION) { case 0x580: /* KittyHawk DC2-100 (K100) */ diff -puN drivers/scsi/aic7xxx_old.c~clean-up-uts_release-usage drivers/scsi/aic7xxx_old.c --- 25/drivers/scsi/aic7xxx_old.c~clean-up-uts_release-usage 2005-01-23 14:46:34.449081496 -0800 +++ 25-akpm/drivers/scsi/aic7xxx_old.c 2005-01-23 14:46:34.479076936 -0800 @@ -224,7 +224,6 @@ #include #include #include -#include #include #include #include @@ -10564,8 +10563,7 @@ static void aic7xxx_panic_abort(struct aic7xxx_host *p, Scsi_Cmnd *cmd) { - printk("aic7xxx driver version %s/%s\n", AIC7XXX_C_VERSION, - UTS_RELEASE); + printk("aic7xxx driver version %s\n", AIC7XXX_C_VERSION); printk("Controller type:\n %s\n", board_names[p->board_name_index]); printk("p->flags=0x%lx, p->chip=0x%x, p->features=0x%x, " "sequencer %s paused\n", diff -puN drivers/usb/core/hcd.c~clean-up-uts_release-usage drivers/usb/core/hcd.c --- 25/drivers/usb/core/hcd.c~clean-up-uts_release-usage 2005-01-23 14:46:34.451081192 -0800 +++ 25-akpm/drivers/usb/core/hcd.c 2005-01-23 14:46:34.481076632 -0800 @@ -33,7 +33,7 @@ #include #include #include -#include /* for UTS_SYSNAME */ +#include #include #include #include @@ -309,8 +309,8 @@ static int rh_string ( // id 3 == vendor description } else if (id == 3) { - sprintf (buf, "%s %s %s", UTS_SYSNAME, UTS_RELEASE, - hcd->driver->description); + sprintf (buf, "%s %s %s", system_utsname.sysname, + system_utsname.release, hcd->driver->description); // unsupported IDs --> "protocol stall" } else diff -puN drivers/usb/gadget/ether.c~clean-up-uts_release-usage drivers/usb/gadget/ether.c --- 25/drivers/usb/gadget/ether.c~clean-up-uts_release-usage 2005-01-23 14:46:34.452081040 -0800 +++ 25-akpm/drivers/usb/gadget/ether.c 2005-01-23 14:46:34.483076328 -0800 @@ -36,8 +36,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -2337,8 +2336,8 @@ eth_bind (struct usb_gadget *gadget) gadget->name); return -ENODEV; } - snprintf (manufacturer, sizeof manufacturer, - UTS_SYSNAME " " UTS_RELEASE "/%s", + snprintf (manufacturer, sizeof manufacturer, "%s %s/%s", + system_utsname.sysname, system_utsname.release, gadget->name); /* If there's an RNDIS configuration, that's what Windows wants to diff -puN drivers/usb/gadget/file_storage.c~clean-up-uts_release-usage drivers/usb/gadget/file_storage.c --- 25/drivers/usb/gadget/file_storage.c~clean-up-uts_release-usage 2005-01-23 14:46:34.454080736 -0800 +++ 25-akpm/drivers/usb/gadget/file_storage.c 2005-01-23 14:46:34.486075872 -0800 @@ -236,8 +236,7 @@ #include #include #include -#include -#include +#include #include #include @@ -3954,8 +3953,8 @@ static int __init fsg_bind(struct usb_ga /* This should reflect the actual gadget power source */ usb_gadget_set_selfpowered(gadget); - snprintf(manufacturer, sizeof manufacturer, - UTS_SYSNAME " " UTS_RELEASE " with %s", + snprintf(manufacturer, sizeof manufacturer, "%s %s with %s", + system_utsname.sysname, system_utsname.release, gadget->name); /* On a real device, serial[] would be loaded from permanent diff -puN drivers/usb/gadget/serial.c~clean-up-uts_release-usage drivers/usb/gadget/serial.c --- 25/drivers/usb/gadget/serial.c~clean-up-uts_release-usage 2005-01-23 14:46:34.456080432 -0800 +++ 25-akpm/drivers/usb/gadget/serial.c 2005-01-23 14:46:34.488075568 -0800 @@ -30,8 +30,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -1596,8 +1595,9 @@ static int gs_bind(struct usb_gadget *ga if (dev == NULL) return -ENOMEM; - snprintf(manufacturer, sizeof(manufacturer), - UTS_SYSNAME " " UTS_RELEASE " with %s", gadget->name); + snprintf(manufacturer, sizeof(manufacturer), "%s %s with %s", + system_utsname.sysname, system_utsname.release, + gadget->name); memset(dev, 0, sizeof(struct gs_dev)); dev->dev_gadget = gadget; diff -puN drivers/usb/gadget/zero.c~clean-up-uts_release-usage drivers/usb/gadget/zero.c --- 25/drivers/usb/gadget/zero.c~clean-up-uts_release-usage 2005-01-23 14:46:34.457080280 -0800 +++ 25-akpm/drivers/usb/gadget/zero.c 2005-01-23 14:46:34.489075416 -0800 @@ -75,8 +75,7 @@ #include #include #include -#include -#include +#include #include #include @@ -1265,8 +1264,8 @@ autoconf_fail: INFO (dev, "using %s, OUT %s IN %s\n", gadget->name, EP_OUT_NAME, EP_IN_NAME); - snprintf (manufacturer, sizeof manufacturer, - UTS_SYSNAME " " UTS_RELEASE " with %s", + snprintf (manufacturer, sizeof manufacturer, "%s %s with %s", + system_utsname.sysname, system_utsname.release, gadget->name); return 0; diff -puN fs/cifs/connect.c~clean-up-uts_release-usage fs/cifs/connect.c --- 25/fs/cifs/connect.c~clean-up-uts_release-usage 2005-01-23 14:46:34.459079976 -0800 +++ 25-akpm/fs/cifs/connect.c 2005-01-23 14:46:34.492074960 -0800 @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -1613,7 +1612,7 @@ CIFSSessSetup(unsigned int xid, struct c 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bytes_returned = - cifs_strtoUCS((wchar_t *) bcc_ptr, UTS_RELEASE, 32, + cifs_strtoUCS((wchar_t *) bcc_ptr, system_utsname.release, 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bcc_ptr += 2; @@ -1640,8 +1639,8 @@ CIFSSessSetup(unsigned int xid, struct c } strcpy(bcc_ptr, "Linux version "); bcc_ptr += strlen("Linux version "); - strcpy(bcc_ptr, UTS_RELEASE); - bcc_ptr += strlen(UTS_RELEASE) + 1; + strcpy(bcc_ptr, system_utsname.release); + bcc_ptr += strlen(system_utsname.release) + 1; strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; } @@ -1857,7 +1856,7 @@ CIFSSpnegoSessSetup(unsigned int xid, st 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bytes_returned = - cifs_strtoUCS((wchar_t *) bcc_ptr, UTS_RELEASE, 32, + cifs_strtoUCS((wchar_t *) bcc_ptr, system_utsname.release, 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bcc_ptr += 2; @@ -1882,8 +1881,8 @@ CIFSSpnegoSessSetup(unsigned int xid, st } strcpy(bcc_ptr, "Linux version "); bcc_ptr += strlen("Linux version "); - strcpy(bcc_ptr, UTS_RELEASE); - bcc_ptr += strlen(UTS_RELEASE) + 1; + strcpy(bcc_ptr, system_utsname.release); + bcc_ptr += strlen(system_utsname.release) + 1; strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; } @@ -2146,7 +2145,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned i 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bytes_returned = - cifs_strtoUCS((wchar_t *) bcc_ptr, UTS_RELEASE, 32, + cifs_strtoUCS((wchar_t *) bcc_ptr, system_utsname.release, 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bcc_ptr += 2; /* null terminate Linux version */ @@ -2163,8 +2162,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned i } else { /* ASCII */ strcpy(bcc_ptr, "Linux version "); bcc_ptr += strlen("Linux version "); - strcpy(bcc_ptr, UTS_RELEASE); - bcc_ptr += strlen(UTS_RELEASE) + 1; + strcpy(bcc_ptr, system_utsname.release); + bcc_ptr += strlen(system_utsname.release) + 1; strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; bcc_ptr++; /* empty domain field */ @@ -2531,7 +2530,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xi 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bytes_returned = - cifs_strtoUCS((wchar_t *) bcc_ptr, UTS_RELEASE, 32, + cifs_strtoUCS((wchar_t *) bcc_ptr, system_utsname.release, 32, nls_codepage); bcc_ptr += 2 * bytes_returned; bcc_ptr += 2; /* null term version string */ @@ -2583,8 +2582,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xi strcpy(bcc_ptr, "Linux version "); bcc_ptr += strlen("Linux version "); - strcpy(bcc_ptr, UTS_RELEASE); - bcc_ptr += strlen(UTS_RELEASE) + 1; + strcpy(bcc_ptr, system_utsname.release); + bcc_ptr += strlen(system_utsname.release) + 1; strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; bcc_ptr++; /* null domain */ _