public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] media: uvcvideo: Code cleanup for dev->status
@ 2022-12-15 10:57 Ricardo Ribalda
  2022-12-15 10:57 ` [PATCH v3 1/2] media: uvcvideo: Remove void casting for the status endpoint Ricardo Ribalda
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ricardo Ribalda @ 2022-12-15 10:57 UTC (permalink / raw)
  To: Max Staudt, Jonathan Cameron, Sergey Senozhatsky, Ming Lei,
	Mauro Carvalho Chehab, Laurent Pinchart, Yunke Cao
  Cc: Ricardo Ribalda, Christoph Hellwig, linux-usb, Alan Stern,
	linux-kernel, linux-media

There is no need to make a kzalloc just for 16 bytes. Let's embed the data
into the main data structure.

Now that we are at it, lets remove all the castings and open coding of
offsets for it.

[Christoph, do you think dma wise we are violating any non written rules? :) thanks]

Cc: Christoph Hellwig <hch@lst.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
To: Ming Lei <tom.leiming@gmail.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Yunke Cao <yunkec@chromium.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Max Staudt <mstaudt@chromium.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

---
Changes in v3:
- Split the patch in two
- Add linux-usb, Alan and Christoph for the allocation change.
- Link to v2: https://lore.kernel.org/r/20221214-uvc-status-alloc-v2-0-3f1cba6fc734@chromium.org

Changes in v2:
- using __aligned(), to keep the old alignment
- Adding Johnathan Cameron to:, as he has some similar experience with iio
- Adding Ming Lei, as this patch kind of revert his patch
- Link to v1: https://lore.kernel.org/r/20221214-uvc-status-alloc-v1-0-a0098ddc7c93@chromium.org

---
Ricardo Ribalda (2):
      media: uvcvideo: Remove void casting for the status endpoint
      media: uvcvideo: Do not alloc dev->status

 drivers/media/usb/uvc/uvc_status.c | 69 ++++++++++++--------------------------
 drivers/media/usb/uvc/uvcvideo.h   | 29 ++++++++++++++--
 2 files changed, 47 insertions(+), 51 deletions(-)
---
base-commit: 0ec5a38bf8499f403f81cb81a0e3a60887d1993c
change-id: 20221214-uvc-status-alloc-93becb783898

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-20 22:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 10:57 [PATCH v3 0/2] media: uvcvideo: Code cleanup for dev->status Ricardo Ribalda
2022-12-15 10:57 ` [PATCH v3 1/2] media: uvcvideo: Remove void casting for the status endpoint Ricardo Ribalda
2022-12-15 11:07   ` Ricardo Ribalda
2022-12-15 10:57 ` [PATCH v3 2/2] media: uvcvideo: Do not alloc dev->status Ricardo Ribalda
2022-12-15 12:48   ` Christoph Hellwig
2022-12-20 22:59     ` Ricardo Ribalda
2022-12-15 15:34 ` [PATCH v3 0/2] media: uvcvideo: Code cleanup for dev->status Alan Stern
2022-12-16  8:55   ` Ricardo Ribalda
2022-12-16 15:45     ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox