On 21-07-2020 10:37, Takashi Iwai wrote: > Submit a complete set freshly as a v2 patch set. > > [PATCH v2 1/3] ... Done, although now only the first two are left since you were of course quite right about the third. > The first return for kmalloc error should remain so, but the rest can > be replaced with goto out. That I meant. I know, but that's exactly what it already did :) I guess it looks a bit non-generic as a patch due to me also unifying the error path due to that same change in structure. But any case, v2 is the same as v1 therefore, minus the fixed paths of course. >> Re: [PATCH 3/3] snd-usb-6fire: Unmark struct snd_pcm_hardware const >> >>> This must be superfluous. usb6fire_pcm_open() changes the field of >>> the copied pcm_hw, not the original pcm_hw itself. Otherwise we >>> must have got already a compile warning / error. >> >> Unfortunately no; it's as mentioned in the cover letter accessed via >> pointer: usb6fire_pcm_open() sets "alsa_rt->hw = pcm_hw" and then >> changes pcm_hw as e.g. "alsa_rt->hw.channels_max = OUT_N_CHANNELS;". >> I.e., not a copy. > > Note that it copies the whole instance, not the pointer. So the > current code is correct. Yap. I blindly assumed that snd_pcm_runtime.hw would be a pointer and synchronized that with the code without even really thinking about it by convincing myself that, as in the case of an array, that "pcm_hw" name would deteriorate to a pointer automatically. As such now keenly aware that my grasp of C semantics has also taken a bit of a nosedive over the last 10 years or so, I'll be more careful. Patch dropped. Thanks. Rene.