Re: [PATCH 1/2] target: remove useless INIT_LIST_HEAD

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

 



On 12/05/2012 10:46 PM, Nicholas A. Bellinger wrote:

So I've been thinking about this patch some more..

Although I do like the micro-op of dropping the extra INIT_LIST_HEAD()
when it's really unnecessary, it makes me more nervous to mix and match
cases like this if member ->  container usage ever changed for a specific
list_head in the future.

You should not make such a change like you would a second semicolon. If
you change a struct from being a member to become a container I
_would_ change its name so it is clear and let the compiler assist me
in auditing all users for proper usage. This is a bigger change, I mean
you change a complete struct and the code logic from being a container
to being an element or the other way around. I *think* the missing list
head init here is the smallest problem here.

I *tried* to audit all members, wrote a small list of the member and
the container(s) it uses and found two list_heads with no users besides
the INIT_LIST_HEAD(). I know that this is not even close to the memory
over commit I posted earlier but it is something :)

So that said, I'm skipping this one for the moment.

--nab

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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux