* [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc
@ 2023-06-28 1:58 Lu Hongfei
2023-06-28 2:44 ` Chaitanya Kulkarni
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lu Hongfei @ 2023-06-28 1:58 UTC (permalink / raw)
To: Christoph Hellwig, Darrick J. Wong, linux-xfs, linux-fsdevel,
linux-kernel
Cc: opensource.kernel, luhongfei
The return value type of i_blocksize() is 'unsigned int', so the
type of blocksize has been modified from 'int' to 'unsigned int'
to ensure data type consistency.
Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
---
The modifications made compared to the previous version are as follows:
1. Keep the alignment of the variable names.
fs/iomap/buffered-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index a4fa81af60d9..37e3daeffc0a 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1076,7 +1076,7 @@ int iomap_file_buffered_write_punch_delalloc(struct inode *inode,
{
loff_t start_byte;
loff_t end_byte;
- int blocksize = i_blocksize(inode);
+ unsigned int blocksize = i_blocksize(inode);
if (iomap->type != IOMAP_DELALLOC)
return 0;
--
2.39.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc
2023-06-28 1:58 [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc Lu Hongfei
@ 2023-06-28 2:44 ` Chaitanya Kulkarni
2023-06-28 4:54 ` Christoph Hellwig
2023-06-28 17:55 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2023-06-28 2:44 UTC (permalink / raw)
To: Lu Hongfei, Christoph Hellwig, Darrick J. Wong,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
On 6/27/23 18:58, Lu Hongfei wrote:
> The return value type of i_blocksize() is 'unsigned int', so the
> type of blocksize has been modified from 'int' to 'unsigned int'
> to ensure data type consistency.
>
> Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
> ---
>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc
2023-06-28 1:58 [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc Lu Hongfei
2023-06-28 2:44 ` Chaitanya Kulkarni
@ 2023-06-28 4:54 ` Christoph Hellwig
2023-06-28 17:55 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2023-06-28 4:54 UTC (permalink / raw)
To: Lu Hongfei
Cc: Christoph Hellwig, Darrick J. Wong, linux-xfs, linux-fsdevel,
linux-kernel, opensource.kernel
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc
2023-06-28 1:58 [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc Lu Hongfei
2023-06-28 2:44 ` Chaitanya Kulkarni
2023-06-28 4:54 ` Christoph Hellwig
@ 2023-06-28 17:55 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2023-06-28 17:55 UTC (permalink / raw)
To: Lu Hongfei
Cc: Christoph Hellwig, linux-xfs, linux-fsdevel, linux-kernel,
opensource.kernel
On Wed, Jun 28, 2023 at 09:58:03AM +0800, Lu Hongfei wrote:
> The return value type of i_blocksize() is 'unsigned int', so the
> type of blocksize has been modified from 'int' to 'unsigned int'
> to ensure data type consistency.
>
> Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> The modifications made compared to the previous version are as follows:
> 1. Keep the alignment of the variable names.
>
> fs/iomap/buffered-io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index a4fa81af60d9..37e3daeffc0a 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -1076,7 +1076,7 @@ int iomap_file_buffered_write_punch_delalloc(struct inode *inode,
> {
> loff_t start_byte;
> loff_t end_byte;
> - int blocksize = i_blocksize(inode);
> + unsigned int blocksize = i_blocksize(inode);
>
> if (iomap->type != IOMAP_DELALLOC)
> return 0;
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-28 17:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28 1:58 [PATCH v2] fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc Lu Hongfei
2023-06-28 2:44 ` Chaitanya Kulkarni
2023-06-28 4:54 ` Christoph Hellwig
2023-06-28 17:55 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).