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 F10003D45E5 for ; Tue, 28 Jul 2026 21:46:07 +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=1785275169; cv=none; b=APTq1CbEIJ8vmzHH2cvTCXn6r5f00qqS5H1z1v3XY7n5A45sL8HFfGCRYwLPkKhh5xUXbzvnIVT/V2YG4bvRCvWjVHh8Dz+aVdPvle3ql9H6p9BPX+YgcfxPO5QQmEnv0p6ChHCIzm87y+Ne8JsyDbui6rlidCMc93nHHfa4goI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785275169; c=relaxed/simple; bh=2l6knvVHfaN2FrpaApbUE7znD1X7ZSfP0BRhjzTd3OA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fBuZR4k6/yOYG2jxg1qy6ZTd5ELBlIIzlocPRi3PZISZCgDTkqHC8bWfqrAEGcXUxLjKL2uFmMgy+0cby3ogAHTcuyF4Xb54TuEfDBLyS2hFRpaiy4We4HdggojlhZCdsB5czpe2scgo+tiLZnPWXiPk8whSBGqgfMWOcX3IFfM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JAeQzZGF; 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="JAeQzZGF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3213F1F000E9; Tue, 28 Jul 2026 21:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785275167; bh=YdzHJQIzLHp4fyZpOkHIJJ1692g7m3ZerJyrXOOFTBI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=JAeQzZGFXO2qh56mm5Kh8e4Z9GWPQ7AQIHJxZHuWXcVSZhYChcOAboPVjtqBDpv8g 87vuYZYxK6qaCyK5gUhJfoRNLf9z809oZup46aOkseoEs23iN+a4FWp/jCVgObEHhl fhs0oRgfJgcW219CN1tt6X2Q0oa/VeBQ0zDndRYTvpT67LECjGZdLDRoCawup1Vf6T VkQMsGVfAapviPlOfXFbmTi81x5ZxaiR9toHpiywZp9+N0mpfMXOwQQb94wuY4mF5w oem8Iim3C9bUEFm7/Tt7oUfmwS0ndZqYcmP4ETvOdFZssQzwYgrT3Tba7lAXNdrnCL r3l9eWXol0T3g== Date: Tue, 28 Jul 2026 14:46:03 -0700 From: Nathan Chancellor To: Manuel Ebner Cc: Alexander Usyskin , 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: <20260728214603.GA3198102@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Jul 28, 2026 at 02:43:37PM +0200, Manuel Ebner wrote: > On Tue, 2026-07-21 at 14:32 -0700, Nathan Chancellor wrote: > > 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 > > I had the same errors and eight notes: > > 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", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ./include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’ > 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ > | ^~~ > ./include/linux/dev_printk.h:154:56: note: in expansion of macro ‘dev_fmt’ > 154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) > | ^~~~~~~ > drivers/misc/issei/hw_heci.c:374:17: note: in expansion of macro ‘dev_err’ > 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", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ./include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’ > 110 | _p_func(dev, fmt, ##__VA_ARGS__); \ > | ^~~ > ./include/linux/dev_printk.h:154:56: note: in expansion of macro ‘dev_fmt’ > 154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) > | ^~~~~~~ > drivers/misc/issei/hw_heci.c:404:17: note: in expansion of macro ‘dev_err’ > 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 > > Can the notes be improved? If so please advice. I manually trimmed the notes in the commit message because I think they are mostly noise, hence the '...'. Thanks for the review! -- Cheers, Nathan