From: Matt Fleming Date: Tue, 23 Oct 2012 11:35:43 +0000 (+0100) Subject: efivarfs: Make 'datasize' unsigned long X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07b1c5bc64cff9c880261a1fef562ef7ea7f6575;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: Matt Fleming --- 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))