[PATCH] printk: fix failure to return error in devkmsg_poll

2013-04-08 Thread Nicolas Kaiser
Error value got overwritten instantly.

Signed-off-by: Nicolas Kaiser 
---
 kernel/printk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index abbdd9e..6317194 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -608,7 +608,8 @@ static unsigned int devkmsg_poll(struct file *file, 
poll_table *wait)
/* return error when data has vanished underneath us */
if (user->seq < log_first_seq)
ret = POLLIN|POLLRDNORM|POLLERR|POLLPRI;
-   ret = POLLIN|POLLRDNORM;
+   else
+   ret = POLLIN|POLLRDNORM;
}
raw_spin_unlock_irq(_lock);
 
-- 
1.8.1.2
--
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] printk: fix failure to return error in devkmsg_poll

2013-04-08 Thread Nicolas Kaiser
Error value got overwritten instantly.

Signed-off-by: Nicolas Kaiser ni...@nikai.net
---
 kernel/printk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index abbdd9e..6317194 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -608,7 +608,8 @@ static unsigned int devkmsg_poll(struct file *file, 
poll_table *wait)
/* return error when data has vanished underneath us */
if (user-seq  log_first_seq)
ret = POLLIN|POLLRDNORM|POLLERR|POLLPRI;
-   ret = POLLIN|POLLRDNORM;
+   else
+   ret = POLLIN|POLLRDNORM;
}
raw_spin_unlock_irq(logbuf_lock);
 
-- 
1.8.1.2
--
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] fs/hfs: remove duplicated defines

2007-11-11 Thread Nicolas Kaiser
Remove duplicated defines.

Signed-off-by: Nicolas Kaiser <[EMAIL PROTECTED]>
---

 fs/hfs/btree.h |5 -
 1 file changed, 5 deletions(-)

--- a/fs/hfs/btree.h2007-10-09 22:31:38.0 +0200
+++ b/fs/hfs/btree.h2007-11-11 12:42:59.0 +0100
@@ -153,11 +153,6 @@
u32 reserved3[16];
 } __packed;
 
-#define HFS_NODE_INDEX 0x00/* An internal (index) node */
-#define HFS_NODE_HEADER0x01/* The tree header node (node 0) */
-#define HFS_NODE_MAP   0x02/* Holds part of the bitmap of used 
nodes */
-#define HFS_NODE_LEAF  0xFF/* A leaf (ndNHeight==1) node */
-
 #define BTREE_ATTR_BADCLOSE0x0001  /* b-tree not closed properly. 
not
   used by hfsplus. */
 #define HFS_TREE_BIGKEYS   0x0002  /* key length is u16 instead of 
u8.
-
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] fs/hfs: remove duplicated defines

2007-11-11 Thread Nicolas Kaiser
Remove duplicated defines.

Signed-off-by: Nicolas Kaiser [EMAIL PROTECTED]
---

 fs/hfs/btree.h |5 -
 1 file changed, 5 deletions(-)

--- a/fs/hfs/btree.h2007-10-09 22:31:38.0 +0200
+++ b/fs/hfs/btree.h2007-11-11 12:42:59.0 +0100
@@ -153,11 +153,6 @@
u32 reserved3[16];
 } __packed;
 
-#define HFS_NODE_INDEX 0x00/* An internal (index) node */
-#define HFS_NODE_HEADER0x01/* The tree header node (node 0) */
-#define HFS_NODE_MAP   0x02/* Holds part of the bitmap of used 
nodes */
-#define HFS_NODE_LEAF  0xFF/* A leaf (ndNHeight==1) node */
-
 #define BTREE_ATTR_BADCLOSE0x0001  /* b-tree not closed properly. 
not
   used by hfsplus. */
 #define HFS_TREE_BIGKEYS   0x0002  /* key length is u16 instead of 
u8.
-
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/


arch/arm: typos in KERN_ERR, KERN_INFO

2007-02-09 Thread Nicolas Kaiser
Typos in KERN_ERR, KERN_INFO.

Signed-off-by: Nicolas Kaiser <[EMAIL PROTECTED]>
---

 arch/arm/mach-imx/dma.c   |2 +-
 arch/arm/mach-s3c2410/pm-simtec.c |2 +-
 arch/arm/plat-omap/dma.c  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff -ur a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c
--- a/arch/arm/mach-imx/dma.c   2006-11-29 22:57:37.0 +0100
+++ b/arch/arm/mach-imx/dma.c   2007-02-09 23:42:15.0 +0100
@@ -234,7 +234,7 @@
imxdma->resbytes = dma_length;
 
