Переглянути джерело

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>
Matt Fleming 13 роки тому
батько
коміт
07b1c5bc64
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      drivers/firmware/efivars.c

+ 1 - 1
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))