From patchwork Tue Oct 27 13:53:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 307001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3E45C388F9 for ; Tue, 27 Oct 2020 17:53:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82E852076D for ; Tue, 27 Oct 2020 17:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603821211; bh=6LKEsRWBHMiaZoVYG6aALfT53+A/Hi8hYUS3sf9o6rU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Nz82zzO5cE6lYrmffTkBySmwcYQOiOOLQWNBnMYSMO0UpFrO0e6Lrgt3zVJaGM8bM 0hQl8s7gDFiE0Qoi7EubjR004KZ0GpXyI+mBNqwz6nHOfBcLSGrJvfQhr5K2iyJeIp d0be1J7dI6TxpEeT178gF60CXhzzRyyjbTcdL5Kk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758752AbgJ0OX0 (ORCPT ); Tue, 27 Oct 2020 10:23:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:48318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2901432AbgJ0OX0 (ORCPT ); Tue, 27 Oct 2020 10:23:26 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6038020780; Tue, 27 Oct 2020 14:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808606; bh=6LKEsRWBHMiaZoVYG6aALfT53+A/Hi8hYUS3sf9o6rU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dwx6PgPUksLX7JpvqWMYaAlP8GgxZctl8cfTZaPyqCuCF8McrWYkZVUQsZtt+A0qS gHhcGdDyWfD1xsEtaBPBKaL/NL6PYqxIAGLtyiWIaBXDYkqiJasrMelgsPga1QRQNH kW7FBv43PuO4M0WFumyxhMlvHoqRNz0UQhUd4pjQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.19 156/264] overflow: Include header file with SIZE_MAX declaration Date: Tue, 27 Oct 2020 14:53:34 +0100 Message-Id: <20201027135438.008836122@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135430.632029009@linuxfoundation.org> References: <20201027135430.632029009@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Leon Romanovsky [ Upstream commit a4947e84f23474803b62a2759b5808147e4e15f9 ] The various array_size functions use SIZE_MAX define, but missed limits.h causes to failure to compile code that needs overflow.h. In file included from drivers/infiniband/core/uverbs_std_types_device.c:6: ./include/linux/overflow.h: In function 'array_size': ./include/linux/overflow.h:258:10: error: 'SIZE_MAX' undeclared (first use in this function) 258 | return SIZE_MAX; | ^~~~~~~~ Fixes: 610b15c50e86 ("overflow.h: Add allocation size calculation helpers") Link: https://lore.kernel.org/r/20200913102928.134985-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- include/linux/overflow.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 15eb85de92269..4564a175e6814 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -3,6 +3,7 @@ #define __LINUX_OVERFLOW_H #include +#include /* * In the fallback code below, we need to compute the minimum and