Patch "infiniband: mlx5: avoid a compile-time warning" has been added to the 3.18-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
infiniband: mlx5: avoid a compile-time warning
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
infiniband-mlx5-avoid-a-compile-time-warning.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7835bfb5261501590a508b3de3379e2231cb4853Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Tue, 13 Jan 2015 17:09:43 +0100
Subject: infiniband: mlx5: avoid a compile-time warning
From: Arnd Bergmann <[email protected]>
commit 7835bfb5261501590a508b3de3379e2231cb4853 upstream.
The return type of find_first_bit() is architecture specific, on ARM it is 'unsigned int', while the asm-generic code used on x86 and a lot of other architectures returns 'unsigned long'.
When building the mlx5 driver on ARM, we get a warning about this:
infiniband/hw/mlx5/mem.c: In function 'mlx5_ib_cont_pages':infiniband/hw/mlx5/mem.c:84:143: warning: comparison of distinct pointer types lacks a cast
m = min(m, find_first_bit(&tmp, sizeof(tmp)));
This patch changes the driver to use min_t to make it behave the same way on all architectures.
--- drivers/infiniband/hw/mlx5/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mem.c +1 -1
@@ -69,7 +69,7 @@ void mlx5_ib_cont_pages(struct ib_umem *for (k =0 ; k < len; k++) {if (!(i & mask)) { tmp = (unsigned long )pfn; - m =min (m,find_first_bit (&tmp,sizeof (tmp))); + m = min_t(unsigned long, m, find_first_bit(&tmp, sizeof(tmp))); skip =1 << m; mask = skip -1 ; base = pfn;
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/ib-iser-fix-sparse-warnings.patch queue-3.18/cred-userns-define-current_user_ns-as-a-function.patch queue-3.18/pci-xilinx-fix-harmless-format-string-warning.patch queue-3.18/arm64-build-vdso-without-libgcov.patch queue-3.18/arm64-provide-a-namespace-to-ncaps.patch queue-3.18/alsa-ppc-awacs-shut-up-maybe-uninitialized-warning.patch queue-3.18/net-tg3-avoid-uninitialized-variable-warning.patch queue-3.18/tty-isicom-fix-big-endian-compile-warning.patch queue-3.18/mtd-avoid-stack-overflow-in-mtd-cfi-code.patch queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch queue-3.18/ips-remove-pointless-warning.patch queue-3.18/powerpc-ptrace-fix-out-of-bounds-array-access-warning.patch queue-3.18/staging-imx-drm-fix-indentation-warning.patch queue-3.18/mlx5-avoid-build-warnings-on-32-bit.patch queue-3.18/mm-cma-silence-warnings-due-to-max-usage.patch queue-3.18/misdn-avoid-arch-specific-__builtin_return_address-call.patch queue-3.18/staging-bcm-add-32-bit-host-dependency.patch queue-3.18/staging-vt6655-fix-overly-large-stack-usage.patch queue-3.18/drbd-avoid-redefinition-of-bits_per_page.patch queue-3.18/infiniband-mlx5-avoid-a-compile-time-warning.patch queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch