[merged] vsprintf-use-warn_on_once.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     vsprintf: use WARN_ON_ONCE
has been removed from the -mm tree.  Its filename was
     vsprintf-use-warn_on_once.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: vsprintf: use WARN_ON_ONCE
From: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>

Signed-off-by: Marcin Slusarz <marcin.slusarz@xxxxxxxxx>
Reviewed-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/vsprintf.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff -puN lib/vsprintf.c~vsprintf-use-warn_on_once lib/vsprintf.c
--- a/lib/vsprintf.c~vsprintf-use-warn_on_once
+++ a/lib/vsprintf.c
@@ -1092,13 +1092,8 @@ int vsnprintf(char *buf, size_t size, co
 
 	/* Reject out-of-range values early.  Large positive sizes are
 	   used for unknown buffer sizes. */
-	if (unlikely((int) size < 0)) {
-		/* There can be only one.. */
-		static char warn = 1;
-		WARN_ON(warn);
-		warn = 0;
+	if (WARN_ON_ONCE((int) size < 0))
 		return 0;
-	}
 
 	str = buf;
 	end = buf + size;
@@ -1544,13 +1539,8 @@ int bstr_printf(char *buf, size_t size, 
 
 	struct printf_spec spec = {0};
 
-	if (unlikely((int) size < 0)) {
-		/* There can be only one.. */
-		static char warn = 1;
-		WARN_ON(warn);
-		warn = 0;
+	if (WARN_ON_ONCE((int) size < 0))
 		return 0;
-	}
 
 	str = buf;
 	end = buf + size;
_

Patches currently in -mm which might be from marcin.slusarz@xxxxxxxxx are

origin.patch
linux-next.patch
ia64-use-printk_once.patch
ide-use-printk_once.patch
cciss-fix-schedule_timeout-parameters.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux