All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Damien Le Moal <Damien.LeMoal@wdc.com>
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	kernel test robot <lkp@intel.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	"clang-built-linux@googlegroups.com" 
	<clang-built-linux@googlegroups.com>
Subject: Re: [PATCH 2/2] zonefs: Fix O_APPEND async write handling
Date: Mon, 15 Mar 2021 10:08:55 -0700	[thread overview]
Message-ID: <20210315170855.tguqrsl7wsbjojib@archlinux-ax161> (raw)
In-Reply-To: <BL0PR04MB6514205221C23615549ED67DE76C9@BL0PR04MB6514.namprd04.prod.outlook.com>

On Mon, Mar 15, 2021 at 07:22:56AM +0000, Damien Le Moal wrote:
> On 2021/03/15 16:21, Johannes Thumshirn wrote:
> > On 15/03/2021 08:16, kernel test robot wrote:
> >> 818	static ssize_t zonefs_file_dio_write(struct kiocb *iocb, struct iov_iter *from)
> >>    819	{
> >>    820		struct inode *inode = file_inode(iocb->ki_filp);
> >>    821		struct zonefs_inode_info *zi = ZONEFS_I(inode);
> >>    822		struct super_block *sb = inode->i_sb;
> >>    823		bool sync = is_sync_kiocb(iocb);
> >>    824		bool append = false;
> >>    825		ssize_t ret, count;
> > 
> >>    843		count = zonefs_write_checks(iocb, from);
> >>  > 844		if (count <= 0)
> >>    845			goto inode_unlock;
> > 
> > Args that needs to be:
> > 			if (count <= 0) {
> > 				ret = count;
> > 				goto inode_unlock;
> > 			}
> > 
> > Sorry for not spotting it.
> 
> Yep. Sending v2. Weird that gcc does not complain on my local compile...

Unfortunately, GCC's version of this warning was disabled for default
compiles by Linus in commit 78a5255ffb6a ("Stop the ad-hoc games with
-Wno-maybe-initialized"). W=2 is required, which can be quite noisy from
my understanding. KCFLAGS=-Wmaybe-uninitialized is a good option.

Cheers,
Nathan

> > 
> >>    878	inode_unlock:
> >>    879		inode_unlock(inode);
> >>    880	
> >>    881		return ret;
> >>    882	}
> >>    883	
> > 
> 
> -- 
> Damien Le Moal
> Western Digital Research

WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/2] zonefs: Fix O_APPEND async write handling
Date: Mon, 15 Mar 2021 10:08:55 -0700	[thread overview]
Message-ID: <20210315170855.tguqrsl7wsbjojib@archlinux-ax161> (raw)
In-Reply-To: <BL0PR04MB6514205221C23615549ED67DE76C9@BL0PR04MB6514.namprd04.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]

On Mon, Mar 15, 2021 at 07:22:56AM +0000, Damien Le Moal wrote:
> On 2021/03/15 16:21, Johannes Thumshirn wrote:
> > On 15/03/2021 08:16, kernel test robot wrote:
> >> 818	static ssize_t zonefs_file_dio_write(struct kiocb *iocb, struct iov_iter *from)
> >>    819	{
> >>    820		struct inode *inode = file_inode(iocb->ki_filp);
> >>    821		struct zonefs_inode_info *zi = ZONEFS_I(inode);
> >>    822		struct super_block *sb = inode->i_sb;
> >>    823		bool sync = is_sync_kiocb(iocb);
> >>    824		bool append = false;
> >>    825		ssize_t ret, count;
> > 
> >>    843		count = zonefs_write_checks(iocb, from);
> >>  > 844		if (count <= 0)
> >>    845			goto inode_unlock;
> > 
> > Args that needs to be:
> > 			if (count <= 0) {
> > 				ret = count;
> > 				goto inode_unlock;
> > 			}
> > 
> > Sorry for not spotting it.
> 
> Yep. Sending v2. Weird that gcc does not complain on my local compile...

Unfortunately, GCC's version of this warning was disabled for default
compiles by Linus in commit 78a5255ffb6a ("Stop the ad-hoc games with
-Wno-maybe-initialized"). W=2 is required, which can be quite noisy from
my understanding. KCFLAGS=-Wmaybe-uninitialized is a good option.

Cheers,
Nathan

> > 
> >>    878	inode_unlock:
> >>    879		inode_unlock(inode);
> >>    880	
> >>    881		return ret;
> >>    882	}
> >>    883	
> > 
> 
> -- 
> Damien Le Moal
> Western Digital Research

  reply	other threads:[~2021-03-15 17:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  3:49 [PATCH 0/2] zonefs fixes Damien Le Moal
2021-03-15  3:49 ` [PATCH 1/2] zonefs: prevent use of seq files as swap file Damien Le Moal
2021-03-15  6:46   ` Johannes Thumshirn
2021-03-15  7:23     ` Damien Le Moal
2021-03-15  3:49 ` [PATCH 2/2] zonefs: Fix O_APPEND async write handling Damien Le Moal
2021-03-15  7:14   ` Johannes Thumshirn
2021-03-15  7:15   ` kernel test robot
2021-03-15  7:15     ` kernel test robot
2021-03-15  7:21     ` Johannes Thumshirn
2021-03-15  7:21     ` Johannes Thumshirn
2021-03-15  7:22       ` Damien Le Moal
2021-03-15  7:22       ` Damien Le Moal
2021-03-15 17:08         ` Nathan Chancellor [this message]
2021-03-15 17:08           ` Nathan Chancellor
2021-03-16  1:11           ` Damien Le Moal
2021-03-16  1:11           ` Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210315170855.tguqrsl7wsbjojib@archlinux-ax161 \
    --to=nathan@kernel.org \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.