devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-ide@vger.kernel.org, devicetree@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch v2] sata, highbank: clear whole array in highbank_initialize_phys()
Date: Sun, 27 Oct 2013 08:16:58 -0400	[thread overview]
Message-ID: <20131027121658.GI14934@mtj.dyndns.org> (raw)
In-Reply-To: <20131018084409.GA14256@longonot.mountain>

On Fri, Oct 18, 2013 at 11:44:09AM +0300, Dan Carpenter wrote:
> The original code used the wrong parameter to clear tx_atten[].  It
> passed the number of elements instead of sizeof() the array to memset.
> 
> The other potential issue was that cphy_base[] wasn't cleared.  I'm not
> sure if that was a real problem or not, but I have cleared it in my
> patch.
> 
> Instead of using memset(), this patch uses empty initializers as a
> cleanup.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied to libata/for-3.13.  I didn't cc stable as it doesn't look
like it caused actual problems.  Reading the code, I'm curious how
port_data[] is supposed to work.  It's a static array used throughout
the driver which is zeroed on each probe(), which doesn't make whole
lot of sense - if I connect a second sata_highbank controller in, the
struct used by the first one will be cleared.  Maybe the whole PHY
thing is supposed to be completely static, but if so, it'd be great if
the code is explicitly structured / explained that way.

Thanks.

-- 
tejun

      parent reply	other threads:[~2013-10-27 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18  8:44 [patch v2] sata, highbank: clear whole array in highbank_initialize_phys() Dan Carpenter
2013-10-18 14:21 ` Rob Herring
2013-10-27 12:16 ` Tejun Heo [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=20131027121658.GI14934@mtj.dyndns.org \
    --to=tj@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=rob.herring@calxeda.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 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).