All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL FOR v4.15] RC cleanup fixes
@ 2017-09-23 10:33 Sean Young
  2017-09-23 19:35 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 6+ messages in thread
From: Sean Young @ 2017-09-23 10:33 UTC (permalink / raw)
  To: linux-media

Hi Mauro,

Just cleanups this round. Line count does go down, though.

Thanks,

Sean


The following changes since commit 1efdf1776e2253b77413c997bed862410e4b6aaf:

  media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency (2017-09-05 16:32:45 -0400)

are available in the git repository at:

  git://linuxtv.org/syoung/media_tree.git for-v4.15a

for you to fetch changes up to fe96866c81291a2887559fdfcc58ddf8fe54111d:

  imon: Improve a size determination in two functions (2017-09-23 11:20:12 +0100)

----------------------------------------------------------------
Arvind Yadav (1):
      media: rc: constify usb_device_id

Bhumika Goyal (1):
      media: rc: make device_type const

Colin Ian King (1):
      media: imon: make two const arrays static, reduces object code size

David Härdeman (15):
      media: lirc_dev: clarify error handling
      media: lirc_dev: remove support for manually specifying minor number
      media: lirc_dev: remove min_timeout and max_timeout
      media: lirc_dev: use cdev_device_add() helper function
      media: lirc_dev: make better use of file->private_data
      media: lirc_dev: make chunk_size and buffer_size mandatory
      media: lirc_dev: remove kmalloc in lirc_dev_fop_read()
      media: lirc_dev: change irctl->attached to be a boolean
      media: lirc_dev: sanitize locking
      media: lirc_dev: use an IDA instead of an array to keep track of registered devices
      media: rename struct lirc_driver to struct lirc_dev
      media: lirc_dev: introduce lirc_allocate_device and lirc_free_device
      media: lirc_zilog: add a pointer to the parent device to struct IR
      media: lirc_zilog: use a dynamically allocated lirc_dev
      media: lirc_dev: merge struct irctl into struct lirc_dev

Ladislav Michl (10):
      media: rc: gpio-ir-recv: use helper variable to access device info
      media: rc: gpio-ir-recv: use devm_kzalloc
      media: rc: gpio-ir-recv: use devm_rc_allocate_device
      media: rc: gpio-ir-recv: use devm_gpio_request_one
      media: rc: gpio-ir-recv: use devm_rc_register_device
      media: rc: gpio-ir-recv: do not allow threaded interrupt handler
      media: rc: gpio-ir-recv: use devm_request_irq
      media: rc: gpio-ir-recv: use KBUILD_MODNAME
      media: rc: gpio-ir-recv: remove gpio_ir_recv_platform_data
      media: rc: gpio-ir-recv: use gpiolib API

Marc Gonzalez (1):
      media: rc: Delete duplicate debug message

Markus Elfring (3):
      media: imon: delete an error message for a failed memory allocation
      media: img-ir: delete an error message for a failed memory allocation
      imon: Improve a size determination in two functions

Sean Young (7):
      media: dvb: a800: port to rc-core
      media: rc: avermedia keymap for a800
      media: rc: ensure that protocols are enabled for scancode drivers
      media: rc: dvb: use dvb device name for rc device
      media: rc: if protocols can't be changed, don't be writable
      media: rc: include device name in rc udev event
      media: vp7045: port TwinhanDTV Alpha to rc-core

Stephen Hemminger (1):
      media: default for RC_CORE should be n

Thomas Meyer (1):
      media: rc: Use bsearch library function

 drivers/media/cec/cec-core.c                     |   1 -
 drivers/media/i2c/ir-kbd-i2c.c                   |   1 -
 drivers/media/rc/Kconfig                         |   1 -
 drivers/media/rc/ati_remote.c                    |   2 +-
 drivers/media/rc/gpio-ir-recv.c                  | 190 +++------
 drivers/media/rc/igorplugusb.c                   |   2 +-
 drivers/media/rc/img-ir/img-ir-core.c            |   5 +-
 drivers/media/rc/imon.c                          |  18 +-
 drivers/media/rc/ir-lirc-codec.c                 |  56 ++-
 drivers/media/rc/keymaps/rc-avermedia-m135a.c    |   3 +-
 drivers/media/rc/keymaps/rc-twinhan1027.c        |   2 +-
 drivers/media/rc/lirc_dev.c                      | 517 +++++++++--------------
 drivers/media/rc/mceusb.c                        |   2 +-
 drivers/media/rc/rc-core-priv.h                  |   2 +-
 drivers/media/rc/rc-main.c                       |  72 ++--
 drivers/media/rc/redrat3.c                       |   2 +-
 drivers/media/rc/streamzap.c                     |   2 +-
 drivers/media/usb/dvb-usb/a800.c                 |  65 +--
 drivers/media/usb/dvb-usb/dvb-usb-remote.c       |   3 +-
 drivers/media/usb/dvb-usb/dvb-usb.h              |   1 +
 drivers/media/usb/dvb-usb/vp7045.c               |  88 +---
 drivers/staging/media/lirc/lirc_zilog.c          | 231 +++++-----
 include/linux/platform_data/media/gpio-ir-recv.h |  23 -
 include/media/lirc_dev.h                         | 100 ++---
 24 files changed, 521 insertions(+), 868 deletions(-)
 delete mode 100644 include/linux/platform_data/media/gpio-ir-recv.h

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

