Skip to content

Staging: gpib: Update return types and error handling for request_system_control

Thomas Andreatta linux-staging lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Staging: gpib: agilent_82357a: changing return type void in intdrivers/staging/gpib/agilent_82357a/agilent_82357a.c+3 -42 replies
2/8Staging: gpib: Updated return type `request_system_control`drivers/staging/gpib/include/gpib_types.h+1 -10 replies
3/8Staging: gpib: Updated return type for `request_system_control`drivers/staging/gpib/agilent_82350b/agilent_82350b.c drivers/staging/gpib/cb7210/cb7210.c drivers/staging/gpib/cec/cec_gpib.c +5 more+16 -80 replies
4/8Staging: gpib: Updated return type `ines_request_system_control`drivers/staging/gpib/ines/ines.h+1 -10 replies
5/8Staging: gpib: Updated return type for `ines_request_system_control`drivers/staging/gpib/ines/ines_gpib.c+2 -10 replies
6/8Staging: gpib: Updated return type for `request_system_control`drivers/staging/gpib/ni_usb/ni_usb_gpib.c+4 -40 replies
7/8Staging: gpib: `request_system_control` error handling in resumedrivers/staging/gpib/agilent_82357a/agilent_82357a.c+7 -10 replies
8/8Staging: gpib: Optimize error handling in agilent_82357a_driver_resumedrivers/staging/gpib/agilent_82357a/agilent_82357a.c+6 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] Staging: gpib: Update return types and error handling for request_system_control

This patch series improves error propagation in the gpib driver by changing the return type of request_system_control and related functions from void to int, allowing proper error handling.

The changes follow these steps:
* Fix the FIXME comment in agilent_82357a.c by changing the return type from void to int
* Update the function prototype in gpib_types.h
* Update all implementations of the function across drivers to return int
* Implement proper error checking for the new signatures in the resume function
* Improves the mutex unlocking path process in the resume function

All functions that used to be void and didn't had any intended return code are now returning success (0), and the resume code is refactored to ensure mutex unlocking in all execution paths.

Thomas Andreatta (8):
Staging: gpib: agilent_82357a: changing return type void in int
Staging: gpib: Updated return type request_system_control
Staging: gpib: Updated return type for request_system_control
Staging: gpib: Updated return type ines_request_system_control
Staging: gpib: Updated return type for ines_request_system_control
Staging: gpib: Updated return type for request_system_control
Staging: gpib: request_system_control error handling in resume
Staging: gpib: Optimize error handling in agilent_82357a_driver_resume

 .../gpib/agilent_82350b/agilent_82350b.c      |  3 ++-
 .../gpib/agilent_82357a/agilent_82357a.c      | 27 ++++++++++---------
 drivers/staging/gpib/cb7210/cb7210.c          |  3 ++-
 drivers/staging/gpib/cec/cec_gpib.c           |  3 ++-
 drivers/staging/gpib/hp_82335/hp82335.c       |  3 ++-
 drivers/staging/gpib/hp_82341/hp_82341.c      |  3 ++-
 drivers/staging/gpib/include/gpib_types.h     |  2 +-
 drivers/staging/gpib/ines/ines.h              |  2 +-
 drivers/staging/gpib/ines/ines_gpib.c         |  3 ++-
 .../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c        |  3 ++-
 drivers/staging/gpib/ni_usb/ni_usb_gpib.c     |  8 +++---
 drivers/staging/gpib/pc2/pc2_gpib.c           |  3 ++-
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c   |  3 ++-
 13 files changed, 38 insertions(+), 28 deletions(-)
Signature · 2 lines
Best regards,
Thomas