Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3203949ybi; Mon, 17 Jun 2019 19:06:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqynvl1iNtbQGeNMmpKWX+ifqnU8lP2X+U+30DnMNrDbBnLlAdKsXwSS3p+FkM2vwxKLNTwd X-Received: by 2002:aa7:8394:: with SMTP id u20mr104704715pfm.252.1560823598371; Mon, 17 Jun 2019 19:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560823598; cv=none; d=google.com; s=arc-20160816; b=oLFSbMnP9McqZl5DfuU1+zQOQH5A3f72sJfiSExeamZRK/qQVbvSMbiT9TvauFnN+R 10QbLzO8B+nDyLmZCGP9bNStSfyg9CdIATnqQ6XaWfqVKUToJMKEsZF6wUdxPiK5spe0 RjvFeaEN4tnBGPDjNMh7+inn9Do4pnmHSBB1+neG4aSsihXlYKMnpBXa8FpW8Gyf+YNP 5tH4Nk+81bUEl9dsxh2sezn9BTVPmMlqA7R8Ki0KPUd86RxRx7dX/pwkmhd+s0/F//jQ xRv/zmFnYJUxxnMsudHRDxLcEJTkCjgEsMA3eyd9R1Zo+G3jnpOld82IduScKuE1ncUz BD3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:nodisclaimer:user-agent:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from:dkim-signature; bh=+1gPkWf2OhZMHMJItTPjZUV5e5pbdgyMURS4PMZLy8Q=; b=NIMI/LGDono96zConZUk1G+63dPCnnq3o0KvL42SyIAJ3UupqsHccQPsXJ8Z4M1m1a aOM1h9ZqLAk8K7zrBK7u0qDNIejpiNfB0cFC6JvfEfKW81LaEGbHYA2wO27Fn+gsNwri Oo9QNdZShWmnclmSCPhy92bq1rDYL1tUE6m8gmRWaxp8bPK6G3FReRzX3tYd+ovXGr6f 8KrE/JMVjpGXrhSSp/LOxxoCOGPb1hInHS2/kKAV47fn6T61vCku4xVH2snD3e1Va0By aqpXK2sjMU/lZ3iflzujYRSfCRxeDuXdoDn2fN0kPvwG4C0aug7visbvjVdEuU6aSspC c+3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Poso5qek; 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 ay6si6659579plb.203.2019.06.17.19.06.23; Mon, 17 Jun 2019 19:06:38 -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; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Poso5qek; 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 S1727337AbfFRCE3 (ORCPT + 99 others); Mon, 17 Jun 2019 22:04:29 -0400 Received: from mail-eopbgr150085.outbound.protection.outlook.com ([40.107.15.85]:42308 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725829AbfFRCE3 (ORCPT ); Mon, 17 Jun 2019 22:04:29 -0400 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=+1gPkWf2OhZMHMJItTPjZUV5e5pbdgyMURS4PMZLy8Q=; b=Poso5qek5EBM1UgnJ7sFj6HQha370kKF+kRChK89cioEjZaiLGbZN8TfUqxQeQ41OKRtwzmEPifgV9dq6Whng0JM3Pg5PnGC3jyu+63DB995z8U/Mf8s6g+g6daVq0DZf6D4J6FgAJ0RjyUNBu99YJB0nlRbB1x0MyRgJjBZpE0= Received: from VE1PR08MB5006.eurprd08.prod.outlook.com (10.255.159.31) by VE1PR08MB4688.eurprd08.prod.outlook.com (10.255.115.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.15; Tue, 18 Jun 2019 02:04:25 +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; Tue, 18 Jun 2019 02:04:25 +0000 From: "james qian wang (Arm Technology China)" To: Arnd Bergmann CC: Liviu Dudau , Brian Starkey , David Airlie , Daniel Vetter , "Lowry Li (Arm Technology China)" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , nd Subject: Re: [PATCH] drm/komeda: fix size_t format string Thread-Topic: [PATCH] drm/komeda: fix size_t format string Thread-Index: AQHVJXojg0qTn3QqBEKaMAcl4INAHA== Date: Tue, 18 Jun 2019 02:04:25 +0000 Message-ID: <20190618020419.GA32081@james-ThinkStation-P300> References: <20190617125002.1312331-1-arnd@arndb.de> In-Reply-To: <20190617125002.1312331-1-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.9.4 (2018-02-28) x-originating-ip: [113.29.88.7] x-clientproxiedby: HK0P153CA0037.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::25) To VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c1ab9b1a-21f3-443d-914e-08d6f391499a 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:VE1PR08MB4688; x-ms-traffictypediagnostic: VE1PR08MB4688: nodisclaimer: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 007271867D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916004)(396003)(39860400002)(346002)(376002)(366004)(136003)(199004)(189003)(76176011)(25786009)(33716001)(478600001)(6246003)(99286004)(52116002)(256004)(58126008)(476003)(316002)(54906003)(229853002)(6486002)(11346002)(486006)(33656002)(1076003)(6436002)(14444005)(446003)(4326008)(6506007)(26005)(5660300002)(66066001)(6512007)(9686003)(66476007)(66446008)(66556008)(64756008)(81166006)(53936002)(71200400001)(71190400001)(8936002)(81156014)(3846002)(6116002)(386003)(86362001)(55236004)(186003)(8676002)(102836004)(66946007)(68736007)(14454004)(6916009)(2906002)(305945005)(73956011)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR08MB4688;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: 362ea+5iBYmi2FARug+F/Kfuc+PjmZjN2uxZjoe/U5gBT0Ca7PsMc8A0QCwBnFmKn+Tyk/IyBo5LfTpTybq66Udgteq9STH17XlU96YMIBk/SdfyGL3LhJLyySCvzCK1mVLIUVQ9qpVPLe1w0QEWmXQQPKjKe910wVnWmq4Kl8MT+z5LV53WtdO+vSJT2ehQ49MGm7n32nuE2pkgPRAPa4ibnsuEmDjejQ3K2FoyCDLC2+rdd4VTT6QEitQhtUXvo/k8Et2BX2Zvt2aJbv4+ucUJnSBkUbC3GEtw/a71gmjkHFK/wXQ2JyOmfIZVQLMHftiKluCLtZuF136WPPDbAnquP+v3KLuvu9UCsWWox/vQ0nGylmH5+O8DQBCtk9W2KejA6qxabMvo9T4U/cNjAyT4Hsivw85+zSPWIxsrHBg= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1ab9b1a-21f3-443d-914e-08d6f391499a X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2019 02:04:25.6264 (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: VE1PR08MB4688 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 17, 2019 at 02:49:18PM +0200, Arnd Bergmann wrote: > The debug output uses the wrong format string for printing a size_t: >=20 > 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_framebuff= er.c:9: > drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c: In function 'kom= eda_fb_afbc_size_check': > drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:96:17: error: for= mat '%lx' expects argument of type 'long unsigned int', but argument 3 has = type 'size_t' {aka 'unsigned int'} [-Werror=3Dformat=3D] > DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%lx. min_size 0x%x.= \n", >=20 > This is harmless in the kernel as size_t and long are always the same > width, but it's always better to use the correct format string > to shut up the warning. >=20 > Fixes: 9ccf536e53cb ("drm/komeda: Added AFBC support for komeda driver") > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/dr= ivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c > index abc8c0ccc053..58ff34e718d0 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c > @@ -93,7 +93,7 @@ komeda_fb_afbc_size_check(struct komeda_fb *kfb, struct= drm_file *file, > AFBC_SUPERBLK_ALIGNMENT); > min_size =3D 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%x.= \n", > obj->size, min_size); > goto check_failed; > } > @@ -137,7 +137,7 @@ komeda_fb_none_afbc_size_check(struct komeda_dev *mde= v, struct komeda_fb *kfb, > min_size =3D 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 requi= rement: %d.\n", > + DRM_DEBUG_KMS("The fb->obj[%d] size: %zd lower than the minimum requi= rement: %d.\n", > i, obj->size, min_size); > return -EINVAL; > } > --=20 > 2.20.0 Hi Arnd: Thank you for the patch. Reviewed-by: James Qian Wang (Arm Technology China)