Re: FEC_MPC52xx_MDIO oddness.
On 31/10/07 17:30 +0100, Gabriel C wrote: > Domen Puncer wrote: > > On 31/10/07 10:22 -0400, Dave Jones wrote: > >> The Kconfig for this reads.. > >> > >> +config FEC_MPC52xx_MDIO > >> + bool "MPC52xx FEC MDIO bus driver" > >> + depends on FEC_MPC52xx > >> + default y > >> + ---help--- > >> + The MPC5200's FEC can connect to the Ethernet either with > >> + an external MII PHY chip or 10 Mbps 7-wire interface > >> + (Motorola? industry standard). > >> + If your board uses an external PHY connected to FEC, enable this. > >> + If not sure, enable. > >> + If compiled as module, it will be called 'fec_mpc52xx_phy.ko'. > >> > >> Because this is bool, it'll never be compiled as a module. > >> Given that fec_mpc52xx_phy.c has a MODULE_LICENSE() > >> Should this be a tristate perhaps ? > > > > It's ok, it will be compiled as module if fec driver is compiled as > > module, and built-in if fec is built-in. > > > > from Makefile: > > obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx.o > > ifeq ($(CONFIG_FEC_MPC52xx_MDIO),y) > > obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx_phy.o > > endif > > > > Yes, a bit weird, but it's best I could come up with. > > (fec_mdio=m and fec=y is an invalid case, that I wanted to avoid). > > Could you please fix this warnings as well ? > > > http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/13c9d93a7afa60e2 I saw the bug reports, but unfortunately don't have a smart idea for the solution (moving the driver into a separate Kconfig might do it), so I'm waiting for Sam's input on this. > > Regards, > > Gabriel -- Domen Puncer | Research & Development . Telargo d.o.o. | Zagrebška cesta 20 | 2000 Maribor | Slovenia . www.telargo.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: FEC_MPC52xx_MDIO oddness.
On 31/10/07 10:22 -0400, Dave Jones wrote: > The Kconfig for this reads.. > > +config FEC_MPC52xx_MDIO > + bool "MPC52xx FEC MDIO bus driver" > + depends on FEC_MPC52xx > + default y > + ---help--- > + The MPC5200's FEC can connect to the Ethernet either with > + an external MII PHY chip or 10 Mbps 7-wire interface > + (Motorola? industry standard). > + If your board uses an external PHY connected to FEC, enable this. > + If not sure, enable. > + If compiled as module, it will be called 'fec_mpc52xx_phy.ko'. > > Because this is bool, it'll never be compiled as a module. > Given that fec_mpc52xx_phy.c has a MODULE_LICENSE() > Should this be a tristate perhaps ? It's ok, it will be compiled as module if fec driver is compiled as module, and built-in if fec is built-in. from Makefile: obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx.o ifeq ($(CONFIG_FEC_MPC52xx_MDIO),y) obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx_phy.o endif Yes, a bit weird, but it's best I could come up with. (fec_mdio=m and fec=y is an invalid case, that I wanted to avoid). Domen > > Dave > > -- > http://www.codemonkey.org.uk -- Domen Puncer | Research & Development . Telargo d.o.o. | Zagrebška cesta 20 | 2000 Maribor | Slovenia . www.telargo.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mpc5200: psc-spi driver must not touch port_config or cdm registers
On 23/10/07 21:39 -0600, Grant Likely wrote: > From: Grant Likely <[EMAIL PROTECTED]> > > port_config and the cdm are the responsibility of firmware; and if > firmware doesn't set it up correctly, it should be fixed up by > platform code on a per-board basis because it's a property of the > board. > > Drivers should never touch these registers. They are completely > unprotected and the platform may do odd things with them that the > driver must not interfere with. > > Signed-off-by: Grant Likely <[EMAIL PROTECTED]> > --- > > Domen, Dragos; can you please check your usage of this driver. None of > the in-tree board ports use it as-is, but they are of course just a > device tree change away from being usable on the lite5200b. My test cases were just a jumper on RX-TX line. It's not even allowed to set mclken_div_pscX? There can be different speed devices on same SPI (spi_board_info->max_speed_hz). > > Board ports that use it need to be modified to make the cdm/port_config > changes in firmware (prefered) or in arch/powerpc/platforms/52xx/.c > > Cheers, > g. > > drivers/spi/mpc52xx_psc_spi.c | 77 > + > 1 files changed, 2 insertions(+), 75 deletions(-) > > diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c > index 7051e6c..ec3a618 100644 > --- a/drivers/spi/mpc52xx_psc_spi.c > +++ b/drivers/spi/mpc52xx_psc_spi.c > @@ -328,78 +328,15 @@ static void mpc52xx_psc_spi_cleanup(struct spi_device > *spi) > kfree(spi->controller_state); > } > > -static int mpc52xx_psc_spi_port_config(int psc_id, struct mpc52xx_psc_spi > *mps) > +static void mpc52xx_psc_spi_config(int psc_id, struct mpc52xx_psc_spi *mps) > { > - struct mpc52xx_cdm __iomem *cdm; > - struct mpc52xx_gpio __iomem *gpio; > struct mpc52xx_psc __iomem *psc = mps->psc; > - u32 ul; > u32 mclken_div; > - int ret = 0; > - > -#if defined(CONFIG_PPC_MERGE) > - cdm = mpc52xx_find_and_map("mpc5200-cdm"); > - gpio = mpc52xx_find_and_map("mpc5200-gpio"); > -#else > - cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE); > - gpio = ioremap(MPC52xx_PA(MPC52xx_GPIO_OFFSET), MPC52xx_GPIO_SIZE); > -#endif > - if (!cdm || !gpio) { > - printk(KERN_ERR "Error mapping CDM/GPIO\n"); > - ret = -EFAULT; > - goto unmap_regs; > - } > > /* default sysclk is 512MHz */ > mclken_div = 0x8000 | > (((mps->sysclk ? mps->sysclk : 51200) / MCLK) & 0x1FF); It's actually 528e6, and mclken_div doesn't seem to be used anywhere anymore. > > - switch (psc_id) { > - case 1: ... Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] sb1000: prevent a potential NULL pointer dereference in sb1000_dev_ioctl()
On 29/07/07 00:02 +0200, Jesper Juhl wrote: > Hi, > > Here's a small patch, prompted by a find by the Coverity checker, > that removes a potential NULL pointer dereference from > drivers/net/sb1000.c::sb1000_dev_ioctl(). > The checker spotted that we do a NULL test of 'dev', yet we > dereference the pointer prior to that check. > This patch simply moves the dereference after the NULL test. But... it can't be called without a valid 'dev', no? A quick 'grep do_ioctl net/' confirms that all calls are in the form of 'dev->do_ioctl(dev, ...'. Domen > @@ -991,11 +991,13 @@ static int sb1000_dev_ioctl(struct net_device *dev, > struct ifreq *ifr, int cmd) > short PID[4]; > int ioaddr[2], status, frequency; > unsigned int stats[5]; > - struct sb1000_private *lp = netdev_priv(dev); > + struct sb1000_private *lp; > > if (!(dev && dev->flags & IFF_UP)) > return -ENODEV; > > + lp = netdev_priv(dev); > + > ioaddr[0] = dev->base_addr; > /* mem_start holds the second I/O address */ > ioaddr[1] = dev->mem_start; > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] introduce __init_exit function annotation
On 17/07/07 19:02 +0200, Takashi Iwai wrote: > At Tue, 17 Jul 2007 18:48:46 +0200, > Sam Ravnborg wrote: > > > > On Tue, Jul 17, 2007 at 05:40:15PM +0200, Takashi Iwai wrote: > > > At Tue, 17 Jul 2007 17:32:36 +0200, > > > Sam Ravnborg wrote: > > > > > > > > On Tue, Jul 17, 2007 at 05:16:13PM +0200, Takashi Iwai wrote: > > > > > At Tue, 17 Jul 2007 17:14:32 +0200, > > > > > Sam Ravnborg wrote: > > > > > > > > > > > > On Tue, Jul 17, 2007 at 04:52:12PM +0200, Takashi Iwai wrote: > > > > > > > At Tue, 17 Jul 2007 15:02:30 +0200, > > > > > > > Sam Ravnborg wrote: > > > > > > > > > > > > > > > > On Tue, Jul 17, 2007 at 10:02:48AM +0200, Domen Puncer wrote: > > > > > > > > > Introduce __init_exit, which is useful ie. for drivers that > > > > > > > > > call > > > > > > > > > cleanup functions when they fail in __init functions. > > > > > > > > > > > > > > > > This is wrong. > > > > > > > > On arm (just one example of several) the __exit section are > > > > > > > > discarded > > > > > > > > at buildtime so any reference from __init to __exit will cause > > > > > > > > the > > > > > > > > linker to error out. > > > > > > > > > > > > > > Hmm, from what I see, it adds __init to the function. There is no > > > > > > > reference to __exit. > > > > > > > > > > > > The cleanup functions are marked __exit in the referenced case. > > > > > > > > > > My understanding is that it's the very purpose of this patch -- > > > > > change the mark from __exit to __init_exit for such clean-up > > > > > functions. > > > > > > > > And that is wrong. > > > > > > You misunderstood. What I meant is the case like this: > > > > > > static void __init_exit cleanup() > > > { > > > ... > > > } > > > > > > static void __init foo_init() > > > { > > > if (error) > > > cleanup(); > > > } > > > > > > static void __exit foo_exit() > > > { > > > cleanup(); > > > } > > > > > > Currently, there is no proper way to mark cleanup(). Neither __init, > > > __exit, __devinit nor __devexit can be used there. > > > > Then you get the annotation sorted out so cleanup() get discarded in the > > built-in case. But you leave no room for automated tools to detect this. > > > > If this is really necessary (and I daught) then a specific section should be > > dedicated for this usage. > > > > We have lot of issues with current __init/__exit, __devinit/__devexit, > > __cpuint/__cpuexit > > and introducing more of the kind does not help it. > > So even if it saves a few bytes in some odd cases the added complaxity is > > IMHO not worth it. > > Well, I don't think it's a few bytes and not so odd, but I agree that > this solution isn't the best way. And, I now remember that this won't > work anyway, too. Calling __init from __exit also causes error... I made this patch because I saw __init calling __exit in yet another driver (gianfar). Guess I'll just send the old way fix, and remove __exit. As for calling __init_exit from __exit: 1 - in kernel, there's no __exit => no problem 2 - module, __init_exit is a no-op => no problem the code in question again: > #ifdef MODULE > #define __exit __attribute__ ((__section__(".exit.text"))) > +#define __init_exit > #else > #define __exit __attribute_used__ __attribute__ > ((__section__(".exit.text"))) > +#define __init_exit __init > #endif Or maybe it's the name that is confuzing, but it makes sense to me: __init_exit - you can call it from __init or __exit. __init_or_exit? Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] introduce __init_exit function annotation
On 17/07/07 17:40 +0200, Takashi Iwai wrote: > At Tue, 17 Jul 2007 17:32:36 +0200, > Sam Ravnborg wrote: > > > > On Tue, Jul 17, 2007 at 05:16:13PM +0200, Takashi Iwai wrote: > > > At Tue, 17 Jul 2007 17:14:32 +0200, > > > Sam Ravnborg wrote: > > > > > > > > On Tue, Jul 17, 2007 at 04:52:12PM +0200, Takashi Iwai wrote: > > > > > At Tue, 17 Jul 2007 15:02:30 +0200, > > > > > Sam Ravnborg wrote: > > > > > > > > > > > > On Tue, Jul 17, 2007 at 10:02:48AM +0200, Domen Puncer wrote: > > > > > > > Introduce __init_exit, which is useful ie. for drivers that call > > > > > > > cleanup functions when they fail in __init functions. > > > > > > > > > > > > This is wrong. > > > > > > On arm (just one example of several) the __exit section are > > > > > > discarded > > > > > > at buildtime so any reference from __init to __exit will cause the > > > > > > linker to error out. > > > > > > > > > > Hmm, from what I see, it adds __init to the function. There is no > > > > > reference to __exit. > > > > > > > > The cleanup functions are marked __exit in the referenced case. > > > > > > My understanding is that it's the very purpose of this patch -- > > > change the mark from __exit to __init_exit for such clean-up > > > functions. > > > > And that is wrong. > > You misunderstood. What I meant is the case like this: > > static void __init_exit cleanup() > { > ... > } > > static void __init foo_init() > { > if (error) > cleanup(); > } > > static void __exit foo_exit() > { > cleanup(); > } Uh, yes, this, or just __init_exit foo_exit() as in Sam's example. It seemed obvious to me, sorry. > > Currently, there is no proper way to mark cleanup(). Neither __init, > __exit, __devinit nor __devexit can be used there. > > > Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] introduce __init_exit function annotation
On 17/07/07 10:31 +0200, Adrian Bunk wrote: > On Tue, Jul 17, 2007 at 10:02:48AM +0200, Domen Puncer wrote: > > Introduce __init_exit, which is useful ie. for drivers that call > > cleanup functions when they fail in __init functions. > > > > > > Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> > > --- > > include/linux/init.h |2 ++ > > 1 file changed, 2 insertions(+) > > > > Index: work-powerpc.git/include/linux/init.h > > === > > --- work-powerpc.git.orig/include/linux/init.h > > +++ work-powerpc.git/include/linux/init.h > > @@ -60,8 +60,10 @@ > > > > #ifdef MODULE > > #define __exit __attribute__ ((__section__(".exit.text"))) > > +#define __init_exit > > #else > > #define __exit __attribute_used__ __attribute__ > > ((__section__(".exit.text"))) > > +#define __init_exit__init > > #endif > > > > /* For assembly routines */ > > This doesn't work on architectures like i386 where __exit code is > discarded at runtime. If it's a module, then it shouldn't be discarded until unload anyway. If it's in-kernel, then it'll be discarded as __init stuff. I don't see a problem? BTW. can you point me to reasoning for discarding __exit at runtime? Domen > > 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] introduce __init_exit function annotation
Introduce __init_exit, which is useful ie. for drivers that call cleanup functions when they fail in __init functions. Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- include/linux/init.h |2 ++ 1 file changed, 2 insertions(+) Index: work-powerpc.git/include/linux/init.h === --- work-powerpc.git.orig/include/linux/init.h +++ work-powerpc.git/include/linux/init.h @@ -60,8 +60,10 @@ #ifdef MODULE #define __exit __attribute__ ((__section__(".exit.text"))) +#define __init_exit #else #define __exit __attribute_used__ __attribute__ ((__section__(".exit.text"))) +#define __init_exit__init #endif /* For assembly routines */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH rc4-mm1] drivers/char/isicom.c old api rewritten
On 02/08/05 00:02 +0200, Jiri Slaby wrote: > Hello. > Could you send me critics and bugs? You have much bigger chances of someone reviewing the patch if you at least split code changes and whitespace/type cleanups. 65k is a lot. > Could somebody test it (but NOT now)? > Thanks. > > drivers/char/isicom.c | 1610 > - > include/linux/isicom.h |8 > 2 files changed, 817 insertions(+), 801 deletions(-) > > Here it is (about 65 KiB): It should deserve a few bytes of description ;-) > http://www.fi.muni.cz/~xslaby/lnx/isi.txt > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.6.13-rc4-kj
A new release from kernel janitors (http://janitor.kernelnewbies.org/). Patchset is at http://coderock.org/kj/2.6.13-rc4-kj/ new in this release: time_after-drivers_net_eth16i From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/eth16i.c : Use of the time_after() macro time_after-drivers_net_arcnet_arcnet From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/arcnet/arcnet.c : Use of the time_after() macro time_after-drivers_net_3c59x From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/3c59x.c : Use of the time_after() macro time_after-drivers_net_shaper From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/shaper.c : Use of the time_before() and time_after() macros time_after-drivers_net_seeq8005 From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/seeq8005.c : Use of the time_before() macro time_after-drivers_net_ppp_async From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/ppp_async.c : Use of the time_after_eq() macro time_after-drivers_net_oaknet From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/oaknet.c : Use of the time_after() macro time_after-drivers_media_dvb_ttusb-budget_dvb-ttusb-budget From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c : Use of the time_after_eq() macro time_after-drivers_char_lp From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/char/lp.c : Use of the time_after() macro time_after-drivers_char_agp_nvidia-agp From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/char/agp/nvidia-agp.c : Use of the time_before_eq() macro time_after-drivers_block_floppy From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/block/floppy.c : Use of the time_after() and time_before() macros time_after-drivers_block_DAC960 From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/block/DAC960.c : Use of time_after(), time_after_eq() and time_before() macros time_after-drivers_scsi_qlogicfc From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/scsi/qlogicfc.c : Use of the time_after() macro spelling-REPORTING-BUGS From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [TRIVIAL PATCH] Spelling and whitespace fixes for REPORTING-BUGS fixup-Documentation_filesystems_sysfs.txt From: Jan Veldeman <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] Driver core: Documentation: use snprintf and strnlen fixup2-Documentation_filesystems_sysfs.txt From: Jan Veldeman <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] Driver core: Documentation: fix whitespace between parameters fixup3-Documentation_filesystems_sysfs.txt From: Jan Veldeman <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] Driver core: Documentation: use S_IRUSR | ... in stead of 0644 kj_tag merged: --- msleep_interruptible-drivers_sbus_char_aurora.patch vfree-drivers_scsi_qla2xxx_qla_os.patch msleep_interruptible-drivers_sbus_char_envctrl.patch ssleep-drivers_scsi_qla1280.patch sleep_on-drivers_sbus_char_vfc_i2c.patch time_after-drivers_atm_idt77252 time_after-drivers_net_wan_ time_after-drivers_net_pcmcia_smc91c92_cs sparse-sound_core_memalloc sparse-net_netlink_af_netlink sparse-include_linux_skbuff.h sparse-drivers_atm_firestream sparse-drivers_atm_ambassador return_code-net_sctp_objcnt int_sleep_on-arch_cris_arch-v10_drivers_eeprom.patch dropped: remove-pci-find-device-drivers_net_e1000_e1000_main.patch - code changed/gone all patches: min-max-ide_ide-timing.h.patch list-for-each-entry-drivers_net_ppp_generic.patch list-for-each-entry-fs_jffs_intrep.patch list-for-each-entry-fs_namespace.patch list-for-each-fs_dcache.patch msleep-drivers_ide_ide-tape.patch pr_debug-drivers_block_umem.patch list-for-each-drivers_net_tulip_de4x5.patch min-max-arch_sh_boards_bigsur_io.patch min-max-arch_sh_cchips_hd6446x_hd64465_io.patch msleep-drivers_block_xd.patch msleep-drivers_ide_ide-cs.patch for-each-pci-dev-arch_i386_pci_acpi.patch function-string-arch-mips.patch msleep-drivers_net_wireless_prism54_islpci_dev.patch msleep_interruptible-drivers_parport_ieee1284_ops.patch msleep_interruptible-drivers_parport_parport_pc.patch msleep+msleep_interruptible-drivers_net_tokenring_ibmtr.patch pci_dev_present-drivers_ide_pci_alim15x3.patch remove-pci-find-device-drivers_net_gt96100eth.patch set_current_state-drivers_net_irda_stir4200.patch set_current_state-drivers_net_tokenring_tms380tr.patch lib-parser-fs_devpts_inode.patch comment-drivers_block_floppy.c.patch remove_file-arch_arm26_boot_compressed_hw_bse.c.patch remove_file-arch_mips_arc_salone.c.patch remove_file-arch_mips_pmc_sierra_yosemite_ht_irq.c.patch remove_file-arch_ppc_syslib_ppc4xx_pm.c.patch remove_file-drivers_parport_parport_arc.c.patch remove_f
Re: [PATCH][1/3] ppc32: add 440ep support
On 27/07/05 18:56 -0400, Paul Mackerras wrote: > Andrew Morton writes: > > > Matt Porter <[EMAIL PROTECTED]> wrote: > > > > > > +static u64 dma_mask = 0xULL; How about just DMA_32BIT_MASK from dma-mapping.h, that one has to be correct. ;-) > > > > I'm sure you're totally uninterested in this, but the above will probably > > generate warnings on (say) ppc64, where u64 is implemented as unsigned > > long. > > > > I usually chuck a simple `-1' in there and the compiler always gets it > > right, regardless of signedness and size and architecture. > > Umm, I think we actually want 2^32-1 not -1, don't we? In which case > I think Matt's code is what we have to have. > > I tried a little test compile with gcc 4.0 with -m64 -Wall and it > didn't generate a warning with the 0xULL constant. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.6.13-rc3-kj
A new release from kernel janitors (http://janitor.kernelnewbies.org/). Lots of new patches this time! Patchset is at http://coderock.org/kj/2.6.13-rc3-kj/ new in this release: flashpoint_01-remove_unused_things From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 1/15] FlashPoint: remove unused things flashpoint_02-remove_trivial_wrappers From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2/15] FlashPoint: remove trivial wrappers flashpoint_03-remove_UCHAR From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH3 3/15] FlashPoint: remove UCHAR flashpoint_04-remove_USHORT From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 4/15] FlashPoint: remove USHORT flashpoint_05-remove_UINT From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 5/15] FlashPoint: remove UINT flashpoint_06-remove_ULONG From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 6/15] FlashPoint: remove ULONG flashpoint_07-remove_ushort_ptr From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 7/15] FlashPoint: remove ushort_ptr flashpoint_08-use_standart_types From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 8/15] FlashPoint: use standard fixed size types. flashpoint_09-untypedef_SCCB From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 9/15] FlashPoint: untypedef struct _SCCB flashpoint_10-untypedef_SCCBMgr_info From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 10/15] FlashPoint: untypedef struct SCCBMgr_info flashpoint_11-untypedef_SCCBMgr_tar_info From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 11/15] FlashPoint: untypedef struct SCCBMgr_tar_info flashpoint_12-untypedef_NVRAMInfo From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 12/15] FlashPoint: untypedef struct NVRAMInfo flashpoint_13-untypedef_SCCBcard From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 13/15] FlashPoint: untypedef struct SCCBcard flashpoint_14-lindent From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 14/15] ./scripts/Lindent drivers/scsi/FlashPoint.c flashpoint_15-return_parenthesis From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 15/15] FlashPoint: don't use parenthesis with "return" wait_event-drivers_char_drm_i830_irq From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH 10/14] drm/i830_irq: use wait_event_interruptible_timeout() time_after-drivers_usb_input_ati_remote From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/usb/input/ati_remote.c : Use of time_after and time_before macros time_after-drivers_scsi_ From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/scsi/: Use of time_after macro time_after-drivers_net_wan_ From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/wan/: use of time_after macro time_after-drivers_net_tulip_pnic From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/tulip/pnic.c : Use of time_after macro time_after-drivers_net_tokenring_olympic From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/tokenring/olympic.c : Use of time_after macro time_after-drivers_net_tokenring_lanstreamer From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/tokenring/lanstreamer.c : Use of time_after macro time_after-drivers_net_pcmcia_smc91c92_cs From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/pcmcia/smc91c92_cs.c : Use of time_after macro time_after-drivers_net_pcmcia_3c589_cs From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/pcmcia/3c589_cs.c : Use of time_befor macro time_after-drivers_net_ns83820 From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/ns83820.c : Use of time_after_eq macro time_after-drivers_net_hp100 From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/hp100.c : Use of time_before macro time_after-drivers_net_hamradio_mkiss From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/hamradio/mkiss.c : Use of time_before macro time_after-drivers_net_hamradio_baycom_epp From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/net/hamradio/ : Use of time_after_eq macro time_after-drivers_net_3c523 From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: Re: [KJ] [PATCH] drivers/net/3c523.c : Use of time_after macro time_after-drivers_ieee1394_hosts From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/ieee1394/hosts.c : Use of time_before macro time_after-drivers_ide_ide-tape From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/ide/ide-tape.c : Use of time_after macro spelling-Documentation_ From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] Spelling fixes for Documentation/ sparse-sound_core_memalloc
Re: kernel guide to space
On 12/07/05 10:12 +0300, Denis Vlasenko wrote: > > 3c. * in types > > Leave space between name and * in types. > > Multiple * dont need additional space between them. > > > > struct foo **bar; > > unless you declare a fuction: > > int* > function_style_for_easy_grep(...) > { > ... > } > > I like this style because I can grep for ^function_style_for_easy_grep > and quickly find function def. > That's a pretty bad argument, since most functions aren't declared that way, and there are much better source code navigational tools, like cscope and ctags. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.6.13-rc2-kj
A new release from kernel janitors (http://janitor.kernelnewbies.org/). Patchset is at http://coderock.org/kj/2.6.13-rc2-kj/ new in this release: sparse-net From: Victor Fusco <[EMAIL PROTECTED]> Subject: Re: [KJ] [PATCH 2.6.13-rc1 14/17] fix sparse warnings [UPDATE 2/2] sparse-mm_slab From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-c1 2/17] fix sparse warnings [UPDATE] sparse-kernel_audit From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-rc1 13/17] fix sparse warnings (__nocast type) sparse-include_net_bluetooth_bluetooth.h From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-rc1 17/17] fix sparse warnings (__nocast type) sparse-fs_reiserfs_fix_node From: Victor Fusco <[EMAIL PROTECTED]> Subject: Re: [KJ] [PATCH 2.6.13-rc1 9/17] fix sparse warnings (__nocast type) sparse-drivers_ieee1394_raw1394 From: Victor Fusco <[EMAIL PROTECTED]> Subject: Re: [KJ] [PATCH 2.6.13-rc1 16/17] fix sparse warnings (__nocast type) sparse-drivers_char_n_tty From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-rc1 10/17] fix sparse warnings (__nocast type) sparse-drivers_bluetooth_hci_usb From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-rc1 11/17] fix sparse warnings (__nocast type) sparse-drivers_bluetooth_bpa10x From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-rc1 12/17] fix sparse warnings (__nocast type) sparse-drivers_block_ll_rw_blk From: Victor Fusco <[EMAIL PROTECTED]> Subject: Re: [KJ] [PATCH 2.6.13-c1 5/17] fix sparse warnings [UPDATE] sparse-drivers_block_deadline-iosched From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-rc1 8/17] fix sparse warnings (__nocast type) sparse-drivers_block_cfq-iosched From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-rc1 7/17] fix sparse warnings (__nocast type) sparse-drivers_block_as-iosched From: Victor Fusco <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.13-c1 6/17] fix sparse warnings (__nocast type) set_current_state-kernel_module.c From: aLeJ <[EMAIL PROTECTED]> Subject: [KJ] kernel/module.c use __set_current_state() instead of direct assigment indent-drivers_char_Makefile From: Jim Cromie <[EMAIL PROTECTED]> Subject: [KJ] cleanup indenting on drivers/char/Makefile casts-drivers_usb_serial_usb-serial From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/serial/usb-serial: Remove unneeded void 2.6.13-rc2-kj description dropped mail merged notes patches patches-backup-if-i-fuck-up patches.comments pbomb-2.6.12 series series.backup.backup-coz-ill-fuck-up series.old casts kj_tag merged: --- msleep-arch_arm_mach-sa1100_cpu-sa1110.patch readability-net_core_dev cleanup-include_net_slhc_vj.h dropped: return-drivers_macintosh_apm_emu driver can still do useful things if misc_register fails. sleep_on-drivers_sbus_char_bpp.patch sleep_on() is gone from there all patches: min-max-ide_ide-timing.h.patch list-for-each-entry-drivers_net_ppp_generic.patch list-for-each-entry-fs_jffs_intrep.patch list-for-each-entry-fs_namespace.patch list-for-each-fs_dcache.patch msleep-drivers_ide_ide-tape.patch pr_debug-drivers_block_umem.patch list-for-each-drivers_net_tulip_de4x5.patch min-max-arch_sh_boards_bigsur_io.patch min-max-arch_sh_cchips_hd6446x_hd64465_io.patch msleep-drivers_block_xd.patch msleep-drivers_ide_ide-cs.patch for-each-pci-dev-arch_i386_pci_acpi.patch function-string-arch-mips.patch msleep-drivers_net_wireless_prism54_islpci_dev.patch msleep_interruptible-drivers_parport_ieee1284_ops.patch msleep_interruptible-drivers_parport_parport_pc.patch msleep_interruptible-drivers_sbus_char_aurora.patch msleep+msleep_interruptible-drivers_net_tokenring_ibmtr.patch pci_dev_present-drivers_ide_pci_alim15x3.patch remove-pci-find-device-drivers_net_e1000_e1000_main.patch remove-pci-find-device-drivers_net_gt96100eth.patch set_current_state-drivers_net_irda_stir4200.patch set_current_state-drivers_net_tokenring_tms380tr.patch lib-parser-fs_devpts_inode.patch comment-drivers_block_floppy.c.patch remove_file-arch_arm26_boot_compressed_hw_bse.c.patch remove_file-arch_mips_arc_salone.c.patch remove_file-arch_mips_pmc_sierra_yosemite_ht_irq.c.patch remove_file-arch_ppc_syslib_ppc4xx_pm.c.patch remove_file-drivers_parport_parport_arc.c.patch remove_file-fs_jffs2_histo.h.patch remove_file-include_asm_arm_hardware_linkup_l1110.h.patch remove_file-include_asm_mips_gfx.h.patch remove_file-include_asm_mips_mach_au1x00_au1100_mmc.h.patch remove_file-include_asm_mips_mipsprom.h.patch remove_file-include_asm_mips_riscos_syscall.h.patch remove_file-include_linux_netfilter_ipv4_ip_logging.h.patch remove_file-include_linux_netfilter_ipv6_ip6_logging.h.patch vfree-drivers_char_agp_backend.patch vfree-drivers_scsi_qla2xxx_qla_os.patch vfree-fs_reiserfs_super.patch msleep-drivers_block_cciss.patch msleep-drivers_block_paride_pf.p
Re: [KJ] 2.6.13-rc2-kj (Should work now, was: (Broken Link))
That's what happens if you close the console with reminder to copy. :-) Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.12-rc2] aoe [1/6]: improve allowed interfaces configuration
On 21/04/05 09:36 -0400, Ed L Cashin wrote: > "Bodo Eggert <[EMAIL PROTECTED]>" <[EMAIL PROTECTED]> writes: > > > Ed L Cashin <[EMAIL PROTECTED]> wrote: > > ... > >> + /sys/module/aoe/parameters/aoe_iflist instead of > > ^^^ > > > > Why does the module name need to be part of the attribute? > > That's redundant. That's redundant. > > Yes. That's true. Redundancy isn't always bad, though, and using the > "aoe_" prefix lets the kernel parameter for the built-in aoe driver be > the same as the parameter for the modular driver. The __setup() stuff is redundancy too, as module parameters already work as boot parameters (ie. aoe.iflist). Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] introduce generic 64bit rotations and i386 asm optimized version
On 19/04/05 15:46 +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > In article <[EMAIL PROTECTED]> (at Tue, 19 Apr 2005 09:18:10 +0300), Denis > Vlasenko <[EMAIL PROTECTED]> says: > > > diff -urpN 2.6.12-rc2.1.be/include/linux/bitops.h > > 2.6.12-rc2.2.ror/include/linux/bitops.h > > --- 2.6.12-rc2.1.be/include/linux/bitops.h Mon Apr 18 22:55:10 2005 > > +++ 2.6.12-rc2.2.ror/include/linux/bitops.h Tue Apr 19 00:25:28 2005 ... > > -static __inline__ int get_bitmask_order(unsigned int count) > > +static inline int get_bitmask_order(unsigned int count) > > { > > int order; > > > > Please keep using __inline__, not inline. Why? Couldn't find any threads about this, and even SubmittingPatches has: "'static inline' is preferred over 'static __inline__'..." Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 1/1] nbd: Don't create all MAX_NBD devices by default all the time
On 14/04/05 13:23 +0200, Lars Marowsky-Bree wrote: > From: Lars Marowsky-Bree <[EMAIL PROTECTED]> > > This patches adds the "nbds_max" parameter to the nbd kernel module, > which limits the number of nbds allocated. Previously, always all 128 > entries were allocated unconditionally, which used to waste resources > and needlessly flood the hotplug system with events. (Defaults to 16 > now.) > ... > > +module_param(nbds_max, int, 16); This is permissions in sysfs (or 0 if no file is to be created). > +MODULE_PARM_DESC(nbds_max, "How many network block devices to initialize."); > #ifndef NDEBUG > module_param(debugflags, int, 0644); > MODULE_PARM_DESC(debugflags, "flags for controlling debug output"); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 2.6.12-rc2: Compose key doesn't work
On 10/04/05 11:52 +0200, Rene Herman wrote: > Hi Vojtech. > > I have mapped my right windows key to "Compose" in X: ... > > This worked fine upto 2.6.11.7, but doesn't under 2.6.12-rc2. The key > doesn't seem to be doing anything anymore: "Compose-'-e" just gets me > "'e" and so on. I can confirm this, right windows key works as scroll up, so it might be related to recent scroll patches. A quick workaround is to: echo -n "0" > /sys/bus/serio/devices/serio1/scroll serio1 being the keyboard here. Btw. is that "-n" really necessary? Had too look at the code to figure out why it's not working :-) > > X is X.org 6.8.1, keyboard is regular PS/2 keyboard, directly connected. Same here. Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/5] autoparam
On 21/03/05 00:06 +0100, Magnus Damm wrote: > Here are a set of patches that makes it possible to autogenerate kernel > command > line documentation from the source code. The approach is rather > straightforward > - the parameter name, the type and the description are stored in a section > called __param_strings. After vmlinux is built this section is extracted using > objcopy and a script is used to generate a primitive - but up to date - > document. I think it's a great idea. A needed feature with simple implementation. I like it. > > Right now the section is left in the kernel binary. The document is currently > not generated from the Makefile, so the curious user should perform: Any plans to make this a complete patch? > > $ objcopy -j __param_strings vmlinux -O binary foo > $ chmod a+x scripts/section2text.rb > $ cat foo | ./scripts/section2text.rb > > And yeah, you need to install ruby to run the script. Attached a perl script, that has almost the same output. (I think perl is more usual on linux machines) > > The ruby script section2text.rb does some checks to see if MODULE_PARM_DESC() > is used without module_param(). You will find interesting typos. > > Future work that extends this idea could include replacing __setup(name) with > __setup(name, descr). And storing the documentation somewhere to make it easy > for the end user to look up the generated parameter list from the boot loader. And kernel-parameters.txt will never again have obsoleted options :-) Domen section2text.pl Description: Perl program
Re: [patch 3/8] lib/c: documentation strncpy()
this clarifys the documentation on the behavier of strncpy(). From: walter harms <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- [Geez, again, next time i'll send them to myself first] kj-domen/lib/string.c |4 1 files changed, 4 insertions(+) diff -puN lib/string.c~comment-lib_string lib/string.c --- kj/lib/string.c~comment-lib_string 2005-04-05 12:57:42.0 +0200 +++ kj-domen/lib/string.c 2005-04-05 12:57:42.0 +0200 @@ -85,6 +85,10 @@ EXPORT_SYMBOL(strcpy); * * The result is not %NUL-terminated if the source exceeds * @count bytes. + * + * In the case where the length of @src is less than that of + * count, the remainder of @dest will be padded with %NUL. + * */ char * strncpy(char * dest,const char *src,size_t count) { _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.6.12-rc2-kj
A new release from kernel janitors (http://janitor.kernelnewbies.org/). Patchset is at http://coderock.org/kj/2.6.12-rc2-kj/ new in this release: bug-lib_sort.patch From: Daniel Dickman <[EMAIL PROTECTED]> Subject: [KJ] [patch 1/1] fix lib/sort regression test comment-kernel_sys.patch From: Daniel Dickman <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 2.6.12-rc1-bk1 1/1] correctly name the Shell sort comment-lib_string.patch From: walter harms <[EMAIL PROTECTED]> Subject: [KJ] string.linux-2.6.10/lib/c: documentation strncpy() dma_mask-drivers_atm_he.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] atm/he: Use the DMA_32BIT_MASK constant dma_mask-drivers_block_cciss.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/block/cciss : Use the DMA_{32,64}_MASK constants dma_mask-drivers_block_cpqarray.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] block/cpqarray: Use the DMA_32BIT_MASK constant dma_mask-drivers_net.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] drivers/net/: Use the DMA_{64,32}BIT_MASK constants dma_mask-drivers_scsi.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] drivers/scsi/: Use the DMA_32BIT_MASK constant dma_mask-drivers_scsi_ahci.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH 04/19] drivers/scsi/ahci: Use the DMA_{64,32}BIT_MASK constants dma_mask-drivers_scsi_sata_vsc.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH 19/19] drivers/scsi/sata_vsc: Use the DMA_32BIT_MASK constant dma_mask-drivers_usb_host_ehci-hcd.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] dma-mask : drivers/usb/host/ehci-hcd.c docbook_fixes.patch From: Pavel Pisa <[EMAIL PROTECTED]> Subject: [KJ] Some (unqualified) changes and extensions to the Kernel documentation docbook_fixes-net.patch From: Pavel Pisa <[EMAIL PROTECTED]> Subject: net/: documentation fixes jiffies_to_msecs-drivers_input_joydev.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] input/joydev: Remove custom jiffies_to_msecs() macro msecs_to_jiffies-drivers_serial_icom.h.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] serial/icom: Remove custom msescs_to_jiffies() macro printk-drivers_acpi_container.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : drivers/block/drivers/acpi/container.c printk-drivers_acpi_pci_link.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk: drivers/acpi/pci_link.c printk-drivers_block_DAC960.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : drivers/block/DAC960.c printk-drivers_block_cciss.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : drivers/block/cciss.c printk-drivers_block_paride.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : drivers/block/paride/ printk-drivers_char_applicom.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : drivers/char/applicom.c printk-drivers_char_ftape_compressor_zftape-compress.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : drivers/char/ftape/compressor/zftape-compress.c printk-drivers_media_dvb_ttpci_av7110_ipack.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: Re: [KJ] [PATCH] [RESEND] printk : drivers/media/dvb/ttpci/av7110_ipack.c sparse-lib_sha1.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] lib/sha1.c: fix sparse warning wait_queue-drivers_usb_serial_digi_acceleport.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] usb/digi_acceleport: correct wait-queue state whitespace-arch_i386_boot_Makefile.patch From: Daniel Dickman <[EMAIL PROTECTED]> Subject: Re: codingstyle-trivial-whitespace-fixups-2.patch kj_tag.patch -kj merged: --- remove_file-arch_ppc64_boot_no_initrd.c remove_file-arch_ppc_syslib_ppc4xx_serial.c remove_file-include_asm_m68knommu_io_hw_swap.h remove_file-include_asm_m68knommu_semp3.h remove_file-include_asm_ppc64_iSeries_iSeries_fixup.h vfree-drivers_media_dvb_dvb-core_dmxdev vfree-drivers_media_dvb_dvb-core_dvb_ca_en50221 remove_duplicate_delay-drivers_net_sk98lin_skethtool int_sleep_on-drivers_usb_misc_rio500 pci_register_driver-drivers_ieee1394 pci_register_driver-drivers_media_dvb_b2c2_skystar2 pci_register_driver-drivers_media_dvb_bt8xx_bt878 return_code-drivers_usb_image sparse-crypto_sha256 sparse-crypto_sha512 sparse-crypto_blowfish sparse-drivers_atm_zatm sparse-drivers_atm_nicstar sparse-drivers_atm_ambassador vfree-drivers_video_sis_sis_main int_sleep_on-drivers_i2c_busses_i2c-elektor int_sleep_on-drivers_i2c_busses_i2c-ite pci_register_driver-drivers_video pci_register_driver-drivers_video_a
Re: [patch 4/4 with proper signed-off] security/selinux/ss/conditional.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/security/selinux/ss/conditional.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff -puN security/selinux/ss/conditional.c~sparse-security_selinux_ss_conditional security/selinux/ss/conditional.c --- kj/security/selinux/ss/conditional.c~sparse-security_selinux_ss_conditional 2005-03-20 12:11:33.0 +0100 +++ kj-domen/security/selinux/ss/conditional.c 2005-03-20 12:11:33.0 +0100 @@ -219,7 +219,8 @@ int cond_read_bool(struct policydb *p, s { char *key = NULL; struct cond_bool_datum *booldatum; - u32 buf[3], len; + __le32 buf[3]; + u32 len; int rc; booldatum = kmalloc(sizeof(struct cond_bool_datum), GFP_KERNEL); @@ -263,7 +264,8 @@ static int cond_read_av_list(struct poli struct avtab_datum datum; struct avtab_node *node_ptr; int rc; - u32 buf[1], i, len; + __le32 buf[1]; + u32 i, len; u8 found; *ret_list = NULL; @@ -369,7 +371,8 @@ static int expr_isvalid(struct policydb static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp) { - u32 buf[2], len, i; + __le32 buf[2]; + u32 len, i; int rc; struct cond_expr *expr = NULL, *last = NULL; @@ -427,7 +430,8 @@ err: int cond_read_list(struct policydb *p, void *fp) { struct cond_node *node, *last = NULL; - u32 buf[1], i, len; + __le32 buf[1]; + u32 i, len; int rc; rc = next_entry(buf, fp, sizeof buf); _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 3/4 with proper signed-off] security/selinux/ss/avtab.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/security/selinux/ss/avtab.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN security/selinux/ss/avtab.c~sparse-security_selinux_ss_avtab security/selinux/ss/avtab.c --- kj/security/selinux/ss/avtab.c~sparse-security_selinux_ss_avtab 2005-03-20 12:11:32.0 +0100 +++ kj-domen/security/selinux/ss/avtab.c2005-03-20 12:11:32.0 +0100 @@ -303,7 +303,7 @@ void avtab_hash_eval(struct avtab *h, ch int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey) { - u32 buf[7]; + __le32 buf[7]; u32 items, items2; int rc; @@ -370,7 +370,7 @@ int avtab_read(struct avtab *a, void *fp int rc; struct avtab_key avkey; struct avtab_datum avdatum; - u32 buf[1]; + __le32 buf[1]; u32 nel, i; _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2/4 with proper signed-off] security/selinux/ss/ebitmap.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/security/selinux/ss/ebitmap.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN security/selinux/ss/ebitmap.c~sparse-security_selinux_ss_ebitmap security/selinux/ss/ebitmap.c --- kj/security/selinux/ss/ebitmap.c~sparse-security_selinux_ss_ebitmap 2005-03-20 12:11:31.0 +0100 +++ kj-domen/security/selinux/ss/ebitmap.c 2005-03-20 12:11:31.0 +0100 @@ -239,8 +239,9 @@ int ebitmap_read(struct ebitmap *e, void { int rc; struct ebitmap_node *n, *l; - u32 buf[3], mapsize, count, i; - u64 map; + __le32 buf[3]; + u32 mapsize, count, i; + __le64 map; ebitmap_init(e); _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 1/4 with proper signed-off] security/selinux/ss/policydb.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/security/selinux/ss/policydb.c | 35 ++-- 1 files changed, 20 insertions(+), 15 deletions(-) diff -puN security/selinux/ss/policydb.c~sparse-security_selinux_ss_policydb security/selinux/ss/policydb.c --- kj/security/selinux/ss/policydb.c~sparse-security_selinux_ss_policydb 2005-03-20 12:11:25.0 +0100 +++ kj-domen/security/selinux/ss/policydb.c 2005-03-20 12:11:25.0 +0100 @@ -780,7 +780,7 @@ static int context_read_and_validate(str struct policydb *p, void *fp) { - u32 buf[3]; + __le32 buf[3]; int rc; rc = next_entry(buf, fp, sizeof buf); @@ -820,7 +820,8 @@ static int perm_read(struct policydb *p, char *key = NULL; struct perm_datum *perdatum; int rc; - u32 buf[2], len; + __le32 buf[2]; + u32 len; perdatum = kmalloc(sizeof(*perdatum), GFP_KERNEL); if (!perdatum) { @@ -860,7 +861,8 @@ static int common_read(struct policydb * { char *key = NULL; struct common_datum *comdatum; - u32 buf[4], len, nel; + __le32 buf[4]; + u32 len, nel; int i, rc; comdatum = kmalloc(sizeof(*comdatum), GFP_KERNEL); @@ -1092,7 +1094,8 @@ static int role_read(struct policydb *p, char *key = NULL; struct role_datum *role; int rc; - u32 buf[2], len; + __le32 buf[2]; + u32 len; role = kmalloc(sizeof(*role), GFP_KERNEL); if (!role) { @@ -1152,7 +1155,8 @@ static int type_read(struct policydb *p, char *key = NULL; struct type_datum *typdatum; int rc; - u32 buf[3], len; + __le32 buf[3]; + u32 len; typdatum = kmalloc(sizeof(*typdatum),GFP_KERNEL); if (!typdatum) { @@ -1224,7 +1228,8 @@ static int user_read(struct policydb *p, char *key = NULL; struct user_datum *usrdatum; int rc; - u32 buf[2], len; + __le32 buf[2]; + u32 len; usrdatum = kmalloc(sizeof(*usrdatum), GFP_KERNEL); if (!usrdatum) { @@ -1392,7 +1397,8 @@ int policydb_read(struct policydb *p, vo struct ocontext *l, *c, *newc; struct genfs *genfs_p, *genfs, *newgenfs; int i, j, rc; - u32 buf[8], len, len2, config, nprim, nel, nel2; + __le32 buf[8]; + u32 len, len2, config, nprim, nel, nel2; char *policydb_str; struct policydb_compat_info *info; struct range_trans *rt, *lrt; @@ -1408,17 +1414,14 @@ int policydb_read(struct policydb *p, vo if (rc < 0) goto bad; - for (i = 0; i < 2; i++) - buf[i] = le32_to_cpu(buf[i]); - - if (buf[0] != POLICYDB_MAGIC) { + if (buf[0] != cpu_to_le32(POLICYDB_MAGIC)) { printk(KERN_ERR "security: policydb magic number 0x%x does " "not match expected magic number 0x%x\n", - buf[0], POLICYDB_MAGIC); + le32_to_cpu(buf[0]), POLICYDB_MAGIC); goto bad; } - len = buf[1]; + len = le32_to_cpu(buf[1]); if (len != strlen(POLICYDB_STRING)) { printk(KERN_ERR "security: policydb string length %d does not " "match expected length %Zu\n", @@ -1494,9 +1497,11 @@ int policydb_read(struct policydb *p, vo goto bad; } - if (buf[2] != info->sym_num || buf[3] != info->ocon_num) { + if (le32_to_cpu(buf[2]) != info->sym_num || + le32_to_cpu(buf[3]) != info->ocon_num) { printk(KERN_ERR "security: policydb table sizes (%d,%d) do " - "not match mine (%d,%d)\n", buf[2], buf[3], + "not match mine (%d,%d)\n", + le32_to_cpu(buf[2]), le32_to_cpu(buf[3]), info->sym_num, info->ocon_num); goto bad; } _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 4/4 with proper signed-off] crypto/tea.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/crypto/tea.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN crypto/tea.c~sparse-crypto_tea crypto/tea.c --- kj/crypto/tea.c~sparse-crypto_tea 2005-03-20 12:11:36.0 +0100 +++ kj-domen/crypto/tea.c 2005-03-20 12:11:36.0 +0100 @@ -31,8 +31,8 @@ #define XTEA_ROUNDS32 #define XTEA_DELTA 0x9e3779b9 -#define u32_in(x) le32_to_cpu(*(const u32 *)(x)) -#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from)) +#define u32_in(x) le32_to_cpup((const __le32 *)(x)) +#define u32_out(to, from) (*(__le32 *)(to) = cpu_to_le32(from)) struct tea_ctx { u32 KEY[4]; _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 3/4 with proper signed-off] crypto/blowfish.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/crypto/blowfish.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff -puN crypto/blowfish.c~sparse-crypto_blowfish crypto/blowfish.c --- kj/crypto/blowfish.c~sparse-crypto_blowfish 2005-03-20 12:11:35.0 +0100 +++ kj-domen/crypto/blowfish.c 2005-03-20 12:11:35.0 +0100 @@ -349,8 +349,8 @@ static void encrypt_block(struct bf_ctx static void bf_encrypt(void *ctx, u8 *dst, const u8 *src) { - const u32 *in_blk = (const u32 *)src; - u32 *const out_blk = (u32 *)dst; + const __be32 *in_blk = (const __be32 *)src; + __be32 *const out_blk = (__be32 *)dst; u32 in32[2], out32[2]; in32[0] = be32_to_cpu(in_blk[0]); @@ -362,8 +362,8 @@ static void bf_encrypt(void *ctx, u8 *ds static void bf_decrypt(void *ctx, u8 *dst, const u8 *src) { - const u32 *in_blk = (const u32 *)src; - u32 *const out_blk = (u32 *)dst; + const __be32 *in_blk = (const __be32 *)src; + __be32 *const out_blk = (__be32 *)dst; const u32 *P = ((struct bf_ctx *)ctx)->p; const u32 *S = ((struct bf_ctx *)ctx)->s; u32 yl = be32_to_cpu(in_blk[0]); _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2/4 with proper signed-off] crypto/sha512.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/crypto/sha512.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN crypto/sha512.c~sparse-crypto_sha512 crypto/sha512.c --- kj/crypto/sha512.c~sparse-crypto_sha512 2005-03-20 12:11:34.0 +0100 +++ kj-domen/crypto/sha512.c2005-03-20 12:11:34.0 +0100 @@ -105,7 +105,7 @@ static const u64 sha512_K[80] = { static inline void LOAD_OP(int I, u64 *W, const u8 *input) { - W[I] = __be64_to_cpu( ((u64*)(input))[I] ); + W[I] = __be64_to_cpu( ((__be64*)(input))[I] ); } static inline void BLEND_OP(int I, u64 *W) _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 1/4 with proper signed-off] crypto/sha256.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/crypto/sha256.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN crypto/sha256.c~sparse-crypto_sha256 crypto/sha256.c --- kj/crypto/sha256.c~sparse-crypto_sha256 2005-03-20 12:11:33.0 +0100 +++ kj-domen/crypto/sha256.c2005-03-20 12:11:33.0 +0100 @@ -58,7 +58,7 @@ static inline u32 Maj(u32 x, u32 y, u32 static inline void LOAD_OP(int I, u32 *W, const u8 *input) { - W[I] = __be32_to_cpu( ((u32*)(input))[I] ); + W[I] = __be32_to_cpu( ((__be32*)(input))[I] ); } static inline void BLEND_OP(int I, u32 *W) _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 10/10 with proper signed-off] arch/i386/crypto/aes.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/arch/i386/crypto/aes.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/i386/crypto/aes.c~sparse-arch_i386_crypto_aes arch/i386/crypto/aes.c --- kj/arch/i386/crypto/aes.c~sparse-arch_i386_crypto_aes 2005-03-20 12:11:21.0 +0100 +++ kj-domen/arch/i386/crypto/aes.c 2005-03-20 12:11:21.0 +0100 @@ -59,7 +59,7 @@ struct aes_ctx { }; #define WPOLY 0x011b -#define u32_in(x) le32_to_cpu(*(const u32 *)(x)) +#define u32_in(x) le32_to_cpup((const __le32 *)(x)) #define bytes2word(b0, b1, b2, b3) \ (((u32)(b3) << 24) | ((u32)(b2) << 16) | ((u32)(b1) << 8) | (b0)) _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 09/10 with proper signed-off] arch/i386/mm/fault.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/arch/i386/mm/fault.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN arch/i386/mm/fault.c~sparse-arch_i386_mm_fault arch/i386/mm/fault.c --- kj/arch/i386/mm/fault.c~sparse-arch_i386_mm_fault 2005-03-20 12:11:20.0 +0100 +++ kj-domen/arch/i386/mm/fault.c 2005-03-20 12:11:20.0 +0100 @@ -146,7 +146,7 @@ static int __is_prefetch(struct pt_regs if (instr > limit) break; - if (__get_user(opcode, (unsigned char *) instr)) + if (__get_user(opcode, (unsigned char __user *) instr)) break; instr_hi = opcode & 0xf0; @@ -173,7 +173,7 @@ static int __is_prefetch(struct pt_regs scan_more = 0; if (instr > limit) break; - if (__get_user(opcode, (unsigned char *) instr)) + if (__get_user(opcode, (unsigned char __user *) instr)) break; prefetch = (instr_lo == 0xF) && (opcode == 0x0D || opcode == 0x18); _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 08/10 with proper signed-off] arch/i386/kernel/apm.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/arch/i386/kernel/apm.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff -puN arch/i386/kernel/apm.c~sparse-arch_i386_kernel_apm arch/i386/kernel/apm.c --- kj/arch/i386/kernel/apm.c~sparse-arch_i386_kernel_apm 2005-03-20 12:11:19.0 +0100 +++ kj-domen/arch/i386/kernel/apm.c 2005-03-20 12:11:19.0 +0100 @@ -346,10 +346,10 @@ extern int (*console_blank_hook)(int); struct apm_user { int magic; struct apm_user * next; - int suser: 1; - int writer: 1; - int reader: 1; - int suspend_wait: 1; + unsigned intsuser: 1; + unsigned intwriter: 1; + unsigned intreader: 1; + unsigned intsuspend_wait: 1; int suspend_result; int suspends_pending; int standbys_pending; _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 07/10 with proper signed-off] arch/i386/kernel/traps.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/arch/i386/kernel/traps.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff -puN arch/i386/kernel/traps.c~sparse-arch_i386_kernel_traps arch/i386/kernel/traps.c --- kj/arch/i386/kernel/traps.c~sparse-arch_i386_kernel_traps 2005-03-20 12:11:18.0 +0100 +++ kj-domen/arch/i386/kernel/traps.c 2005-03-20 12:11:18.0 +0100 @@ -233,22 +233,22 @@ void show_registers(struct pt_regs *regs * time of the fault.. */ if (in_kernel) { - u8 *eip; + u8 __user *eip; printk("\nStack: "); show_stack(NULL, (unsigned long*)esp); printk("Code: "); - eip = (u8 *)regs->eip - 43; + eip = (u8 __user *)regs->eip - 43; for (i = 0; i < 64; i++, eip++) { unsigned char c; - if (eip < (u8 *)PAGE_OFFSET || __get_user(c, eip)) { + if (eip < (u8 __user *)PAGE_OFFSET || __get_user(c, eip)) { printk(" Bad EIP value."); break; } - if (eip == (u8 *)regs->eip) + if (eip == (u8 __user *)regs->eip) printk("<%02x> ", c); else printk("%02x ", c); @@ -272,13 +272,13 @@ static void handle_BUG(struct pt_regs *r if (eip < PAGE_OFFSET) goto no_bug; - if (__get_user(ud2, (unsigned short *)eip)) + if (__get_user(ud2, (unsigned short __user *)eip)) goto no_bug; if (ud2 != 0x0b0f) goto no_bug; - if (__get_user(line, (unsigned short *)(eip + 2))) + if (__get_user(line, (unsigned short __user *)(eip + 2))) goto bug; - if (__get_user(file, (char **)(eip + 4)) || + if (__get_user(file, (char * __user *)(eip + 4)) || (unsigned long)file < PAGE_OFFSET || __get_user(c, file)) file = ""; _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 06/10 with proper signed-off] init/do_mounts_initrd.c: fix sparse warning
Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/init/do_mounts_initrd.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN init/do_mounts_initrd.c~sparse-init_do_mounts_initrd init/do_mounts_initrd.c --- kj/init/do_mounts_initrd.c~sparse-init_do_mounts_initrd 2005-03-20 12:11:17.0 +0100 +++ kj-domen/init/do_mounts_initrd.c2005-03-20 12:11:17.0 +0100 @@ -41,7 +41,7 @@ static int __init do_linuxrc(void * shel static void __init handle_initrd(void) { int error; - int i, pid; + int pid; real_root_dev = new_encode_dev(ROOT_DEV); create_dev("/dev/root.old", Root_RAM0, NULL); @@ -58,7 +58,7 @@ static void __init handle_initrd(void) pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); if (pid > 0) { - while (pid != sys_wait4(-1, &i, 0, NULL)) + while (pid != sys_wait4(-1, NULL, 0, NULL)) yield(); } _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.6.12-rc1-kj
arnings sparse-fs_ext3_resize.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] fs/ext3/resize.c: fix sparse warnings sparse-fs_hpfs_inode.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] fs/hpfs/inode.c: fix sparse warnings sparse-fs_qnx4_dir.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] fs/qnx4/*: fix sparse warnings sparse-include_linux_smb_fs.h.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] fs/smbfs/*: fix sparse warnings sparse-security_selinux_ss_ebitmap.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] security/selinux/ss/ebitmap.c: fix sparse warnings sparse-security_selinux_ss_avtab.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] security/selinux/ss/avtab.c: fix sparse warnings sparse-security_selinux_ss_conditional.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] security/selinux/ss/conditional.c: fix sparse warnings sparse-crypto_sha256.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] crypto/sha256.c: fix sparse warnings sparse-crypto_sha512.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] crypto/sha512.c: fix sparse warnings sparse-crypto_blowfish.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] crypto/blowfish.c: fix sparse warnings sparse-crypto_tea.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] crypto/tea.c: fix sparse warnings sparse-drivers_atm_zatm.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/atm/zatm.c: fix sparse warning sparse-drivers_atm_nicstar.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/atm/nicstar.c: fix some sparse warnings sparse-drivers_atm_ambassador.patch From: Alexey Dobriyan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/atm/ambassador.c: fix sparse warnings dma_mask-drivers_scsi_lasi700.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] drivers/scsi/lasi700.c: Use the DMA_32BIT_MASK constant printk-arch_ia64_kernel_smp.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : arch/ia64/kernel/smp.c printk-drivers_char_watchdog_wdt285.patch From: Christophe Lucas <[EMAIL PROTECTED]> Subject: [KJ] [PATCH] printk : drivers/char/watchdog/wdt285.c dma_mask-drivers_ieee1394_pcilynx.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] drivers/ieee1394/pcilynx.c: Use the DMA_32BIT_MASK constant dma_mask-drivers_media_video_bttv-driver.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] drivers/media/video/bttv-driver.c: Use the DMA_32BIT_MASK constant dma_mask-drivers_message_fusion_mptbase.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] drivers/message/fusion/mptbase.c: Use the DMA_{64, 32}BIT_MASK constants dma_mask-drivers_block_cciss.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH 1/3] drivers/block/cciss.c: Use the DMA_{64, 32}BIT_MASK constants dma_mask-drivers_block_sx8.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH 2/3] drivers/block/sx8.c: Use the DMA_{64, 32}BIT_MASK constants dma_mask-drivers_block_umem.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH 3/3] drivers/block/umem.c: Use the DMA_{64, 32}BIT_MASK constants dma_mask-drivers_media_video_meye.patch From: Tobias Klauser <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] drivers/media/video/meye.c: Use the DMA_32BIT_MASK constant list_for_each-drivers_macintosh_via-pmu.patch From: Domen Puncer <[EMAIL PROTECTED]> Subject: Re: [Fwd: [patch 1/3] list_for_each_entry: drivers-macintosh-via-pmu.c] kj_tag.patch -kj merged: --- list-for-each-entry-drivers_chan_kern list-for-each-entry-safe-arch_i386_mm_pageattr msleep_interruptible-drivers_macintosh_mediabay msleep-drivers_media_radio_radio-zoltrix msleep-drivers_net_irda_act200l-sir msleep-drivers_net_irda_irtty-sir msleep-drivers_net_irda_ma600-sir msleep-drivers_net_irda_pcmcia_xirc2ps_cs msleep-drivers_net_irda_sir_dev msleep-drivers_net_ni65 msleep-drivers_net_ns83820 msleep_interruptible-drivers_net_irda_tekram-sir msleep_interruptible-drivers_tc_zs remove-pci-find-device-drivers_net_tg3 fix-comment-fs_jbd_journal msleep_interruptible-drivers_net_ewrk3 reorder-state-drivers_char_snsc docs-fs_super remove_file-arch_sh64_lib_old_checksum.c remove_file-drivers_char_hp600_keyb.c remove_file-sound_oss_maestro_tables.h cleanup-drivers_media_radio_miropcm20-radio.c msleep-drivers_net_cs89x0 msleep-drivers_net_wan_cosa typo_suppport-bttv_dvb v
Re: [ patch 1/5] drivers/serial/jsm: new serial device driver
On 14/03/05 12:35 -0500, Wen Xiong wrote: > Domen Puncer wrote: > > >Just some nitpicking... > > > > > > > Hi Domen, all, > > Thanks for your comments. I did some minor changes for patch1 based on > Domen's comment. > And i missed, what is probably a bug: > +module_param(jsm_debug, int, 0); > +module_param(jsm_rawreadok, int, 1); Last parameter is sysfs file mode, or 0 if no file is to be created. Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2/3] cdrom/cdu31a update
Use semaphores instead of sleep_on*. Stolen from patch: http://lkml.org/lkml/2004/12/18/107 from Ondrej Zary <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> Acked-by: Ondrej Zary <[EMAIL PROTECTED]> --- ./drivers/cdrom/cdu31a.c.orig2 2005-03-13 14:12:23.0 +0100 +++ ./drivers/cdrom/cdu31a.c2005-03-13 14:13:44.0 +0100 @@ -267,7 +267,7 @@ static struct s_sony_subcode last_sony_s static volatile int sony_inuse = 0;/* Is the drive in use? Only one operation at a time allowed */ -static DECLARE_WAIT_QUEUE_HEAD(sony_wait); /* Things waiting for the drive */ +static DECLARE_MUTEX(sony_sem);/* Semaphore for drive hardware access */ static struct task_struct *has_cd_task = NULL; /* The task that is currently using the CDROM drive, or @@ -341,13 +341,16 @@ static int scd_media_changed(struct cdro */ static int scd_drive_status(struct cdrom_device_info *cdi, int slot_nr) { - if (CDSL_CURRENT != slot_nr) { + if (CDSL_CURRENT != slot_nr) /* we have no changer support */ return -EINVAL; - } - if (scd_spinup() == 0) { + if (sony_spun_up) + return CDS_DISC_OK; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; + if (scd_spinup() == 0) sony_spun_up = 1; - } + up(&sony_sem); return sony_spun_up ? CDS_DISC_OK : CDS_DRIVE_NOT_READY; } @@ -442,6 +445,8 @@ static int scd_reset(struct cdrom_device { unsigned long retry_count; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; reset_drive(); retry_count = jiffies + SONY_RESET_TIMEOUT; @@ -449,6 +454,7 @@ static int scd_reset(struct cdrom_device sony_sleep(); } + up(&sony_sem); return 0; } @@ -640,7 +646,10 @@ static int scd_select_speed(struct cdrom else sony_speed = speed - 1; + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; set_drive_params(sony_speed); + up(&sony_sem); return 0; } @@ -655,7 +664,10 @@ static int scd_lock_door(struct cdrom_de } else { is_auto_eject = 0; } + if (down_interruptible(&sony_sem)) + return -ERESTARTSYS; set_drive_params(sony_speed); + up(&sony_sem); return 0; } @@ -848,38 +860,12 @@ do_sony_cd_cmd(unsigned char cmd, unsigned char *result_buffer, unsigned int *result_size) { unsigned long retry_count; - int num_retries; - int recursive_call; - unsigned long flags; - - - save_flags(flags); - cli(); - if (current != has_cd_task) { /* Allow recursive calls to this routine */ - while (sony_inuse) { - interruptible_sleep_on(&sony_wait); - if (signal_pending(current)) { - result_buffer[0] = 0x20; - result_buffer[1] = SONY_SIGNAL_OP_ERR; - *result_size = 2; - restore_flags(flags); - return; - } - } - sony_inuse = 1; - has_cd_task = current; - recursive_call = 0; - } else { - recursive_call = 1; - } + int num_retries = 0; - num_retries = 0; retry_cd_operation: while (handle_sony_cd_attention()); - sti(); - retry_count = jiffies + SONY_JIFFIES_TIMEOUT; while (time_before(jiffies, retry_count) && (is_busy())) { sony_sleep(); @@ -907,14 +893,6 @@ retry_cd_operation: msleep(100); goto retry_cd_operation; } - - if (!recursive_call) { - has_cd_task = NULL; - sony_inuse = 0; - wake_up_interruptible(&sony_wait); - } - - restore_flags(flags); } @@ -1154,13 +1132,9 @@ static void abort_read(void) pending read operation. */ static void handle_abort_timeout(unsigned long data) { - unsigned long flags; - pr_debug(PFX "Entering %s\n", __FUNCTION__); - save_flags(flags); - cli(); /* If it is in use, ignore it. */ - if (!sony_inuse) { + if (down_trylock(&sony_sem) == 0) { /* We can't use abort_read(), because it will sleep or schedule in the timer interrupt. Just start the operation, finish it on the next access to @@ -1171,8 +1145,8 @@ static void handle_abort_timeout(unsigne sony_blocks_left = 0; abort_read_started = 1; + up
Re: [patch 1/3] cdrom/cdu31a update
Pretty trivial cleanups: - reordered #includes - improved some printk's (note: this actually enabled some debug printk's) - removed ()'s from returns - removed SONY_POLL_EACH_BYTE, as grep doesn't find it anywhere else - removed panic() as it can't happen. Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> Acked-by: Ondrej Zary <[EMAIL PROTECTED]> --- ./drivers/cdrom/cdu31a.c.orig 2005-03-06 15:55:44.0 +0100 +++ ./drivers/cdrom/cdu31a.c2005-03-13 14:10:32.0 +0100 @@ -148,10 +148,10 @@ * Ondrej Zary <[EMAIL PROTECTED]> */ -#include +#define DEBUG 1 +#include #include - #include #include #include @@ -166,13 +166,13 @@ #include #include #include +#include #include #include #include #include -#include #include "cdu31a.h" #define MAJOR_NR CDU31A_CDROM_MAJOR @@ -180,10 +180,7 @@ #define CDU31A_MAX_CONSECUTIVE_ATTENTIONS 10 -#define DEBUG 1 - -/* Define the following if you have data corruption problems. */ -#undef SONY_POLL_EACH_BYTE +#define PFX "CDU31A: " /* ** Edit the following data to change interrupts, DMA channels, etc. @@ -397,37 +394,37 @@ static inline void sony_sleep(void) */ static inline int is_attention(void) { - return ((inb(sony_cd_status_reg) & SONY_ATTN_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_ATTN_BIT) != 0; } static inline int is_busy(void) { - return ((inb(sony_cd_status_reg) & SONY_BUSY_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_BUSY_BIT) != 0; } static inline int is_data_ready(void) { - return ((inb(sony_cd_status_reg) & SONY_DATA_RDY_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_DATA_RDY_BIT) != 0; } static inline int is_data_requested(void) { - return ((inb(sony_cd_status_reg) & SONY_DATA_REQUEST_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_DATA_REQUEST_BIT) != 0; } static inline int is_result_ready(void) { - return ((inb(sony_cd_status_reg) & SONY_RES_RDY_BIT) != 0); + return (inb(sony_cd_status_reg) & SONY_RES_RDY_BIT) != 0; } static inline int is_param_write_rdy(void) { - return ((inb(sony_cd_fifost_reg) & SONY_PARAM_WRITE_RDY_BIT) != 0); + return (inb(sony_cd_fifost_reg) & SONY_PARAM_WRITE_RDY_BIT) != 0; } static inline int is_result_reg_not_empty(void) { - return ((inb(sony_cd_fifost_reg) & SONY_RES_REG_NOT_EMP_BIT) != 0); + return (inb(sony_cd_fifost_reg) & SONY_RES_REG_NOT_EMP_BIT) != 0; } static inline void reset_drive(void) @@ -478,17 +475,17 @@ static inline void clear_param_reg(void) static inline unsigned char read_status_register(void) { - return (inb(sony_cd_status_reg)); + return inb(sony_cd_status_reg); } static inline unsigned char read_result_register(void) { - return (inb(sony_cd_result_reg)); + return inb(sony_cd_result_reg); } static inline unsigned char read_data_register(void) { - return (inb(sony_cd_read_reg)); + return inb(sony_cd_read_reg); } static inline void write_param(unsigned char param) @@ -534,8 +531,8 @@ static irqreturn_t cdu31a_interrupt(int wake_up(&cdu31a_irq_wait); } else { disable_interrupts(); - printk - ("CDU31A: Got an interrupt but nothing was waiting\n"); + printk(KERN_NOTICE PFX + "Got an interrupt but nothing was waiting\n"); } return IRQ_HANDLED; } @@ -610,8 +607,8 @@ static void set_drive_params(int want_do do_sony_cd_cmd(SONY_SET_DRIVE_PARAM_CMD, params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk(" Unable to set spin-down time: 0x%2.2x\n", - res_reg[1]); + printk(KERN_NOTICE PFX + "Unable to set spin-down time: 0x%2.2x\n", res_reg[1]); } params[0] = SONY_SD_MECH_CONTROL; @@ -627,8 +624,8 @@ static void set_drive_params(int want_do do_sony_cd_cmd(SONY_SET_DRIVE_PARAM_CMD, params, 2, res_reg, &res_size); if ((res_size < 2) || ((res_reg[0] & 0xf0) == 0x20)) { - printk(" Unable to set mechanical parameters: 0x%2.2x\n", - res_reg[1]); + printk(KERN_NOTICE PFX "Unable to set mechanical " + "parameters: 0x%2.2x\n", res_reg[1]); } } @@ -672,7 +669,7 @@ static void restart_on_error(void) unsigned long retry_count; - printk("cdu31a: Resetting drive on error\n"); + printk(KERN_NOTICE PFX "Resetting drive on error\n"); reset_drive();
Re: [patch 3/3] cdrom/cdu31a update
Use wait_event instead of sleep_on. Also, remove two unused variables. Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> Acked-by: Ondrej Zary <[EMAIL PROTECTED]> --- ./drivers/cdrom/cdu31a.c.orig3 2005-03-06 22:04:42.0 +0100 +++ ./drivers/cdrom/cdu31a.c2005-03-12 14:40:14.0 +0100 @@ -264,15 +264,8 @@ static int sony_toc_read = 0; /* Has the static struct s_sony_subcode last_sony_subcode;/* Points to the last subcode address read */ -static volatile int sony_inuse = 0;/* Is the drive in use? Only one operation - at a time allowed */ - static DECLARE_MUTEX(sony_sem);/* Semaphore for drive hardware access */ -static struct task_struct *has_cd_task = NULL; /* The task that is currently - using the CDROM drive, or - NULL if none. */ - static int is_double_speed = 0;/* does the drive support double speed ? */ static int is_auto_eject = 1; /* Door has been locked? 1=No/0=Yes */ @@ -300,6 +293,7 @@ module_param(cdu31a_irq, int, 0); /* The interrupt handler will wake this queue up when it gets an interrupts. */ DECLARE_WAIT_QUEUE_HEAD(cdu31a_irq_wait); +static int irq_flag = 0; static int curr_control_reg = 0; /* Current value of the control register */ @@ -376,17 +370,31 @@ static inline void disable_interrupts(vo */ static inline void sony_sleep(void) { - unsigned long flags; - if (cdu31a_irq <= 0) { yield(); } else {/* Interrupt driven */ + DEFINE_WAIT(w); + int first = 1; + + while (1) { + prepare_to_wait(&cdu31a_irq_wait, &w, + TASK_INTERRUPTIBLE); + if (first) { + enable_interrupts(); + first = 0; + } - save_flags(flags); - cli(); - enable_interrupts(); - interruptible_sleep_on(&cdu31a_irq_wait); - restore_flags(flags); + if (irq_flag != 0) + break; + if (!signal_pending(current)) { + schedule(); + continue; + } else + disable_interrupts(); + break; + } + finish_wait(&cdu31a_irq_wait, &w); + irq_flag = 0; } } @@ -530,11 +538,13 @@ static irqreturn_t cdu31a_interrupt(int /* If something was waiting, wake it up now. */ if (waitqueue_active(&cdu31a_irq_wait)) { disable_interrupts(); - wake_up(&cdu31a_irq_wait); + irq_flag = 1; + wake_up_interruptible(&cdu31a_irq_wait); } } else if (waitqueue_active(&cdu31a_irq_wait)) { disable_interrupts(); - wake_up(&cdu31a_irq_wait); + irq_flag = 1; + wake_up_interruptible(&cdu31a_irq_wait); } else { disable_interrupts(); printk(KERN_NOTICE PFX - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 0/3] cdrom/cdu31a update
Hi. These cdu31a patches are based on http://lkml.org/lkml/2004/12/18/107 from Ondrej Zary <[EMAIL PROTECTED]> Split into three files (see replies): 1 - printk and other trivial cleanups 2 - semaphorifization (hey, i invented a new word) 3 - use wait_event instead of sleep_on in irq handling Patches have been tested by Ondrej, thanks! Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [ patch 1/5] drivers/serial/jsm: new serial device driver
Just some nitpicking... On 11/03/05 10:29 -0500, Wen Xiong wrote: > + * Globals > + */ > +int jsm_driver_state = DRIVER_INITIALIZED; > +spinlock_t jsm_board_head_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK() > +LIST_HEAD(jsm_board_head); > + > +static struct pci_device_id jsm_pci_tbl[] = { > + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9), 0, > 0, 0 }, > + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9PRI), 0, > 0, 1 }, > + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45), 0, > 0, 2 }, > + { PCI_DEVICE (PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, > 0, 3 }, > + { 0,} /* 0 terminated list. */ > +}; > +MODULE_DEVICE_TABLE(pci, jsm_pci_tbl); > + > +static struct board_id jsm_Ids[] = { Trailing whitespace. > + { PCI_DEVICE_NEO_2DB9_PCI_NAME, 2 }, > + { PCI_DEVICE_NEO_2DB9PRI_PCI_NAME, 2 }, > + { PCI_DEVICE_NEO_2RJ45_PCI_NAME,2 }, > + { PCI_DEVICE_NEO_2RJ45PRI_PCI_NAME, 2 }, > + { NULL, 0 } > +}; > + > +char *jsm_driver_state_text[] = { > + "Driver Initialized", > + "Driver Ready." > +}; > + > +static int jsm_finalize_board_init(struct jsm_board *brd) Trailing whitespace. > +{ > + int rc = 0; > + > + jsm_printk(INIT, INFO, &brd->pci_dev, "start\n"); > + > + if (brd->irq) { > + rc = request_irq(brd->irq, brd->bd_ops->intr, > SA_INTERRUPT|SA_SHIRQ, "JSM", brd); > + > + if (rc) { > + printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); > + brd->state = BOARD_FAILED; > + brd->dpastatus = BD_NOFEP; > + rc = -ENODEV; > + } else > + jsm_printk(INIT, INFO, &brd->pci_dev, > + "Requested and received usage of IRQ %d\n", > brd->irq); > + } > + return rc; > +} > + > +/* > + * jsm_found_board() > + * > + * A board has been found, init it. > + */ > +static int jsm_found_board(struct pci_dev *pdev, int id) > +{ > + struct jsm_board *brd; > + int i = 0; > + int rc = 0; > + struct list_head *tmp; > + struct jsm_board *cur_board_entry; > + unsigned long lock_flags; > + int adapter_count = 0; > + > + brd = (struct jsm_board *)kmalloc(sizeof(struct jsm_board), GFP_KERNEL); Don't cast void pointers. > + if (!brd) { > + dev_err(&pdev->dev, "memory allocation for board structure > failed\n"); > + return -ENOMEM; > + } > + memset(brd, 0, sizeof(struct jsm_board)); sizeof(*brd)? > + > + spin_lock_irqsave(&jsm_board_head_lock, lock_flags); > + list_for_each(tmp, &jsm_board_head) { > + cur_board_entry = > + list_entry(tmp, struct jsm_board, > + jsm_board_entry); list_for_each_entry would make it shorter. > + if (cur_board_entry->boardnum != adapter_count) { > + break; > + } > + adapter_count++; > + } > + > + list_add_tail(&brd->jsm_board_entry, &jsm_board_head); > + spin_unlock_irqrestore(&jsm_board_head_lock, lock_flags); > + > + /* store the info for the board we've found */ > + brd->boardnum = adapter_count; > + brd->pci_dev = pdev; > + brd->name = jsm_Ids[id].name; > + brd->maxports = jsm_Ids[id].maxports; > + brd->dpastatus = BD_NOFEP; > + init_waitqueue_head(&brd->state_wait); > + > + spin_lock_init(&brd->bd_lock); > + spin_lock_init(&brd->bd_intr_lock); > + > + brd->state = BOARD_FOUND; > + > + for (i = 0; i < brd->maxports; i++) Trailing whitespace. > + brd->channels[i] = NULL; > + > + /* store which revision we have */ > + pci_read_config_byte(pdev, PCI_REVISION_ID, &brd->rev); > + > + brd->irq = pdev->irq; > + > + switch(brd->pci_dev->device) { > + > + case PCI_DEVICE_ID_NEO_2DB9: > + case PCI_DEVICE_ID_NEO_2DB9PRI: > + case PCI_DEVICE_ID_NEO_2RJ45: > + case PCI_DEVICE_ID_NEO_2RJ45PRI: > + > + /* > + * This chip is set up 100% when we get to it. > + * No need to enable global interrupts or anything. > + */ > + brd->dpatype = T_NEO | T_PCIBUS; > + > + jsm_printk(INIT, INFO, &brd->pci_dev, > + "jsm_found_board - NEO adapter\n"); > + > + /* get the PCI Base Address Registers */ > + brd->membase= pci_resource_start(pdev, 0); > + brd->membase_end = pci_resource_end(pdev, 0); > + > + if (brd->membase & 1) > + brd->membase &= ~3; > + else > + brd->membase &= ~15; > + > + /* Assign the board_ops struct */ > + brd->bd_ops = &jsm_neo_ops; > + > + brd->bd_uart_offset
Re: [patch 07/12] Re: radio-sf16fmi cleanup
On 06/03/05 16:40 -0800, Andrew Morton wrote: > [EMAIL PROTECTED] wrote: > > > > > > This is small cleanup of radio-sf16fmi driver. > > Well, yes, but it is a functional change, no? > > Previously the kernel accepted the `sf16fm=' option. Now the users must > switch over to, umm, `radio-sf16fmi.io=', yes? Right. > > > > > Signed-off-by: Marcel Sebek <[EMAIL PROTECTED]> > > Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> > > --- > > > > > > kj-domen/Documentation/kernel-parameters.txt |3 --- > > kj-domen/drivers/media/radio/radio-sf16fmi.c | 10 -- > > 2 files changed, 13 deletions(-) > > > > diff -puN Documentation/kernel-parameters.txt~kill_kernel_parameter-sf16fm > > Documentation/kernel-parameters.txt > > --- kj/Documentation/kernel-parameters.txt~kill_kernel_parameter-sf16fm > > 2005-03-05 16:11:31.0 +0100 > > +++ kj-domen/Documentation/kernel-parameters.txt2005-03-05 > > 16:11:31.0 +0100 > > @@ -1148,9 +1148,6 @@ running once the system is up. > > > > serialnumber[BUGS=IA-32] > > > > - sf16fm= [HW] SF16FMI radio driver for Linux > > - Format: > > - > > sg_def_reserved_size= > > [SCSI] > > > > diff -puN drivers/media/radio/radio-sf16fmi.c~kill_kernel_parameter-sf16fm > > drivers/media/radio/radio-sf16fmi.c > > --- kj/drivers/media/radio/radio-sf16fmi.c~kill_kernel_parameter-sf16fm > > 2005-03-05 16:11:31.0 +0100 > > +++ kj-domen/drivers/media/radio/radio-sf16fmi.c2005-03-05 > > 16:11:31.0 +0100 > > @@ -326,13 +326,3 @@ static void __exit fmi_cleanup_module(vo > > > > module_init(fmi_init); > > module_exit(fmi_cleanup_module); > > - > > -#ifndef MODULE > > -static int __init fmi_setup_io(char *str) > > -{ > > - get_option(&str, &io); > > - return 1; > > -} > > - > > -__setup("sf16fm=", fmi_setup_io); > > -#endif > > _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [BK PATCH] I2C patches for 2.6.11
On 05/03/05 22:55 -0800, Greg KH wrote: > On Sat, Mar 05, 2005 at 12:59:02PM +0100, Jean Delvare wrote: > > Hi Greg, > > > > > Here is a I2C update for 2.6.11. It includes a number of fixes, and > > > some new i2c drivers. All of these patches have been in the past few > > > -mm releases. > > > > I checked against my own list of patches and found that I have two more, > > which were posted to the sensors and kernel-janitors list in early > > february: > > http://archives.andrew.net.au/lm-sensors/msg29340.html > > http://archives.andrew.net.au/lm-sensors/msg29342.html > > > > They never made it to your own i2c tree, nor Andrew's tree. What do we > > want to do with these? > > They should show up in the -kj tree, right? That will make it to the > -mm tree, and then the kernel janitor maintainer will split them up and > send them to me and you. Actually, there's no "-mm step" in here. Patches should already be in your mailboxes. Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] whitespace cleanups for fs/cifs/file.c
On 07/03/05 10:26 +0100, Edgar, Bob wrote: > I lurk on the list and didn't comment last time but there is one aspect > of this patch that I think is "bad" style. The function declaration should > not be on the same line with the type. Why? Try to find the file where a > function is defined instead of used. If you grep "^funcname" you'll find > it quite simply. The same is true in YFE (mine being vi) /^funcname gets > me there in one shot. Does anybody actually use grep "^funcname"? cscope/ctags is the way. > > This may not seem an important thing but when you are coming into a > project cold and don't know how anything works or where it lives it > can be very important. Consider trying to find where some common > function from a library is defined in a project with sever 1000 files. Again... cscope or ctags will make your life much easier here. > > I now return you to your regularly scheduled programming. > > bob > > -Original Message- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > org]On Behalf Of Jesper Juhl > Sent: Freitag, 4. März 2005 20:24 > To: Steve French > Cc: Jörn Engel; Luca Tettamanti; samba-technical; Linux Kernel Mailing > List; Domen Puncer > Subject: [PATCH] whitespace cleanups for fs/cifs/file.c ... > -int > -cifs_open(struct inode *inode, struct file *file) > +int cifs_open(struct inode *inode, struct file *file) ... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2/8] isdn/capi: replace interruptible_sleep_on() with wait_event_interruptible()
On 06/03/05 19:47 -0800, Andrew Morton wrote: > [EMAIL PROTECTED] wrote: > > > > > > > > Use wait_event_interruptible() instead of the deprecated > > interruptible_sleep_on(). Patch is straight-forward as current sleep is > > conditionally looped. Patch is compile-tested. > > > > Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> > > Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> > > --- > > > > > > kj-domen/drivers/isdn/capi/capi.c |9 ++--- > > 1 files changed, 2 insertions(+), 7 deletions(-) > > > > diff -puN drivers/isdn/capi/capi.c~int_sleep_on-drivers_isdn_capi_capi > > drivers/isdn/capi/capi.c > > --- kj/drivers/isdn/capi/capi.c~int_sleep_on-drivers_isdn_capi_capi > > 2005-03-05 16:11:36.0 +0100 > > +++ kj-domen/drivers/isdn/capi/capi.c 2005-03-05 16:11:36.0 > > +0100 > > @@ -675,13 +675,8 @@ capi_read(struct file *file, char __user > > if (file->f_flags & O_NONBLOCK) > > return -EAGAIN; > > > > - for (;;) { > > - interruptible_sleep_on(&cdev->recvwait); > > - if ((skb = skb_dequeue(&cdev->recvqueue)) != 0) > > - break; > > - if (signal_pending(current)) > > - break; > > - } > > + wait_event_interruptible(cdev->recvwait, > > + ((skb = skb_dequeue(&cdev->recvqueue)) == 0)); > > if (skb == 0) > > return -ERESTARTNOHAND; > > } > > hmm, OK. Putting an expression with side-effect such as this into a macro > which evaluates the expression multiple times is a bit of a worry, but it > appears that everything will work OK. > > That being said, I'd prefer that this come in via the ISDN team, after > having been tested please. I believe last update from ISDN team was 13 months ago. :-( And I concur, testing would be great. Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 1/8] isdn_bsdcomp.c - vfree() checking cleanups
On 07/03/05 00:07 +, Ralph Corderoy wrote: > > Hi Domen, > > > - if (db->dict) { > > - vfree (db->dict); > > - db->dict = NULL; > > - } > > + vfree (db->dict); > > + db->dict = NULL; > > Is it really worth always calling vfree() which calls __vunmap() before > db->dict is determined to be NULL in order to turn three lines into two? Four lines into two :-) > Plus the write to db->dict which might otherwise not be needed. The old > code was clear, clean, and fast, no? Shorter and more readable code is always better, right? And speed really doesn't seem to be an issue here. Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 2/6] 12/34: cdrom/cdu31a: replace interruptible_sleep_on() with wait_event_interruptible()
On 06/03/05 12:42 +0100, Ondrej Zary wrote: > [EMAIL PROTECTED] wrote: > >Use wait_event_interruptible() instead of the deprecated > >interruptible_sleep_on(). The patch is straight-forward as the macros > >should result in the same execution. Patch is compile-tested (still throws > >out warnings > >regarding {save,restore}_flags()). > > > >Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> > >Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> > Uh, this one escaped me, as schedule() (sleep_on) after cli() is clearly wrong. Btw. what was the reason for this? > I've posted a patch for the cdu31a driver some time ago that removes > almost all usage of interruptible_sleep_on() and also > {save,restore}_flags() - it uses semaphore instead. > The only remaining code is in sony_sleep() function when using > IRQ-driven operation. > > See http://lkml.org/lkml/2004/12/18/107 > The patch is big because I've messed with the formatting... I looked at it, and rewrote some of it into smaller patches. If you don't mind, can i send them to you for review and testing? Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] hid-core: Configurable USB HID Mouse Interrupt Polling Interval
On 07/02/05 07:59 -0800, Randy.Dunlap wrote: > Mikkel Krautz wrote: > >And, here's an updated version of hid-core.c: > > > >Signed-off-by: Mikkel Krautz <[EMAIL PROTECTED]> > >--- > >--- clean/drivers/usb/input/hid-core.c > >+++ dirty/drivers/usb/input/hid-core.c ... > >+ > >+static unsigned int hid_mousepoll_interval; > >+module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); > > Why is it writable by root? IOW, will writing a new value to it > change the operational value dynamically? > > Also, from the kernel-parameters.txt patch: > + usbhid.mousepoll= > + [USBHID] The interval at wich mice are to be polled at. > > (a) "which" > (b) drop one of the "at"s... either one. Is listing module parameters in kernel-parameters.txt the right thing to do? (There are lots of them, not many are listed) I see some options that might be better: - Kconfig magic which extracts module_param* and MODULE_PARM_DESC from sources and appends them to help text. - a userspace script, that goes trough all modules and generates kernel-module-parameters.txt for example. - modinfo like tool (but i think it would require source or descriptions compiled in kernel) Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.11-rc3] IBM Trackpoint support
I'm a bit late, sorry. Haven't seen these mentioned in replies: On 03/02/05 17:43 -0500, Stephen Evanchik wrote: > +int tp_sens = TP_DEF_SENS; > +module_param_named(sens, tp_sens, uint, 0); > +MODULE_PARM_DESC(sens, "Sensitivity"); I don't see out-of-file usages... these could be static. ... > + static int name(char* page, char** start, off_t off, int count, int* > eof, void* data) \ > + { \ > + int len; \ > + struct psmouse *psmouse = (struct psmouse *)data; \ > + struct trackpoint_data *tp = (struct > trackpoint_data*)psmouse->private; \ No need to cast (void *). ... > +static int scroll_write_func(struct file *file, const char __user > *buffer, unsigned long count, void *data) > +{ > + int len = count; > + unsigned char tmp[5]; > + struct psmouse *psmouse = (struct psmouse *)data; > + struct trackpoint_data *tp = (struct trackpoint_data*)psmouse->private; > + if(count > sizeof(tmp) - 1) > + len = sizeof(tmp) - 1; How about: len = min(count, sizeof(tmp) - 1);? ... > +no_ext_dev: Nitpick: Some like ' ' before label (makes diff -pu patches more readable) Domen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.6.11-rc2-kj
Another release from kernel janitors (http://kerneljanitors.org/) This one contains 194 patches. Mail me if I missed any patches. Feedback is appreciated, especially for some not so trivial patches like wait_event ones. Patchset is at http://coderock.org/kj/2.6.11-rc2-kj/ new in this release: msleep-drivers_ieee1394_sbp2.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [UPDATE PATCH] ieee1394/sbp2: use ssleep() instead of schedule_timeout() msleep-drivers_net_cs89x0.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 5/28] net/cs89x0: replace schedule_timeout() with msleep() msleep-drivers_net_wan_cosa.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 4/28] net/cosa: replace schedule_timeout() with msleep() msleep_ssleep-drivers_net_wireless_airo.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 3/28] net/airo: replace schedule_timeout() with msleep()/ssleep() typo_suppport-bttv_dvb.patch From: Carlo Perassi <[EMAIL PROTECTED]> Subject: [KJ] [patch] trivial typos vfree-arch_s390_kernel_module.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [18/29] module.c - vfree() checking cleanups vfree-drivers_char_agp_backend.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [23/29] backend.c - vfree() checking cleanups vfree-drivers_char_agp_generic.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [28/29] generic.c - vfree() checking cleanups vfree-drivers_ieee1394_dma.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [9/29] dma.c - vfree() checking cleanups vfree-drivers_isdn_hardware_eicon_platform.h.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [2/29] platform.h - vfree() checking cleanups vfree-drivers_isdn_i4l_isdn_bsdcomp.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [1/29] isdn_bsdcomp.c - vfree() checking cleanups vfree-drivers_media_dvb_dvb-core_dmxdev.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [12/29] dmxdev.c - vfree() checking cleanups vfree-drivers_media_dvb_dvb-core_dvb_ca_en50221.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [4/29] dvb_ca_en50221.c - vfree() checking cleanups vfree-drivers_media_dvb_dvb-core_dvb_demux.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [20/29] dvb_demux.c - vfree() checking cleanups vfree-drivers_media_dvb_ttpci_av7110.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [5/29] av7110.c - vfree() checking cleanups vfree-drivers_media_dvb_ttpci_av7110_ipack.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [8/29] av7110_ipack.c - vfree() checking cleanups vfree-drivers_media_dvb_ttpci_budget-core.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [27/29] budget-core.c - vfree() checking cleanups vfree-drivers_media_video_stradis.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [24/29] stradis.c - vfree() checking cleanups vfree-drivers_scsi_qla2xxx_qla_os.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [15/29] qla_os.c - vfree() checking cleanups vfree-drivers_video_sis_sis_main.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [22/29] sis_main.c - vfree() checking cleanups vfree-fs_reiserfs_super.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [19/29] super.c - vfree() checking cleanups vfree-net_bridge_netfilter_ebtables.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [14/29] ebtables.c - vfree() checking cleanups vfree-sound_oss_gus_wave.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [21/29] gus_wave.c - vfree() checking cleanups vfree-sound_oss_pss.patch From: [EMAIL PROTECTED] Subject: [KJ] [PATCH] [RESEND] [29/29] pss.c - vfree() checking cleanups extern-include_linux_generic_serial.h.old.patch From: Adrian Bunk <[EMAIL PROTECTED]> Subject: [KJ] [2.6 patch] generic_serial.h: kill incorrect gs_debug reference msleep-arch_arm_mach-sa1100_cpu-sa1110.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 1/22] arm/cpu-sa1110: replace schedule_timeout() with msleep() msleep-arch_ia64_kernel_smpboot.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 13/21] ia64/smpboot: replace schedule_timeout() with msleep() msleep-arch_ppc64_kernel_iSeries_pci_reset.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 16/21] ppc64/iSeries_pci_reset: replace schedule_timeout() with msleep() msleep-arch_ppc64_kernel_pSeries_smp.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 17/21] ppc64/pSeries_smp: replace schedule_timeout() with msleep() msleep-arch_ppc64_kernel_smp.patch From: Nishanth Aravamudan <[EMAIL PROTECTED]> Subject: [KJ] [PATCH 19/21] ppc64/smp: replace