Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752824AbcKYHfz (ORCPT ); Fri, 25 Nov 2016 02:35:55 -0500 Received: from mail-ua0-f195.google.com ([209.85.217.195]:33881 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbcKYHft (ORCPT ); Fri, 25 Nov 2016 02:35:49 -0500 MIME-Version: 1.0 In-Reply-To: <20161124163158.3939337-1-arnd@arndb.de> References: <20161124163158.3939337-1-arnd@arndb.de> From: Vitaly Wool Date: Fri, 25 Nov 2016 08:35:47 +0100 Message-ID: Subject: Re: [PATCH] z3fold: use %z modifier for format string To: Arnd Bergmann Cc: Andrew Morton , Dan Streetman , zhong jiang , Linux-MM , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAP7a38e004059 Content-Length: 1308 Lines: 37 Hi Arnd, On Thu, Nov 24, 2016 at 5:31 PM, Arnd Bergmann wrote: > Printing a size_t requires the %zd format rather than %d: > > mm/z3fold.c: In function ‘init_z3fold’: > include/linux/kern_levels.h:4:18: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=] > > Fixes: 50a50d2676c4 ("z3fold: don't fail kernel build if z3fold_header is too big") > Signed-off-by: Arnd Bergmann Acked-by: Vitaly Wool And thanks :) ~vitaly > --- > mm/z3fold.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/z3fold.c b/mm/z3fold.c > index e282ba073e77..66ac7a7dc934 100644 > --- a/mm/z3fold.c > +++ b/mm/z3fold.c > @@ -884,7 +884,7 @@ static int __init init_z3fold(void) > { > /* Fail the initialization if z3fold header won't fit in one chunk */ > if (sizeof(struct z3fold_header) > ZHDR_SIZE_ALIGNED) { > - pr_err("z3fold: z3fold_header size (%d) is bigger than " > + pr_err("z3fold: z3fold_header size (%zd) is bigger than " > "the chunk size (%d), can't proceed\n", > sizeof(struct z3fold_header) , ZHDR_SIZE_ALIGNED); > return -E2BIG; > -- > 2.9.0 >