mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: gpib: change return type of t1_delay function to report errors
@ 2025-02-12  2:35 Rodrigo Gobbi
  2025-02-12  2:35 ` [PATCH 1/2] " Rodrigo Gobbi
  2025-02-12  2:35 ` [PATCH 2/2] staging: gpib: fix style at nec7210_t1_delay definition Rodrigo Gobbi
  0 siblings, 2 replies; 5+ messages in thread
From: Rodrigo Gobbi @ 2025-02-12  2:35 UTC (permalink / raw)
  To: gregkh, dan.carpenter, dpenkler
  Cc: ~lkcamp/patches, linux-staging, linux-kernel

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


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

end of thread, other threads:[~2025-02-12  7:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-12  2:35 [PATCH 0/2] staging: gpib: change return type of t1_delay function to report errors Rodrigo Gobbi
2025-02-12  2:35 ` [PATCH 1/2] " Rodrigo Gobbi
2025-02-12  7:05   ` Dan Carpenter
2025-02-12  2:35 ` [PATCH 2/2] staging: gpib: fix style at nec7210_t1_delay definition Rodrigo Gobbi
2025-02-12  7:07   ` Dan Carpenter

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

all inboxes | Powered by JetHome®