zhanghailiang <zhang.zhanghaili...@huawei.com> writes: > The logic of pcmcia_socket_unregister is wrong, > which will cause a freed memory accessing > > Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> > --- > Hi, > > The function pcmcia_socket_unregister seemes to be unused, > Should it be removed? Thanks.
I think we should remove the whole thing: pcmcia_sockets, pcmcia_socket_register(), pcmcia_socket_unregister, pcmcia_info(). Here's why. It serves just one purpose: "info pcmcia". HMP-only, therefore not a stable interface. But is it a useful one? The only caller of pcmcia_socket_register() is pxa2xx_pcmcia_realize(), of device model "pxa2xx-pcmcia". As far as I can tell, used only by a couple of ARM boards: "verdex", "mainstone", "akita", "spitz", "borzoi", "terrier", "z2", "connex", "tosa". Of these, only "akita", "spitz", "borzoi", "terrier" and "tosa" insert a card into the slot, and they do so right on board initialization. Nothing ever ejects a card from a slot. Therefore, "info pcmcia" effectively prints a fixed, machine-specific string so far. Doesn't sound useful to me. If we acquire PCMCIA devices where querying status is interesting, we'll want a QMP command, so this code will be pretty much useless. Peter M., what do you think?