From: Davide Gianforte <davide@gengisdave.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
kernel-janitors <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH 2/2] staging: silicom: function return fixes
Date: Fri, 11 Jul 2014 09:12:25 +0200 [thread overview]
Message-ID: <3841595.FCr3AICt7G@mayhem> (raw)
In-Reply-To: <20140709185914.GA28612@kroah.com>
On Wed, Jul 09, 2014 at 11:59:14, Greg Kroah-Hartman wrote:
> On Tue, Jul 01, 2014 at 02:33:43PM +0200, Davide Gianforte wrote:
> > + uint32_t ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
> >
> > - ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
>
> How about just removing the " = 0;" part of the variable definition?
> That would be a smaller patch, and still keep everything "clean".
>
> thanks,
>
> greg k-h
Also I prefer the style to keep definitions separated from assignments.
I've seen a lot of kernel code which initialize variables with function returns,
but as you said, it is not "clean", even if it is code-correct.
I'll rewrite the patch and I will send asap.
thanks
davide
next prev parent reply other threads:[~2014-07-11 7:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 12:24 [PATCH 1/2] staging: silicom: checkpatch fixes Davide Gianforte
2014-07-01 12:33 ` [PATCH 2/2] staging: silicom: function return fixes Davide Gianforte
2014-07-09 18:59 ` Greg Kroah-Hartman
2014-07-11 7:12 ` Davide Gianforte [this message]
2014-07-11 13:31 ` Dan Carpenter
2014-07-09 9:38 ` [PATCH 1/2] staging: silicom: checkpatch fixes Dan Carpenter
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=3841595.FCr3AICt7G@mayhem \
--to=davide@gengisdave.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.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