Re: [PATCH v2 0/5] usb: cdc-wdm: subdriver support

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

 



Oliver Neukum <oliver@xxxxxxxxxx> writes:
> Am Montag, 27. Februar 2012, 12:58:27 schrieb Bjørn Mork:
>> Oliver Neukum <oliver@xxxxxxxxxx> writes:
>> 
>> > Now, I am confused. I thought I had acked everything outstanding.
>> > What did I miss?
>> 
>> Could just as well be me having missed it, but I cannot remember seeing
>> a definite ack the the patch set in the subject.  I.e. the
>>    "[PATCH v2 0/5] usb: cdc-wdm: subdriver support" 
>> set.
>> 
>> You sort of pre-approved the concept and provided valuable feedback on
>> patch 3/5, based on which I sent an updated version of that single
>> patch. But I didn't dare consider any of those a final ack.
>> 
>
> +/* using a counter to merge subdriver requests with our own into a combined state */
>  static int qmi_wwan_manage_power(struct usbnet *dev, int on)
>  {
> -	dev->intf->needs_remote_wakeup = on;
> -	return 0;
> +	atomic_t *pmcount = (void *)&dev->data[1];
>
> Where is this initialized?

struct usbnet is allocated as a private part of the netdev by
  usbnet_probe => alloc_etherdev => alloc_netdev_mqs => kzalloc
So the whole data[5] array should already be properly initialized to 0.

Do you think that the counter should be explicitly initialized anyway to
avoid any confusion?  I have also wondered if it would be a good idea to
overlay a private struct on top of the data[5] array, to better document
the driver's usage of the array.  That would probably make even more
sense if we do explicit initialization.  Any thoughts on that?



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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux