From patchwork Tue Jan 19 20:07:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 366471 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E19FCC433DB for ; Tue, 19 Jan 2021 20:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D46A2310D for ; Tue, 19 Jan 2021 20:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728987AbhASUQD (ORCPT ); Tue, 19 Jan 2021 15:16:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404441AbhASUIW (ORCPT ); Tue, 19 Jan 2021 15:08:22 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3229C061575; Tue, 19 Jan 2021 12:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=fSP+Hbk1pR3y4XkNVhyMko7WwZjsk4H30rYU4STDj5o=; b=eUkk+F65lUgQOdRu/awSGb7eZk 2jIyZH91LQFeb/Rxa+wGcH2fujM7AD/XQVXBjrj0KGb4nepyHOma7tX9foASzzfeDm+FfkhiP+KmG MDMY5IZQOnQ08LIXQFbpxOhUXzNAwEbO5uK0V67tNhwRbu30lpxIeNjCE61HyF3BVwowNnj629Knc NnXI8iPRacj8iN4SkxBkJraeXP+R0/FGwddUqzjgukOSivKbvxq/T/b7qZwVYgCSFftRqSYWsupcK TsxsOWIH1iR7z4KECGR3CvK0LDf+cVIRT2f7ziEg7y4KbKMUjFmDx/A9gIfRBVPXszaGUdhdZ1zaA Dq9vYrCg==; Received: from [2601:1c0:6280:3f0::9abc] (helo=merlin.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1xHp-00073y-Bq; Tue, 19 Jan 2021 20:07:33 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Subject: [PATCH 1/2 v2] HID: correct kernel-doc notation in Date: Tue, 19 Jan 2021 12:07:22 -0800 Message-Id: <20210119200723.12092-2-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210119200723.12092-1-rdunlap@infradead.org> References: <20210119200723.12092-1-rdunlap@infradead.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Correct kernel-doc notation in HID header files (include/linux/hid*.h). Add notation (comments) where it is missing. Use the documented "Return:" notation for function return values. Fix a few typos/spellos. Signed-off-by: Randy Dunlap Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org --- v2: rebase & resend include/linux/hid-sensor-hub.h | 9 +++++---- include/linux/hid.h | 15 +++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) --- linux-next-20210119.orig/include/linux/hid.h +++ linux-next-20210119/include/linux/hid.h @@ -918,7 +918,7 @@ __u32 hid_field_extract(const struct hid /** * hid_device_io_start - enable HID input during probe, remove * - * @hid - the device + * @hid: the device * * This should only be called during probe or remove and only be * called by the thread calling probe or remove. It will allow @@ -936,7 +936,7 @@ static inline void hid_device_io_start(s /** * hid_device_io_stop - disable HID input during probe, remove * - * @hid - the device + * @hid: the device * * Should only be called after hid_device_io_start. It will prevent * incoming packets from going to the driver for the duration of @@ -1010,6 +1010,13 @@ static inline void hid_map_usage(struct /** * hid_map_usage_clear - map usage input bits and clear the input bit * + * @hidinput: hidinput which we are interested in + * @usage: usage to fill in + * @bit: pointer to input->{}bit (out parameter) + * @max: maximal valid usage->code to consider later (out parameter) + * @type: input event type (EV_KEY, EV_REL, ...) + * @c: code which corresponds to this usage and type + * * The same as hid_map_usage, except the @c bit is also cleared in supported * bits (@bit). */ @@ -1084,7 +1091,7 @@ static inline void hid_hw_request(struct * @rtype: HID report type * @reqtype: HID_REQ_GET_REPORT or HID_REQ_SET_REPORT * - * @return: count of data transfered, negative if error + * Return: count of data transferred, negative if error * * Same behavior as hid_hw_request, but with raw buffers instead. */ @@ -1106,7 +1113,7 @@ static inline int hid_hw_raw_request(str * @buf: raw data to transfer * @len: length of buf * - * @return: count of data transfered, negative if error + * Return: count of data transferred, negative if error */ static inline int hid_hw_output_report(struct hid_device *hdev, __u8 *buf, size_t len) --- linux-next-20210119.orig/include/linux/hid-sensor-hub.h +++ linux-next-20210119/include/linux/hid-sensor-hub.h @@ -150,7 +150,7 @@ int sensor_hub_remove_callback(struct hi * @info: return information about attribute after parsing report * * Parses report and returns the attribute information such as report id, -* field index, units and exponet etc. +* field index, units and exponent etc. */ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev, u8 type, @@ -167,7 +167,7 @@ int sensor_hub_input_get_attribute_info( * @is_signed: If true then fields < 32 bits will be sign-extended * * Issues a synchronous or asynchronous read request for an input attribute. -* Returns data upto 32 bits. +* Return: data up to 32 bits. */ enum sensor_hub_read_flags { @@ -205,8 +205,9 @@ int sensor_hub_set_feature(struct hid_se * @buffer: buffer to copy output * * Used to get a field in feature report. For example this can get polling -* interval, sensitivity, activate/deactivate state. On success it returns -* number of bytes copied to buffer. On failure, it returns value < 0. +* interval, sensitivity, activate/deactivate state. +* Return: On success, it returns the number of bytes copied to buffer. +* On failure, it returns value < 0. */ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, u32 field_index, int buffer_size, void *buffer); From patchwork Tue Jan 19 20:07:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 367403 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01DE4C433DB for ; Tue, 19 Jan 2021 20:16:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9193C23107 for ; Tue, 19 Jan 2021 20:16:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730197AbhASUPz (ORCPT ); Tue, 19 Jan 2021 15:15:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404498AbhASUIW (ORCPT ); Tue, 19 Jan 2021 15:08:22 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08AE9C061757; Tue, 19 Jan 2021 12:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=qH9+bSG9rldlwp1A7DpxVLC8Lk4DArwmSI8u9Y2/wRo=; b=zZEqB+N+PwjS44QIyd9rjx4bof oAewXwE/xA/GnLniegGNLlzGe9JqKM4bPY4RoIa9JsFxzoGBo2J1vPNdkUxnggDM8ItznVoEGkXEP rGlsCdky9z9HeGESISYAT2kBtVqaqwkxHHPxzHBUJUjhXqT4kiqpa4fIzLFJdNvTRBRkuCXdDS8T+ Ut//TIrieZ0Y9gYovWwGZ5mLpnk7G/J5rA66q5lGdgdWBeoPrXHP1F9I7oelCOYoGGXp5XcGJWtcy 57NMLS3MLBq6o7QATx1vdgjgZUn5kDiMxDScSqFaBq67WEzSoOwD4COaxg63JxAlVN2vk7UH0KAPa yzSgWBbQ==; Received: from [2601:1c0:6280:3f0::9abc] (helo=merlin.infradead.org) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1xHr-00073y-Ld; Tue, 19 Jan 2021 20:07:36 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Subject: [PATCH 2/2 v2] HID: correct kernel-doc notation in hid-quirks.c Date: Tue, 19 Jan 2021 12:07:23 -0800 Message-Id: <20210119200723.12092-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210119200723.12092-1-rdunlap@infradead.org> References: <20210119200723.12092-1-rdunlap@infradead.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use correct kernel-doc notation for functions. Add notation (comments) where it is missing. Use the documented "Return:" notation for function return values. Signed-off-by: Randy Dunlap Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org --- v2: rebase & resend drivers/hid/hid-quirks.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) --- linux-next-20210119.orig/drivers/hid/hid-quirks.c +++ linux-next-20210119/drivers/hid/hid-quirks.c @@ -1028,7 +1028,7 @@ static DEFINE_MUTEX(dquirks_lock); /* Runtime ("dynamic") quirks manipulation functions */ /** - * hid_exists_dquirk: find any dynamic quirks for a HID device + * hid_exists_dquirk - find any dynamic quirks for a HID device * @hdev: the HID device to match * * Description: @@ -1036,7 +1036,7 @@ static DEFINE_MUTEX(dquirks_lock); * the pointer to the relevant struct hid_device_id if found. * Must be called with a read lock held on dquirks_lock. * - * Returns: NULL if no quirk found, struct hid_device_id * if found. + * Return: NULL if no quirk found, struct hid_device_id * if found. */ static struct hid_device_id *hid_exists_dquirk(const struct hid_device *hdev) { @@ -1060,7 +1060,7 @@ static struct hid_device_id *hid_exists_ /** - * hid_modify_dquirk: add/replace a HID quirk + * hid_modify_dquirk - add/replace a HID quirk * @id: the HID device to match * @quirks: the unsigned long quirks value to add/replace * @@ -1069,7 +1069,7 @@ static struct hid_device_id *hid_exists_ * quirks value with what was provided. Otherwise, add the quirk * to the dynamic quirks list. * - * Returns: 0 OK, -error on failure. + * Return: 0 OK, -error on failure. */ static int hid_modify_dquirk(const struct hid_device_id *id, const unsigned long quirks) @@ -1121,7 +1121,7 @@ static int hid_modify_dquirk(const struc } /** - * hid_remove_all_dquirks: remove all runtime HID quirks from memory + * hid_remove_all_dquirks - remove all runtime HID quirks from memory * @bus: bus to match against. Use HID_BUS_ANY if all need to be removed. * * Description: @@ -1145,7 +1145,10 @@ static void hid_remove_all_dquirks(__u16 } /** - * hid_quirks_init: apply HID quirks specified at module load time + * hid_quirks_init - apply HID quirks specified at module load time + * @quirks_param: array of quirks strings (vendor:product:quirks) + * @bus: bus type + * @count: number of quirks to check */ int hid_quirks_init(char **quirks_param, __u16 bus, int count) { @@ -1176,7 +1179,7 @@ int hid_quirks_init(char **quirks_param, EXPORT_SYMBOL_GPL(hid_quirks_init); /** - * hid_quirks_exit: release memory associated with dynamic_quirks + * hid_quirks_exit - release memory associated with dynamic_quirks * @bus: a bus to match against * * Description: @@ -1193,14 +1196,14 @@ void hid_quirks_exit(__u16 bus) EXPORT_SYMBOL_GPL(hid_quirks_exit); /** - * hid_gets_squirk: return any static quirks for a HID device + * hid_gets_squirk - return any static quirks for a HID device * @hdev: the HID device to match * * Description: * Given a HID device, return a pointer to the quirked hid_device_id entry * associated with that device. * - * Returns: the quirks. + * Return: the quirks. */ static unsigned long hid_gets_squirk(const struct hid_device *hdev) { @@ -1224,13 +1227,13 @@ static unsigned long hid_gets_squirk(con } /** - * hid_lookup_quirk: return any quirks associated with a HID device + * hid_lookup_quirk - return any quirks associated with a HID device * @hdev: the HID device to look for * * Description: * Given a HID device, return any quirks associated with that device. * - * Returns: an unsigned long quirks value. + * Return: an unsigned long quirks value. */ unsigned long hid_lookup_quirk(const struct hid_device *hdev) {