* Re: [GIT PULL FOR v4.15] RC cleanup fixes
  2017-09-23 10:33 [GIT PULL FOR v4.15] RC cleanup fixes Sean Young
@ 2017-09-23 19:35 ` Mauro Carvalho Chehab
  2017-09-23 20:38   ` Sean Young
  0 siblings, 1 reply; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2017-09-23 19:35 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media

Hi Sean,

Em Sat, 23 Sep 2017 11:33:56 +0100
Sean Young <sean@mess.org> escreveu:

> Hi Mauro,
> 
> Just cleanups this round. Line count does go down, though.
> 
> Thanks,
> 
> Sean
> 
> 
> The following changes since commit 1efdf1776e2253b77413c997bed862410e4b6aaf:
> 
>   media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency (2017-09-05 16:32:45 -0400)
> 
> are available in the git repository at:
> 
>   git://linuxtv.org/syoung/media_tree.git for-v4.15a
> 
> for you to fetch changes up to fe96866c81291a2887559fdfcc58ddf8fe54111d:
> 
>   imon: Improve a size determination in two functions (2017-09-23 11:20:12 +0100)
> 
> ----------------------------------------------------------------
> Arvind Yadav (1):
>       media: rc: constify usb_device_id
> 
> Bhumika Goyal (1):
>       media: rc: make device_type const
> 
> Colin Ian King (1):
>       media: imon: make two const arrays static, reduces object code size
> 
> David Härdeman (15):
>       media: lirc_dev: clarify error handling
>       media: lirc_dev: remove support for manually specifying minor number
>       media: lirc_dev: remove min_timeout and max_timeout

This patch doesn't get rid of the corresponding documentation bits:

$ git grep MIN_TIMEOUT Documentation/
Documentation/media/uapi/rc/lirc-get-timeout.rst:ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
Documentation/media/uapi/rc/lirc-get-timeout.rst:LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
Documentation/media/uapi/rc/lirc-get-timeout.rst:.. c:function:: int ioctl( int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)
Documentation/media/uapi/rc/lirc-get-timeout.rst:    :name: LIRC_GET_MIN_TIMEOUT
Documentation/media/uapi/rc/lirc-set-rec-timeout.rst:   The range of supported timeout is given by :ref:`LIRC_GET_MIN_TIMEOUT`.

I didn't see any other patches in this series getting rid of them
either.

>       media: lirc_dev: use cdev_device_add() helper function
>       media: lirc_dev: make better use of file->private_data

I suspect that this patch will likely break the imon driver:

$ git grep private_data drivers/media/rc/
drivers/media/rc/imon.c:                file->private_data = ictx;
drivers/media/rc/imon.c:        ictx = file->private_data;
drivers/media/rc/imon.c:        ictx = file->private_data;
drivers/media/rc/imon.c:        ictx = file->private_data;

Please double-check if the remaining patches won't risk causing
regressions, as there are several patches there touching the RC
core ;-)

For now, I'll mark the pull request with "Changes requested".

Thanks,
Mauro

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

* Re: [GIT PULL FOR v4.15] RC cleanup fixes
  2017-09-23 19:35 ` Mauro Carvalho Chehab
@ 2017-09-23 20:38   ` Sean Young
  2017-09-24  9:09     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 6+ messages in thread
From: Sean Young @ 2017-09-23 20:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

Hi Mauro,

