Skip to content

Instantly share code, notes, and snippets.

@stffrdhrn
Last active April 7, 2016 09:27
Show Gist options
  • Save stffrdhrn/699b7e992df59c7e724da9095636bfd2 to your computer and use it in GitHub Desktop.
Save stffrdhrn/699b7e992df59c7e724da9095636bfd2 to your computer and use it in GitHub Desktop.
The Idea is to fix these up:
Summary:
Most of these are the same
~7 warning: format '%zu' expects argument of type 'size_t',
~3 comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2);
CC mm/percpu.o
In file included from mm/percpu.c:823:0:
mm/percpu-km.c: In function 'pcpu_verify_alloc_info':
mm/percpu-km.c:107:10: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat=]
alloc_pages - nr_pages);
^
mm/percpu.c: In function 'pcpu_alloc':
mm/percpu.c:891:3: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]
WARN(true, "illegal size (%zu) or align (%zu) for "
^
mm/percpu.c:891:3: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat=]
mm/percpu.c:1036:3: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat=]
pr_warning("PERCPU: allocation failed, size=%zu align=%zu atomic=%d, %s\n",
^
mm/percpu.c:1036:3: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=]
mm/percpu.c: In function 'pcpu_dump_alloc_info':
mm/percpu.c:1442:9: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=]
ai->unit_size, ai->alloc_size / ai->atom_size, ai->atom_size);
^
mm/percpu.c:1442:9: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]
mm/percpu.c:1442:9: warning: format '%zu' expects argument of type 'size_t', but argument 5 has type 'unsigned int' [-Wformat=]
mm/percpu.c:1442:9: warning: format '%zu' expects argument of type 'size_t', but argument 6 has type 'unsigned int' [-Wformat=]
mm/percpu.c:1442:9: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'unsigned int' [-Wformat=]
mm/percpu.c:1442:9: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'unsigned int' [-Wformat=]
CC mm/dmapool.o
mm/dmapool.c: In function 'show_pools':
mm/dmapool.c:99:6: warning: format '%Zu' expects argument of type 'size_t', but argument 6 has type 'unsigned int' [-Wformat=]
pool->size, pages);
^
mm/dmapool.c:99:6: warning: format '%Zu' expects argument of type 'size_t', but argument 7 has type 'unsigned int' [-Wformat=]
CC fs/libfs.o
In file included from include/linux/sched.h:17:0,
from include/linux/blkdev.h:4,
from fs/libfs.c:6:
fs/libfs.c: In function 'simple_attr_write':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
fs/libfs.c:841:9: note: in expansion of macro 'min'
size = min(sizeof(attr->set_buf) - 1, len);
^
CC fs/proc/task_mmu.o
In file included from include/asm-generic/bug.h:13:0,
from arch/openrisc/include/generated/asm/bug.h:1,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from fs/proc/task_mmu.c:1:
fs/proc/task_mmu.c: In function 'pagemap_read':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
fs/proc/task_mmu.c:1390:9: note: in expansion of macro 'min'
len = min(count, PM_ENTRY_BYTES * pm.pos);
^
CC crypto/rng.o
CC crypto/drbg.o
crypto/drbg.c: In function 'drbg_seed':
crypto/drbg.c:1121:3: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat=]
pr_devel("DRBG: personalization string too long %zu\n",
^
crypto/drbg.c: In function 'drbg_generate':
crypto/drbg.c:1330:3: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat=]
pr_devel("DRBG: additional information string too long %zu\n",
^
CC crypto/jitterentropy.o
CC crypto/jitterentropy-kcapi.o
LD crypto/jitterentropy_rng.o
LD crypto/built-in.o
LD block/built-in.o
LD drivers/amba/built-in.o
LD drivers/auxdisplay/built-in.o
CC drivers/base/component.o
drivers/base/component.c: In function 'find_components':
drivers/base/component.c:101:3: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]
dev_dbg(master->dev, "Looking for component %zu\n", i);
^
CC drivers/char/random.o
In file included from include/linux/sched.h:17:0,
from include/linux/utsname.h:5,
from drivers/char/random.c:238:
drivers/char/random.c: In function 'write_pool':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
drivers/char/random.c:1498:11: note: in expansion of macro 'min'
bytes = min(count, sizeof(buf));
^
CC drivers/i2c/i2c-dev.o
drivers/i2c/i2c-dev.c: In function 'i2cdev_read':
drivers/i2c/i2c-dev.c:151:2: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=]
pr_debug("i2c-dev: i2c-%d reading %zu bytes.\n",
^
drivers/i2c/i2c-dev.c: In function 'i2cdev_write':
drivers/i2c/i2c-dev.c:175:2: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=]
pr_debug("i2c-dev: i2c-%d writing %zu bytes.\n",
^
CC drivers/misc/eeprom/at24.o
drivers/misc/eeprom/at24.c: In function 'at24_eeprom_read':
drivers/misc/eeprom/at24.c:239:3: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]
dev_dbg(&client->dev, "read %zu@%d --> %d (%ld)\n",
^
drivers/misc/eeprom/at24.c: In function 'at24_eeprom_write':
drivers/misc/eeprom/at24.c:370:3: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]
dev_dbg(&client->dev, "write %zu@%d --> %zd (%ld)\n",
^
drivers/misc/eeprom/at24.c:370:3: warning: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'ssize_t' [-Wformat=]
drivers/misc/eeprom/at24.c: In function 'at24_probe':
drivers/misc/eeprom/at24.c:636:2: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'unsigned int' [-Wformat=]
dev_info(&client->dev, "%zu byte %s EEPROM, %s, %u bytes/write\n",
^
CC drivers/spi/spi.o
drivers/spi/spi.c: In function '__spi_split_transfer_maxsize':
drivers/spi/spi.c:2287:2: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Wformat=]
dev_warn_once(&msg->spi->dev,
^
CC drivers/spi/spi-oc-simple.o
CC net/core/dev_ioctl.o
In file included from include/asm-generic/bug.h:13:0,
from arch/openrisc/include/generated/asm/bug.h:1,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from net/core/dev_ioctl.c:1:
net/core/dev_ioctl.c: In function 'dev_ifsioc_locked':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
net/core/dev_ioctl.c:149:11: note: in expansion of macro 'min'
min(sizeof(ifr->ifr_hwaddr.sa_data),
^
net/core/dev_ioctl.c: In function 'dev_ifsioc':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
net/core/dev_ioctl.c:270:10: note: in expansion of macro 'min'
min(sizeof(ifr->ifr_hwaddr.sa_data),
^
CC lib/kstrtox.o
In file included from lib/kstrtox.c:16:0:
lib/kstrtox.c: In function 'kstrtoull_from_user':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
lib/kstrtox.c:330:10: note: in expansion of macro 'min'
count = min(count, sizeof(buf) - 1); \
^
lib/kstrtox.c:338:1: note: in expansion of macro 'kstrto_from_user'
kstrto_from_user(kstrtoull_from_user, kstrtoull, unsigned long long);
^
lib/kstrtox.c: In function 'kstrtoll_from_user':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
lib/kstrtox.c:330:10: note: in expansion of macro 'min'
count = min(count, sizeof(buf) - 1); \
^
lib/kstrtox.c:339:1: note: in expansion of macro 'kstrto_from_user'
kstrto_from_user(kstrtoll_from_user, kstrtoll, long long);
^
lib/kstrtox.c: In function 'kstrtoul_from_user':
include/linux/kernel.h:752:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment