Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp513219ybi; Wed, 19 Jun 2019 03:25:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfEB2ecTc719oGacg28tFbMIMDSaJ/fiUSzA++LZZJMUGkfYIfcL88RamxSWC0Wbzkc9PK X-Received: by 2002:a17:90a:25af:: with SMTP id k44mr10153058pje.122.1560939951619; Wed, 19 Jun 2019 03:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560939951; cv=none; d=google.com; s=arc-20160816; b=0p+9+5PAKz5GUQvhl5IMfW0EN8PNAHX9Ak0hydLpKrpXw9rzDQynR+10VD3/IQ9Gy3 QUKg3QNOLH6I9H8E/YyGQixqbcvNjtRLX7ccRnkUMhIY0DCwOSMf8s2kyOb12zlBUlsG soR+1lP9XNpmPDotL2BdkTW45/wRTZVWD+r3zvXpwza8Md1fjndZyQtgqL4XQBV4kDPY 2QZiqjwE3bwiqjwGG9VBtBAh05ApqwftrM6Yz4eLC38kN4lU2qV1PkHg+vVCp9EviuFB nGus3o2szK57tOzkfbwvgEDtY+qxFAwpbxPo8ImdDrSUMOFkLaxuXC4TMPXTAP0chCda rylQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=BwiJHg/ogbX6UVF0JOGI95ZpM4NYLlf8hAcmIyrXlLs=; b=HcLo7e8Tan9jklK6ddwBBZ/JT0YFr8seeJWzcj8nVN/StQJ7cClYpIkViLDLHBavXu Uv4l7XYiMhXo9mbTBHwSDpRSzfv2PsXgF9QGwLJ5LlnbdbCWsez1X0Fr8oKhDMaEh5Yk fnezk8o/cLFrR6DWyAQ3Um1GN58PaPUTqeJWIwv36wa1+FZQHoxLQTFHaQsPoqbq3H8M +XyDpAuhYyTcvJzvNJQGYnF2dUiPFR5znYGi2cuJsSwzMXCSXOTDs7Yw742JSCAovdqV n66X/82Hs03sOxYILCl9w3vWByOGwW89oI1lxRUKkllMu7wGSpZOMropdQSJlTCNNPwO i5eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32si4562195pld.402.2019.06.19.03.25.35; Wed, 19 Jun 2019 03:25:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731530AbfFSKZX (ORCPT + 99 others); Wed, 19 Jun 2019 06:25:23 -0400 Received: from foss.arm.com ([217.140.110.172]:60272 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726959AbfFSKZW (ORCPT ); Wed, 19 Jun 2019 06:25:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C0012360; Wed, 19 Jun 2019 03:25:21 -0700 (PDT) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C5B913F738; Wed, 19 Jun 2019 03:27:07 -0700 (PDT) Received: by e110455-lin.cambridge.arm.com (Postfix, from userid 1000) id 3719D680120; Wed, 19 Jun 2019 11:25:20 +0100 (BST) Date: Wed, 19 Jun 2019 11:25:20 +0100 From: Liviu Dudau To: "james qian wang (Arm Technology China)" Cc: "airlied@linux.ie" , Brian Starkey , "maarten.lankhorst@linux.intel.com" , "sean@poorly.run" , "arnd@arndb.de" , "Jonathan Chai (Arm Technology China)" , "Julien Yin (Arm Technology China)" , "thomas Sun (Arm Technology China)" , "Lowry Li (Arm Technology China)" , Ayan Halder , "Tiannan Zhu (Arm Technology China)" , "Yiqi Kang (Arm Technology China)" , nd , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Ben Davis , "Oscar Zhang (Arm Technology China)" , "Channing Chen (Arm Technology China)" Subject: Re: [PATCH] drm/komeda: Correct printk format specifier for "size_t" Message-ID: <20190619102520.GC17204@e110455-lin.cambridge.arm.com> References: <20190619074225.13521-1-james.qian.wang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190619074225.13521-1-james.qian.wang@arm.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 19, 2019 at 08:42:45AM +0100, james qian wang (Arm Technology China) wrote: > 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 Best regards, Liviu > --- > .../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; > } > -- > 2.17.1 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