Re: [patch v2] sata, highbank: clear whole array in highbank_initialize_phys()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux