lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <741acf06-72b8-41e6-88ef-048273c3da26@baylibre.com>
Date: Thu, 1 May 2025 18:52:08 -0500
From: David Lechner <dlechner@...libre.com>
To: chelsy ratnawat <chelsyratnawat2001@...il.com>
Cc: jikos@...nel.org, jic23@...nel.org, srinivas.pandruvada@...ux.intel.com,
 bentiss@...nel.org, linux-input@...r.kernel.org, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: sensor-hub: Fix typo and improve documentation for
 sensor_hub_remove_callback()

On 5/1/25 6:33 PM, chelsy ratnawat wrote:
> Hi, 

Watch out for HTML mail! The mailing list and other automated tools will reject
it, so some people won't see the whole conversation.

> Thanks for the feedback. Regarding your comments:
> 
> On Thu, May 1, 2025 at 12:47 AM David Lechner <dlechner@...libre.com <mailto:dlechner@...libre.com>> wrote:
> 
>     On 4/30/25 1:23 PM, Chelsy Ratnawat wrote:
>     > Fixed a typo in "registered" and improved grammar for better readability
>     > and consistency with kernel-doc standards. No functional changes.
>     >
>     > Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@...il.com <mailto:chelsyratnawat2001@...il.com>>
>     > ---
>     >  include/linux/hid-sensor-hub.h | 7 ++++---
>     >  1 file changed, 4 insertions(+), 3 deletions(-)
>     >
>     > diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
>     > index c27329e2a5ad..5d2ac79429d4 100644
>     > --- a/include/linux/hid-sensor-hub.h
>     > +++ b/include/linux/hid-sensor-hub.h
>     > @@ -130,10 +130,11 @@ int sensor_hub_register_callback(struct hid_sensor_hub_device *hsdev,
>     >  /**
>     >  * sensor_hub_remove_callback() - Remove client callbacks
> 
>     This says "callbacks", so is it possible to have more than one registered at a
>     time?
> 
>    
>    Regarding the use of "callback" instead of "callbacks", what I understand is- 
>    - The function `sensor_hub_register_callback()` ensures that only one callback is registered for each `(hsdev, usage_id)` pair. If another callback is registered for the same `(hsdev, usage_id)`, it returns `-EINVAL`.
>    - Therefore, `sensor_hub_remove_callback()` is designed to remove that single registered callback for a given `(hsdev, usage_id)` pair. The function does not need to handle multiple callbacks for the same pair, as only one
>      callback is registered at a time. 
>     
>    Please let me know if my understanding is correct, or if you have any additional feedback or suggestions.

Based on the reply from Srinivas, it sounds like you understand correctly.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