linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] x86/ldt: silence a static checker warning
@ 2016-06-13  6:57 Dan Carpenter
  2016-06-13 21:14 ` Andy Lutomirski
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2016-06-13  6:57 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, H. Peter Anvin, x86, Andy Lutomirski, Dave Hansen,
	Jan Beulich, linux-kernel, kernel-janitors

It likely doesn't make a difference but my static checker complains
that we put an upper bound on "size" but not a lower bound.  Let's just
make it unsigned.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
index 6707039b..e25b668 100644
--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -34,7 +34,7 @@ static void flush_ldt(void *current_mm)
 }
 
 /* The caller must call finalize_ldt_struct on the result. LDT starts zeroed. */
-static struct ldt_struct *alloc_ldt_struct(int size)
+static struct ldt_struct *alloc_ldt_struct(unsigned int size)
 {
 	struct ldt_struct *new_ldt;
 	int alloc_size;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-14 10:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-13  6:57 [patch] x86/ldt: silence a static checker warning Dan Carpenter
2016-06-13 21:14 ` Andy Lutomirski
2016-06-14 10:44   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).