Re: [PATCH 1/2] tty: remove redundant initialization in initialize_tty_struct()

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

 



On Fri, 23 Nov 2012 23:04:52 +0800
Yan Hong <clouds.yan@xxxxxxxxx> wrote:

> 2012/11/23 Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>:
> > On Fri, 23 Nov 2012 22:41:47 +0800
> > Yan Hong <clouds.yan@xxxxxxxxx> wrote:
> >
> >> tty_struct is already zeroed, no need to zero its field again.
> >
> > True but its asking for impossible to find bugs later if this changes
> 
> If it's true, we should have concern for all memset() usage. Is this
> case special?

Slowly catchng up on stuff. The problem in this case is that the
allocator and init methods are in different function. As you rightly
observe they don't need to be. Perhaps a better patch would be told fold
them together and remove the memset ?

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux