public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Thomas Andreatta <thomasandreatta2000@gmail.com>
To: dpenkler@gmail.com
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev,
	Thomas Andreatta <thomas.andreatta2000@gmail.com>
Subject: [PATCH 0/8] Staging: gpib: Update return types and error handling for request_system_control
Date: Thu,  1 May 2025 23:30:29 +0200	[thread overview]
Message-ID: <cover.1746133676.git.thomas.andreatta2000@gmail.com> (raw)

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(-)

-- 

Best regards,
Thomas


             reply	other threads:[~2025-05-01 21:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01 21:30 Thomas Andreatta [this message]
2025-05-01 21:30 ` [PATCH 1/8] Staging: gpib: agilent_82357a: changing return type void in int Thomas Andreatta
2025-05-02  7:16   ` Dan Carpenter
2025-05-02  7:35     ` Thomas Andreatta
2025-05-01 21:30 ` [PATCH 2/8] Staging: gpib: Updated return type `request_system_control` Thomas Andreatta
2025-05-02  8:33   ` kernel test robot
2025-05-02  9:25   ` kernel test robot
2025-05-01 21:30 ` [PATCH 3/8] Staging: gpib: Updated return type for `request_system_control` Thomas Andreatta
2025-05-01 21:30 ` [PATCH 4/8] Staging: gpib: Updated return type `ines_request_system_control` Thomas Andreatta
2025-05-01 21:30 ` [PATCH 5/8] Staging: gpib: Updated return type for `ines_request_system_control` Thomas Andreatta
2025-05-01 21:30 ` [PATCH 6/8] Staging: gpib: Updated return type for `request_system_control` Thomas Andreatta
2025-05-01 21:30 ` [PATCH 7/8] Staging: gpib: `request_system_control` error handling in resume Thomas Andreatta
2025-05-01 21:30 ` [PATCH 8/8] Staging: gpib: Optimize error handling in agilent_82357a_driver_resume Thomas Andreatta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1746133676.git.thomas.andreatta2000@gmail.com \
    --to=thomasandreatta2000@gmail.com \
    --cc=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=thomas.andreatta2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox