Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1420493
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch] x86/ldt: silence a static checker warning |
| Date | 2016-06-13 09:00 +0200 |
| Message-ID | <rJu0O-2EM-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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;
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[patch] x86/ldt: silence a static checker warning Dan Carpenter <dan.carpenter@oracle.com> - 2016-06-13 09:00 +0200
Re: [patch] x86/ldt: silence a static checker warning Andy Lutomirski <luto@amacapital.net> - 2016-06-13 23:20 +0200
Re: [patch] x86/ldt: silence a static checker warning Dan Carpenter <dan.carpenter@oracle.com> - 2016-06-14 12:50 +0200
csiph-web