On Sat, Sep 23, 2017 at 04:35:31PM -0300, Mauro Carvalho Chehab wrote:
> Hi Sean,
> 
> Em Sat, 23 Sep 2017 11:33:56 +0100
> Sean Young <sean@mess.org> escreveu:
> 
> > Hi Mauro,
> > 
> > Just cleanups this round. Line count does go down, though.
> > 
> > Thanks,
> > 
> > Sean
> > 
> > 
> > The following changes since commit 1efdf1776e2253b77413c997bed862410e4b6aaf:
> > 
> >   media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency (2017-09-05 16:32:45 -0400)
> > 
> > are available in the git repository at:
> > 
> >   git://linuxtv.org/syoung/media_tree.git for-v4.15a
> > 
> > for you to fetch changes up to fe96866c81291a2887559fdfcc58ddf8fe54111d:
> > 
> >   imon: Improve a size determination in two functions (2017-09-23 11:20:12 +0100)
> > 
> > ----------------------------------------------------------------
> > Arvind Yadav (1):
> >       media: rc: constify usb_device_id
> > 
> > Bhumika Goyal (1):
> >       media: rc: make device_type const
> > 
> > Colin Ian King (1):
> >       media: imon: make two const arrays static, reduces object code size
> > 
> > David Härdeman (15):
> >       media: lirc_dev: clarify error handling
> >       media: lirc_dev: remove support for manually specifying minor number
> >       media: lirc_dev: remove min_timeout and max_timeout
> 
> This patch doesn't get rid of the corresponding documentation bits:
> 
> $ git grep MIN_TIMEOUT Documentation/
> Documentation/media/uapi/rc/lirc-get-timeout.rst:ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
> Documentation/media/uapi/rc/lirc-get-timeout.rst:LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
> Documentation/media/uapi/rc/lirc-get-timeout.rst:.. c:function:: int ioctl( int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)
> Documentation/media/uapi/rc/lirc-get-timeout.rst:    :name: LIRC_GET_MIN_TIMEOUT
> Documentation/media/uapi/rc/lirc-set-rec-timeout.rst:   The range of supported timeout is given by :ref:`LIRC_GET_MIN_TIMEOUT`.

So this patch isn't removing those ioctls, it's just removing it from
the lirc kernel api (so for lirc_zilog.c and out out of tree lirc drivers,
like lirc_rpi). None of those use min/max timeout. It's probably better
to drop this.

> I didn't see any other patches in this series getting rid of them
> either.
> 
> >       media: lirc_dev: use cdev_device_add() helper function
> >       media: lirc_dev: make better use of file->private_data
> 
> I suspect that this patch will likely break the imon driver:
> 
> $ git grep private_data drivers/media/rc/
> drivers/media/rc/imon.c:                file->private_data = ictx;
> drivers/media/rc/imon.c:        ictx = file->private_data;
> drivers/media/rc/imon.c:        ictx = file->private_data;
> drivers/media/rc/imon.c:        ictx = file->private_data;

That's for lcd chardev, nothing to do with lirc.

> Please double-check if the remaining patches won't risk causing
> regressions, as there are several patches there touching the RC
> core ;-)

Agreed, there are some painful patches. I've tested nearly all the IR
hardware I have.

> For now, I'll mark the pull request with "Changes requested".

I'll re-roll and double-check.

Thanks,

Sean

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