if (!sg || !sgcount) {
-   printk(KERN_ERR "imxdma%d: imx_dma_setup_sg epty sg list\n",
+   printk(KERN_ERR "imxdma%d: imx_dma_setup_sg empty sg list\n",
   dma_ch);
return -EINVAL;
}
diff -ur a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/mach-s3c2410/pm-simtec.c
--- a/arch/arm/mach-s3c2410/pm-simtec.c 2007-01-21 15:40:56.0 +0100
+++ b/arch/arm/mach-s3c2410/pm-simtec.c 2007-02-09 23:40:46.0 +0100
@@ -52,7 +52,7 @@
!machine_is_aml_m5900())
return 0;
 
-   printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n");
+   printk(KERN_INFO "Simtec Board Power Management" COPYRIGHT "\n");
 
gstatus4  = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30;
gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28;
diff -ur a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
--- a/arch/arm/plat-omap/dma.c  2006-11-29 22:57:37.0 +0100
+++ b/arch/arm/plat-omap/dma.c  2007-02-09 23:39:56.0 +0100
@@ -1053,7 +1053,7 @@
 void omap_set_lcd_dma_b1_vxres(unsigned long vxres)
 {
if (omap_dma_in_1510_mode()) {
-   printk(KERN_ERR "DMA virtual resulotion is not supported "
+   printk(KERN_ERR "DMA virtual resolution is not supported "
"in 1510 mode\n");
BUG();
}
-
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/


arch/arm: typos in KERN_ERR, KERN_INFO

2007-02-09 Thread Nicolas Kaiser
Typos in KERN_ERR, KERN_INFO.

Signed-off-by: Nicolas Kaiser [EMAIL PROTECTED]
---

 arch/arm/mach-imx/dma.c   |2 +-
 arch/arm/mach-s3c2410/pm-simtec.c |2 +-
 arch/arm/plat-omap/dma.c  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff -ur a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c
--- a/arch/arm/mach-imx/dma.c   2006-11-29 22:57:37.0 +0100
+++ b/arch/arm/mach-imx/dma.c   2007-02-09 23:42:15.0 +0100
@@ -234,7 +234,7 @@
imxdma-resbytes = dma_length;
 
if (!sg || !sgcount) {
-   printk(KERN_ERR imxdma%d: imx_dma_setup_sg epty sg list\n,
+   printk(KERN_ERR imxdma%d: imx_dma_setup_sg empty sg list\n,
   dma_ch);
return -EINVAL;
}
diff -ur a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/mach-s3c2410/pm-simtec.c
--- a/arch/arm/mach-s3c2410/pm-simtec.c 2007-01-21 15:40:56.0 +0100
+++ b/arch/arm/mach-s3c2410/pm-simtec.c 2007-02-09 23:40:46.0 +0100
@@ -52,7 +52,7 @@
!machine_is_aml_m5900())
return 0;
 
-   printk(KERN_INFO Simtec Board Power Manangement COPYRIGHT \n);
+   printk(KERN_INFO Simtec Board Power Management COPYRIGHT \n);
 
gstatus4  = (__raw_readl(S3C2410_BANKCON7)  0x3)  30;
gstatus4 |= (__raw_readl(S3C2410_BANKCON6)  0x3)  28;
diff -ur a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
--- a/arch/arm/plat-omap/dma.c  2006-11-29 22:57:37.0 +0100
+++ b/arch/arm/plat-omap/dma.c  2007-02-09 23:39:56.0 +0100
@@ -1053,7 +1053,7 @@
 void omap_set_lcd_dma_b1_vxres(unsigned long vxres)
 {
if (omap_dma_in_1510_mode()) {
-   printk(KERN_ERR DMA virtual resulotion is not supported 
+   printk(KERN_ERR DMA virtual resolution is not supported 
in 1510 mode\n);
BUG();
}
-
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 12/12] scripts/mod/sumversion.c: replace strtok() with strsep()

2005-03-17 Thread Nicolas Kaiser
* Sam Ravnborg <[EMAIL PROTECTED]>:

> On Sat, Mar 05, 2005 at 04:35:45PM +0100, [EMAIL PROTECTED] wrote:
> > 
> > Replaces strtok() with strsep()
> 
> Why - does it increase portability?

 "strtok() is not thread and SMP safe and strsep() should be
used instead"

http://janitor.kernelnewbies.org/docs/driver-howto.html#3.3.1

Cheers,
n.
-
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 12/12] scripts/mod/sumversion.c: replace strtok() with strsep()

2005-03-17 Thread Nicolas Kaiser
* Sam Ravnborg [EMAIL PROTECTED]:

 On Sat, Mar 05, 2005 at 04:35:45PM +0100, [EMAIL PROTECTED] wrote:
  
  Replaces strtok() with strsep()
 
 Why - does it increase portability?

 strtok() is not thread and SMP safe and strsep() should be
used instead

http://janitor.kernelnewbies.org/docs/driver-howto.html#3.3.1

Cheers,
n.
-
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/