summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efivars.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-10-23 13:35:43 +0200
committerMatt Fleming <matt.fleming@intel.com>2012-10-30 11:39:27 +0100
commit07b1c5bc64cff9c880261a1fef562ef7ea7f6575 (patch)
treec055ffdac6ab14f8920baba8976fa26cd242fc73 /drivers/firmware/efivars.c
parentefivarfs: Add unique magic number (diff)
downloadlinux-07b1c5bc64cff9c880261a1fef562ef7ea7f6575.tar.xz
linux-07b1c5bc64cff9c880261a1fef562ef7ea7f6575.zip
efivarfs: Make 'datasize' unsigned long
There's no reason to declare 'datasize' as an int, since the majority of the functions it's passed to expect an unsigned long anyway. Plus, this way we avoid any sign problems during arithmetic. Acked-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'drivers/firmware/efivars.c')
-rw-r--r--drivers/firmware/efivars.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 3b0cf9acb504..6a858d1a5bb3 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -692,7 +692,7 @@ static ssize_t efivarfs_file_write(struct file *file,
void *data;
u32 attributes;
struct inode *inode = file->f_mapping->host;
- int datasize = count - sizeof(attributes);
+ unsigned long datasize = count - sizeof(attributes);
unsigned long newdatasize;
if (count < sizeof(attributes))