From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:57568 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751900AbdEDWhv (ORCPT ); Thu, 4 May 2017 18:37:51 -0400 Subject: Patch "infiniband: mlx5: avoid a compile-time warning" has been added to the 3.18-stable tree To: arnd@arndb.de, davem@davemloft.net, eli@mellanox.com, gregkh@linuxfoundation.org Cc: , From: Date: Thu, 04 May 2017 15:37:28 -0700 Message-ID: <149393744816225@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 7835bfb5261501590a508b3de3379e2231cb4853 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 13 Jan 2015 17:09:43 +0100 Subject: infiniband: mlx5: avoid a compile-time warning From: Arnd Bergmann 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. Signed-off-by: Arnd Bergmann Acked-by: Eli Cohen Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/mlx5/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/hw/mlx5/mem.c +++ b/drivers/infiniband/hw/mlx5/mem.c @@ -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 arnd@arndb.de 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