From patchwork Thu Apr 4 22:25:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 10886587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26DCF922 for ; Thu, 4 Apr 2019 22:25:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00083287A2 for ; Thu, 4 Apr 2019 22:25:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E81162881B; Thu, 4 Apr 2019 22:25:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7E8D7287A2 for ; Thu, 4 Apr 2019 22:25:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F9A76E9FB; Thu, 4 Apr 2019 22:25:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id F163B6E9FB for ; Thu, 4 Apr 2019 22:25:33 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2019 15:25:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,309,1549958400"; d="scan'208";a="128728731" Received: from rdvivi-losangeles.jf.intel.com ([10.7.196.65]) by orsmga007.jf.intel.com with ESMTP; 04 Apr 2019 15:25:33 -0700 From: Rodrigo Vivi To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/lima: Fix broken compilation. Date: Thu, 4 Apr 2019 15:25:38 -0700 Message-Id: <20190404222538.28899-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Qiang Yu , Rodrigo Vivi Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Rodrigo Vivi I'm not entirely sure about the limits we should use here on ARM based driver, but apparently the entry and limit are inverted and UINT_MAX cannot be used directly there. So let's at least for now fix this compilation issue on a compilation only driver: CC [M] drivers/gpu/drm/lima/lima_ctx.o In file included from ./include/linux/kernel.h:7, from ./include/asm-generic/bug.h:18, from ./arch/x86/include/asm/bug.h:83, from ./include/linux/bug.h:5, from ./include/linux/mmdebug.h:5, from ./include/linux/gfp.h:5, from ./include/linux/slab.h:15, from drivers/gpu/drm/lima/lima_ctx.c:4: drivers/gpu/drm/lima/lima_ctx.c: In function ‘lima_ctx_create’: ./include/linux/limits.h:13:18: error: incompatible type for argument 4 of ‘xa_alloc’ #define UINT_MAX (~0U) ^~~~~ drivers/gpu/drm/lima/lima_ctx.c:27:41: note: in expansion of macro ‘UINT_MAX’ err = xa_alloc(&mgr->handles, id, ctx, UINT_MAX, GFP_KERNEL); ^~~~~~~~ In file included from ./include/linux/radix-tree.h:31, from ./include/linux/idr.h:15, from ./include/drm/drm_device.h:7, from drivers/gpu/drm/lima/lima_device.h:7, from drivers/gpu/drm/lima/lima_ctx.c:7: ./include/linux/xarray.h:817:32: note: expected ‘struct xa_limit’ but argument is of type ‘unsigned int’ void *entry, struct xa_limit limit, gfp_t gfp) ~~~~~~~~~~~~~~~~^~~~~ make[4]: *** [scripts/Makefile.build:276: drivers/gpu/drm/lima/lima_ctx.o] Error 1 make[3]: *** [scripts/Makefile.build:486: drivers/gpu/drm/lima] Error 2 make[2]: *** [scripts/Makefile.build:486: drivers/gpu/drm] Error 2 make[1]: *** [scripts/Makefile.build:486: drivers/gpu] Error 2 make: *** [Makefile:1051: drivers] Error 2 Cc: Qiang Yu Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/lima/lima_ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/lima/lima_ctx.c b/drivers/gpu/drm/lima/lima_ctx.c index c8d12f7c6894..22fff6caa961 100644 --- a/drivers/gpu/drm/lima/lima_ctx.c +++ b/drivers/gpu/drm/lima/lima_ctx.c @@ -23,7 +23,7 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id) goto err_out0; } - err = xa_alloc(&mgr->handles, id, UINT_MAX, ctx, GFP_KERNEL); + err = xa_alloc(&mgr->handles, id, ctx, xa_limit_32b, GFP_KERNEL); if (err < 0) goto err_out0;