From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C1CC33C513 for ; Wed, 22 Jul 2026 18:53:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784746398; cv=none; b=qffBarrsajcLb+/Lvc3O1whK12ciTQXWZXUP+iVvYLrPolDi7kRnsxmknfTMtKfWHmwd7Xpboqi09Uy6XBcLQp+P5dyklZ07eAXJzCEFnR8SNQYdPdsXptnd0b6xEz8+tQKaE9hQNFYowjyfntsrv5Hd6mTU+68BxbqMorAl9dA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784746398; c=relaxed/simple; bh=J2lyL4yAcpwHOXLtfu05HiWf+A82dg/py+giDTzhsDI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dv8uFnagdMN1U278aVUIx6Fcd97Ki05AXzOPmpF1JeXoQgOVSefCE0qNPODid2O4VaIbtlGHmvdCNjBHwJR8gTRJpanmgj3m+GrMtdG0YujSQRKNX2+UqJHe8lgr7Bfq6AyFYYUug5RBDlV3ZERFQ+INz9jwmEYPEYjaVJeb2qQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B2umygRA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B2umygRA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81FEC1F000E9; Wed, 22 Jul 2026 18:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784746393; bh=/yBj7CmSRVw5QqJuGMwpsP7eCPt0FbFcNIvN70Cbhpw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=B2umygRAzlhdd66d2m2UzvGtynfgO2foIuzHWqeZIjteITQjRcOAvzh3uwrCpxRzl ZJX4QVMk71kmFrpNOY0VbfAU2MEmDLVy+yc0YxZ7SEvmBxPkxOonE0T6Ummdok5yPz xawiwF08gNKz8iQ6oHD1nfNDQ7mzDCHl6wzwSFSv547FPo2gd/EG2MOxhlcyFYGN9W JSWaMBMhDrGJcotVt29zPiFoSEQfNIorl/4JRoTjm65O13u75WvDOPBApkPO9LR2+A L+E/Sxccmqb237j/X09qLZlFwdIUhFb4tCeWyFHCBxctkNyglwpDXMsB7XwLpBMELt E72+Z1dNPcR7g== Date: Wed, 22 Jul 2026 11:53:08 -0700 From: Nathan Chancellor To: "Usyskin, Alexander" Cc: Arnd Bergmann , Greg Kroah-Hartman , Karol Wachowski , Vitaly Lubart , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] issei: Fix size_t printk specifier in heci_{write,read}_buf() Message-ID: <20260722185308.GA3860842@ax162> References: <20260721-issei-fix-size_t-specifier-v1-1-246155b42d48@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jul 22, 2026 at 05:57:53AM +0000, Usyskin, Alexander wrote: > > Subject: [PATCH] issei: Fix size_t printk specifier in heci_{write,read}_buf() > > > > When building for 32-bit platforms, for which 'size_t' is > > 'unsigned int', there are a couple of warnings around incorrect printk > > specifiers: > > > > In file included from drivers/misc/issei/hw_heci.c:7: > > drivers/misc/issei/hw_heci.c: In function 'heci_write_hbuf': > > drivers/misc/issei/hw_heci.c:374:37: error: format '%lu' expects argument of > > type 'long unsigned int', but argument 4 has type 'unsigned int' [- > > Werror=format=] > > 374 | dev_err(&idev->dev, "Data size %zu not aligned to slot size > > %lu\n", > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ... > > drivers/misc/issei/hw_heci.c:374:79: note: format string is defined here > > 374 | dev_err(&idev->dev, "Data size %zu not aligned to slot size > > %lu\n", > > | ~~^ > > | | > > | long unsigned int > > | %u > > drivers/misc/issei/hw_heci.c: In function 'heci_read_hbuf': > > drivers/misc/issei/hw_heci.c:404:37: error: format '%lu' expects argument of > > type 'long unsigned int', but argument 4 has type 'unsigned int' [- > > Werror=format=] > > 404 | dev_err(&idev->dev, "Data size %zu not aligned to slot size > > %lu\n", > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ... > > drivers/misc/issei/hw_heci.c:404:79: note: format string is defined here > > 404 | dev_err(&idev->dev, "Data size %zu not aligned to slot size > > %lu\n", > > | ~~^ > > | | > > | long unsigned int > > | %u > > cc1: all warnings being treated as errors > > > > Use '%zu' for printing these values, the proper printk specifier for > > 'size_t'. > > > > Thanks for a fix! > Interesting, which checker should catch such errors? I saw this with both Clang and GCC when building ARCH=i386 allmodconfig. > Acked-by: Alexander Usyskin Thanks for the quick response! -- Cheers, Nathan