* Re: [GIT PULL FOR v4.15] RC cleanup fixes
  2017-09-23 20:38   ` Sean Young
@ 2017-09-24  9:09     ` Mauro Carvalho Chehab
  2017-09-24 10:40       ` Sean Young
  0 siblings, 1 reply; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2017-09-24  9:09 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media

Em Sat, 23 Sep 2017 21:38:59 +0100
Sean Young <sean@mess.org> escreveu:

> Hi Mauro,
> 
> On Sat, Sep 23, 2017 at 04:35:31PM -0300, Mauro Carvalho Chehab wrote:
> > Hi Sean,
> > 
> > Em Sat, 23 Sep 2017 11:33:56 +0100
> > Sean Young <sean@mess.org> escreveu:
> >   
> > > Hi Mauro,
> > > 
> > > Just cleanups this round. Line count does go down, though.
> > > 
> > > Thanks,
> > > 
> > > Sean
> > > 
> > > 
> > > The following changes since commit 1efdf1776e2253b77413c997bed862410e4b6aaf:
> > > 
> > >   media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency (2017-09-05 16:32:45 -0400)
> > > 
> > > are available in the git repository at:
> > > 
> > >   git://linuxtv.org/syoung/media_tree.git for-v4.15a
> > > 
> > > for you to fetch changes up to fe96866c81291a2887559fdfcc58ddf8fe54111d:
> > > 
> > >   imon: Improve a size determination in two functions (2017-09-23 11:20:12 +0100)
> > > 
> > > ----------------------------------------------------------------
> > > Arvind Yadav (1):
> > >       media: rc: constify usb_device_id
> > > 
> > > Bhumika Goyal (1):
> > >       media: rc: make device_type const
> > > 
> > > Colin Ian King (1):
> > >       media: imon: make two const arrays static, reduces object code size
> > > 
> > > David Härdeman (15):
> > >       media: lirc_dev: clarify error handling
> > >       media: lirc_dev: remove support for manually specifying minor number
> > >       media: lirc_dev: remove min_timeout and max_timeout  
> > 
> > This patch doesn't get rid of the corresponding documentation bits:
> > 
> > $ git grep MIN_TIMEOUT Documentation/
> > Documentation/media/uapi/rc/lirc-get-timeout.rst:ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
> > Documentation/media/uapi/rc/lirc-get-timeout.rst:LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
> > Documentation/media/uapi/rc/lirc-get-timeout.rst:.. c:function:: int ioctl( int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)
> > Documentation/media/uapi/rc/lirc-get-timeout.rst:    :name: LIRC_GET_MIN_TIMEOUT
> > Documentation/media/uapi/rc/lirc-set-rec-timeout.rst:   The range of supported timeout is given by :ref:`LIRC_GET_MIN_TIMEOUT`.  
> 
> So this patch isn't removing those ioctls, it's just removing it from
> the lirc kernel api (so for lirc_zilog.c and out out of tree lirc drivers,
> like lirc_rpi). None of those use min/max timeout. It's probably better
> to drop this.

Ah, I see. Well, if none of the in-kernel drivers use it, we can
drop it.

Btw, as it seems that now only lirc_zilog uses the Linux kernel
API, we could just move it to staging, under drivers/staging/media/lirc/,
remove all EXPORT_SYMBOL_* from it, and add it to the lirc_zilog
Makefile.

That probably meets the goal of avoiding people to write new
drivers based on it. Any other out of tree driver that might
be still using it could do the same, while such driver is not
converted to rc-core.

> 
> > I didn't see any other patches in this series getting rid of them
> > either.
> >   
> > >       media: lirc_dev: use cdev_device_add() helper function
> > >       media: lirc_dev: make better use of file->private_data  
> > 
> > I suspect that this patch will likely break the imon driver:
> > 
> > $ git grep private_data drivers/media/rc/
> > drivers/media/rc/imon.c:                file->private_data = ictx;
> > drivers/media/rc/imon.c:        ictx = file->private_data;
> > drivers/media/rc/imon.c:        ictx = file->private_data;
> > drivers/media/rc/imon.c:        ictx = file->private_data;  
> 
> That's for lcd chardev, nothing to do with lirc.

Ah, OK!

> 
> > Please double-check if the remaining patches won't risk causing
> > regressions, as there are several patches there touching the RC
> > core ;-)  
> 
> Agreed, there are some painful patches. I've tested nearly all the IR
> hardware I have.

If they don't cause regressions, better to apply then ;)
As we're early at -rc, merging it now is a good idea, as people
will have more time to review.

> 
> > For now, I'll mark the pull request with "Changes requested".  
> 
> I'll re-roll and double-check.

Regards,
Mauro

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

* Re: [GIT PULL FOR v4.15] RC cleanup fixes
  2017-09-24  9:09     ` Mauro Carvalho Chehab
@ 2017-09-24 10:40       ` Sean Young
  2017-09-24 12:42         ` Sean Young
  0 siblings, 1 reply; 6+ messages in thread
From: Sean Young @ 2017-09-24 10:40 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

