[PATCH 0/2] staging: gpib: change return type of t1_delay function to report errors

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

 



Propagate t1 delay configuration error to userspace
---
Noticed that at [1] there is a FIXME tag to propagate ni_usb_write_registers() 
errors but the t1_delay pointer definition is defined as unsigned int. Checking at
userspace libs, it is possible to notice that the error could be returned/treated in the
following sequence [1], [2] and [3] (I'm simplyfing the codepath here).

The patch is big due the pointer signature change affecting all gpib drivers.
I'm suggesting to return a int value.
I've tested the compilation of every driver after that change.
Tks and regards.

[1] https://github.com/torvalds/linux/blob/master/drivers/staging/gpib/ni_usb/ni_usb_gpib.c#L1608
[2] https://sourceforge.net/p/linux-gpib/git/ci/master/tree/linux-gpib-user/lib/ibconfig.c#l70
[3] https://sourceforge.net/p/linux-gpib/git/ci/master/tree/linux-gpib-user/lib/ibutil.c#l469
[4] https://sourceforge.net/p/linux-gpib/git/ci/master/tree/linux-gpib-user/lib/ibutil.c#l433
---
Rodrigo Gobbi (2):
  staging: gpib: change return type of t1_delay function to report errors
  staging: gpib: fix style at nec7210_t1_delay definition

 drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 2 +-
 drivers/staging/gpib/agilent_82357a/agilent_82357a.c | 2 +-
 drivers/staging/gpib/cb7210/cb7210.c                 | 2 +-
 drivers/staging/gpib/cec/cec_gpib.c                  | 2 +-
 drivers/staging/gpib/common/gpib_os.c                | 5 ++++-
 drivers/staging/gpib/eastwood/fluke_gpib.c           | 2 +-
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c             | 2 +-
 drivers/staging/gpib/gpio/gpib_bitbang.c             | 2 +-
 drivers/staging/gpib/hp_82335/hp82335.c              | 2 +-
 drivers/staging/gpib/hp_82341/hp_82341.c             | 2 +-
 drivers/staging/gpib/include/gpib_types.h            | 2 +-
 drivers/staging/gpib/include/nec7210.h               | 4 ++--
 drivers/staging/gpib/ines/ines.h                     | 2 +-
 drivers/staging/gpib/ines/ines_gpib.c                | 2 +-
 drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c   | 3 +--
 drivers/staging/gpib/nec7210/nec7210.c               | 2 +-
 drivers/staging/gpib/ni_usb/ni_usb_gpib.c            | 4 ++--
 drivers/staging/gpib/pc2/pc2_gpib.c                  | 2 +-
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c          | 2 +-
 19 files changed, 24 insertions(+), 22 deletions(-)

-- 
2.47.0





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux