[PATCH] ethernet: nvidia: Remove extra parens
Remove unnecessary double parenthesis around if statement. Signed-off-by: David Wood --- drivers/net/ethernet/nvidia/forcedeth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index 925b296..f39cae6 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c @@ -1481,7 +1481,7 @@ static int phy_init(struct net_device *dev) } /* phy vendor specific configuration */ - if ((np->phy_oui == PHY_OUI_CICADA)) { + if (np->phy_oui == PHY_OUI_CICADA) { if (init_cicada(dev, np, phyinterface)) { netdev_info(dev, "%s: phy init failed\n", pci_name(np->pci_dev)); -- 2.0.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] ethernet: nvidia: Remove extra parens
Remove unnecessary double parenthesis around if statement. Signed-off-by: David Wood de...@dtwood.uk --- drivers/net/ethernet/nvidia/forcedeth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index 925b296..f39cae6 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c @@ -1481,7 +1481,7 @@ static int phy_init(struct net_device *dev) } /* phy vendor specific configuration */ - if ((np-phy_oui == PHY_OUI_CICADA)) { + if (np-phy_oui == PHY_OUI_CICADA) { if (init_cicada(dev, np, phyinterface)) { netdev_info(dev, %s: phy init failed\n, pci_name(np-pci_dev)); -- 2.0.3 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] spi: Fix warning about redefinition
On 6 August 2014 21:04, Guenter Roeck wrote: > On Wed, Aug 06, 2014 at 08:53:41PM +0200, David Wood wrote: > ... > That was purely to ensure that there is no hidden use through a macro > defined elsewhere, not a suggestion for a real patch. > > Guenter I also managed not to notice that I had in fact shown that the fs.h definitions were the opposite of those in the spi driver, so it would in fact be significant if they were swapped. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] spi: Fix warning about redefinition
On Wed, 6 Aug 2014 11:33:28 -0700, Guenter Roeck wrote: > On Wed, Aug 06, 2014 at 07:19:54PM +0200, Richard Weinberger wrote: > > On Wed, Aug 6, 2014 at 6:55 PM, Nick Krause wrote: > > > Fix the following warnings about redefining READ and write > > > > > > drivers/spi/spi-omap-100k.c:73:0: warning: "WRITE" redefined [enabled by > > > default] > > > include/linux/fs.h:193:0: note: this is the location of the previous > > > definition > > > drivers/spi/spi-omap-100k.c:74:0: warning: "READ" redefined [enabled by > > > default] > > > include/linux/fs.h:192:0: note: this is the location of the previous > > > definition > > > > > > Signed-off-by: Nick Krause > > > --- > > > drivers/spi/spi-omap-100k.c | 6 ++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c > > > index 5e91858..eb8ae4e 100644 > > > --- a/drivers/spi/spi-omap-100k.c > > > +++ b/drivers/spi/spi-omap-100k.c > > > @@ -70,6 +70,12 @@ > > > #define SPI_STATUS_WE (1UL << 1) > > > #define SPI_STATUS_RD (1UL << 0) > > > > > > +#ifdef WRITE > > > +#undef WRITE > > > +#endif > > > +#ifdef READ > > > +#undef READ > > > +#endif > > > #define WRITE 0 > > > #define READ 1 > > > > Are these symbols even in use? > > > > It is always fun watching those patches flow by :-) > With the following patch: > diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c > index 5e91858..f72ddfc 100644 > --- a/drivers/spi/spi-omap-100k.c > +++ b/drivers/spi/spi-omap-100k.c > @@ -70,8 +70,8 @@ > #define SPI_STATUS_WE (1UL << 1) > #define SPI_STATUS_RD (1UL << 0) > -#define WRITE 0 > -#define READ 1 > +#undef WRITE > +#undef READ > [ just to make sure that no existing defines are used instead of the new ones > ] > When compiling the resulting code with W=1, I get: > drivers/spi/spi-omap-100k.c: In function 'spi100k_read_data': > drivers/spi/spi-omap-100k.c:148:6: warning: variable 'dataH' set but not used > [-Wunused-but-set-variable] > So, one might conclude that the defines are not used. > Guenter There's also no need to have the undefines, as the READ is defined as 0 in linux/fs.h, and WRITE as 1 (WRITE = RW_MASK = REQ_WRITE = 1ULL << __REQ_WRITE, with __REQ_WRITE being defined in enum rq_flag_bits { __REQ_WRITE = 0; };), so even if it did try to use those definitions, it wouldn't then matter. Unfortunately, neither the linux source code, nor the linwizard source (from which this file was copied) show how the defines got there, they appear to have been in the code ever since Nokia originally wrote the file in 2005. So the following should be sufficient: diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 5e91858..1dbb706 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -70,9 +70,6 @@ #define SPI_STATUS_WE (1UL << 1) #define SPI_STATUS_RD (1UL << 0) -#define WRITE 0 -#define READ 1 - /* use PIO for small transfers, avoiding DMA setup/teardown overhead and * cache operations; better heuristics consider wordsize and bitrate. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] spi: Fix warning about redefinition
On Wed, 6 Aug 2014 11:33:28 -0700, Guenter Roeck wrote: On Wed, Aug 06, 2014 at 07:19:54PM +0200, Richard Weinberger wrote: On Wed, Aug 6, 2014 at 6:55 PM, Nick Krause xerofoi...@gmail.com wrote: Fix the following warnings about redefining READ and write drivers/spi/spi-omap-100k.c:73:0: warning: WRITE redefined [enabled by default] include/linux/fs.h:193:0: note: this is the location of the previous definition drivers/spi/spi-omap-100k.c:74:0: warning: READ redefined [enabled by default] include/linux/fs.h:192:0: note: this is the location of the previous definition Signed-off-by: Nick Krause xerofoi...@gmail.com --- drivers/spi/spi-omap-100k.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 5e91858..eb8ae4e 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -70,6 +70,12 @@ #define SPI_STATUS_WE (1UL 1) #define SPI_STATUS_RD (1UL 0) +#ifdef WRITE +#undef WRITE +#endif +#ifdef READ +#undef READ +#endif #define WRITE 0 #define READ 1 Are these symbols even in use? It is always fun watching those patches flow by :-) With the following patch: diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 5e91858..f72ddfc 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -70,8 +70,8 @@ #define SPI_STATUS_WE (1UL 1) #define SPI_STATUS_RD (1UL 0) -#define WRITE 0 -#define READ 1 +#undef WRITE +#undef READ [ just to make sure that no existing defines are used instead of the new ones ] When compiling the resulting code with W=1, I get: drivers/spi/spi-omap-100k.c: In function 'spi100k_read_data': drivers/spi/spi-omap-100k.c:148:6: warning: variable 'dataH' set but not used [-Wunused-but-set-variable] So, one might conclude that the defines are not used. Guenter There's also no need to have the undefines, as the READ is defined as 0 in linux/fs.h, and WRITE as 1 (WRITE = RW_MASK = REQ_WRITE = 1ULL __REQ_WRITE, with __REQ_WRITE being defined in enum rq_flag_bits { __REQ_WRITE = 0; };), so even if it did try to use those definitions, it wouldn't then matter. Unfortunately, neither the linux source code, nor the linwizard source (from which this file was copied) show how the defines got there, they appear to have been in the code ever since Nokia originally wrote the file in 2005. So the following should be sufficient: diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 5e91858..1dbb706 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -70,9 +70,6 @@ #define SPI_STATUS_WE (1UL 1) #define SPI_STATUS_RD (1UL 0) -#define WRITE 0 -#define READ 1 - /* use PIO for small transfers, avoiding DMA setup/teardown overhead and * cache operations; better heuristics consider wordsize and bitrate. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] spi: Fix warning about redefinition
On 6 August 2014 21:04, Guenter Roeck li...@roeck-us.net wrote: On Wed, Aug 06, 2014 at 08:53:41PM +0200, David Wood wrote: ... That was purely to ensure that there is no hidden use through a macro defined elsewhere, not a suggestion for a real patch. Guenter I also managed not to notice that I had in fact shown that the fs.h definitions were the opposite of those in the spi driver, so it would in fact be significant if they were swapped. David -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: PROBLEM: virtual console corruption (2.4.1/p4/radeon/XFree864.0.2)
I believe you, although... why doesn't it happen with 2.2.17? vconsole buffers in a different place in memory, I suppose? I'll forward this to the XFree team. Thanks! -David On Fri, 16 Feb 2001, James Simmons wrote: > > X server problem. > ____ David Wood | Templar Studios LLC. 157 Ludlow Street N 600 | New York, NY 10002 tel 212.982.9360 x210 | fax 212.982.9370 - 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: PROBLEM: virtual console corruption (2.4.1/p4/radeon/XFree864.0.2)
I believe you, although... why doesn't it happen with 2.2.17? vconsole buffers in a different place in memory, I suppose? I'll forward this to the XFree team. Thanks! -David On Fri, 16 Feb 2001, James Simmons wrote: X server problem. David Wood | Templar Studios LLC. 157 Ludlow Street N 600 | New York, NY 10002 tel 212.982.9360 x210 | fax 212.982.9370 - 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/
PROBLEM: virtual console corruption (2.4.1/p4/radeon/XFree86 4.0.2)
[1.] virtual console corruption (2.4.1/p4/radeon/XFree86 4.0.2) [2.] Taking a redhat 7 install, upgrading it to currency, and then adding rawhide RPMS for the required extra pieces, I compiled a 2.4.1 kernel using kgcc. Everything actually works rather well, with the exception that when I've started XFree86 a few times, coupled with switching virtual consoles, I get irretrievably "corrupted" text virtual consoles. The screen becomes garbled, sometimes quite colorful, cursor goes to the wrong place, text appears in odd locations or is not visible at all. Interestingly, the scrollback buffer allows me to scroll through the garble perfectly. The problem can only be fixed by rebooting. X works great throughout, even when the text-mode console is messed up. It's just the text-mode console that has the problem. I have tried an alternate compile, omitting support for AGPART and Radeon DRI - no effect. The exact same setup, but replacing 2.4.1 with 2.2.17, works perfectly. [3.] kernel, console, vga, xwindows [4.] Linux version 2.4.1 ([EMAIL PROTECTED]) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #1 Wed Feb 14 14:28:33 EST 2001 [5.] No OOPS [6.] No script [7.] [7.1.] Software: Linux fox.templar.com 2.4.1 #1 Wed Feb 14 14:28:33 EST 2001 i686 unknown Kernel modules 2.4.2 Gnu C 2.96 Gnu Make 3.79.1 Binutils 2.10.0.18 Linux C Library> libc.2.2 Dynamic linker ldd (GNU libc) 2.2 Procps 2.0.7 Mount 2.10m Net-tools 1.56 Console-tools 0.3.3 Sh-utils 2.0 Modules Loaded emu10k1 soundcore [7.2.] processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 0 model name : Intel(R) Pentium(R) 4 CPU 1600MHz stepping: 5 cpu MHz : 1396.591 cache size : 256 KB fdiv_bug: no hlt_bug : no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm bogomips: 2785.28 [7.3.] emu10k144944 0 soundcore 3920 4 [emu10k1] [7.4.] ioports: -001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 0376-0376 : ide1 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 0cf8-0cff : PCI conf1 c000-cfff : PCI Bus #01 c800-c8ff : PCI device 1002:5144 (ATI Technologies Inc) d000-dfff : PCI Bus #02 d800-d8ff : Adaptec AIC-7861 df00-df3f : Intel Corporation 82557 [Ethernet Pro 100] df00-df3f : eepro100 df80-df9f : Creative Labs SB Live! EMU1 df80-df9f : EMU10K1 dfe0-dfe7 : CONEXANT 56K Winmodem dff0-dff7 : Creative Labs SB Live! ef40-ef5f : Intel Corporation 82820 820 (Camino 2) Chipset USB (Hub A) ef40-ef5f : usb-uhci ef80-ef9f : Intel Corporation 82820 820 (Camino 2) Chipset USB (Hub B) ef80-ef9f : usb-uhci efa0-efaf : Intel Corporation 82820 820 (Camino 2) Chipset SMBus ffa0-ffaf : Intel Corporation 82820 820 (Camino 2) Chipset IDE U100 ffa0-ffa7 : ide0 ffa8-ffaf : ide1 iomem: -0009fbff : System RAM 0009fc00-0009 : reserved 000a-000b : Video RAM area 000c-000c7fff : Video ROM 000c8000-000c87ff : Extension ROM 000c8800-000c9fff : Extension ROM 000f-000f : System ROM 0010-0ffb : System RAM 0010-00213ef7 : Kernel code 00213ef8-002734cf : Kernel data 0ffc-0ffd : ACPI Tables 0ffe-0fff7fff : ACPI Tables 0fff8000-0fff : ACPI Non-volatile Storage e690-f69f : PCI Bus #01 e800-efff : PCI device 1002:5144 (ATI Technologies Inc) f6a0-f6af : PCI Bus #02 f800-fbff : Intel Corporation 82850 850 (Tehama) Chipset Host Bridge (MCH) fec0-fec00fff : reserved fee0-fee00fff : reserved ff50-ff6f : PCI Bus #01 ff68-ff6f : PCI device 1002:5144 (ATI Technologies Inc) ff70-ff9f : PCI Bus #02 ff9a-ff9b : Intel Corporation 82557 [Ethernet Pro 100] ff9d-ff9d : CONEXANT 56K Winmodem ff9fe000-ff9fefff : Intel Corporation 82557 [Ethernet Pro 100] ff9fe000-ff9fefff : eepro100 ff9ff000-ff9f : Adaptec AIC-7861 ffb8-ffbf : reserved fff0- : reserved [7.5.] 00:00.0 Host bridge: Intel Corporation: Unknown device 2530 (rev 02) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- 00:01.0 PCI bridge: Intel Corporation: Unknown device 2532 (rev 02) (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap- 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast
PROBLEM: virtual console corruption (2.4.1/p4/radeon/XFree86 4.0.2)
[1.] virtual console corruption (2.4.1/p4/radeon/XFree86 4.0.2) [2.] Taking a redhat 7 install, upgrading it to currency, and then adding rawhide RPMS for the required extra pieces, I compiled a 2.4.1 kernel using kgcc. Everything actually works rather well, with the exception that when I've started XFree86 a few times, coupled with switching virtual consoles, I get irretrievably "corrupted" text virtual consoles. The screen becomes garbled, sometimes quite colorful, cursor goes to the wrong place, text appears in odd locations or is not visible at all. Interestingly, the scrollback buffer allows me to scroll through the garble perfectly. The problem can only be fixed by rebooting. X works great throughout, even when the text-mode console is messed up. It's just the text-mode console that has the problem. I have tried an alternate compile, omitting support for AGPART and Radeon DRI - no effect. The exact same setup, but replacing 2.4.1 with 2.2.17, works perfectly. [3.] kernel, console, vga, xwindows [4.] Linux version 2.4.1 ([EMAIL PROTECTED]) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #1 Wed Feb 14 14:28:33 EST 2001 [5.] No OOPS [6.] No script [7.] [7.1.] Software: Linux fox.templar.com 2.4.1 #1 Wed Feb 14 14:28:33 EST 2001 i686 unknown Kernel modules 2.4.2 Gnu C 2.96 Gnu Make 3.79.1 Binutils 2.10.0.18 Linux C Library libc.2.2 Dynamic linker ldd (GNU libc) 2.2 Procps 2.0.7 Mount 2.10m Net-tools 1.56 Console-tools 0.3.3 Sh-utils 2.0 Modules Loaded emu10k1 soundcore [7.2.] processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 0 model name : Intel(R) Pentium(R) 4 CPU 1600MHz stepping: 5 cpu MHz : 1396.591 cache size : 256 KB fdiv_bug: no hlt_bug : no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm bogomips: 2785.28 [7.3.] emu10k144944 0 soundcore 3920 4 [emu10k1] [7.4.] ioports: -001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 0376-0376 : ide1 03c0-03df : vga+ 03f6-03f6 : ide0 03f8-03ff : serial(auto) 0cf8-0cff : PCI conf1 c000-cfff : PCI Bus #01 c800-c8ff : PCI device 1002:5144 (ATI Technologies Inc) d000-dfff : PCI Bus #02 d800-d8ff : Adaptec AIC-7861 df00-df3f : Intel Corporation 82557 [Ethernet Pro 100] df00-df3f : eepro100 df80-df9f : Creative Labs SB Live! EMU1 df80-df9f : EMU10K1 dfe0-dfe7 : CONEXANT 56K Winmodem dff0-dff7 : Creative Labs SB Live! ef40-ef5f : Intel Corporation 82820 820 (Camino 2) Chipset USB (Hub A) ef40-ef5f : usb-uhci ef80-ef9f : Intel Corporation 82820 820 (Camino 2) Chipset USB (Hub B) ef80-ef9f : usb-uhci efa0-efaf : Intel Corporation 82820 820 (Camino 2) Chipset SMBus ffa0-ffaf : Intel Corporation 82820 820 (Camino 2) Chipset IDE U100 ffa0-ffa7 : ide0 ffa8-ffaf : ide1 iomem: -0009fbff : System RAM 0009fc00-0009 : reserved 000a-000b : Video RAM area 000c-000c7fff : Video ROM 000c8000-000c87ff : Extension ROM 000c8800-000c9fff : Extension ROM 000f-000f : System ROM 0010-0ffb : System RAM 0010-00213ef7 : Kernel code 00213ef8-002734cf : Kernel data 0ffc-0ffd : ACPI Tables 0ffe-0fff7fff : ACPI Tables 0fff8000-0fff : ACPI Non-volatile Storage e690-f69f : PCI Bus #01 e800-efff : PCI device 1002:5144 (ATI Technologies Inc) f6a0-f6af : PCI Bus #02 f800-fbff : Intel Corporation 82850 850 (Tehama) Chipset Host Bridge (MCH) fec0-fec00fff : reserved fee0-fee00fff : reserved ff50-ff6f : PCI Bus #01 ff68-ff6f : PCI device 1002:5144 (ATI Technologies Inc) ff70-ff9f : PCI Bus #02 ff9a-ff9b : Intel Corporation 82557 [Ethernet Pro 100] ff9d-ff9d : CONEXANT 56K Winmodem ff9fe000-ff9fefff : Intel Corporation 82557 [Ethernet Pro 100] ff9fe000-ff9fefff : eepro100 ff9ff000-ff9f : Adaptec AIC-7861 ffb8-ffbf : reserved fff0- : reserved [7.5.] 00:00.0 Host bridge: Intel Corporation: Unknown device 2530 (rev 02) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast TAbort- TAbort- MAbort+ SERR- PERR- Latency: 0 Region 0: Memory at f800 (32-bit, prefetchable) [size=64M] Capabilities: [a0] AGP version 2.0 Status: RQ=31 SBA+ 64bit- FW+ Rate=x1,x2 Command: RQ=0 SBA- AGP- 64bit- FW-