Skip to content

Commit

Permalink
Linux 4.0 compat: bdi_setup_and_register() __must_check
Browse files Browse the repository at this point in the history
Explicitly disable the unused by variable warnings by setting
__attribute__((unused)) for bdi_setup_and_register().  This is
required because the function is defined with the __must_check
attribute.

Signed-off-by: Bill McGonigle <bill-github.com-public1@bfccomputing.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#3141
  • Loading branch information
Bill McGonigle authored and behlendorf committed Mar 16, 2015
1 parent 4c7b7ee commit e023409
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/kernel-bdi-setup-and-register.m4
Expand Up @@ -10,7 +10,8 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], [
], [
struct backing_dev_info bdi;
char *name = "bdi";
(void) bdi_setup_and_register(&bdi, name);
int error __attribute__((unused)) =
bdi_setup_and_register(&bdi, name);
], [bdi_setup_and_register], [mm/backing-dev.c], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_2ARGS_BDI_SETUP_AND_REGISTER, 1,
Expand All @@ -24,7 +25,8 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER], [
struct backing_dev_info bdi;
char *name = "bdi";
unsigned int cap = BDI_CAP_MAP_COPY;
(void) bdi_setup_and_register(&bdi, name, cap);
int error __attribute__((unused)) =
bdi_setup_and_register(&bdi, name, cap);
], [bdi_setup_and_register], [mm/backing-dev.c], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_3ARGS_BDI_SETUP_AND_REGISTER, 1,
Expand Down

0 comments on commit e023409

Please sign in to comment.