From patchwork Wed Jun 19 07:42:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Qian Wang X-Patchwork-Id: 11003639 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 F2236924 for ; Wed, 19 Jun 2019 07:42:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE05A2898B for ; Wed, 19 Jun 2019 07:42:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1C7128B68; Wed, 19 Jun 2019 07:42:52 +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 6AC6C287FE for ; Wed, 19 Jun 2019 07:42:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A3266E30F; Wed, 19 Jun 2019 07:42:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80075.outbound.protection.outlook.com [40.107.8.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 532CC6E30F for ; Wed, 19 Jun 2019 07:42:49 +0000 (UTC) Received: from VE1PR08MB5006.eurprd08.prod.outlook.com (10.255.159.31) by VE1PR08MB4862.eurprd08.prod.outlook.com (10.255.113.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.12; Wed, 19 Jun 2019 07:42:45 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::206b:5cf6:97e:1358]) by VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::206b:5cf6:97e:1358%7]) with mapi id 15.20.1987.014; Wed, 19 Jun 2019 07:42:45 +0000 From: "james qian wang (Arm Technology China)" To: Liviu Dudau , "airlied@linux.ie" , Brian Starkey , "maarten.lankhorst@linux.intel.com" , "sean@poorly.run" , "arnd@arndb.de" Subject: [PATCH] drm/komeda: Correct printk format specifier for "size_t" Thread-Topic: [PATCH] drm/komeda: Correct printk format specifier for "size_t" Thread-Index: AQHVJnKVyoEvbn4ar0KHP3NUwbidVQ== Date: Wed, 19 Jun 2019 07:42:45 +0000 Message-ID: <20190619074225.13521-1-james.qian.wang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [113.29.88.7] x-clientproxiedby: HK2PR02CA0188.apcprd02.prod.outlook.com (2603:1096:201:21::24) To VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 31649ace-e81a-48c3-e91e-08d6f489b7e0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VE1PR08MB4862; x-ms-traffictypediagnostic: VE1PR08MB4862: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0073BFEF03 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39860400002)(136003)(396003)(199004)(189003)(66556008)(26005)(6436002)(8676002)(81166006)(103116003)(14454004)(81156014)(50226002)(6486002)(55236004)(6506007)(2201001)(53936002)(186003)(86362001)(5660300002)(6116002)(1076003)(386003)(2906002)(3846002)(256004)(64756008)(110136005)(6512007)(8936002)(66476007)(478600001)(2501003)(73956011)(36756003)(66446008)(68736007)(54906003)(99286004)(102836004)(7736002)(71190400001)(52116002)(66066001)(71200400001)(2616005)(476003)(486006)(305945005)(25786009)(4326008)(66946007)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4862; H:VE1PR08MB5006.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: +9icAsqMqSz5oj2fToXIeXKjzBC1G73uc8AUhaKlrjuErS0cBvF9/8sKDkOKHcoQiZTHmXOM+lNdAFzI/WP52EoEe9Q0yg9S2jumj1ylHlyP+VbibvzI4ywvucshcIhbHVj5N8D/d5TzoEGuwXYOh7l/euQN9zIFH1Q0op+SAgZM0PUCNAVVmuBi3OqFbum08+NU44kxrhtdI3i5i/l8OGlpiGmYruNVwV3NgIetyVCA1YvRHPcPEouIAS8b7tNFqlMASq+nHIix0+jBBPOko6V97Zk80eu1/rtpNb0ukQNr/mru/++N+uO+jH7uTXewcehSzBcFHuF246gUm5k0RyBbj3xmhp+vaVtO4LnXQBDlcKZAMAbu9OSVMR5CzPH8/Czfzs2OpXX3OvUqktwUU5CE59nHd9dxvmd0hhAm+ao= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31649ace-e81a-48c3-e91e-08d6f489b7e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2019 07:42:45.5829 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: james.qian.wang@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4862 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=peQSzoDWwW9i55UHswzIecsFCoN+YXX8Y3FXqQN8ryk=; b=xnKt3ae7N2xCjzHO6pIlysXCiuSZIhEmBA8vgyFZb9OQa7JhzxftQJFxM5O+qd5/wuh6n+rRnaUIf1BcXxLfnVsx2iHtSRl4hjEYw0eiWxxnhXsFw+QPXRTU+w7TwVkj2qiSNxnUfPQEgjeTlroKCzyw2EcnY2QHl1Cd/dGEJas= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; 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: nd , Ayan Halder , "Oscar Zhang \(Arm Technology China\)" , "Tiannan Zhu \(Arm Technology China\)" , "Jonathan Chai \(Arm Technology China\)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin \(Arm Technology China\)" , "Channing Chen \(Arm Technology China\)" , "james qian wang \(Arm Technology China\)" , "Yiqi Kang \(Arm Technology China\)" , "thomas Sun \(Arm Technology China\)" , "Lowry Li \(Arm Technology China\)" , Ben Davis Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Warnings popup when "make ARCH=i386" In file included from include/drm/drm_mm.h:49, from include/drm/drm_vma_manager.h:26, from include/drm/drm_gem.h:40, from drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:9: drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c: In function 'komeda_fb_afbc_size_check': drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:96:17: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%lx. min_size 0x%x.\n", That leads by misuse "%lx" as format speicifier for size_t, correct it to "%zx" Reported-by: kbuild test robot Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Liviu Dudau --- .../gpu/drm/arm/display/komeda/komeda_framebuffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c index abc8c0ccc053..3b0a70ed6aa0 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c @@ -43,8 +43,8 @@ komeda_fb_afbc_size_check(struct komeda_fb *kfb, struct drm_file *file, struct drm_framebuffer *fb = &kfb->base; const struct drm_format_info *info = fb->format; struct drm_gem_object *obj; - u32 alignment_w = 0, alignment_h = 0, alignment_header; - u32 n_blocks = 0, min_size = 0; + u32 alignment_w = 0, alignment_h = 0, alignment_header, n_blocks; + u64 min_size; obj = drm_gem_object_lookup(file, mode_cmd->handles[0]); if (!obj) { @@ -93,7 +93,7 @@ komeda_fb_afbc_size_check(struct komeda_fb *kfb, struct drm_file *file, AFBC_SUPERBLK_ALIGNMENT); min_size = kfb->afbc_size + fb->offsets[0]; if (min_size > obj->size) { - DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%lx. min_size 0x%x.\n", + DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%zx. min_size 0x%llx.\n", obj->size, min_size); goto check_failed; } @@ -114,7 +114,8 @@ komeda_fb_none_afbc_size_check(struct komeda_dev *mdev, struct komeda_fb *kfb, struct drm_framebuffer *fb = &kfb->base; const struct drm_format_info *info = fb->format; struct drm_gem_object *obj; - u32 i, min_size, block_h; + u32 i, block_h; + u64 min_size; if (komeda_fb_check_src_coords(kfb, 0, 0, fb->width, fb->height)) return -EINVAL; @@ -137,7 +138,7 @@ komeda_fb_none_afbc_size_check(struct komeda_dev *mdev, struct komeda_fb *kfb, min_size = komeda_fb_get_pixel_addr(kfb, 0, fb->height, i) - to_drm_gem_cma_obj(obj)->paddr; if (obj->size < min_size) { - DRM_DEBUG_KMS("The fb->obj[%d] size: %ld lower than the minimum requirement: %d.\n", + DRM_DEBUG_KMS("The fb->obj[%d] size: 0x%zx lower than the minimum requirement: 0x%llx.\n", i, obj->size, min_size); return -EINVAL; }