diff options
author | Abhinav Singh <singhabhinav9051571833@gmail.com> | 2023-11-08 10:15:50 +0530 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-11-18 15:00:01 +0100 |
commit | 297945d9bc13a10e2ce39f0a3aad38c6812435a5 (patch) | |
tree | c818981a14ef228e6bf4a52ec6bb8da717882081 /fs/direct-io.c | |
parent | db3db63b1d17c98f69e894edaa2b0b364ecde7a9 (diff) |
fs : Fix warning using plain integer as NULL
Sparse static analysis tools generate a warning with this message
"Using plain integer as NULL pointer". In this case this warning is
being shown because we are trying to initialize pointer to NULL using
integer value 0.
Signed-off-by: Abhinav Singh <singhabhinav9051571833@gmail.com>
Link: https://lore.kernel.org/r/20231108044550.1006555-1-singhabhinav9051571833@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r-- | fs/direct-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 20533266ade6..60456263a338 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1114,7 +1114,7 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, loff_t offset = iocb->ki_pos; const loff_t end = offset + count; struct dio *dio; - struct dio_submit sdio = { 0, }; + struct dio_submit sdio = { NULL, }; struct buffer_head map_bh = { 0, }; struct blk_plug plug; unsigned long align = offset | iov_iter_alignment(iter); |