From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Li kunyu <kunyu@nfschina.com>
Cc: dan.j.williams@intel.com, Jonathan.Cameron@huawei.com,
gregkh@linuxfoundation.org, rafael@kernel.org,
ira.weiny@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel: resource: Remove unnecessary ‘0’ values from err
Date: Wed, 12 Jul 2023 18:57:06 +0300 [thread overview]
Message-ID: <ZK7NUpb942858aiI@smile.fi.intel.com> (raw)
In-Reply-To: <20230713235339.3090-1-kunyu@nfschina.com>
On Fri, Jul 14, 2023 at 07:53:39AM +0800, Li kunyu wrote:
> err is assigned first, so it does not need to initialize the assignment.
While this is fine, I would go further to make it more explicit, i.e.
> - int err=0;
> + int err;
> struct resource new = *old;
> struct resource *conflict;
- if ((err = __find_resource(root, old, &new, newsize, constraint)))
+ err = __find_resource(root, old, &new, newsize, constraint);
+ if (err)
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2023-07-12 15:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 23:53 Li kunyu
2023-07-12 15:57 ` Andy Shevchenko [this message]
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=ZK7NUpb942858aiI@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=kunyu@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®