On Sun, Sep 24, 2017 at 06:09:32AM -0300, Mauro Carvalho Chehab wrote:
> Em Sat, 23 Sep 2017 21:38:59 +0100
> Sean Young <sean@mess.org> escreveu:
> 
> > Hi Mauro,
> > 
> > On Sat, Sep 23, 2017 at 04:35:31PM -0300, Mauro Carvalho Chehab wrote:
> > > Hi Sean,
> > > 
> > > Em Sat, 23 Sep 2017 11:33:56 +0100
> > > Sean Young <sean@mess.org> escreveu:
> > >   
> > > > Hi Mauro,
> > > > 
> > > > Just cleanups this round. Line count does go down, though.
> > > > 
> > > > Thanks,
> > > > 
> > > > Sean
> > > > 
> > > > 
> > > > The following changes since commit 1efdf1776e2253b77413c997bed862410e4b6aaf:
> > > > 
> > > >   media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency (2017-09-05 16:32:45 -0400)
> > > > 
> > > > are available in the git repository at:
> > > > 
> > > >   git://linuxtv.org/syoung/media_tree.git for-v4.15a
> > > > 
> > > > for you to fetch changes up to fe96866c81291a2887559fdfcc58ddf8fe54111d:
> > > > 
> > > >   imon: Improve a size determination in two functions (2017-09-23 11:20:12 +0100)
> > > > 
> > > > ----------------------------------------------------------------
> > > > Arvind Yadav (1):
> > > >       media: rc: constify usb_device_id
> > > > 
> > > > Bhumika Goyal (1):
> > > >       media: rc: make device_type const
> > > > 
> > > > Colin Ian King (1):
> > > >       media: imon: make two const arrays static, reduces object code size
> > > > 
> > > > David Härdeman (15):
> > > >       media: lirc_dev: clarify error handling
> > > >       media: lirc_dev: remove support for manually specifying minor number
> > > >       media: lirc_dev: remove min_timeout and max_timeout  
> > > 
> > > This patch doesn't get rid of the corresponding documentation bits:
> > > 
> > > $ git grep MIN_TIMEOUT Documentation/
> > > Documentation/media/uapi/rc/lirc-get-timeout.rst:ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
> > > Documentation/media/uapi/rc/lirc-get-timeout.rst:LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
> > > Documentation/media/uapi/rc/lirc-get-timeout.rst:.. c:function:: int ioctl( int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)
> > > Documentation/media/uapi/rc/lirc-get-timeout.rst:    :name: LIRC_GET_MIN_TIMEOUT
> > > Documentation/media/uapi/rc/lirc-set-rec-timeout.rst:   The range of supported timeout is given by :ref:`LIRC_GET_MIN_TIMEOUT`.  
> > 
> > So this patch isn't removing those ioctls, it's just removing it from
> > the lirc kernel api (so for lirc_zilog.c and out out of tree lirc drivers,
> > like lirc_rpi). None of those use min/max timeout. It's probably better
> > to drop this.
> 
> Ah, I see. Well, if none of the in-kernel drivers use it, we can
> drop it.

Looks like our emails crossed each other -- I have already pushed out
another PR without it.

> Btw, as it seems that now only lirc_zilog uses the Linux kernel
> API, we could just move it to staging, under drivers/staging/media/lirc/,
> remove all EXPORT_SYMBOL_* from it, and add it to the lirc_zilog
> Makefile.

So ir-lirc-codec.c (our rc-core lirc interface) uses lirc_dev.c (lirc
kernel api), so it would be very difficult to move to staging.

> That probably meets the goal of avoiding people to write new
> drivers based on it. Any other out of tree driver that might
> be still using it could do the same, while such driver is not
> converted to rc-core.

Actually I've made good progress on a new lirc_zilog driver, based on a
re-rolled ir database (firmware file) file for rc-core. With that in
place, the linux kernel api can be removed completely and that will
make the lirc code much cleaner.

I'm hoping to have this finished soon, well in time for v4.15.


Thanks,

Sean

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

* Re: [GIT PULL FOR v4.15] RC cleanup fixes
  2017-09-24 10:40       ` Sean Young
@ 2017-09-24 12:42         ` Sean Young
  0 siblings, 0 replies; 6+ messages in thread
From: Sean Young @ 2017-09-24 12:42 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

On Sun, Sep 24, 2017 at 11:40:20AM +0100, Sean Young wrote:
> On Sun, Sep 24, 2017 at 06:09:32AM -0300, Mauro Carvalho Chehab wrote:
> > Ah, I see. Well, if none of the in-kernel drivers use it, we can
> > drop it.
> 
> Looks like our emails crossed each other -- I have already pushed out
> another PR without it.

So I force pushed a new version with this commit dropped. That probably
wasn't the right thing to do.

Should you prefer the original request without min/max timeout dropped for
lirc kapi drivers, please note that the original pull request now has
branch name v4.15a-v1 (commit fe96866c81291a2887559fdfcc58ddf8fe54111d,
as the pull request says.

Sorry about that.


Sean

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

end of thread, other threads:[~2017-09-24 12:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-23 10:33 [GIT PULL FOR v4.15] RC cleanup fixes Sean Young
2017-09-23 19:35 ` Mauro Carvalho Chehab
2017-09-23 20:38   ` Sean Young
2017-09-24  9:09     ` Mauro Carvalho Chehab
2017-09-24 10:40       ` Sean Young
2017-09-24 12:42         ` Sean Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.